Function: missingRequiredSections()
missingRequiredSections(
documentType,presentKeys): readonlystring[]
The SHALL section keys a DocumentType requires that are absent from
presentKeys, preserving the type's declared order. The parser passes the set
of recognized section keys it framed; each returned key becomes one
REQUIRED_SECTION_MISSING warning. Returns an empty array when every required
section is present (or the type asserts none).
Parameters
documentType
presentKeys
ReadonlySet<string>
Returns
readonly string[]
Example
import { missingRequiredSections } from "@cosyte/ccda";
missingRequiredSections("ccd", new Set(["allergies", "problems"]));
// ["medications", "results"]