root = Card([header, statsRow, nextPatient, appointmentsSection, roomStatus, checkInForm, dayNav], "card", "column", "l")
header = CardHeader("Clinic Day View", "Monday, January 15, 2024")
statsRow = Card([expectedPatients, noShowRate], "clear", "row", "l", "stretch", "between")
expectedPatients = Callout("info", "Patients Expected Today", "12 appointments scheduled")
noShowRate = Callout("warning", "No-Show Rate This Month", "8.3% (3 of 36)")
nextPatient = Alert("Next Patient Called", "Sarah Johnson — Room 2 — 10:30 AM", "info")
appointmentsSection = Card([apptHeading, appointmentsTable], "sunk", "column", "m")
apptHeading = Heading("Today's Appointments", "h3")
appointmentsTable = Table([timeCol, patientCol, statusCol, roomCol])
timeCol = Col("Time", ["09:00", "09:30", "10:00", "10:30", "11:00", "11:30", "14:00", "14:30", "15:00", "15:30", "16:00", "16:30"])
patientCol = Col("Patient", ["Michael Chen", "Emily Davis", "Robert Wilson", "Sarah Johnson", "Lisa Anderson", "James Taylor", "Amanda White", "Christopher Lee", "Jessica Martin", "Daniel Garcia", "Ashley Rodriguez", "Matthew Martinez"])
statusCol = Col("Status", ["Checked In", "Checked In", "Waiting", "Called", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled"])
roomCol = Col("Room", ["1", "2", "3", "2", "1", "3", "2", "1", "3", "2", "1", "3"])
roomStatus = Card([roomHeading, roomList], "sunk", "column", "m")
roomHeading = Heading("Room Availability", "h3")
roomList = ListBlock([room1, room2, room3], "image")
room1 = ListItem("Room 1", "Occupied — Michael Chen (09:00)", null, "Free at 09:30")
room2 = ListItem("Room 2", "Occupied — Emily Davis (09:30)", null, "Next: Sarah Johnson (10:30)")
room3 = ListItem("Room 3", "Free", null, "Available now")
checkInForm = Form("checkin", checkInButtons, [patientSelectField])
patientSelectField = FormControl("Select Patient", patientSelect, "Choose from today's scheduled patients")
patientSelect = Select("patient", patientOptions, "Select a patient...")
patientOptions = [optChen, optDavis, optWilson, optJohnson, optAnderson, optTaylor, optWhite, optLee, optMartin, optGarcia, optRodriguez, optMartinez]
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:30 — Room 2")
optAnderson = SelectItem("lisa-anderson", "Lisa Anderson — 11:00 — Room 1")
optTaylor = SelectItem("james-taylor", "James Taylor — 11:30 — Room 3")
optWhite = SelectItem("amanda-white", "Amanda White — 14:00 — Room 2")
optLee = SelectItem("christopher-lee", "Christopher Lee — 14:30 — Room 1")
optMartin = SelectItem("jessica-martin", "Jessica Martin — 15:00 — Room 3")
optGarcia = SelectItem("daniel-garcia", "Daniel Garcia — 15:30 — Room 2")
optRodriguez = SelectItem("ashley-rodriguez", "Ashley Rodriguez — 16:00 — Room 1")
optMartinez = SelectItem("matthew-martinez", "Matthew Martinez — 16:30 — Room 3")
checkInButtons = Buttons([checkInBtn, clearBtn])
checkInBtn = Button("Check In Patient", null, "primary")
clearBtn = Button("Clear", null, "tertiary")
dayNav = Buttons([prevDayBtn, todayBtn, nextDayBtn], "row")
prevDayBtn = Button("← Previous Day", null, "secondary")
todayBtn = Button("Today", null, "primary")
nextDayBtn = Button("Next Day →", null, "secondary")