Skip to main content
Version: v0.0.3

Function: extractProblems()

extractProblems(sectionEl, narrativeById, ctx): readonly ProblemConcern[]

Extract every Problem Concern Act from a Problems <section> element. Each <entry> whose act carries the Problem Concern Act template becomes a ProblemConcern; the nested Problem Observations become Problems. Reconciles each problem's coded value against its narrative reference. Never throws.

Parameters

sectionEl

Element

narrativeById

ReadonlyMap<string, string>

ctx

ParseCtx

Returns

readonly ProblemConcern[]

Example

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