Function: buildHeader()
buildHeader(
root,ctx):CcdaHeader
Extract the CcdaHeader from a ClinicalDocument root element. Never
throws; omits any field the document does not carry. Emits
MULTIPLE_RECORD_TARGETS when more than one recordTarget is present.
Parameters
root
Element
ctx
Returns
Example
import { buildHeader } from "@cosyte/ccda";
const header = buildHeader(rootEl, { emit: () => {} });
console.log(header.title, header.recordTargets.length);