Interface: BuildCcdaProblem
A Problem Concern for the Problems section. The coded problem (SNOMED CT by
default, or ICD-10-CM) is the condition; status maps to the concern act's
status (active/resolved/inactive) and is never guessed.
onset is the condition's onset date (the concern/observation effectiveTime
low); resolution is its resolution date (the high, a.k.a. "resolution
date", when the condition became biologically resolved). Per the C-CDA R2.1
Problem Observation (…22.4.4) rule the presence of a high, whether a
real date or nullFlavor="UNK", itself asserts the problem is resolved, so a
resolution is only meaningful on a resolved concern: buildCcda
throws when resolution is supplied without status: "resolved" rather than
emit a completion date on a still-active problem. A resolved problem whose
resolution date is unknown still emits a nullFlavor="UNK" high (the SHALL
form), never a fabricated date.
Example
import type { BuildCcdaProblem } from "@cosyte/ccda";
const p: BuildCcdaProblem = {
problem: { code: "59621000", displayName: "Essential hypertension" },
status: "active",
onset: "20210101",
};
const resolved: BuildCcdaProblem = {
problem: { code: "195967001", displayName: "Asthma" },
status: "resolved",
onset: "20180301",
resolution: "20220615",
};
Properties
onset?
readonlyoptionalonset?:string
Onset date as an HL7 date string (e.g. "20210101"), the effectiveTime/low, optional.
problem
readonlyproblem:BuildCode
The coded condition (SNOMED CT default, or ICD-10-CM).
resolution?
readonlyoptionalresolution?:string
Resolution date as an HL7 date string (the effectiveTime/high, a.k.a.
"resolution date"). Requires status: "resolved", a resolution date on a
non-resolved problem is a contradiction buildCcda rejects. Omitting
it on a resolved problem still emits a nullFlavor="UNK" high.
status?
readonlyoptionalstatus?:"active"|"resolved"|"inactive"
Active / resolved / inactive; defaults to "active".