Skip to main content
Version: v0.0.3

Interface: BuildCcdaProcedure

A Procedure for the Procedures section. kind selects the C-CDA Procedure Activity variant, an altering/operative "procedure" (default, <procedure> …22.4.14), a non-altering "act" service (<act> …22.4.12), or an assessment "observation" (<observation> …22.4.13). code is the coded procedure (SNOMED CT by default, or CPT / ICD-10-PCS / LOINC) and is required (the template SHALL contain a code). disposition maps to the act's moodCode, performed (EVN) vs planned (INT), which the parser reads back as its performed-vs-planned disposition; the two are never conflated. effectiveTime is emitted only when supplied (the template's effectiveTime is SHOULD [0..1], CONF:1098-7662, not fabricated when unknown).

Example

import type { BuildCcdaProcedure } from "@cosyte/ccda";
const appendectomy: BuildCcdaProcedure = {
code: { code: "80146002", displayName: "Appendectomy" },
disposition: "performed",
effectiveTime: "20230615",
};
const plannedColonoscopy: BuildCcdaProcedure = {
code: { code: "73761001", displayName: "Colonoscopy" },
disposition: "planned",
};

Properties

code

readonly code: BuildCode

The coded procedure (SNOMED CT by default, or CPT / ICD-10-PCS / LOINC).


disposition?

readonly optional disposition?: "performed" | "planned"

Performed (EVN) or planned (INT); defaults to "performed". Never conflated.


effectiveTime?

readonly optional effectiveTime?: string

The procedure date as an HL7 date string; emitted only when supplied (SHOULD [0..1]).


kind?

readonly optional kind?: ProcedureKind

The Procedure Activity variant; defaults to "procedure" (operative).


status?

readonly optional status?: string

The statusCode; defaults per disposition (performed → "completed", planned → "active"). SHALL [1..1] on the template, so always emitted.


value?

readonly optional value?: BuildCode

The coded result value (xsi:type="CD", SNOMED CT default). Required for the "observation" variant, Procedure Activity Observation (…22.4.13) SHALL contain a value [1..1], and ignored for the other two variants; buildCcda throws if a "observation" procedure omits it.