MedReconciliation
<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
Admission
Signed
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
| Variant | What it is |
|---|---|
| discharge | Columns home, inpatient, decision, discharge prescription. |
| admission | Last column becomes Admission order. |
| continue / modify / stop / new | Decision buttons; new appears on rows with no home medicine. |
| needs decision | Warning badge; Sign button counts them. |
| note | Amber line for holds or duplicates. |
| readOnly | Signed, 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
| Prop | Type | Default | Description |
|---|---|---|---|
rows * | MedRecRow[] | — | Array of { home, inpatient, decision, modified, stopReason, note }; a medicine is { name, dose, unit, route, freq, prn }: the starting rows (uncontrolled); required |
rowsValue | MedRecRow[] | uncontrolled | The rows (controlled); pair with onRowsChange |
onRowsChange | (rows: MedRecRow[]) => void | none | Called with the new rows when a decision changes |
stage | MedRecStage | 'discharge' | 'admission' | 'discharge' |
patient | string | none | Patient name |
source | string | 'Patient interview and pharmacy fill history' | Source of the home list |
readOnly | boolean | false | Signed and view only |
signedBy | string | 'the attending' | Who signed it, shown when readOnly |
onSign | (rows: MedRecRow[]) => void | none | Called by Sign Reconciliation with the rows (enabled once every row has a decision) |
rangeContext | RangeContextId | 'inpatient' when no global context is set | Which 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.
<co-med-reconciliation stage="…" patient="…" [rows]="rows" (co-rows-change)="onRowsChange($event.detail)"></co-med-reconciliation>
| Kind | Name | Description |
|---|---|---|
| property / JSON attribute | rows | Array of { home, inpatient, decision, modified, stopReason, note }; a medicine is { name, dose, unit, route, freq, prn }: the starting rows (uncontrolled); required |
| property / JSON attribute | rows-value / rowsValue | The rows (controlled); pair with onRowsChange; default uncontrolled |
| attribute | stage | 'admission' | 'discharge'; default 'discharge' |
| attribute | patient | Patient name; default none |
| attribute | source | Source of the home list; default 'Patient interview and pharmacy fill history' |
| attribute | read-only / readOnly | Signed and view only; default false |
| attribute | signed-by / signedBy | Who signed it, shown when readOnly; default 'the attending' |
| attribute | range-context / rangeContext | Which shared reference range flags use; the lab range on a result still wins; default 'inpatient' when no global context is set |
| attribute | default-checked / defaultChecked | |
| property / JSON attribute | default-value / defaultValue | |
| attribute | auto-focus / autoFocus | |
| event | co-rows-change | Called with the new rows when a decision changes; default none (React: onRowsChange) |
| event | co-sign | Called by Sign Reconciliation with the rows (enabled once every row has a decision); default none (React: onSign) |
| event | co-change | (React: onChange) |
| event | co-input | (React: onInput) |