InpatientOrderEntry
<co-inpatient-order-entry>InpatientOrderEntry writes one inpatient medication order with dose, route, frequency, duration, PRN reason and priority, shows the order sentence as it is built, and tracks pharmacist verification.
import { InpatientOrderEntry } from 'health-components';
Examples
Showcase
Pharmacist Verification
Stat
Usage
<InpatientOrderEntry patient="Ruiz, Carmen" order={{ name: "Oxycodone", dose: 5, unit: "mg", route: "PO", freq: "q4h", prn: true }} />
When to use
- CPOE for inpatient medication orders, and the pharmacist verification view of the same order.
When not to use
- Outpatient prescriptions: the e-prescribing components.
- Order sets with many orders.
Variants and states
| Variant | What it is |
|---|---|
| draft | Not signed. |
| PRN | Reason required; maximum in 24 hours shown. |
| priority | Routine, Now, STAT. STAT pages pharmacy. |
| pending | Pending pharmacist verification; pharmacist role gets Verify and Return. |
| verified | Pharmacist name and time. |
| rejected | Returned, with the pharmacist note. |
| override | Given before verification, reviewed after. |
| warnings | Dose, renal or interaction alerts. |
| readOnly | 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
- Order sentence is a polite live region.
- Priority is a radiogroup.
Do and don't
- Do: Require a PRN reason on every PRN order.
- Don't: Write 5.0 mg or .5 mg.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
order * | InpatientOrder | — | { name, dose, unit, route, freq, prn, prnReason, maxDaily, duration, priority, weightBased, warnings: [{ tone, title, text }] }; required |
value | InpatientOrderDraft | uncontrolled from `order` | Frequency, PRN, PRN reason, priority and duration (controlled) |
onChange | (draft: InpatientOrderDraft) => void | none | Called with the new draft when the prescriber changes it |
status | OrderVerifyStatus | 'draft' | 'draft' | 'pending' | 'verified' | 'rejected' | 'override' |
role | 'prescriber' | 'pharmacist' | 'prescriber' | 'prescriber' | 'pharmacist' |
patient | string | none | Patient line |
verifiedBy | string | none | Pharmacist who verified it |
verifiedAt | string | none | When it was verified |
pharmacist | string | 'pharmacy' | Pharmacist who returned it |
pharmacistNote | string | none | Why it was returned |
overrideBy | string | 'the nurse' | Nurse who gave it before verification |
showErrors | boolean | false | Shows required-field errors |
readOnly | boolean | false | View only |
onSign | (draft: InpatientOrderDraft, sentence: string) => void | none | Called by Sign Order with the draft and the order sentence |
onVerify | () => void | none | Called by Verify (pharmacist) |
onReturn | () => void | none | Called by Return to Prescriber (pharmacist) |
onCancel | () => void | none | Called by Cancel |
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, plus className and event handlers on the root element.
Angular, Vue and HTML
Register the elements once (Angular guide), then use <co-inpatient-order-entry>. 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-inpatient-order-entry status="…" role="…" [order]="order" (co-change)="onChange($event.detail)"></co-inpatient-order-entry>
| Kind | Name | Description |
|---|---|---|
| property / JSON attribute | order | { name, dose, unit, route, freq, prn, prnReason, maxDaily, duration, priority, weightBased, warnings: [{ tone, title, text }] }; required |
| property / JSON attribute | value | Frequency, PRN, PRN reason, priority and duration (controlled); default uncontrolled from `order` |
| attribute | status | 'draft' | 'pending' | 'verified' | 'rejected' | 'override'; default 'draft' |
| attribute | role | 'prescriber' | 'pharmacist'; default 'prescriber' |
| attribute | patient | Patient line; default none |
| attribute | verified-by / verifiedBy | Pharmacist who verified it; default none |
| attribute | verified-at / verifiedAt | When it was verified; default none |
| attribute | pharmacist | Pharmacist who returned it; default 'pharmacy' |
| attribute | pharmacist-note / pharmacistNote | Why it was returned; default none |
| attribute | override-by / overrideBy | Nurse who gave it before verification; default 'the nurse' |
| attribute | show-errors / showErrors | Shows required-field errors; default false |
| attribute | read-only / readOnly | View only; default false |
| 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-change | Called with the new draft when the prescriber changes it; default none (React: onChange) |
| event | co-sign | Called by Sign Order with the draft and the order sentence; default none (React: onSign) |
| event | co-verify | Called by Verify (pharmacist); default none (React: onVerify) |
| event | co-return | Called by Return to Prescriber (pharmacist); default none (React: onReturn) |
| event | co-cancel | Called by Cancel; default none (React: onCancel) |