You are an oncology clinic schedule optimizer. Assign start_time and end_time to each treatment row. Output ONLY CSV between markers — no reasoning.

## ABSOLUTE RULE — READ THIS FIRST
It is BETTER to leave 30-50% of profiles UNASSIGNED than to exceed chair capacity or RN limits in even ONE time slot. An output with 50 unassigned profiles and zero violations is CORRECT. An output with 0 unassigned but 1 capacity violation is WRONG and UNACCEPTABLE.

## RULES
- T = Schedule Time Block (from CLINIC TIMING below). end_time = start_time + (service_duration × T minutes)
- All times align to T-minute boundaries in HH:MM:SS format
- Each profile has exactly ONE service (treatment). No contiguity rules needed.
- If a profile cannot fit without violating capacity: set start_time="00:00:00" end_time="00:00:00"
- Return rows in same order as input. Only modify start_time and end_time.

## HARD CONSTRAINTS (violating ANY of these makes the entire output INVALID)
- Treatment Chairs: NEVER more than chair_capacity patients in any slot. If you cannot place a profile without exceeding this, mark it UNASSIGNED.
- RN Staffing: RN demand per slot = starts + ends + (mid_patients × nurse_factor). NEVER exceed available RN count.
- MAX STARTS PER SLOT: Each slot has its own limit. NEVER exceed it.
- DO NOT START / DO NOT BOOK: No treatment can begin during these windows.
- All treatments within clinic hours.

## ALGORITHM
1. Sort profiles by service_duration DESCENDING, then profile_id ASC for ties.
2. For each profile, find the EARLIEST valid slot where ALL constraints are satisfied.
3. If a valid slot exists: assign and update counters.
4. If NO valid slot exists: mark UNASSIGNED. Do NOT force it into a full slot.

## GOALS
1. ZERO constraint violations (this overrides everything else)
2. Maximize assigned profiles WITHIN the capacity limits
3. Spread across the full day (50/50 AM/PM)
4. Minimize peak concurrent chairs

## TIME CALCULATION
- end_minutes = (HH×60 + MM) + (service_duration × T)
- HH = end_minutes ÷ 60, MM = end_minutes mod 60. Minutes NEVER exceed 59.

## PRE-OUTPUT VALIDATION
Before outputting, count patients in chair per slot. If ANY slot exceeds capacity, move the last-placed profiles in that slot to UNASSIGNED until the slot is within limits.

## OUTPUT FORMAT
Output ONLY CSV between ---CSV_START--- and ---CSV_END--- markers.
No header row. No reasoning. No commentary.
Columns: schedule_date,clinic_id,clinic_name,profile_id,service_id,start_time,service_duration,end_time,service_sequence_id,service_name

EXAMPLES (T=15):
- start=07:00, dur=8:  420+120=540 → 09:00:00
- start=07:30, dur=14: 450+210=660 → 11:00:00
- start=08:30, dur=6:  510+90=600  → 10:00:00
- start=10:00, dur=14: 600+210=810 → 13:30:00

## PRE-OUTPUT VALIDATION
✓ No slot exceeds chair capacity (if it does, move violating profiles to UNASSIGNED)
✓ No slot exceeds max starts limit
✓ RN demand ≤ available RNs at all slots
✓ No treatment starts during Do Not Start / Do Not Book window
✓ All treatments within clinic hours
✓ Every end_time = start_time + (service_duration × T)
✓ No invalid times (minutes >= 60)
✓ Output has exactly same rows as input
✓ Starts spread across the day (50/50 AM/PM)

If any violation found, mark the violating profile as UNASSIGNED rather than outputting an invalid schedule.

## OUTPUT FORMAT
Output ONLY CSV between ---CSV_START--- and ---CSV_END--- markers.
No header row. No reasoning. No commentary.
Columns: schedule_date,clinic_id,clinic_name,profile_id,service_id,start_time,service_duration,end_time,service_sequence_id,service_name


## SCHEDULING ALGORITHM
Use the **First Fit Decreasing** strategy:
Sort all profiles by total duration DESCENDING (longest first). For each profile in sorted order, assign it to the EARLIEST available time slot that satisfies ALL constraints (chairs, staff, max starts, clinic hours). Once placed, lock it and move to the next profile. Never revisit a placed profile. This is the recommended construction heuristic from Timefold's scheduling algorithms — it prevents long profiles from being blocked later and naturally spreads load across the day.

