Skip to main content
Version: v0.0.3

Interface: EditCcdaOptions

Options for editCcda: the ordered list of section edits to apply, and the revision behavior. revision defaults to an automatic RPLC revision; pass a RevisionInit to override its ids/version, or false to edit in place without stamping a new document version.

Example

import type { EditCcdaOptions } from "@cosyte/ccda";
const opts: EditCcdaOptions = {
sections: [{ kind: "medications", content: [] }],
revision: false,
};

Properties

revision?

readonly optional revision?: false | RevisionInit


sections?

readonly optional sections?: readonly SectionEdit[]


terminology?

readonly optional terminology?: TerminologyAdapter

An optional consumer-supplied bring-your-own TerminologyAdapter, forwarded to the final re-parse of the edited document so it surfaces SEMANTIC_CODE_INVALID for any coded value the adapter rejects, the same semantic-validation tier parseCcda and buildCcda already offer, now reaching the edited output. editCcda never coerces a code to satisfy the adapter (it emits every value verbatim, byte-faithful on untouched sections and spec-clean on the one it rebuilds); the adapter can only ever add a flag. Omit for the default recognize-only behavior. @cosyte/ccda never imports a terminology library; you supply the adapter.