Interface: BuildCcdaMedication
A Medication Activity for the Medications section. drug is the RxNorm coded
product (RxNorm by default). dose, route, frequency, and duration are
all optional and never guessed: an omitted dose/route is emitted as
absent, which the parser then flags (MISSING_DOSE_QUANTITY /
MISSING_ROUTE_CODE) rather than being defaulted to a confident-wrong value.
frequency is the periodic timing (a PIVL_TS period, e.g. every 8 hours);
duration is the therapy window (an IVL_TS low/high), the two are emitted
as distinct effectiveTime siblings, never conflated.
Example
import type { BuildCcdaMedication } from "@cosyte/ccda";
const lisinopril: BuildCcdaMedication = {
drug: { code: "314076", displayName: "Lisinopril 10 MG Oral Tablet" },
dose: { value: 1, unit: "{tablet}" },
route: { code: "C38288", displayName: "Oral" },
frequency: { value: 24, unit: "h" },
};
Properties
dose?
readonlyoptionaldose?:BuildQuantity
The dose per administration (doseQuantity); absent → parser flags it.
drug
readonlydrug:BuildCode
The coded drug product (RxNorm by default, or NDC).
duration?
readonlyoptionalduration?:object
The therapy window (IVL_TS) as HL7 date strings; either bound optional.
high?
readonlyoptionalhigh?:string
low?
readonlyoptionallow?:string
frequency?
readonlyoptionalfrequency?:BuildQuantity
The periodic dosing frequency, a PIVL_TS period (e.g. { value: 8, unit: "h" }).
route?
readonlyoptionalroute?:BuildCode
The administration route (routeCode); NCI Thesaurus by default.
status?
readonlyoptionalstatus?:"active"|"resolved"|"inactive"
Active / resolved / inactive; maps to the statusCode. Defaults to "active".