Skip to main content
Version: v0.0.4

Type Alias: MedicationContext

MedicationContext = "order" | "encoded" | "dispense" | "administration"

Which pharmacy/treatment segment a Medication was extracted from: the clinical "phase" of the medication. Each value maps 1:1 to one RX* parent segment (Ch. 4A):

  • "order": RXO (Pharmacy/Treatment Order): the originally requested give code/amount/dosage-form, before pharmacy encoding.
  • "encoded": RXE (Encoded Order): the pharmacy-encoded give code/amount, plus the give strength (RXE-25/26): the only context that carries a separate strength.
  • "dispense": RXD (Dispense): what was actually dispensed.
  • "administration": RXA (Administration): what was actually given to the patient.

The context is preserved verbatim and never collapsed: an RDE order that carries both an RXO request and an RXE encoded line surfaces as TWO Medication entries with distinct contexts: the helper never reconciles one against the other.