Interface: CcdaDocumentInit
Constructor init for CcdaDocument. Produced by buildDocument
(the parts) plus the orchestrator's accumulated warnings. Optional keys are
omitted (never set to undefined) per exactOptionalPropertyTypes.
Example
import type { CcdaDocumentInit } from "@cosyte/ccda";
const init: CcdaDocumentInit = {
templateIds: [],
header: { recordTargets: [], relatedDocuments: [] },
sections: [],
problems: [],
medications: [],
allergies: [],
results: [],
vitals: [],
immunizations: [],
procedures: [],
encounters: [],
smokingStatus: [],
plannedItems: [],
functionalStatus: [],
mentalStatus: [],
familyHistory: [],
pastMedicalHistory: [],
warnings: [],
};
Properties
allergies
readonlyallergies: readonlyAllergyConcern[]
documentType?
readonlyoptionaldocumentType?:DocumentType
encounters
readonlyencounters: readonlyEncounter[]
familyHistory
readonlyfamilyHistory: readonlyFamilyHistory[]
functionalStatus
readonlyfunctionalStatus: readonlyStatusObservation[]
header
readonlyheader:CcdaHeader
immunizations
readonlyimmunizations: readonlyImmunization[]
medications
readonlymedications: readonlyMedication[]
mentalStatus
readonlymentalStatus: readonlyStatusObservation[]
nonXmlBody?
readonlyoptionalnonXmlBody?:ED
pastMedicalHistory
readonlypastMedicalHistory: readonlyProblem[]
plannedItems
readonlyplannedItems: readonlyPlannedItem[]
problems
readonlyproblems: readonlyProblemConcern[]
procedures
readonlyprocedures: readonlyProcedure[]
profile?
readonlyoptionalprofile?:ProfileAttribution
The CcdaProfile applied at parse time (its name + resolved
lineage), or absent when no profile was active. Attribution only, the
profile's effect is already reflected in warnings (tolerated deviations
re-badged PROFILE_QUIRK_APPLIED, flagged expected).
results
readonlyresults: readonlyResultOrganizer[]
sections
readonlysections: readonlyCcdaSection[]
serialized?
readonlyoptionalserialized?:string
Internal
The spec-clean XML snapshot captured from the source DOM at parse time,
returned by CcdaDocument.toString. Populated by parseCcda; absent
for a hand-constructed document (which therefore cannot be serialized until
a builder API lands).
smokingStatus
readonlysmokingStatus: readonlySmokingStatus[]
templateIds
readonlytemplateIds: readonlyII[]
vitals
readonlyvitals: readonlyVitalSignsOrganizer[]
warnings
readonlywarnings: readonlyCcdaWarning[]