Skip to main content
Version: v0.0.3

Function: extractAllergies()

extractAllergies(sectionEl, narrativeById, ctx): readonly AllergyConcern[]

Extract every Allergy Concern Act from an Allergies <section> element. Each <entry> whose act carries the Allergy Concern Act template becomes an AllergyConcern; the nested Allergy-Intolerance Observations become Allergys (including the "No Known Allergies" negated form). Never throws.

Parameters

sectionEl

Element

narrativeById

ReadonlyMap<string, string>

ctx

ParseCtx

Returns

readonly AllergyConcern[]

Example

import { extractAllergies } from "@cosyte/ccda";
const concerns = extractAllergies(sectionEl, section.narrativeById, ctx);