cqm-reports 1.0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (175) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +33 -0
  3. data/README.md +27 -0
  4. data/Rakefile +16 -0
  5. data/lib/cqm_report.rb +77 -0
  6. data/lib/ext/code.rb +11 -0
  7. data/lib/ext/data_element.rb +24 -0
  8. data/lib/html-export/qdm-patient/_header_css.mustache +61 -0
  9. data/lib/html-export/qdm-patient/_javascript.mustache +52 -0
  10. data/lib/html-export/qdm-patient/data_element/_data_element.mustache +4 -0
  11. data/lib/html-export/qdm-patient/data_element/_data_element_codes.mustache +9 -0
  12. data/lib/html-export/qdm-patient/data_element/_data_element_other_fields.mustache +106 -0
  13. data/lib/html-export/qdm-patient/data_element/_data_element_times.mustache +44 -0
  14. data/lib/html-export/qdm-patient/qdm_patient.mustache +73 -0
  15. data/lib/html-export/qdm-patient/qdm_patient.rb +47 -0
  16. data/lib/qrda-export/catI-r5/_code.mustache +1 -0
  17. data/lib/qrda-export/catI-r5/_codes.mustache +10 -0
  18. data/lib/qrda-export/catI-r5/_header.mustache +28 -0
  19. data/lib/qrda-export/catI-r5/_measure_section.mustache +59 -0
  20. data/lib/qrda-export/catI-r5/_reporting_period.mustache +23 -0
  21. data/lib/qrda-export/catI-r5/qrda1_r5.mustache +209 -0
  22. data/lib/qrda-export/catI-r5/qrda1_r5.rb +220 -0
  23. data/lib/qrda-export/catI-r5/qrda_header/_author.mustache +26 -0
  24. data/lib/qrda-export/catI-r5/qrda_header/_custodian.mustache +43 -0
  25. data/lib/qrda-export/catI-r5/qrda_header/_documentation_of_service_event.mustache +88 -0
  26. data/lib/qrda-export/catI-r5/qrda_header/_information_recipient.mustache +7 -0
  27. data/lib/qrda-export/catI-r5/qrda_header/_legal_authenticator.mustache +25 -0
  28. data/lib/qrda-export/catI-r5/qrda_header/_participant.mustache +7 -0
  29. data/lib/qrda-export/catI-r5/qrda_header/_record_target.mustache +44 -0
  30. data/lib/qrda-export/catI-r5/qrda_templates/adverse_event.mustache +40 -0
  31. data/lib/qrda-export/catI-r5/qrda_templates/allergy_intolerance.mustache +42 -0
  32. data/lib/qrda-export/catI-r5/qrda_templates/assessment_order.mustache +25 -0
  33. data/lib/qrda-export/catI-r5/qrda_templates/assessment_performed.mustache +38 -0
  34. data/lib/qrda-export/catI-r5/qrda_templates/assessment_recommended.mustache +25 -0
  35. data/lib/qrda-export/catI-r5/qrda_templates/communication_performed.mustache +62 -0
  36. data/lib/qrda-export/catI-r5/qrda_templates/device_applied.mustache +41 -0
  37. data/lib/qrda-export/catI-r5/qrda_templates/device_order.mustache +38 -0
  38. data/lib/qrda-export/catI-r5/qrda_templates/device_recommended.mustache +37 -0
  39. data/lib/qrda-export/catI-r5/qrda_templates/diagnosis.mustache +55 -0
  40. data/lib/qrda-export/catI-r5/qrda_templates/diagnostic_study_order.mustache +25 -0
  41. data/lib/qrda-export/catI-r5/qrda_templates/diagnostic_study_performed.mustache +50 -0
  42. data/lib/qrda-export/catI-r5/qrda_templates/diagnostic_study_recommended.mustache +21 -0
  43. data/lib/qrda-export/catI-r5/qrda_templates/encounter_order.mustache +35 -0
  44. data/lib/qrda-export/catI-r5/qrda_templates/encounter_performed.mustache +52 -0
  45. data/lib/qrda-export/catI-r5/qrda_templates/encounter_recommended.mustache +37 -0
  46. data/lib/qrda-export/catI-r5/qrda_templates/family_history.mustache +37 -0
  47. data/lib/qrda-export/catI-r5/qrda_templates/immunization_administered.mustache +35 -0
  48. data/lib/qrda-export/catI-r5/qrda_templates/immunization_order.mustache +46 -0
  49. data/lib/qrda-export/catI-r5/qrda_templates/intervention_order.mustache +24 -0
  50. data/lib/qrda-export/catI-r5/qrda_templates/intervention_performed.mustache +36 -0
  51. data/lib/qrda-export/catI-r5/qrda_templates/intervention_recommended.mustache +25 -0
  52. data/lib/qrda-export/catI-r5/qrda_templates/laboratory_test_order.mustache +24 -0
  53. data/lib/qrda-export/catI-r5/qrda_templates/laboratory_test_performed.mustache +42 -0
  54. data/lib/qrda-export/catI-r5/qrda_templates/laboratory_test_recommended.mustache +25 -0
  55. data/lib/qrda-export/catI-r5/qrda_templates/medication_active.mustache +32 -0
  56. data/lib/qrda-export/catI-r5/qrda_templates/medication_administered.mustache +39 -0
  57. data/lib/qrda-export/catI-r5/qrda_templates/medication_discharge.mustache +63 -0
  58. data/lib/qrda-export/catI-r5/qrda_templates/medication_dispensed.mustache +70 -0
  59. data/lib/qrda-export/catI-r5/qrda_templates/medication_order.mustache +64 -0
  60. data/lib/qrda-export/catI-r5/qrda_templates/patient_care_experience.mustache +14 -0
  61. data/lib/qrda-export/catI-r5/qrda_templates/patient_characteristic_clinical_trial_participant.mustache +18 -0
  62. data/lib/qrda-export/catI-r5/qrda_templates/patient_characteristic_expired.mustache +32 -0
  63. data/lib/qrda-export/catI-r5/qrda_templates/patient_characteristic_payer.mustache +14 -0
  64. data/lib/qrda-export/catI-r5/qrda_templates/physical_exam_order.mustache +30 -0
  65. data/lib/qrda-export/catI-r5/qrda_templates/physical_exam_performed.mustache +45 -0
  66. data/lib/qrda-export/catI-r5/qrda_templates/physical_exam_recommended.mustache +30 -0
  67. data/lib/qrda-export/catI-r5/qrda_templates/procedure_order.mustache +32 -0
  68. data/lib/qrda-export/catI-r5/qrda_templates/procedure_performed.mustache +64 -0
  69. data/lib/qrda-export/catI-r5/qrda_templates/procedure_recommended.mustache +34 -0
  70. data/lib/qrda-export/catI-r5/qrda_templates/provider_care_experience.mustache +15 -0
  71. data/lib/qrda-export/catI-r5/qrda_templates/provider_characteristic.mustache +15 -0
  72. data/lib/qrda-export/catI-r5/qrda_templates/substance_recommended.mustache +35 -0
  73. data/lib/qrda-export/catI-r5/qrda_templates/symptom.mustache +48 -0
  74. data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_admission_source.mustache +6 -0
  75. data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_anatomical_location_site.mustache +1 -0
  76. data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_author.mustache +29 -0
  77. data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_author_participation.mustache +8 -0
  78. data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_component.mustache +13 -0
  79. data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_data_element_codes_as_values.mustache +10 -0
  80. data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_days_supplied.mustache +6 -0
  81. data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_encounter_diagnosis.mustache +21 -0
  82. data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_facility_location.mustache +24 -0
  83. data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_immunization_details.mustache +14 -0
  84. data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_medication_details.mustache +36 -0
  85. data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_medication_supply_request.mustache +17 -0
  86. data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_method.mustache +1 -0
  87. data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_ordinality.mustache +1 -0
  88. data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_principal_diagnosis.mustache +8 -0
  89. data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_reaction_observation.mustache +9 -0
  90. data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_reason.mustache +12 -0
  91. data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_related_to.mustache +6 -0
  92. data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_results.mustache +24 -0
  93. data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_severity.mustache +8 -0
  94. data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_status.mustache +8 -0
  95. data/lib/qrda-export/catIII-r2-1/_continuous_variable_value.mustache +17 -0
  96. data/lib/qrda-export/catIII-r2-1/_header.mustache +25 -0
  97. data/lib/qrda-export/catIII-r2-1/_measure_data.mustache +41 -0
  98. data/lib/qrda-export/catIII-r2-1/_measure_section.mustache +74 -0
  99. data/lib/qrda-export/catIII-r2-1/_reporting_period.mustache +23 -0
  100. data/lib/qrda-export/catIII-r2-1/_stratification.mustache +29 -0
  101. data/lib/qrda-export/catIII-r2-1/_supplemental_data.mustache +28 -0
  102. data/lib/qrda-export/catIII-r2-1/qrda3_r21.mustache +11 -0
  103. data/lib/qrda-export/catIII-r2-1/qrda3_r21.rb +127 -0
  104. data/lib/qrda-export/catIII-r2-1/qrda_header/_author.mustache +25 -0
  105. data/lib/qrda-export/catIII-r2-1/qrda_header/_custodian.mustache +17 -0
  106. data/lib/qrda-export/catIII-r2-1/qrda_header/_documentation_of_service_event.mustache +88 -0
  107. data/lib/qrda-export/catIII-r2-1/qrda_header/_legal_authenticator.mustache +25 -0
  108. data/lib/qrda-export/helper/aggregate_object_helper.rb +154 -0
  109. data/lib/qrda-export/helper/cat1_view_helper.rb +81 -0
  110. data/lib/qrda-export/helper/date_helper.rb +108 -0
  111. data/lib/qrda-export/helper/frequency_helper.rb +83 -0
  112. data/lib/qrda-export/helper/patient_view_helper.rb +46 -0
  113. data/lib/qrda-export/helper/view_helper.rb +28 -0
  114. data/lib/qrda-import/base-importers/demographics_importer.rb +38 -0
  115. data/lib/qrda-import/base-importers/section_importer.rb +237 -0
  116. data/lib/qrda-import/cda_identifier.rb +20 -0
  117. data/lib/qrda-import/data-element-importers/adverse_event_importer.rb +26 -0
  118. data/lib/qrda-import/data-element-importers/allergy_intolerance_importer.rb +24 -0
  119. data/lib/qrda-import/data-element-importers/assessment_order_importer.rb +19 -0
  120. data/lib/qrda-import/data-element-importers/assessment_performed_importer.rb +24 -0
  121. data/lib/qrda-import/data-element-importers/assessment_recommended_importer.rb +19 -0
  122. data/lib/qrda-import/data-element-importers/communication_performed_importer.rb +30 -0
  123. data/lib/qrda-import/data-element-importers/device_applied_importer.rb +22 -0
  124. data/lib/qrda-import/data-element-importers/device_order_importer.rb +19 -0
  125. data/lib/qrda-import/data-element-importers/device_recommended_importer.rb +19 -0
  126. data/lib/qrda-import/data-element-importers/diagnosis_importer.rb +24 -0
  127. data/lib/qrda-import/data-element-importers/diagnostic_study_order_importer.rb +19 -0
  128. data/lib/qrda-import/data-element-importers/diagnostic_study_performed_importer.rb +32 -0
  129. data/lib/qrda-import/data-element-importers/diagnostic_study_recommended_importer.rb +19 -0
  130. data/lib/qrda-import/data-element-importers/encounter_order_importer.rb +21 -0
  131. data/lib/qrda-import/data-element-importers/encounter_performed_importer.rb +46 -0
  132. data/lib/qrda-import/data-element-importers/encounter_recommended_importer.rb +21 -0
  133. data/lib/qrda-import/data-element-importers/family_history_importer.rb +21 -0
  134. data/lib/qrda-import/data-element-importers/immunization_administered_importer.rb +23 -0
  135. data/lib/qrda-import/data-element-importers/immunization_order_importer.rb +27 -0
  136. data/lib/qrda-import/data-element-importers/intervention_order_importer.rb +19 -0
  137. data/lib/qrda-import/data-element-importers/intervention_performed_importer.rb +23 -0
  138. data/lib/qrda-import/data-element-importers/intervention_recommended_importer.rb +19 -0
  139. data/lib/qrda-import/data-element-importers/laboratory_test_order_importer.rb +19 -0
  140. data/lib/qrda-import/data-element-importers/laboratory_test_performed_importer.rb +29 -0
  141. data/lib/qrda-import/data-element-importers/laboratory_test_recommended_importer.rb +19 -0
  142. data/lib/qrda-import/data-element-importers/medication_active_importer.rb +25 -0
  143. data/lib/qrda-import/data-element-importers/medication_administered_importer.rb +26 -0
  144. data/lib/qrda-import/data-element-importers/medication_discharge_importer.rb +32 -0
  145. data/lib/qrda-import/data-element-importers/medication_dispensed_importer.rb +37 -0
  146. data/lib/qrda-import/data-element-importers/medication_order_importer.rb +36 -0
  147. data/lib/qrda-import/data-element-importers/patient_care_experience_importer.rb +19 -0
  148. data/lib/qrda-import/data-element-importers/patient_characteristic_clinical_trial_participant_importer.rb +19 -0
  149. data/lib/qrda-import/data-element-importers/patient_characteristic_expired_importer.rb +22 -0
  150. data/lib/qrda-import/data-element-importers/patient_characteristic_payer_importer.rb +19 -0
  151. data/lib/qrda-import/data-element-importers/physical_exam_order_importer.rb +21 -0
  152. data/lib/qrda-import/data-element-importers/physical_exam_performed_importer.rb +27 -0
  153. data/lib/qrda-import/data-element-importers/physical_exam_recommended_importer.rb +21 -0
  154. data/lib/qrda-import/data-element-importers/procedure_order_importer.rb +23 -0
  155. data/lib/qrda-import/data-element-importers/procedure_performed_importer.rb +33 -0
  156. data/lib/qrda-import/data-element-importers/procedure_recommended_importer.rb +23 -0
  157. data/lib/qrda-import/data-element-importers/provider_care_experience_importer.rb +19 -0
  158. data/lib/qrda-import/data-element-importers/provider_characteristic_importer.rb +19 -0
  159. data/lib/qrda-import/data-element-importers/substance_administered_importer.rb +27 -0
  160. data/lib/qrda-import/data-element-importers/substance_order_importer.rb +29 -0
  161. data/lib/qrda-import/data-element-importers/substance_recommended_importer.rb +27 -0
  162. data/lib/qrda-import/data-element-importers/symptom_importer.rb +21 -0
  163. data/lib/qrda-import/entry_finder.rb +20 -0
  164. data/lib/qrda-import/entry_package.rb +16 -0
  165. data/lib/qrda-import/narrative_reference_handler.rb +33 -0
  166. data/lib/qrda-import/patient_importer.rb +128 -0
  167. data/lib/util/code_system_helper.rb +77 -0
  168. data/lib/util/hqmf_template_helper.rb +52 -0
  169. data/lib/util/hqmf_template_oid_map.json +654 -0
  170. data/lib/util/hqmfr2_template_oid_map.json +378 -0
  171. data/lib/util/hqmfr2cql_template_oid_map.json +390 -0
  172. data/lib/util/qrda_template_helper.rb +20 -0
  173. data/lib/util/qrdar5_1_template_oid_map.json +406 -0
  174. data/lib/util/qrdar5_template_oid_map.json +406 -0
  175. metadata +344 -0
