Function: extractMedications()
extractMedications(
sectionEl,narrativeById,ctx): readonlyMedication[]
Extract every Medication Activity from a Medications <section> element.
Each <entry> whose substanceAdministration carries the Medication
Activity template becomes a Medication. Flags a missing
doseQuantity / routeCode and an unclassifiable effectiveTime. Never
throws.
Parameters
sectionEl
Element
narrativeById
ReadonlyMap<string, string>
ctx
Returns
readonly Medication[]
Example
import { extractMedications } from "@cosyte/ccda";
const meds = extractMedications(sectionEl, section.narrativeById, ctx);