root = Card([header, statsRow, nextPatient, appointmentsSection, roomsSection, checkinSection])
header = CardHeader("Clinic Day View", "Monday, January 15, 2025")
statsRow = Card([expectedPatients, noShowRate], "clear", "row", "m")
expectedPatients = Callout("info", "Patients Expected Today", "24 scheduled appointments")
noShowRate = Callout("warning", "No-Show Rate This Month", "12.3% (18 of 146 appointments)")
nextPatient = Callout("success", "Next Patient Called", "Sarah Johnson — Room 3 — 10:15 AM")
appointmentsSection = Card([apptHeading, apptTable], "sunk")
apptHeading = Heading("Today's Appointments", "h3")
apptTable = Table([timeCol, patientCol, roomCol, statusCol])
timeCol = Col("Time", ["8:00 AM", "8:30 AM", "9:00 AM", "9:30 AM", "10:00 AM", "10:15 AM", "10:45 AM", "11:00 AM", "11:30 AM", "1:00 PM", "1:30 PM", "2:00 PM", "2:30 PM", "3:00 PM", "3:30 PM", "4:00 PM"])
patientCol = Col("Patient", ["Michael Chen", "Emma Rodriguez", "James Wilson", "Olivia Brown", "David Kim", "Sarah Johnson", "Lisa Anderson", "Robert Taylor", "Jennifer Lee", "Christopher Moore", "Amanda White", "Daniel Harris", "Michelle Clark", "Andrew Lewis", "Stephanie Walker", "Ryan Hall"])
roomCol = Col("Room", ["1", "2", "3", "1", "2", "3", "1", "2", "3", "1", "2", "3", "1", "2", "3", "1"])
statusCol = Col("Status", ["Checked In", "Checked In", "In Progress", "Checked In", "Waiting", "Called", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled"])
roomsSection = Card([roomsHeading, roomsList], "sunk")
roomsHeading = Heading("Room Availability", "h3")
roomsList = ListBlock([room1, room2, room3, room4], "number")
room1 = ListItem("Room 1", "Occupied — Michael Chen (8:00 AM)", null, null)
room2 = ListItem("Room 2", "Occupied — Emma Rodriguez (8:30 AM)", null, null)
room3 = ListItem("Room 3", "Next: Sarah Johnson (10:15 AM)", null, null)
room4 = ListItem("Room 4", "Free — Available now", null, null)
checkinSection = Card([checkinHeading, checkinForm], "sunk")
checkinHeading = Heading("Patient Check-In", "h3")
checkinForm = Form("checkin-form", checkinButtons, [patientSelectField, confirmField])
patientSelectField = FormControl("Select Patient", patientSelect, "Choose from today's scheduled patients")
patientSelect = Select("patient", [optChen, optRodriguez, optWilson, optBrown, optKim, optJohnson, optAnderson, optTaylor, optLee, optMoore, optWhite, optHarris, optClark, optLewis, optWalker, optHall], "Search or select...")
optChen = SelectItem("michael-chen", "Michael Chen — 8:00 AM — Room 1")
optRodriguez = SelectItem("emma-rodriguez", "Emma Rodriguez — 8:30 AM — Room 2")
optWilson = SelectItem("james-wilson", "James Wilson — 9:00 AM — Room 3")
optBrown = SelectItem("olivia-brown", "Olivia Brown — 9:30 AM — Room 1")
optKim = SelectItem("david-kim", "David Kim — 10:00 AM — Room 2")
optJohnson = SelectItem("sarah-johnson", "Sarah Johnson — 10:15 AM — Room 3")
optAnderson = SelectItem("lisa-anderson", "Lisa Anderson — 10:45 AM — Room 1")
optTaylor = SelectItem("robert-taylor", "Robert Taylor — 11:00 AM — Room 2")
optLee = SelectItem("jennifer-lee", "Jennifer Lee — 11:30 AM — Room 3")
optMoore = SelectItem("christopher-moore", "Christopher Moore — 1:00 PM — Room 1")
optWhite = SelectItem("amanda-white", "Amanda White — 1:30 PM — Room 2")
optHarris = SelectItem("daniel-harris", "Daniel Harris — 2:00 PM — Room 3")
optClark = SelectItem("michelle-clark", "Michelle Clark — 2:30 PM — Room 1")
optLewis = SelectItem("andrew-lewis", "Andrew Lewis — 3:00 PM — Room 2")
optWalker = SelectItem("stephanie-walker", "Stephanie Walker — 3:30 PM — Room 3")
optHall = SelectItem("ryan-hall", "Ryan Hall — 4:00 PM — Room 1")
confirmField = FormControl("Confirm Check-In", confirmCheckbox, "Patient has arrived and is ready to be seen")
confirmCheckbox = CheckBoxGroup("confirm", [confirmItem])
confirmItem = CheckBoxItem("I confirm this patient has arrived", "Patient is present in the waiting area", "arrived", false)
checkinButtons = Buttons([checkinBtn, cancelBtn])
checkinBtn = Button("Check In Patient", null, "primary")
cancelBtn = Button("Cancel", null, "tertiary")