Skip to main content
Version: v0.0.3

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

readonly allergies: readonly AllergyConcern[]


documentType?

readonly optional documentType?: DocumentType


encounters

readonly encounters: readonly Encounter[]


familyHistory

readonly familyHistory: readonly FamilyHistory[]


functionalStatus

readonly functionalStatus: readonly StatusObservation[]


readonly header: CcdaHeader


immunizations

readonly immunizations: readonly Immunization[]


medications

readonly medications: readonly Medication[]


mentalStatus

readonly mentalStatus: readonly StatusObservation[]


nonXmlBody?

readonly optional nonXmlBody?: ED


pastMedicalHistory

readonly pastMedicalHistory: readonly Problem[]


plannedItems

readonly plannedItems: readonly PlannedItem[]


problems

readonly problems: readonly ProblemConcern[]


procedures

readonly procedures: readonly Procedure[]


profile?

readonly optional profile?: 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

readonly results: readonly ResultOrganizer[]


sections

readonly sections: readonly CcdaSection[]


serialized?

readonly optional serialized?: 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

readonly smokingStatus: readonly SmokingStatus[]


templateIds

readonly templateIds: readonly II[]


vitals

readonly vitals: readonly VitalSignsOrganizer[]


warnings

readonly warnings: readonly CcdaWarning[]