Skip to main content

MAR

ComplexInpatient nursing<co-m-a-r>

MAR is the medication administration record: scheduled, PRN and continuous orders by time, with Given, Held, Refused, Late and Due states, a two-scan five rights check, a witness for high-alert drugs and co-sign.

import { MAR } from 'health-components';

Examples​

All Statuses​

Storybook

High Alert Witness​

Storybook

Scan Mismatch​

Storybook

Prn Waiting​

Storybook

Continuous Read Only​

Storybook

Usage​

<MAR times={["08:00","12:00","16:00","20:00"]} nowTime="12:00" patientName="Marcus Hill" patientBarcode="MRN0048213" rows={rows} onRecord={post} />

When to use​

  • Inpatient medication pass on any unit.
  • Reviewing what was given, held or refused this shift.

When not to use​

  • Ordering or reconciling medications: MedicationList and MedReconciliation.
  • Outpatient prescriptions: PrescriptionForm.

Variants and states​

VariantWhat it is
ScheduledGiven (green), Due (amber), Late (red), Held and Refused (grey, with reason), Scheduled (future, outline).
PRNPRN available cell; indication and reassessment window shown in the panel.
ContinuousRunning state with the current rate in mL/h.
High-alertRed High-alert badge; Given stays disabled until a witness is entered.
Co-signRecords co-sign Pending against the dose.
Administer panelOpens from a Due or Late cell: scan wristband, scan drug, five rights list, reason, Given / Held / Refused.
Scan mismatchRed scan step and red rights; Given stays disabled.
readOnlyView only; cells are not buttons.

Accessibility​

  • Table with caption; each actionable cell is a button named with drug, time and status.
  • Scan results are announced through a live region.
  • Disabled Given says why next to it in text.
  • Status is a word in a pill, never colour alone.

Do and don't​

  • Do: Record the reason with every Held or Refused dose.
  • Do: Show the drip rate on continuous rows.
  • Don't: Allow Given before both scans match.
  • Don't: Let one nurse witness their own high-alert dose.

Props​

PropTypeDefaultDescription
rows *MarRow[]—Orders; required
times *string[]—Column times; required
nowTimestringnoneCurrent column
patientNamestringnonePatient name for the wristband step
patientBarcodestringnoneExpected wristband code
nursestring'You'Who records
nowstringthe scheduled timeTime recorded
defaultActive{ row: string; time: string }noneAdminister panel open at first
defaultScansMarScans{}Initial scan results
defaultWitnessstring''Initial witness
filterMarFilter—Controlled filter
defaultFilterMarFilter'all'Initial filter (uncontrolled)
onFilterChange(filter: MarFilter) => void—Called when the filter changes
readOnlybooleanfalseView only: cells are not buttons
onRecord(e: MarRecordEvent) => void—Called when a dose is recorded Given, Held or Refused
titlestring'Medication Administration Record'Card title
subtitlestringnonePatient line
rangeContextRangeContextId'inpatient' when no global context is setWhich shared reference range flags use; the lab range on a result still wins

Also accepts native attributes, including defaultChecked, defaultValue, autoFocus, onChange, onInput, plus className and event handlers on the root element.

Angular, Vue and HTML​

Register the elements once (Angular guide), then use <co-m-a-r>. Attributes take strings; arrays and objects are set as properties (Angular [prop], Vue :prop) or as JSON attributes. Callbacks are DOM events with the value in event.detail.

Angular template
<co-m-a-r now-time="…" patient-name="…" [rows]="rows" (co-filter-change)="onFilterChange($event.detail)"></co-m-a-r>
KindNameDescription
property / JSON attributerowsOrders; required
property / JSON attributetimesColumn times; required
attributenow-time / nowTimeCurrent column; default none
attributepatient-name / patientNamePatient name for the wristband step; default none
attributepatient-barcode / patientBarcodeExpected wristband code; default none
attributenurseWho records; default 'You'
attributenowTime recorded; default the scheduled time
property / JSON attributedefault-active / defaultActiveAdminister panel open at first; default none
property / JSON attributedefault-scans / defaultScansInitial scan results; default {}
attributedefault-witness / defaultWitnessInitial witness; default ''
attributefilterControlled filter
attributedefault-filter / defaultFilterInitial filter (uncontrolled); default 'all'
attributeread-only / readOnlyView only: cells are not buttons; default false
attributetitleCard title; default 'Medication Administration Record'
attributesubtitlePatient line; default none
attributerange-context / rangeContextWhich shared reference range flags use; the lab range on a result still wins; default 'inpatient' when no global context is set
attributedefault-checked / defaultChecked
property / JSON attributedefault-value / defaultValue
attributeauto-focus / autoFocus
eventco-filter-changeCalled when the filter changes (React: onFilterChange)
eventco-recordCalled when a dose is recorded Given, Held or Refused (React: onRecord)
eventco-change (React: onChange)
eventco-input (React: onInput)