## CLINIC CONFIGURATION (dynamically loaded from CSV)
### CLINIC TIMING (for Monday)
- Clinic Hours: 7:00:00 - 17:00:00
- Treatment Room (TTCNP): start >= 7:00:00, end <= 17:00:00
- Lab Hours: start >= 7:00:00, end <= 17:00:00
- Nurse Factor (ongoing mid-treatment): 16% per patient → 1 RN covers up to 6.2 concurrent mid-treatment patients
- Schedule Time Block: 15 minutes per slot (all time calculations use this interval)
- *** IMPORTANT: T = 15. Use 15 minutes for ALL duration calculations, not 15. duration_minutes = service_duration × 15 ***

### RESOURCES (Physical Chairs)
- Treatment Chairs: 24 (max 24 patients using this resource simultaneously)
- Lab Chairs: 2 (max 2 patients using this resource simultaneously)
- Injection Chairs: 1 (max 1 patients using this resource simultaneously)

### STAFF AVAILABILITY (for Monday, Available only)
- RN (Registered Nurse): 07:30:00-16:45:00, 12 available per slot
- Lab Tech: 07:30:00-16:15:00, 1 available per slot
- LPN (Injection Nurse): 07:30:00-17:00:00, 1 available per slot
- MD (Provider): 08:00:00-16:15:00, 2 available per slot
- MA: 07:15:00-16:45:00, 1 available per slot

### DO NOT START RULES (for Monday)
  No Do Not Start rules configured.

### DO NOT BOOK RULES (for Monday)
  No Do Not Book rules configured.

### MAX TREATMENT STARTS PER SLOT (for Monday)
The maximum number of treatments that can START in each 15-minute slot is defined per slot below.
This is a HARD constraint — even if chairs and RNs are available, do not exceed these limits.
  - 07:00:00: max 2 treatment start(s)
  - 07:15:00: max 0 treatment start(s)
  - 07:30:00: max 1 treatment start(s)
  - 07:45:00: max 2 treatment start(s)
  - 08:00:00: max 2 treatment start(s)
  - 08:15:00: max 2 treatment start(s)
  - 08:30:00: max 3 treatment start(s)
  - 08:45:00: max 3 treatment start(s)
  - 09:00:00: max 3 treatment start(s)
  - 09:15:00: max 3 treatment start(s)
  - 09:30:00: max 3 treatment start(s)
  - 09:45:00: max 3 treatment start(s)
  - 10:00:00: max 3 treatment start(s)
  - 10:15:00: max 3 treatment start(s)
  - 10:30:00: max 3 treatment start(s)
  - 10:45:00: max 3 treatment start(s)
  - 11:00:00: max 3 treatment start(s)
  - 11:15:00: max 3 treatment start(s)
  - 11:30:00: max 3 treatment start(s)
  - 11:45:00: max 3 treatment start(s)
  - 12:00:00: max 3 treatment start(s)
  - 12:15:00: max 3 treatment start(s)
  - 12:30:00: max 3 treatment start(s)
  - 12:45:00: max 3 treatment start(s)
  - 13:00:00: max 3 treatment start(s)
  - 13:15:00: max 3 treatment start(s)
  - 13:30:00: max 3 treatment start(s)
  - 13:45:00: max 3 treatment start(s)
  - 14:00:00: max 3 treatment start(s)
  - 14:15:00: max 3 treatment start(s)
  - 14:30:00: max 3 treatment start(s)
  - 14:45:00: max 3 treatment start(s)
  - 15:00:00: max 3 treatment start(s)
  - 15:15:00: max 3 treatment start(s)
  - 15:30:00: max 3 treatment start(s)
  - 15:45:00: max 3 treatment start(s)
  - 16:00:00: max 3 treatment start(s)
  - 16:15:00: max 3 treatment start(s)
  - 16:30:00: max 0 treatment start(s)
  - 16:45:00: max 0 treatment start(s)
  - 17:00:00: max 0 treatment start(s)
  - 17:15:00: max 0 treatment start(s)
  - 17:30:00: max 0 treatment start(s)


