Skip to main content
Version: v0.0.3

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?

readonly optional dose?: BuildQuantity

The dose per administration (doseQuantity); absent → parser flags it.


drug

readonly drug: BuildCode

The coded drug product (RxNorm by default, or NDC).


duration?

readonly optional duration?: object

The therapy window (IVL_TS) as HL7 date strings; either bound optional.

high?

readonly optional high?: string

low?

readonly optional low?: string


frequency?

readonly optional frequency?: BuildQuantity

The periodic dosing frequency, a PIVL_TS period (e.g. { value: 8, unit: "h" }).


route?

readonly optional route?: BuildCode

The administration route (routeCode); NCI Thesaurus by default.


status?

readonly optional status?: "active" | "resolved" | "inactive"

Active / resolved / inactive; maps to the statusCode. Defaults to "active".