Skip to main content
Version: v0.0.3

Function: extractFamilyHistory()

extractFamilyHistory(sectionEl, narrativeById, ctx): readonly FamilyHistory[]

Extract every Family History Organizer from a Family History <section> element. Each <entry> whose organizer carries the Family History Organizer template becomes a FamilyHistory; its component/observation members become FamilyHistoryObservations. Never throws.

Parameters

sectionEl

Element

narrativeById

ReadonlyMap<string, string>

ctx

ParseCtx

Returns

readonly FamilyHistory[]

Example

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