## PROFILE LIST TO OPTIMIZE (CSV):
schedule_date,location_id,clinic_name,profile_id,service_id,start_time,service_duration,end_time,service_sequence_id,service_name
5/25/2026,20001,PostFalls,2001001,3,7:00:00,2,7:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001002,3,7:00:00,2,7:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001003,3,7:00:00,2,7:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001004,3,7:00:00,2,7:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001005,3,7:00:00,2,7:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001006,3,7:00:00,2,7:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001007,3,7:00:00,3,7:45:00,4,Treatment
5/25/2026,20001,PostFalls,2001008,3,7:00:00,3,7:45:00,4,Treatment
5/25/2026,20001,PostFalls,2001009,3,7:00:00,3,7:45:00,4,Treatment
5/25/2026,20001,PostFalls,2001010,3,7:00:00,3,7:45:00,4,Treatment
5/25/2026,20001,PostFalls,2001011,3,7:00:00,4,8:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001012,3,7:00:00,4,8:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001013,3,7:00:00,4,8:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001014,3,7:00:00,4,8:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001015,3,7:00:00,4,8:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001016,3,7:00:00,4,8:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001017,3,7:00:00,4,8:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001018,3,7:00:00,4,8:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001019,3,7:00:00,4,8:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001020,3,7:00:00,4,8:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001021,3,7:00:00,4,8:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001022,3,7:00:00,4,8:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001023,3,7:00:00,4,8:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001024,3,7:00:00,4,8:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001025,3,7:00:00,4,8:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001026,3,7:00:00,5,8:15:00,4,Treatment
5/25/2026,20001,PostFalls,2001027,3,7:00:00,5,8:15:00,4,Treatment
5/25/2026,20001,PostFalls,2001028,3,7:00:00,5,8:15:00,4,Treatment
5/25/2026,20001,PostFalls,2001029,3,7:00:00,5,8:15:00,4,Treatment
5/25/2026,20001,PostFalls,2001030,3,7:00:00,6,8:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001031,3,7:00:00,6,8:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001032,3,7:00:00,6,8:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001033,3,7:00:00,6,8:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001034,3,7:00:00,6,8:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001035,3,7:00:00,6,8:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001036,3,7:00:00,6,8:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001037,3,7:00:00,6,8:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001038,3,7:00:00,6,8:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001039,3,7:00:00,6,8:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001040,3,7:00:00,6,8:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001041,3,7:00:00,6,8:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001042,3,7:00:00,6,8:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001043,3,7:00:00,6,8:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001044,3,7:00:00,6,8:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001045,3,7:00:00,7,8:45:00,4,Treatment
5/25/2026,20001,PostFalls,2001046,3,7:00:00,7,8:45:00,4,Treatment
5/25/2026,20001,PostFalls,2001047,3,7:00:00,8,9:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001048,3,7:00:00,8,9:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001049,3,7:00:00,8,9:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001050,3,7:00:00,8,9:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001051,3,7:00:00,8,9:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001052,3,7:00:00,8,9:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001053,3,7:00:00,8,9:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001054,3,7:00:00,8,9:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001055,3,7:00:00,8,9:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001056,3,7:00:00,8,9:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001057,3,7:00:00,8,9:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001058,3,7:00:00,8,9:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001059,3,7:00:00,8,9:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001060,3,7:00:00,10,9:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001061,3,7:00:00,10,9:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001062,3,7:00:00,10,9:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001063,3,7:00:00,10,9:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001064,3,7:00:00,10,9:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001065,3,7:00:00,10,9:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001066,3,7:00:00,10,9:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001067,3,7:00:00,12,10:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001068,3,7:00:00,12,10:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001069,3,7:00:00,12,10:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001070,3,7:00:00,12,10:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001071,3,7:00:00,14,10:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001072,3,7:00:00,14,10:30:00,4,Treatment
5/25/2026,20001,PostFalls,2001073,3,7:00:00,16,11:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001074,3,7:00:00,20,12:00:00,4,Treatment
5/25/2026,20001,PostFalls,2001075,3,7:00:00,24,13:00:00,4,Treatment

## OUTPUT
Complete the scheduling algorithm defined in the instructions above, then run the pre-output validation checklist. Only after all checks pass, output the CSV.

Output ONLY the CSV between the markers below. Do NOT include any reasoning, working, justification, or commentary — only the CSV block.

---CSV_START---
(CSV rows here, one per line, no header row)
---CSV_END---

Columns: schedule_date,clinic_id,clinic_name,profile_id,service_id,start_time,service_duration,end_time,service_sequence_id,service_name

Rules:
- Keep schedule_date, clinic_id, clinic_name, profile_id, service_id, service_duration, service_sequence_id, service_name UNCHANGED from input
- Assign NEW start_time and end_time values (HH:MM:SS format)
- end_time = start_time + (service_duration × Schedule_Time_Block_minutes)  [Schedule_Time_Block_minutes is defined in CLINIC TIMING]
- For UNASSIGNED profiles: set start_time="00:00:00" and end_time="00:00:00" for ALL services in that profile
- Output ALL rows (assigned + unassigned) in the exact same order as the input
- Do NOT add quotes around values
- Do NOT include a header row inside the markers
- Do NOT include any text outside the ---CSV_START--- and ---CSV_END--- markers