Interface: BuildCcdaPlannedImmunization
A planned Immunization Activity (…4.120). mood excludes the appointment
moods, the same substanceAdministration domain a
BuildCcdaPlannedOrder draws on. code is the vaccine, emitted in
the consumable (Immunization Medication Information …4.54) and defaulting
to CVX, never RxNorm: the two substanceAdministration planned variants
have different default systems because their slot bindings differ.
effectiveTime is required here because the template requires it, and the
builder is conservative on emit, so the type requires what the template
requires rather than emitting a document short a SHALL element or fabricating
a date the caller never supplied. C-CDA makes effectiveTime [1..1] on this
template, "the time that the immunization activity should occur".
Do not read that as "this is the only planned template that requires it".
C-CDA makes
effectiveTime [1..1] on both substanceAdministration planned
variants: Planned Medication Activity (…4.42) SHALL carry exactly one too
(CONF:1098-30468). It is the other five (…4.39, …4.40, …4.41,
…4.43, …4.44) that make it [0..1]. BuildCcdaPlannedOrder still
types effectiveTime as optional for its medicationActivity arm, so
buildCcda can emit a Planned Medication Activity short that SHALL element.
Making the field required on BuildCcdaPlannedOrder would be a breaking
change to a published type, so the gap stands.
Example
import type { BuildCcdaPlannedImmunization } from "@cosyte/ccda";
const dueFluShot: BuildCcdaPlannedImmunization = {
kind: "immunizationActivity",
code: { code: "140", displayName: "Influenza, split virus, trivalent, injectable, preservative free" },
effectiveTime: "20241001",
};
Extends
BuildCcdaPlannedItemBase
Properties
code
readonlycode:BuildCode
The planned act/observation/drug code; default code system varies by kind.
Inherited from
BuildCcdaPlannedItemBase.code
effectiveTime
readonlyeffectiveTime:string
When the immunization should occur. Required: the template makes it [1..1].
Overrides
BuildCcdaPlannedItemBase.effectiveTime
kind
readonlykind:"immunizationActivity"
mood?
readonlyoptionalmood?:PlannedOrderMood
The planned @moodCode; defaults to "INT". Appointment moods not representable.