Interface: MedicationAmount
The give / dispense / administered amount of a Medication.
Carries the HL7 min/max amount pair and its units.
- For an order (RXO-2/3) or encoded order (RXE-3/4) the amount is a genuine min..max range: both keys may be present.
- For a dispense (RXD-4) or administration (RXA-6) there is a SINGLE
amount; it is surfaced as
minimumwithmaximumOMITTED. This is a single value, not a range: do not read the absentmaximumas "no upper bound on a range".
minimum/maximum are strict-Number() parsed (undefined, never NaN).
units is the give/dispense/administered units CWE (RXO-4 / RXE-5 / RXD-5 /
RXA-7); check units.nameOfCodingSystem === "UCUM" for computable units.
Example
import type { MedicationAmount } from "@cosyte/hl7";
const amount: MedicationAmount = { minimum: 250, units: { identifier: "mg", nameOfCodingSystem: "UCUM" } };
Properties
maximum?
readonlyoptionalmaximum?:number
RXO-3 / RXE-4 maximum. OMITTED for single-amount (dispense/administration) contexts.
minimum?
readonlyoptionalminimum?:number
RXO-2 / RXE-3 minimum, or the single dispense (RXD-4) / administered (RXA-6) amount.
units?
readonlyoptionalunits?:CWE
RXO-4 / RXE-5 / RXD-5 / RXA-7 give/dispense/administered units.