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
Note: This is a custom section that is not in the DSTU2.1 spec.
Acceptable FHIR resources:
CarePlan
act
will be created for each CarePlan in the section.ProcedureRequest
act
will be created for each ProcedureRequest in the section.Acceptable FHIR resources:
Encounter
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:
DeviceUseStatement
Procedure
List
Acceptable FHIR resources:
MedicationRequest
MedicationActivity
Acceptable FHIR resources:
Condition
Acceptable FHIR resources:
Procedure
387713003
, a Procedure Activity Procedure entry will be created.103693007
, a Procedure Activity Observation entry will be created.Acceptable FHIR resources:
ReferralRequest
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.Acceptable FHIR resources:
Observation
let vitalSection = composition.addSection("vitalsign");
// Each of these Observations will generate a distinct Vital Signs Organizer
let topLevelList = Fhir
.search()
.forResource('Observation')
.where('subject', subject)
.where('category', 'vital-signs')
.where([some suitable filter])
.asList();
vitalSection.populate(topLevelList);
// All of these Observations will be clustered in a single 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);
You are about to leave the Smile Digital Health documentation and navigate to the Open Source HAPI-FHIR Documentation.