Chart sections
patientRoutineThe common case: a view switch over a patient chart, with a critical count on Labs that reaches the accessible name as a word.
import { Tabs } from "@oxygenui-design/tabs";
import { allergyList, medicationList, observationPanel } from "@oxygenui-design/fixtures";
import "@oxygenui-design/tabs/styles.css";
const critical = observationPanel.filter(isCritical);
<Tabs
as="tabs"
aria-label="Chart sections"
defaultValue="summary"
items={[
{ value: "summary", label: "Summary", children: <Summary /> },
{
value: "labs",
label: "Labs",
// Counted from the data, never typed in. A tone is a claim about the
// patient, so it has to come from the same place the panel does.
count: critical.length,
tone: critical.length ? "critical" : "neutral",
children: <Labs observations={observationPanel} />,
},
{ value: "meds", label: "Medications", count: medicationList.length, children: <Meds /> },
{ value: "allergies", label: "Allergies", count: allergyList.length, children: <Allergies /> },
]}
/>;