Interface: BuildCcdaOptions
Options for buildCcda. Every field is optional, buildCcda(init) is
valid and produces the default behavior.
Example
import type { BuildCcdaOptions, TerminologyAdapter } from "@cosyte/ccda";
const adapter: TerminologyAdapter = { validateCode: (c) => ({ result: myService.has(c.code) }) };
const opts: BuildCcdaOptions = { terminology: adapter };
Properties
terminology?
readonlyoptionalterminology?:TerminologyAdapter
An optional consumer-supplied bring-your-own TerminologyAdapter. Two
paths consume it: (1) its validateCode is forwarded to the internal re-parse
so a built document surfaces SEMANTIC_CODE_INVALID for any coded value the
adapter rejects; (2) its optional translate is consulted at each clinical
coded slot (problem value, allergen, medication drug + route, vaccine + route)
to emit <translation> alternate codings beside the primary code. The
builder never coerces a code to satisfy the adapter, it emits every primary
value verbatim, a <translation> is only ever an additional alternate, and
an adapter with no translate opinion produces byte-identical output. Omit for
the default behavior.