CDA Module Mappings
All code examples in this document assume that you are in your handle function and already have the following line in your code:
var composition = ResourceBuilder.build('Composition');
Valid Document Types
- "ContinuityOfCareDocument"
- "TransferSummary"
To set your document to any of the following types in your cda template, use
composition.setType(documentType)
.
Example: composition.setType('ContinuityOfCareDocument')
- recordTarget:
Patient
- author:
Device
- custodian:
Organization
- documentationOf:
Encounter
There is currently no support for the following optional header tags:
- dataEnterer
- informant
- informationRecipient
- legalAuthenticator
- authenticator
- participant
- inFulfillmentOf
- authorization
- componentOf
Valid Section Types and Sources
To add a section to your cda template, use composition.addSection(sectionType)
.
Example: var medicationSection = composition.addSection("medication");
Allergy and Intolerances Section
Acceptable Fhir resources:
AllergyIntolerance
- An Allergy Concern Act entry will be created for each Coding with system RxNorm found in AllergyIntolerance.code
Medications Section
Acceptable Fhir resources:
MedicationRequest
- A Substance Administration entry will be created for each MedicationRequest.
MedicatoinActivity
- A Substance Administration entry will be created for each MedicationActivity.
Problem Section
Acceptable Fhir resources:
Condition
- A Problem Concern Act will be created for each Condition resource.
- The nested Problem Concern Observation will contain the identifier from an Encounter or EpisodeOfCare in Condition.context. If no context is present, a random identifier will be assigned for the Problem Concern Observation.
Results Section
Acceptable Fhir resources:
DiagnosticReport
- A Results Organizer will be created for each Diagnostic Report.
- All Observations referenced in DiagnosticReport.result will be collected.
- For each Observation, a Result Observation will be nested in the Results Organizer for each value present in Observation.value and every Observation.component.value
Observation
- A Results Organizer will be created for each Observation that was not collected for a Diagnostic Report.
- A Result Observation will be nested in the Results Organizer for each value present in Observation.value and every Observation.component.value
Only values of type valueQuantity, valueCodeableConcept, and valueString will be read.
Social History Section
Acceptable Fhir resources:
Observation
- If an observation with Loinc code
72166-2
is present, a Smoking Status Meaningful Use entry will be created.
- If an observation with Loinc code
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"
Vital Signs Section
Acceptable Fhir resources:
Observation
- A Vital Signs Organizer will be created for each Observation in the section.
- A Vital Sign Observation will be nested in the Vital Signs Organizer for each value present in
Observation.value and every Observation.component.value
Dialysis Prescription Section
Note: This is a custom section that is not in the DSTU2.1 spec.
Acceptable Fhir resources:
CarePlan
- A Planned Dialysis
act
will be created for each CarePlan in the section
ProcedureRequest
- A Planned Dialysis
act
will be created for each ProcedureRequest in the section.
Reason for Referral Section
Acceptable Fhir resources:
ReferralRequest
- A Patient Referral Act will be created for each ReferralRequest in the section.