Available Document and Section Types for CDA Export
All code examples in this document assume that you are in your generateCdaExchangeComposition function and already have the following line in your code:
var composition = ResourceBuilder.build('Composition');
To set your document to any of the following types in your cda template, use
composition.setType(documentType)
.
Example: composition.setType('ContinuityOfCareDocument')
Patient
Device
Organization
Encounter
There is currently no support for the following optional header tags:
To add a section to your cda template, use composition.addSection(sectionType)
.
Example: var medicationSection = composition.addSection("medication");
Acceptable FHIR resources:
AllergyIntolerance
Acceptable FHIR resources:
Encounter
Acceptable FHIR resources:
CarePlan
Acceptable FHIR resources:
CareTeam
Practitioner
Acceptable FHIR resources:
FamilyMemberHistory
Acceptable FHIR resources:
Observation
component
s, a Functional Status Organizer entry will be created, and one Functional Status Observation entry will be nested inside the Functional Status Organizer for each component
found.Condition
Acceptable FHIR resources:
Goal
Acceptable FHIR resources:
Immunization
moodCode="EVN"
will be created for each Immunization in the section.ImmunizationRecommendation
moodCode="INT"
will be created for each ImmunizationRecommendation in the section.Acceptable FHIR resources:
Procedure
Acceptable FHIR resources:
MedicationStatement
moodCode="EVN"
will be created for each MedicationStatement.MedicationRequest
moodCode="INT"
will be created for each MedicationRequest.Acceptable FHIR resources:
Condition
Acceptable FHIR resources:
Procedure
Acceptable FHIR resources:
DiagnosticReport
Observation
Only values of type valueQuantity, valueCodeableConcept, and valueString will be read.
Acceptable FHIR resources:
Observation
72166-2
is present, a Smoking Status Meaningful Use entry will be created.76689-9
is present, a Sex Assigned At Birth entry will be created.For either of these two entries, you can guarantee that an entry will be present even if no FHIR resource is provided by adding the entry to the populateMissing
param array. in the /apply CDA Exchange Endpoint.
The full list of acceptable values for that array are:
"SMOKING_STATUS"
"SEX_ASSIGNED_AT_BIRTH"
Acceptable FHIR resources:
Observation
let vitalSection = composition.addSection("vitalsign");
// All of these Observations will be clustered in a single Vital Signs Organizer
let topLevelList = Fhir
.search()
.forResource('Observation')
.where('subject', subject)
.where('category', 'vital-signs')
.where([some suitable filter])
.asList();
vitalSection.addSection().populate(topLevelList);
// All of these Observations will be clustered in a second Vital Signs Organizer
let clusteredList = Fhir
.search()
.forResource('Observation')
.where('subject', subject)
.where('category', 'vital-signs')
.where([some other suitable filter])
.asList();
vitalSection.addSection().populate(clusteredList);