Skip to main content

InpatientOrderEntry

ComplexInpatient flow<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​

Storybook

Pharmacist Verification​

Storybook

Stat​

Storybook

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​

VariantWhat it is
draftNot signed.
PRNReason required; maximum in 24 hours shown.
priorityRoutine, Now, STAT. STAT pages pharmacy.
pendingPending pharmacist verification; pharmacist role gets Verify and Return.
verifiedPharmacist name and time.
rejectedReturned, with the pharmacist note.
overrideGiven before verification, reviewed after.
warningsDose, renal or interaction alerts.
readOnlyLocked.

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​

PropTypeDefaultDescription
order *InpatientOrder—{ name, dose, unit, route, freq, prn, prnReason, maxDaily, duration, priority, weightBased, warnings: [{ tone, title, text }] }; required
valueInpatientOrderDraftuncontrolled from `order`Frequency, PRN, PRN reason, priority and duration (controlled)
onChange(draft: InpatientOrderDraft) => voidnoneCalled with the new draft when the prescriber changes it
statusOrderVerifyStatus'draft''draft' | 'pending' | 'verified' | 'rejected' | 'override'
role'prescriber' | 'pharmacist''prescriber''prescriber' | 'pharmacist'
patientstringnonePatient line
verifiedBystringnonePharmacist who verified it
verifiedAtstringnoneWhen it was verified
pharmaciststring'pharmacy'Pharmacist who returned it
pharmacistNotestringnoneWhy it was returned
overrideBystring'the nurse'Nurse who gave it before verification
showErrorsbooleanfalseShows required-field errors
readOnlybooleanfalseView only
onSign(draft: InpatientOrderDraft, sentence: string) => voidnoneCalled by Sign Order with the draft and the order sentence
onVerify() => voidnoneCalled by Verify (pharmacist)
onReturn() => voidnoneCalled by Return to Prescriber (pharmacist)
onCancel() => voidnoneCalled by Cancel
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, 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.

Angular template
<co-inpatient-order-entry status="…" role="…" [order]="order" (co-change)="onChange($event.detail)"></co-inpatient-order-entry>
KindNameDescription
property / JSON attributeorder{ name, dose, unit, route, freq, prn, prnReason, maxDaily, duration, priority, weightBased, warnings: [{ tone, title, text }] }; required
property / JSON attributevalueFrequency, PRN, PRN reason, priority and duration (controlled); default uncontrolled from `order`
attributestatus'draft' | 'pending' | 'verified' | 'rejected' | 'override'; default 'draft'
attributerole'prescriber' | 'pharmacist'; default 'prescriber'
attributepatientPatient line; default none
attributeverified-by / verifiedByPharmacist who verified it; default none
attributeverified-at / verifiedAtWhen it was verified; default none
attributepharmacistPharmacist who returned it; default 'pharmacy'
attributepharmacist-note / pharmacistNoteWhy it was returned; default none
attributeoverride-by / overrideByNurse who gave it before verification; default 'the nurse'
attributeshow-errors / showErrorsShows required-field errors; default false
attributeread-only / readOnlyView only; default false
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-changeCalled with the new draft when the prescriber changes it; default none (React: onChange)
eventco-signCalled by Sign Order with the draft and the order sentence; default none (React: onSign)
eventco-verifyCalled by Verify (pharmacist); default none (React: onVerify)
eventco-returnCalled by Return to Prescriber (pharmacist); default none (React: onReturn)
eventco-cancelCalled by Cancel; default none (React: onCancel)