root = Card([header, kpiBlock, nextPatientCallout, roomStatusHeader, roomStatus, appointmentsHeader, appointmentsTable, dateNav])
header = CardHeader("Clinic Day View", "Monday, December 15, 2024 · Dr. Sarah Mitchell")
kpiBlock = SnippetCardBlock([kpiPatients, kpiNoShow], "grid", true)
kpiPatients = SnippetCardItem("patients-expected", kpiPatientsLhs, kpiPatientsRhs)
kpiPatientsLhs = IconText(kpiPatientsIcon, "neutral", "m", "Patients Expected", "Scheduled today", false, "horizontal")
kpiPatientsIcon = Icon("users", "people")
kpiPatientsRhs = BoldText("number", "24", "+3 vs yesterday", "metric")
kpiNoShow = SnippetCardItem("no-show-rate", kpiNoShowLhs, kpiNoShowRhs)
kpiNoShowLhs = IconText(kpiNoShowIcon, "neutral", "m", "No-Show Rate", "This month", false, "horizontal")
kpiNoShowIcon = Icon("user-x", "people")
kpiNoShowRhs = BoldText("number", "8.2%", "-1.4%", "metric")
nextPatientCallout = Callout("info", "Next Patient Called", "Maria Gonzalez — Room 2 · 10:15 AM appointment", true)
roomStatusHeader = InlineHeader("Room Availability", "Real-time status as of 9:42 AM")
roomStatus = EntityList([room1, room2, room3, room4, room5], "default", { left: "Room", right: "Status", rightVariant: "text" })
room1 = { left: "Room 1", right: "Occupied (J. Chen)", rightVariant: "text" }
room2 = { left: "Room 2", right: "Free — Next: M. Gonzalez", rightVariant: "text" }
room3 = { left: "Room 3", right: "Free", rightVariant: "text" }
room4 = { left: "Room 4", right: "Occupied (R. Patel)", rightVariant: "text" }
room5 = { left: "Room 5", right: "Maintenance", rightVariant: "text" }
appointmentsHeader = InlineHeader("Today's Appointments", "24 scheduled · Tap Check In to confirm arrival")
appointmentsTable = Table([colTime, colPatient, colRoom, colType, colStatus, colAction])
colTime = Col("Time", ["8:00 AM", "8:30 AM", "9:00 AM", "9:15 AM", "9:30 AM", "9:45 AM", "10:00 AM", "10:15 AM", "10:30 AM", "10:45 AM", "11:00 AM", "11:30 AM", "1:00 PM", "1:30 PM", "2:00 PM", "2:15 PM", "2:30 PM", "3:00 PM", "3:15 PM", "3:30 PM", "4:00 PM", "4:15 PM", "4:30 PM", "5:00 PM"], "string")
colPatient = Col("Patient", ["James Chen", "Sarah Kim", "Robert Patel", "Lisa Wang", "David Park", "Anna Foster", "Michael Torres", "Maria Gonzalez", "Jennifer Wu", "Carlos Ruiz", "Emily Davis", "Kevin Lee", "Amanda Brooks", "Steven Clark", "Nicole Adams", "Brian Hall", "Laura Young", "Mark Allen", "Susan King", "Daniel Wright", "Rachel Scott", "Thomas Green", "Karen Baker", "Joseph Hill"], "string")
colRoom = Col("Room", ["1", "2", "3", "1", "4", "2", "3", "2", "1", "4", "3", "2", "1", "3", "4", "1", "2", "3", "4", "1", "2", "3", "4", "1"], "string")
colType = Col("Type", ["Follow-up", "New Patient", "Annual Exam", "Follow-up", "Consultation", "Follow-up", "New Patient", "Follow-up", "Annual Exam", "Consultation", "Follow-up", "New Patient", "Follow-up", "Annual Exam", "Consultation", "Follow-up", "New Patient", "Follow-up", "Annual Exam", "Consultation", "Follow-up", "New Patient", "Follow-up", "Annual Exam"], "string")
colStatus = Col("Status", ["Checked In", "Checked In", "Checked In", "Checked In", "Checked In", "Waiting", "Waiting", "Called", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled", "Scheduled"], "string")
colAction = Col("Action", ["✓ Done", "✓ Done", "✓ Done", "✓ Done", "✓ Done", "Check In", "Check In", "In Room", "Check In", "Check In", "Check In", "Check In", "Check In", "Check In", "Check In", "Check In", "Check In", "Check In", "Check In", "Check In", "Check In", "Check In", "Check In", "Check In"], "action")
dateNav = Buttons([btnPrev, btnToday, btnNext], "row")
btnPrev = Button("← Previous Day", { type: "continue_conversation", context: "Show me the clinic day view for Sunday, December 14, 2024" }, "secondary")
btnToday = Button("Today", { type: "continue_conversation", context: "Refresh today's clinic day view" }, "primary")
btnNext = Button("Next Day →", { type: "continue_conversation", context: "Show me the clinic day view for Tuesday, December 16, 2024" }, "secondary")