Skip to main content

MedReconciliation

ComplexInpatient flow<co-med-reconciliation>

MedReconciliation lines up home, inpatient and discharge medicines row by row and asks for continue, modify or stop on each, and will not sign while any row has no decision.

import { MedReconciliation } from 'health-components';

Examples​

Showcase​

Storybook

Admission​

Storybook

Signed​

Storybook

Usage​

<MedReconciliation stage="discharge" patient="Okafor, Grace" rows={rows} />

When to use​

  • Admission and discharge medication reconciliation, by the admitting or discharging prescriber.

When not to use​

  • Ordering a single new medicine: InpatientOrderEntry.
  • Order review at transfer: OrderReconciliation.

Variants and states​

VariantWhat it is
dischargeColumns home, inpatient, decision, discharge prescription.
admissionLast column becomes Admission order.
continue / modify / stop / newDecision buttons; new appears on rows with no home medicine.
needs decisionWarning badge; Sign button counts them.
noteAmber line for holds or duplicates.
readOnlySigned, locked.

Clinical values​

Every number goes through the clinical value rules: tabular digits, unit always shown, fixed precision per measure (temperature 0.1 °C, potassium 0.1 mmol/L, creatinine 0.01 mg/dL, heart rate whole bpm), the reference range in the tooltip and H, L, H! or L! flags. Doses drop trailing zeros and keep a leading zero (0.5 mg, 5 mg).

Accessibility​

  • Each decision group is a radiogroup named with the medicine.
  • Stopped medicines say "Stopped" in words.

Do and don't​

  • Do: Show the inpatient substitution next to the home medicine it replaced.
  • Don't: Default every row to Continue.

Props​

PropTypeDefaultDescription
rows *MedRecRow[]—Array of { home, inpatient, decision, modified, stopReason, note }; a medicine is { name, dose, unit, route, freq, prn }: the starting rows (uncontrolled); required
rowsValueMedRecRow[]uncontrolledThe rows (controlled); pair with onRowsChange
onRowsChange(rows: MedRecRow[]) => voidnoneCalled with the new rows when a decision changes
stageMedRecStage'discharge''admission' | 'discharge'
patientstringnonePatient name
sourcestring'Patient interview and pharmacy fill history'Source of the home list
readOnlybooleanfalseSigned and view only
signedBystring'the attending'Who signed it, shown when readOnly
onSign(rows: MedRecRow[]) => voidnoneCalled by Sign Reconciliation with the rows (enabled once every row has a decision)
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-med-reconciliation>. 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-med-reconciliation stage="…" patient="…" [rows]="rows" (co-rows-change)="onRowsChange($event.detail)"></co-med-reconciliation>
KindNameDescription
property / JSON attributerowsArray of { home, inpatient, decision, modified, stopReason, note }; a medicine is { name, dose, unit, route, freq, prn }: the starting rows (uncontrolled); required
property / JSON attributerows-value / rowsValueThe rows (controlled); pair with onRowsChange; default uncontrolled
attributestage'admission' | 'discharge'; default 'discharge'
attributepatientPatient name; default none
attributesourceSource of the home list; default 'Patient interview and pharmacy fill history'
attributeread-only / readOnlySigned and view only; default false
attributesigned-by / signedByWho signed it, shown when readOnly; default 'the attending'
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-rows-changeCalled with the new rows when a decision changes; default none (React: onRowsChange)
eventco-signCalled by Sign Reconciliation with the rows (enabled once every row has a decision); default none (React: onSign)
eventco-change (React: onChange)
eventco-input (React: onInput)