Skip to main content
Version: v0.0.3

Type Alias: SectionEdit

SectionEdit = SectionInput & object

One section add/replace operation: a SectionInput (the section kind plus its typed builder content) with an optional SectionEditMode (default "upsert"). The union is discriminated on kind, so content is typed to exactly that section's BuildCcda* shape.

Type Declaration

mode?

readonly optional mode?: SectionEditMode

Example

import type { SectionEdit } from "@cosyte/ccda";
const addAProblem: SectionEdit = {
kind: "problems",
mode: "replace",
content: [{ problem: { code: "38341003", displayName: "Hypertension" }, status: "active" }],
};