root = Card([header, metricsRow, nextPatient, appointmentsSection, roomsSection, checkInForm])
header = CardHeader("Clinic Day View", "Monday, January 15, 2025")
metricsRow = Card([expectedPatients, noShowRate], "clear", "row", "m")
expectedPatients = Callout("info", "Patients Expected", "12 scheduled today")
noShowRate = Callout("warning", "No-Show Rate This Month", "8.3% (3 of 36)")
nextPatient = Callout("success", "Next Patient Called", "Sarah Johnson — 10:15 AM — Room 2")
appointmentsSection = Card([appointmentsHeading, appointmentsTable], "sunk")
appointmentsHeading = Heading("Today's Appointments", "h3")
appointmentsTable = Table([timeCol, patientCol, roomCol, statusCol])
timeCol = Col("Time", ["09:00", "09:30", "10:00", "10:15", "10:45", "11:00", "11:30", "13:00", "13:30", "14:00", "14:30", "15:00"])
patientCol = Col("Patient", ["Michael Chen", "Emily Davis", "Robert Wilson", "Sarah Johnson", "Lisa Anderson", "James Taylor", "Maria Garcia", "David Lee", "Jennifer White", "Christopher Brown", "Amanda Martinez", "Daniel Thompson"])
roomCol = Col("Room", ["1", "2", "3", "2", "1", "3", "2", "1", "3", "2", "1", "3"])
statusCol = Col("Status", ["Checked In", "Checked In", "Waiting", "Called", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled"])
roomsSection = Card([roomsHeading, roomsList], "sunk")
roomsHeading = Heading("Room Availability", "h3")
roomsList = ListBlock([room1, room2, room3], "image")
room1 = ListItem("Room 1", "Occupied — Michael Chen (09:00)", null, "View")
room2 = ListItem("Room 2", "Next: Sarah Johnson (10:15)", null, "View")
room3 = ListItem("Room 3", "Free — Available now", null, "Assign")
checkInForm = Card([checkInHeading, checkInFormInner], "sunk")
checkInHeading = Heading("Patient Check-In", "h3")
checkInFormInner = Form("check-in", checkInButtons, [patientSelectField, confirmField])
patientSelectField = FormControl("Select Patient", patientSelect, "Choose from today's scheduled patients")
patientSelect = Select("patient", [optChen, optDavis, optWilson, optJohnson, optAnderson, optTaylor, optGarcia, optLee, optWhite, optBrown, optMartinez, optThompson], "Select patient...")
optChen = SelectItem("michael-chen", "Michael Chen — 09:00 — Room 1")
optDavis = SelectItem("emily-davis", "Emily Davis — 09:30 — Room 2")
optWilson = SelectItem("robert-wilson", "Robert Wilson — 10:00 — Room 3")
optJohnson = SelectItem("sarah-johnson", "Sarah Johnson — 10:15 — Room 2")
optAnderson = SelectItem("lisa-anderson", "Lisa Anderson — 10:45 — Room 1")
optTaylor = SelectItem("james-taylor", "James Taylor — 11:00 — Room 3")
optGarcia = SelectItem("maria-garcia", "Maria Garcia — 11:30 — Room 2")
optLee = SelectItem("david-lee", "David Lee — 13:00 — Room 1")
optWhite = SelectItem("jennifer-white", "Jennifer White — 13:30 — Room 3")
optBrown = SelectItem("christopher-brown", "Christopher Brown — 14:00 — Room 2")
optMartinez = SelectItem("amanda-martinez", "Amanda Martinez — 14:30 — Room 1")
optThompson = SelectItem("daniel-thompson", "Daniel Thompson — 15:00 — Room 3")
confirmField = FormControl("Confirm Check-In", confirmCheckbox, "Patient has arrived and is ready")
confirmCheckbox = CheckBoxGroup("confirm", [confirmItem])
confirmItem = CheckBoxItem("I confirm this patient has arrived", "Arrival confirmed", "arrived", false)
checkInButtons = Buttons([checkInBtn, prevDayBtn, nextDayBtn], "row")
checkInBtn = Button("Check In Patient", null, "primary")
prevDayBtn = Button("Previous Day", null, "secondary")
nextDayBtn = Button("Next Day", null, "secondary")