@@ -0,0 +1,52 @@
1
+ <entry>
2
+ <act classCode="ACT" moodCode="EVN" {{{negation_ind}}}>
3
+ <!--Encounter performed Act -->
4
+ <templateId extension="2017-08-01" root="2.16.840.1.113883.10.20.24.3.133"/>
5
+ <code code="ENC" codeSystem="2.16.840.1.113883.5.6" codeSystemName="ActClass" displayName="Encounter"/>
6
+ <entryRelationship typeCode="SUBJ">
7
+ <encounter classCode="ENC" moodCode="EVN">
8
+ <!-- Encounter activities template -->
9
+ <templateId extension="2015-08-01" root="2.16.840.1.113883.10.20.22.4.49"/>
10
+ <!-- Encounter performed template -->
11
+ <templateId extension="2017-08-01" root="2.16.840.1.113883.10.20.24.3.23"/>
12
+ <id extension="{{object_id}}" root="1.3.6.1.4.1.115"/>
13
+ <!-- QDM Attribute: Code -->
14
+ {{> _codes}}
15
+ <text>{{description}}</text>
16
+ <statusCode code="completed"/>
17
+ {{#relevantPeriod}}
18
+ <!-- QDM Attribute: Relevant Period -->
19
+ {{{relevant_period}}}
20
+ {{/relevantPeriod}}
21
+ {{#dischargeDisposition}}
22
+ <!-- QDM Attribute: Discharge Disposition -->
23
+ <sdtc:dischargeDispositionCode {{> _code}}/>
24
+ {{/dischargeDisposition}}
25
+ {{#authorDatetime}}
26
+ <!-- QDM Attribute: Author dateTime -->
27
+ {{> qrda_templates/template_partials/_author}}
28
+ {{/authorDatetime}}
29
+ {{#facilityLocations}}
30
+ <!-- QDM Attribute: Facility Locations -->
31
+ {{> qrda_templates/template_partials/_facility_location}}
32
+ {{/facilityLocations}}
33
+ {{#admissionSource}}
34
+ <!-- QDM Attribute: Admission Source -->
35
+ {{> qrda_templates/template_partials/_admission_source}}
36
+ {{/admissionSource}}
37
+ {{#principalDiagnosis}}
38
+ <!-- QDM Attribute: Principal Diagnosis -->
39
+ {{> qrda_templates/template_partials/_principal_diagnosis}}
40
+ {{/principalDiagnosis}}
41
+ {{#diagnoses}}
42
+ <!-- QDM Attribute: Diagnoses -->
43
+ {{> qrda_templates/template_partials/_encounter_diagnosis}}
44
+ {{/diagnoses}}
45
+ {{#negationRationale}}
46
+ <!-- QDM Attribute: Negation Rationale -->
47
+ {{> qrda_templates/template_partials/_reason}}
48
+ {{/negationRationale}}
49
+ </encounter>
50
+ </entryRelationship>
51
+ </act>
52
+ </entry>
@@ -0,0 +1,37 @@
1
+ <entry>
2
+ <act classCode="ACT" moodCode="INT" {{{negation_ind}}}>
3
+ <!--Encounter Recommended Act (V2) -->
4
+ <templateId root="2.16.840.1.113883.10.20.24.3.134" extension="2017-08-01"/>
5
+ <id extension="{{object_id}}" root="1.3.6.1.4.1.115"/>
6
+ <code code="ENC" codeSystem="2.16.840.1.113883.5.6" codeSystemName="ActClass" displayName="Encounter"/>
7
+ <entryRelationship typeCode="SUBJ">
8
+ <encounter classCode="ENC" moodCode="INT">
9
+ <!-- Conforms to C-CDA R2.1 Planned Encounter (V2) template -->
10
+ <templateId root="2.16.840.1.113883.10.20.22.4.40" extension="2014-06-09"/>
11
+ <!-- Encounter Recommended (V4) template -->
12
+ <templateId root="2.16.840.1.113883.10.20.24.3.24" extension="2017-08-01"/>
13
+ <id extension="{{object_id}}" root="1.3.6.1.4.1.115"/>
14
+ <!-- QDM Attribute: Code -->
15
+ {{> _codes}}
16
+ <text>{{description}}</text>
17
+ <statusCode code="active"/>
18
+ {{#authorDatetime}}
19
+ <!-- QDM Attribute: Author dateTime -->
20
+ {{> qrda_templates/template_partials/_author}}
21
+ {{/authorDatetime}}
22
+ {{#facilityLocation}}
23
+ <!-- QDM Attribute: Facility Location -->
24
+ {{> qrda_templates/template_partials/_facility_location}}
25
+ {{/facilityLocation}}
26
+ {{#reason}}
27
+ <!-- QDM Attribute: Reason -->
28
+ {{> qrda_templates/template_partials/_reason}}
29
+ {{/reason}}
30
+ {{#negationRationale}}
31
+ <!-- QDM Attribute: Negation Rationale -->
32
+ {{> qrda_templates/template_partials/_reason}}
33
+ {{/negationRationale}}
34
+ </encounter>
35
+ </entryRelationship>
36
+ </act>
37
+ </entry>
@@ -0,0 +1,37 @@
1
+ <entry>
2
+ <organizer moodCode="EVN" classCode="CLUSTER">
3
+ <!-- C-CDA R2.1 Family History Organizer (V3) -->
4
+ <templateId root="2.16.840.1.113883.10.20.22.4.45" extension="2015-08-01"/>
5
+ <!-- Family History Organizer QDM (V4) -->
6
+ <templateId root="2.16.840.1.113883.10.20.24.3.12" extension="2017-08-01"/>
7
+ <id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
8
+ <statusCode code="completed" />
9
+ {{#relationship}}
10
+ <!-- QDM Attribute: Relationship -->
11
+ <subject>
12
+ <relatedSubject classCode="PRS">
13
+ <code {{> _code}}/>
14
+ </relatedSubject>
15
+ </subject>
16
+ {{/relationship}}
17
+ <component>
18
+ <observation classCode="OBS" moodCode="EVN">
19
+ <!-- Conforms to C-CDA R2.1 Family History Observation (V3) -->
20
+ <templateId root="2.16.840.1.113883.10.20.22.4.46" extension="2015-08-01"/>
21
+ <!-- Family History QDM (V3) -->
22
+ <templateId root="2.16.840.1.113883.10.20.24.3.112" extension="2017-08-01"/>
23
+ <id root="1.3.6.1.4.1.115" extension="{{random_id}}"/>
24
+ <code code="75323-6" displayName="Condition" codeSystemName="LOINC" codeSystem="2.16.840.1.113883.6.1">
25
+ <translation code="64572001" displayName="Condition" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96"/>
26
+ </code>
27
+ <statusCode code="completed"/>
28
+ <!-- QDM Attribute: Code -->
29
+ {{> qrda_templates/template_partials/_data_element_codes_as_values}}
30
+ {{#authorDatetime}}
31
+ <!-- QDM Attribute: Author dateTime -->
32
+ {{> qrda_templates/template_partials/_author}}
33
+ {{/authorDatetime}}
34
+ </observation>
35
+ </component>
36
+ </organizer>
37
+ </entry>
@@ -0,0 +1,35 @@
1
+ <entry>
2
+ <substanceAdministration classCode="SBADM" moodCode="EVN" {{{negation_ind}}}>
3
+ <!-- C-CDA R2 Immunization Activity -->
4
+ <templateId root="2.16.840.1.113883.10.20.22.4.52" extension="2014-06-09"/>
5
+ <!-- Immunization Administered -->
6
+ <templateId root="2.16.840.1.113883.10.20.24.3.140" extension="2017-08-01"/>
7
+ <id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
8
+ <code code="416118004" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT" displayName="Administration"/>
9
+ <statusCode code="completed"/>
10
+ {{#authorDatetime}}
11
+ <!-- QDM Attribute: Author dateTime -->
12
+ {{{author_effective_time}}}
13
+ {{/authorDatetime}}
14
+ {{> qrda_templates/template_partials/_immunization_details}}
15
+ <consumable>
16
+ <manufacturedProduct classCode="MANU">
17
+ <!-- Immunization Information (consolidation) template -->
18
+ <templateId root="2.16.840.1.113883.10.20.22.4.54" extension="2014-06-09"/>
19
+ <id root="{{random_id}}"/>
20
+ <manufacturedMaterial>
21
+ {{> _codes}}
22
+ <lotNumberText>1</lotNumberText>
23
+ </manufacturedMaterial>
24
+ </manufacturedProduct>
25
+ </consumable>
26
+ {{#reason}}
27
+ <!-- QDM Attribute: Reason -->
28
+ {{> qrda_templates/template_partials/_reason}}
29
+ {{/reason}}
30
+ {{#negationRationale}}
31
+ <!-- QDM Attribute: Negation Rationale -->
32
+ {{> qrda_templates/template_partials/_reason}}
33
+ {{/negationRationale}}
34
+ </substanceAdministration>
35
+ </entry>
@@ -0,0 +1,46 @@
1
+ <entry>
2
+ <substanceAdministration classCode="SBADM" moodCode="RQO" {{{negation_ind}}}>
3
+ <!-- Conforms to C-CDA R2.1 Planned Immunization Activity -->
4
+ <templateId root="2.16.840.1.113883.10.20.22.4.120"/>
5
+ <!-- Immunization Order (V2) -->
6
+ <templateId root="2.16.840.1.113883.10.20.24.3.143" extension="2017-08-01"/>
7
+ <id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
8
+ <text>{{description}}</text>
9
+ <statusCode code="active"/>
10
+ {{#activeDatetime}}
11
+ <!-- QDM Attribute: Active dateTime -->
12
+ {{{active_date_time}}}
13
+ {{/activeDatetime}}
14
+ {{> qrda_templates/template_partials/_immunization_details}}
15
+ <consumable>
16
+ <manufacturedProduct classCode="MANU">
17
+ <!-- ** Immunization medication information ** -->
18
+ <templateId root="2.16.840.1.113883.10.20.22.4.54" extension="2014-06-09" />
19
+ <id root="{{random_id}}"/>
20
+ <manufacturedMaterial>
21
+ <!-- QDM Attribute: Code -->
22
+ {{> _codes}}
23
+ <lotNumberText>1</lotNumberText>
24
+ </manufacturedMaterial>
25
+ </manufacturedProduct>
26
+ </consumable>
27
+ {{#authorDatetime}}
28
+ <!-- QDM Attribute: Author dateTime -->
29
+ {{> qrda_templates/template_partials/_author}}
30
+ {{/authorDatetime}}
31
+ {{#reason}}
32
+ <!-- QDM Attribute: Reason -->
33
+ {{> qrda_templates/template_partials/_reason}}
34
+ {{/reason}}
35
+ {{#negationRationale}}
36
+ <!-- QDM Attribute: Negation Rationale -->
37
+ {{> qrda_templates/template_partials/_reason}}
38
+ {{/negationRationale}}
39
+ {{#supply}}
40
+ <!-- QDM Attribute: Supply -->
41
+ <entryRelationship typeCode="REFR">
42
+ {{> qrda_templates/template_partials/_medication_supply_request}}
43
+ </entryRelationship>
44
+ {{/supply}}
45
+ </substanceAdministration>
46
+ </entry>
@@ -0,0 +1,24 @@
1
+ <entry>
2
+ <act classCode="ACT" moodCode="RQO" {{{negation_ind}}}>
3
+ <!-- Conforms to C-CDA R2 Planned Act (V2) template -->
4
+ <templateId root="2.16.840.1.113883.10.20.22.4.39" extension="2014-06-09"/>
5
+ <!-- Intervention Order (V4) -->
6
+ <templateId root="2.16.840.1.113883.10.20.24.3.31" extension="2017-08-01"/>
7
+ <id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
8
+ {{> _codes}}
9
+ <text>{{description}}</text>
10
+ <statusCode code="active"/>
11
+ {{#authorDatetime}}
12
+ <!-- QDM Attribute: Author dateTime -->
13
+ {{> qrda_templates/template_partials/_author}}
14
+ {{/authorDatetime}}
15
+ {{#reason}}
16
+ <!-- QDM Attribute: Reason -->
17
+ {{> qrda_templates/template_partials/_reason}}
18
+ {{/reason}}
19
+ {{#negationRationale}}
20
+ <!-- QDM Attribute: Negation Rationale -->
21
+ {{> qrda_templates/template_partials/_reason}}
22
+ {{/negationRationale}}
23
+ </act>
24
+ </entry>
@@ -0,0 +1,36 @@
1
+ <entry>
2
+ <act classCode="ACT" moodCode="EVN" {{{negation_ind}}}>
3
+ <!-- Consolidation CDA: Procedure Activity Act template -->
4
+ <templateId root="2.16.840.1.113883.10.20.22.4.12" extension="2014-06-09"/>
5
+ <!-- Intervention Performed Template -->
6
+ <templateId root="2.16.840.1.113883.10.20.24.3.32" extension="2017-08-01"/>
7
+ <id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
8
+ {{> _codes}}
9
+ <text>{{description}}</text>
10
+ <statusCode code="completed"/>
11
+ {{#relevantPeriod}}
12
+ <!-- QDM Attribute: Relevant Period -->
13
+ {{{relevant_period}}}
14
+ {{/relevantPeriod}}
15
+ {{#authorDatetime}}
16
+ <!-- QDM Attribute: Author dateTime -->
17
+ {{> qrda_templates/template_partials/_author}}
18
+ {{/authorDatetime}}
19
+ {{#reason}}
20
+ <!-- QDM Attribute: Reason -->
21
+ {{> qrda_templates/template_partials/_reason}}
22
+ {{/reason}}
23
+ {{#negationRationale}}
24
+ <!-- QDM Attribute: Negation Rationale -->
25
+ {{> qrda_templates/template_partials/_reason}}
26
+ {{/negationRationale}}
27
+ {{#result}}
28
+ <!-- QDM Attribute: Result -->
29
+ {{> qrda_templates/template_partials/_results}}
30
+ {{/result}}
31
+ {{#status}}
32
+ <!-- QDM Attribute: Status -->
33
+ {{> qrda_templates/template_partials/_status}}
34
+ {{/status}}
35
+ </act>
36
+ </entry>
@@ -0,0 +1,25 @@
1
+ <entry>
2
+ <act classCode="ACT" moodCode="INT" {{{negation_ind}}}>
3
+ <!-- Conforms to C-CDA R2.1 Planned Act (V2) template -->
4
+ <templateId root="2.16.840.1.113883.10.20.22.4.39" extension="2014-06-09"/>
5
+ <!-- Intervention Recommended (V4) template -->
6
+ <templateId root="2.16.840.1.113883.10.20.24.3.33" extension="2017-08-01"/>
7
+ <id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
8
+ <!-- QDM Attribute: Code -->
9
+ {{> _codes}}
10
+ <text>{{description}}</text>
11
+ <statusCode code="active"/>
12
+ {{#authorDatetime}}
13
+ <!-- QDM Attribute: Author dateTime -->
14
+ {{> qrda_templates/template_partials/_author}}
15
+ {{/authorDatetime}}
16
+ {{#reason}}
17
+ <!-- QDM Attribute: Reason -->
18
+ {{> qrda_templates/template_partials/_reason}}
19
+ {{/reason}}
20
+ {{#negationRationale}}
21
+ <!-- QDM Attribute: Negation Rationale -->
22
+ {{> qrda_templates/template_partials/_reason}}
23
+ {{/negationRationale}}
24
+ </act>
25
+ </entry>
@@ -0,0 +1,24 @@
1
+ <entry>
2
+ <observation classCode="OBS" moodCode="RQO" {{{negation_ind}}}>
3
+ <!-- Consolidation Plan of Care Activity Observation -->
4
+ <templateId root="2.16.840.1.113883.10.20.22.4.44" extension="2014-06-09"/>
5
+ <!-- Laboratory Test, Order (V4) -->
6
+ <templateId root="2.16.840.1.113883.10.20.24.3.37" extension="2017-08-01"/>
7
+ <id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
8
+ {{> _codes}}
9
+ <text>{{description}}</text>
10
+ <statusCode code="active"/>
11
+ {{#authorDatetime}}
12
+ <!-- QDM Attribute: Author dateTime -->
13
+ {{> qrda_templates/template_partials/_author}}
14
+ {{/authorDatetime}}
15
+ {{#reason}}
16
+ <!-- QDM Attribute: Reason -->
17
+ {{> qrda_templates/template_partials/_reason}}
18
+ {{/reason}}
19
+ {{#negationRationale}}
20
+ <!-- QDM Attribute: Negation Rationale -->
21
+ {{> qrda_templates/template_partials/_reason}}
22
+ {{/negationRationale}}
23
+ </observation>
24
+ </entry>
@@ -0,0 +1,42 @@
1
+ <entry>
2
+ <observation classCode="OBS" moodCode="EVN" {{{negation_ind}}}>
3
+ <!-- Laboratory Test Performed (V4) -->
4
+ <templateId root="2.16.840.1.113883.10.20.24.3.38" extension="2017-08-01"/>
5
+ <id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
6
+ {{> _codes}}
7
+ <text>{{description}}</text>
8
+ <statusCode code="completed"/>
9
+ {{#relevantPeriod}}
10
+ <!-- QDM Attribute: Relevant Period -->
11
+ {{{relevant_period}}}
12
+ {{/relevantPeriod}}
13
+ {{#method}}
14
+ <!-- QDM Attribute: Method -->
15
+ {{> qrda_templates/template_partials/_method}}
16
+ {{/method}}
17
+ {{#authorDatetime}}
18
+ <!-- QDM Attribute: Author dateTime -->
19
+ {{> qrda_templates/template_partials/_author}}
20
+ {{/authorDatetime}}
21
+ {{#reason}}
22
+ <!-- QDM Attribute: Reason -->
23
+ {{> qrda_templates/template_partials/_reason}}
24
+ {{/reason}}
25
+ {{#negationRationale}}
26
+ <!-- QDM Attribute: Negation Rationale -->
27
+ {{> qrda_templates/template_partials/_reason}}
28
+ {{/negationRationale}}
29
+ {{#result}}
30
+ <!-- QDM Attribute: Result -->
31
+ {{> qrda_templates/template_partials/_results}}
32
+ {{/result}}
33
+ {{#status}}
34
+ <!-- QDM Attribute: Status -->
35
+ {{> qrda_templates/template_partials/_status}}
36
+ {{/status}}
37
+ {{#components}}
38
+ <!-- QDM Attribute: Components -->
39
+ {{> qrda_templates/template_partials/_component}}
40
+ {{/components}}
41
+ </observation>
42
+ </entry>
@@ -0,0 +1,25 @@
1
+ <entry>
2
+ <observation classCode="OBS" moodCode="INT" {{{negation_ind}}}>
3
+ <!-- Conforms to C-CDA R2.1 Planned Observation (V2) -->
4
+ <templateId root="2.16.840.1.113883.10.20.22.4.44" extension="2014-06-09"/>
5
+ <!-- Laboratory Test, Recommended (V4) -->
6
+ <templateId root="2.16.840.1.113883.10.20.24.3.39" extension="2017-08-01"/>
7
+ <id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
8
+ <!-- QDM Attribute: Code -->
9
+ {{> _codes}}
10
+ <text>{{description}}</text>
11
+ <statusCode code="active"/>
12
+ {{#authorDatetime}}
13
+ <!-- QDM Attribute: Author dateTime -->
14
+ {{> qrda_templates/template_partials/_author}}
15
+ {{/authorDatetime}}
16
+ {{#reason}}
17
+ <!-- QDM Attribute: Reason -->
18
+ {{> qrda_templates/template_partials/_reason}}
19
+ {{/reason}}
20
+ {{#negationRationale}}
21
+ <!-- QDM Attribute: Negation Rationale -->
22
+ {{> qrda_templates/template_partials/_reason}}
23
+ {{/negationRationale}}
24
+ </observation>
25
+ </entry>
@@ -0,0 +1,32 @@
1
+ <entry>
2
+ <substanceAdministration classCode="SBADM" moodCode="EVN">
3
+ <!-- Medication Activity (consolidation) template -->
4
+ <templateId root="2.16.840.1.113883.10.20.22.4.16" extension="2014-06-09"/>
5
+ <!-- Medication, Active template -->
6
+ <templateId root="2.16.840.1.113883.10.20.24.3.41" extension="2017-08-01"/>
7
+
8
+ <id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
9
+ <text>{{description}}</text>
10
+ <statusCode code="active"/>
11
+ {{#relevantPeriod}}
12
+ <!-- QDM Attribute: Relevant Period -->
13
+ {{{medication_duration_effective_time}}}
14
+ {{/relevantPeriod}}
15
+ {{> qrda_templates/template_partials/_medication_details}}
16
+ <consumable>
17
+ <manufacturedProduct classCode="MANU">
18
+ <!-- Medication Information (consolidation) template -->
19
+ <templateId root="2.16.840.1.113883.10.20.22.4.23" extension="2014-06-09"/>
20
+ <id root="{{random_id}}"/>
21
+ <manufacturedMaterial>
22
+ {{> _codes}}
23
+ </manufacturedMaterial>
24
+ <manufacturerOrganization>
25
+ <name>Medication Factory Inc.</name>
26
+ </manufacturerOrganization>
27
+ </manufacturedProduct>
28
+ </consumable>
29
+
30
+ </substanceAdministration>
31
+
32
+ </entry>
@@ -0,0 +1,39 @@
1
+ <entry>
2
+ <substanceAdministration classCode="SBADM" moodCode="EVN" {{{negation_ind}}}>
3
+ <!-- Medication Activity (consolidation) template -->
4
+ <templateId root="2.16.840.1.113883.10.20.22.4.16" extension="2014-06-09"/>
5
+ <!-- Medication, Administered template -->
6
+ <templateId root="2.16.840.1.113883.10.20.24.3.42" extension="2017-08-01"/>
7
+ <id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
8
+ <code code="416118004" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT" displayName="Administration"/>
9
+ <statusCode code="completed"/>
10
+ {{#relevantPeriod}}
11
+ <!-- QDM Attribute: Relevant Period -->
12
+ {{{medication_duration_effective_time}}}
13
+ {{/relevantPeriod}}
14
+ {{> qrda_templates/template_partials/_medication_details}}
15
+ <consumable>
16
+ <manufacturedProduct classCode="MANU">
17
+ <!-- Medication Information (consolidation) template -->
18
+ <templateId root="2.16.840.1.113883.10.20.22.4.23" extension="2014-06-09"/>
19
+ <id root="{{random_id}}"/>
20
+ <manufacturedMaterial>
21
+ <!-- QDM Attribute: Code -->
22
+ {{> _codes}}
23
+ </manufacturedMaterial>
24
+ </manufacturedProduct>
25
+ </consumable>
26
+ {{#authorDatetime}}
27
+ <!-- QDM Attribute: Author dateTime -->
28
+ {{> qrda_templates/template_partials/_author}}
29
+ {{/authorDatetime}}
30
+ {{#reason}}
31
+ <!-- QDM Attribute: Reason -->
32
+ {{> qrda_templates/template_partials/_reason}}
33
+ {{/reason}}
34
+ {{#negationRationale}}
35
+ <!-- QDM Attribute: Negation Rationale -->
36
+ {{> qrda_templates/template_partials/_reason}}
37
+ {{/negationRationale}}
38
+ </substanceAdministration>
39
+ </entry>
@@ -0,0 +1,63 @@
1
+ <entry>
2
+ <act classCode="ACT" moodCode="RQO" {{{negation_ind}}}>
3
+ <!-- Discharge Medication Entry -->
4
+ <templateId root="2.16.840.1.113883.10.20.24.3.105" extension="2018-10-01"/>
5
+ <id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
6
+ <code code="75311-1" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Discharge medications"/>
7
+ <statusCode code="active"/>
8
+ <entryRelationship typeCode="SUBJ">
9
+ <substanceAdministration moodCode="EVN" classCode="SBADM">
10
+ <!-- Medication Activity (consolidation) template -->
11
+ <templateId root="2.16.840.1.113883.10.20.22.4.16" extension="2014-06-09"/>
12
+ <!-- Medication, Active template -->
13
+ <templateId root="2.16.840.1.113883.10.20.24.3.41" extension="2016-02-01"/>
14
+ <id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
15
+ <text>{{description}}</text>
16
+ <statusCode code="active"/>
17
+ {{#authorDatetime}}
18
+ <!-- QDM Attribute: Author dateTime -->
19
+ {{{author_effective_time}}}
20
+ {{/authorDatetime}}
21
+ {{> qrda_templates/template_partials/_medication_details}}
22
+ <consumable>
23
+ <manufacturedProduct classCode="MANU">
24
+ <!-- Medication Information (consolidation) template -->
25
+ <templateId root="2.16.840.1.113883.10.20.22.4.23" extension="2014-06-09"/>
26
+ <id root="{{random_id}}"/>
27
+ <manufacturedMaterial>
28
+ {{> _codes}}
29
+ </manufacturedMaterial>
30
+ <manufacturerOrganization>
31
+ <name>Medication Factory Inc.</name>
32
+ </manufacturerOrganization>
33
+ </manufacturedProduct>
34
+ </consumable>
35
+ {{#authorDatetime}}
36
+ {{> qrda_templates/template_partials/_author_participation}}
37
+ {{/authorDatetime}}
38
+ {{#negationRationale}}
39
+ {{> qrda_templates/template_partials/_reason}}
40
+ {{/negationRationale}}
41
+ </substanceAdministration>
42
+ </entryRelationship>
43
+ {{#reason}}
44
+ <!-- QDM Attribute: Reason -->
45
+ {{> qrda_templates/template_partials/_reason}}
46
+ {{/reason}}
47
+ {{#negationRationale}}
48
+ <!-- QDM Attribute: Negation Rationale -->
49
+ {{> qrda_templates/template_partials/_reason}}
50
+ {{/negationRationale}}
51
+ {{#daysSupplied}}
52
+ <entryRelationship typeCode="REFR">
53
+ {{> qrda_templates/template_partials/_days_supplied}}
54
+ </entryRelationship>
55
+ {{/daysSupplied}}
56
+ {{#supply}}
57
+ <!-- QDM Attribute: Supply -->
58
+ <entryRelationship typeCode="REFR">
59
+ {{> qrda_templates/template_partials/_medication_supply_request}}
60
+ </entryRelationship>
61
+ {{/supply}}
62
+ </act>
63
+ </entry>
@@ -0,0 +1,70 @@
1
+ <entry>
2
+ <act classCode="ACT" moodCode="EVN" {{{negation_ind}}}>
3
+ <!-- Medication Dispensed Act -->
4
+ <templateId root="2.16.840.1.113883.10.20.24.3.139" extension="2018-10-01"/>
5
+ <id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
6
+ <code code="SPLY" codeSystem="2.16.840.1.113883.5.6" displayName="supply" codeSystemName="ActClass"/>
7
+ <entryRelationship typeCode="SUBJ">
8
+ <!--Medication dispensed -->
9
+ <supply classCode="SPLY" moodCode="EVN">
10
+ <!-- Medication Dispensed template -->
11
+ <templateId root="2.16.840.1.113883.10.20.24.3.45" extension="2018-10-01"/>
12
+ <!-- Medication Dispense template -->
13
+ <templateId root="2.16.840.1.113883.10.20.22.4.18" extension="2014-06-09"/>
14
+ <id root="1.3.6.1.4.1.115" extension="{{object_id}}"/>
15
+ <text>{{description}}</text>
16
+ <statusCode code="completed"/>
17
+ {{#relevantPeriod}}
18
+ <!-- QDM Attribute: Relevant Period -->
19
+ {{{medication_duration_effective_time}}}
20
+ {{/relevantPeriod}}
21
+ <product>
22
+ <manufacturedProduct classCode="MANU">
23
+ <!-- Medication Information (consolidation) template -->
24
+ <templateId root="2.16.840.1.113883.10.20.22.4.23" extension="2014-06-09"/>
25
+ <id root="{{random_id}}"/>
26
+ <manufacturedMaterial>
27
+ {{> _codes}}
28
+ </manufacturedMaterial>
29
+ </manufacturedProduct>
30
+ </product>
31
+ {{#authordatetime_or_dispenserid?}}
32
+ {{> qrda_templates/template_partials/_author}}
33
+ {{/authordatetime_or_dispenserid?}}
34
+ {{#prescriberId}}
35
+ <participant typeCode="PRF">
36
+ <participantRole>
37
+ <!-- QDM Attribute: Prescriber Id -->
38
+ {{{id_or_null_flavor}}}
39
+ </participantRole>
40
+ </participant>
41
+ {{/prescriberId}}
42
+ {{#daysSupplied}}
43
+ <entryRelationship typeCode="REFR">
44
+ {{> qrda_templates/template_partials/_days_supplied}}
45
+ </entryRelationship>
46
+ {{/daysSupplied}}
47
+ <entryRelationship typeCode="REFR">
48
+ <substanceAdministration classCode="SBADM" moodCode="EVN">
49
+ {{> qrda_templates/template_partials/_medication_details}}
50
+ <consumable>
51
+ <manufacturedProduct>
52
+ <manufacturedMaterial nullFlavor="NA"/>
53
+ </manufacturedProduct>
54
+ </consumable>
55
+ </substanceAdministration>
56
+ </entryRelationship>
57
+ {{#supply}}
58
+ <!-- QDM Attribute: Supply -->
59
+ <entryRelationship typeCode="REFR">
60
+ {{> qrda_templates/template_partials/_medication_supply_request}}
61
+ </entryRelationship>
62
+ {{/supply}}
63
+ {{#negationRationale}}
64
+ <!-- QDM Attribute: Negation Rationale -->
65
+ {{> qrda_templates/template_partials/_reason}}
66
+ {{/negationRationale}}
67
+ </supply>
68
+ </entryRelationship>
69
+ </act>
70
+ </entry>