cqm-models 2.0.0 → 3.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. checksums.yaml +4 -4
  2. data/.eslintrc.json +1 -1
  3. data/.github/workflows/gitleaks_github_actions.yml +28 -0
  4. data/.travis.yml +2 -2
  5. data/README.md +12 -9
  6. data/app/assets/javascripts/AdverseEvent.js +9 -3
  7. data/app/assets/javascripts/AllDataElements.js +18 -6
  8. data/app/assets/javascripts/AllergyIntolerance.js +8 -2
  9. data/app/assets/javascripts/AssessmentOrder.js +8 -2
  10. data/app/assets/javascripts/AssessmentPerformed.js +11 -3
  11. data/app/assets/javascripts/AssessmentRecommended.js +8 -2
  12. data/app/assets/javascripts/CareGoal.js +10 -3
  13. data/app/assets/javascripts/CommunicationPerformed.js +12 -6
  14. data/app/assets/javascripts/DeviceApplied.js +9 -2
  15. data/app/assets/javascripts/DeviceOrder.js +8 -2
  16. data/app/assets/javascripts/DeviceRecommended.js +8 -2
  17. data/app/assets/javascripts/Diagnosis.js +8 -2
  18. data/app/assets/javascripts/DiagnosticStudyOrder.js +8 -2
  19. data/app/assets/javascripts/DiagnosticStudyPerformed.js +9 -2
  20. data/app/assets/javascripts/DiagnosticStudyRecommended.js +8 -2
  21. data/app/assets/javascripts/EncounterOrder.js +9 -2
  22. data/app/assets/javascripts/EncounterPerformed.js +11 -5
  23. data/app/assets/javascripts/EncounterRecommended.js +8 -2
  24. data/app/assets/javascripts/FamilyHistory.js +8 -2
  25. data/app/assets/javascripts/ImmunizationAdministered.js +9 -2
  26. data/app/assets/javascripts/ImmunizationOrder.js +8 -2
  27. data/app/assets/javascripts/InterventionOrder.js +8 -2
  28. data/app/assets/javascripts/InterventionPerformed.js +9 -2
  29. data/app/assets/javascripts/InterventionRecommended.js +8 -2
  30. data/app/assets/javascripts/LaboratoryTestOrder.js +8 -2
  31. data/app/assets/javascripts/LaboratoryTestPerformed.js +9 -2
  32. data/app/assets/javascripts/LaboratoryTestRecommended.js +8 -2
  33. data/app/assets/javascripts/MedicationActive.js +9 -2
  34. data/app/assets/javascripts/MedicationAdministered.js +9 -2
  35. data/app/assets/javascripts/MedicationDischarge.js +9 -2
  36. data/app/assets/javascripts/MedicationDispensed.js +10 -4
  37. data/app/assets/javascripts/MedicationOrder.js +9 -4
  38. data/app/assets/javascripts/Participation.js +8 -2
  39. data/app/assets/javascripts/PatientCareExperience.js +8 -2
  40. data/app/assets/javascripts/PatientCharacteristic.js +7 -2
  41. data/app/assets/javascripts/PatientCharacteristicBirthdate.js +7 -2
  42. data/app/assets/javascripts/PatientCharacteristicClinicalTrialParticipant.js +7 -2
  43. data/app/assets/javascripts/PatientCharacteristicEthnicity.js +7 -2
  44. data/app/assets/javascripts/PatientCharacteristicExpired.js +7 -2
  45. data/app/assets/javascripts/PatientCharacteristicPayer.js +7 -2
  46. data/app/assets/javascripts/PatientCharacteristicRace.js +7 -2
  47. data/app/assets/javascripts/PatientCharacteristicSex.js +7 -2
  48. data/app/assets/javascripts/PhysicalExamOrder.js +8 -2
  49. data/app/assets/javascripts/PhysicalExamPerformed.js +9 -2
  50. data/app/assets/javascripts/PhysicalExamRecommended.js +8 -2
  51. data/app/assets/javascripts/ProcedureOrder.js +10 -3
  52. data/app/assets/javascripts/ProcedurePerformed.js +11 -3
  53. data/app/assets/javascripts/ProcedureRecommended.js +9 -3
  54. data/app/assets/javascripts/ProviderCareExperience.js +8 -2
  55. data/app/assets/javascripts/QDMPatient.js +25 -9
  56. data/app/assets/javascripts/RelatedPerson.js +42 -0
  57. data/app/assets/javascripts/SubstanceAdministered.js +9 -2
  58. data/app/assets/javascripts/SubstanceOrder.js +9 -2
  59. data/app/assets/javascripts/SubstanceRecommended.js +8 -2
  60. data/app/assets/javascripts/Symptom.js +8 -2
  61. data/app/assets/javascripts/attributes/CarePartner.js +33 -0
  62. data/app/assets/javascripts/attributes/Component.js +22 -1
  63. data/app/assets/javascripts/attributes/DiagnosisComponent.js +34 -0
  64. data/app/assets/javascripts/attributes/Entity.js +58 -0
  65. data/app/assets/javascripts/attributes/FacilityLocation.js +4 -1
  66. data/app/assets/javascripts/attributes/Identifier.js +23 -0
  67. data/app/assets/javascripts/attributes/Organization.js +33 -0
  68. data/app/assets/javascripts/attributes/PatientEntity.js +32 -0
  69. data/app/assets/javascripts/attributes/Practitioner.js +35 -0
  70. data/app/assets/javascripts/attributes/ResultComponent.js +31 -0
  71. data/app/assets/javascripts/basetypes/Any.js +24 -14
  72. data/app/assets/javascripts/basetypes/AnyEntity.js +44 -0
  73. data/app/assets/javascripts/basetypes/Code.js +8 -11
  74. data/app/assets/javascripts/basetypes/DataElement.js +17 -6
  75. data/app/assets/javascripts/basetypes/Interval.js +2 -2
  76. data/app/assets/javascripts/basetypes/QDMDate.js +36 -0
  77. data/app/assets/javascripts/basetypes/Quantity.js +1 -1
  78. data/app/assets/javascripts/basetypes/Ratio.js +1 -1
  79. data/app/assets/javascripts/cqm/Provider.js +0 -2
  80. data/app/models/cqm/individual_result.rb +2 -6
  81. data/app/models/cqm/provider.rb +4 -4
  82. data/app/models/hqmfOid_to_datatype_map.json +5 -1
  83. data/app/models/model_finder.rb +1 -0
  84. data/app/models/models.rb +12 -5
  85. data/app/models/qdm/adverse_event.rb +3 -2
  86. data/app/models/qdm/allergy_intolerance.rb +2 -1
  87. data/app/models/qdm/assessment_order.rb +2 -1
  88. data/app/models/qdm/assessment_performed.rb +5 -2
  89. data/app/models/qdm/assessment_recommended.rb +2 -1
  90. data/app/models/qdm/attributes/attribute.rb +1 -0
  91. data/app/models/qdm/attributes/care_partner.rb +10 -0
  92. data/app/models/qdm/attributes/component.rb +1 -1
  93. data/app/models/qdm/attributes/diagnosis_component.rb +10 -0
  94. data/app/models/qdm/attributes/entity.rb +15 -0
  95. data/app/models/qdm/attributes/facility_location.rb +1 -1
  96. data/app/models/qdm/{id.rb → attributes/identifier.rb} +3 -4
  97. data/app/models/qdm/attributes/organization.rb +10 -0
  98. data/app/models/qdm/attributes/patient_entity.rb +9 -0
  99. data/app/models/qdm/attributes/practitioner.rb +12 -0
  100. data/app/models/qdm/{result_component.rb → attributes/result_component.rb} +1 -3
  101. data/app/models/qdm/basetypes/code.rb +9 -10
  102. data/app/models/qdm/basetypes/data_element.rb +25 -18
  103. data/app/models/qdm/basetypes/date.rb +39 -0
  104. data/app/models/qdm/basetypes/interval.rb +8 -11
  105. data/app/models/qdm/basetypes/quantity.rb +1 -0
  106. data/app/models/qdm/basetypes/ratio.rb +1 -0
  107. data/app/models/qdm/care_goal.rb +4 -2
  108. data/app/models/qdm/communication_performed.rb +6 -5
  109. data/app/models/qdm/device_applied.rb +3 -1
  110. data/app/models/qdm/device_order.rb +2 -1
  111. data/app/models/qdm/device_recommended.rb +2 -1
  112. data/app/models/qdm/diagnosis.rb +2 -1
  113. data/app/models/qdm/diagnostic_study_order.rb +2 -1
  114. data/app/models/qdm/diagnostic_study_performed.rb +3 -1
  115. data/app/models/qdm/diagnostic_study_recommended.rb +2 -1
  116. data/app/models/qdm/encounter_order.rb +3 -1
  117. data/app/models/qdm/encounter_performed.rb +3 -2
  118. data/app/models/qdm/encounter_recommended.rb +2 -1
  119. data/app/models/qdm/family_history.rb +2 -1
  120. data/app/models/qdm/immunization_administered.rb +3 -1
  121. data/app/models/qdm/immunization_order.rb +2 -1
  122. data/app/models/qdm/intervention_order.rb +2 -1
  123. data/app/models/qdm/intervention_performed.rb +3 -1
  124. data/app/models/qdm/intervention_recommended.rb +2 -1
  125. data/app/models/qdm/laboratory_test_order.rb +2 -1
  126. data/app/models/qdm/laboratory_test_performed.rb +3 -1
  127. data/app/models/qdm/laboratory_test_recommended.rb +2 -1
  128. data/app/models/qdm/medication_active.rb +3 -1
  129. data/app/models/qdm/medication_administered.rb +3 -1
  130. data/app/models/qdm/medication_discharge.rb +3 -1
  131. data/app/models/qdm/medication_dispensed.rb +4 -3
  132. data/app/models/qdm/medication_order.rb +3 -3
  133. data/app/models/qdm/participation.rb +2 -1
  134. data/app/models/qdm/patient.rb +1 -1
  135. data/app/models/qdm/patient_care_experience.rb +2 -1
  136. data/app/models/qdm/patient_characteristic.rb +1 -1
  137. data/app/models/qdm/patient_characteristic_birthdate.rb +1 -1
  138. data/app/models/qdm/patient_characteristic_clinical_trial_participant.rb +1 -1
  139. data/app/models/qdm/patient_characteristic_ethnicity.rb +1 -1
  140. data/app/models/qdm/patient_characteristic_expired.rb +1 -1
  141. data/app/models/qdm/patient_characteristic_payer.rb +1 -1
  142. data/app/models/qdm/patient_characteristic_race.rb +1 -1
  143. data/app/models/qdm/patient_characteristic_sex.rb +1 -1
  144. data/app/models/qdm/physical_exam_order.rb +2 -1
  145. data/app/models/qdm/physical_exam_performed.rb +3 -1
  146. data/app/models/qdm/physical_exam_recommended.rb +2 -1
  147. data/app/models/qdm/procedure_order.rb +4 -2
  148. data/app/models/qdm/procedure_performed.rb +5 -2
  149. data/app/models/qdm/procedure_recommended.rb +3 -2
  150. data/app/models/qdm/provider_care_experience.rb +2 -1
  151. data/app/models/qdm/related_person.rb +13 -0
  152. data/app/models/qdm/substance_administered.rb +3 -1
  153. data/app/models/qdm/substance_order.rb +3 -1
  154. data/app/models/qdm/substance_recommended.rb +2 -1
  155. data/app/models/qdm/symptom.rb +2 -1
  156. data/bin/validate_generator.sh +1 -1
  157. data/cqm-models.gemspec +5 -5
  158. data/data/oids_qdm_5.5.json +337 -0
  159. data/dist/browser.js +12898 -6908
  160. data/dist/index.js +12897 -6907
  161. data/lib/generate_entities.rb +56 -0
  162. data/lib/generate_models.rb +77 -39
  163. data/lib/generate_patients.rb +20 -14
  164. data/lib/generate_types.rb +54 -14
  165. data/lib/generator_helpers.rb +14 -0
  166. data/modelinfo/qdm-modelinfo-5.5.xml +982 -0
  167. data/package.json +4 -4
  168. data/templates/entity_extension.rb.erb +6 -0
  169. data/templates/identifier_extension.rb.erb +58 -0
  170. data/templates/{id_template.js.erb → identifier_template.js.erb} +6 -5
  171. data/templates/models_template.rb.erb +19 -4
  172. data/templates/mongoose_template.js.erb +86 -12
  173. data/templates/patient_template.js.erb +0 -4
  174. data/yarn.lock +525 -392
  175. metadata +44 -22
  176. data/app/assets/javascripts/Id.js +0 -21
  177. data/app/assets/javascripts/ProviderCharacteristic.js +0 -36
  178. data/app/assets/javascripts/ResultComponent.js +0 -33
  179. data/app/models/qdm/provider_characteristic.rb +0 -12
@@ -3,12 +3,14 @@ module QDM
3
3
  class CareGoal < DataElement
4
4
  include Mongoid::Document
5
5
  embedded_in :patient
6
+ field :statusDate, type: Date
6
7
  field :relevantPeriod, type: QDM::Interval
7
- embeds_many :relatedTo, class_name: 'QDM::Id'
8
+ field :relatedTo, type: Array
8
9
  field :targetOutcome
10
+ embeds_one :performer, class_name: 'QDM::Entity'
9
11
  field :qdmTitle, type: String, default: 'Care Goal'
10
12
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.7'
11
13
  field :qdmCategory, type: String, default: 'care_goal'
12
- field :qdmVersion, type: String, default: '5.4'
14
+ field :qdmVersion, type: String, default: '5.5'
13
15
  end
14
16
  end
@@ -6,15 +6,16 @@ module QDM
6
6
  field :authorDatetime, type: DateTime
7
7
  field :category, type: QDM::Code
8
8
  field :medium, type: QDM::Code
9
- field :sender, type: QDM::Code
10
- field :recipient, type: QDM::Code
11
- embeds_many :relatedTo, class_name: 'QDM::Id'
12
- field :relevantPeriod, type: QDM::Interval
9
+ embeds_one :sender, class_name: 'QDM::Entity'
10
+ embeds_one :recipient, class_name: 'QDM::Entity'
11
+ field :relatedTo, type: Array
12
+ field :sentDatetime, type: DateTime
13
+ field :receivedDatetime, type: DateTime
13
14
  field :negationRationale, type: QDM::Code
14
15
  field :qdmTitle, type: String, default: 'Communication, Performed'
15
16
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.132'
16
17
  field :qdmCategory, type: String, default: 'communication'
17
18
  field :qdmStatus, type: String, default: 'performed'
18
- field :qdmVersion, type: String, default: '5.4'
19
+ field :qdmVersion, type: String, default: '5.5'
19
20
  end
20
21
  end
@@ -4,14 +4,16 @@ module QDM
4
4
  include Mongoid::Document
5
5
  embedded_in :patient
6
6
  field :authorDatetime, type: DateTime
7
+ field :relevantDatetime, type: DateTime
7
8
  field :relevantPeriod, type: QDM::Interval
8
9
  field :negationRationale, type: QDM::Code
9
10
  field :reason, type: QDM::Code
10
11
  field :anatomicalLocationSite, type: QDM::Code
12
+ embeds_one :performer, class_name: 'QDM::Entity'
11
13
  field :qdmTitle, type: String, default: 'Device, Applied'
12
14
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.13'
13
15
  field :qdmCategory, type: String, default: 'device'
14
16
  field :qdmStatus, type: String, default: 'applied'
15
- field :qdmVersion, type: String, default: '5.4'
17
+ field :qdmVersion, type: String, default: '5.5'
16
18
  end
17
19
  end
@@ -6,10 +6,11 @@ module QDM
6
6
  field :authorDatetime, type: DateTime
7
7
  field :negationRationale, type: QDM::Code
8
8
  field :reason, type: QDM::Code
9
+ embeds_one :requester, class_name: 'QDM::Entity'
9
10
  field :qdmTitle, type: String, default: 'Device, Order'
10
11
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.15'
11
12
  field :qdmCategory, type: String, default: 'device'
12
13
  field :qdmStatus, type: String, default: 'order'
13
- field :qdmVersion, type: String, default: '5.4'
14
+ field :qdmVersion, type: String, default: '5.5'
14
15
  end
15
16
  end
@@ -6,10 +6,11 @@ module QDM
6
6
  field :authorDatetime, type: DateTime
7
7
  field :negationRationale, type: QDM::Code
8
8
  field :reason, type: QDM::Code
9
+ embeds_one :requester, class_name: 'QDM::Entity'
9
10
  field :qdmTitle, type: String, default: 'Device, Recommended'
10
11
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.16'
11
12
  field :qdmCategory, type: String, default: 'device'
12
13
  field :qdmStatus, type: String, default: 'recommended'
13
- field :qdmVersion, type: String, default: '5.4'
14
+ field :qdmVersion, type: String, default: '5.5'
14
15
  end
15
16
  end
@@ -7,10 +7,11 @@ module QDM
7
7
  field :prevalencePeriod, type: QDM::Interval
8
8
  field :anatomicalLocationSite, type: QDM::Code
9
9
  field :severity, type: QDM::Code
10
+ embeds_one :recorder, class_name: 'QDM::Entity'
10
11
  field :qdmTitle, type: String, default: 'Diagnosis'
11
12
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.110'
12
13
  field :qrdaOid, type: String, default: '2.16.840.1.113883.10.20.24.3.135'
13
14
  field :qdmCategory, type: String, default: 'condition'
14
- field :qdmVersion, type: String, default: '5.4'
15
+ field :qdmVersion, type: String, default: '5.5'
15
16
  end
16
17
  end
@@ -6,10 +6,11 @@ module QDM
6
6
  field :authorDatetime, type: DateTime
7
7
  field :reason, type: QDM::Code
8
8
  field :negationRationale, type: QDM::Code
9
+ embeds_one :requester, class_name: 'QDM::Entity'
9
10
  field :qdmTitle, type: String, default: 'Diagnostic Study, Order'
10
11
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.22'
11
12
  field :qdmCategory, type: String, default: 'diagnostic_study'
12
13
  field :qdmStatus, type: String, default: 'order'
13
- field :qdmVersion, type: String, default: '5.4'
14
+ field :qdmVersion, type: String, default: '5.5'
14
15
  end
15
16
  end
@@ -4,6 +4,7 @@ module QDM
4
4
  include Mongoid::Document
5
5
  embedded_in :patient
6
6
  field :authorDatetime, type: DateTime
7
+ field :relevantDatetime, type: DateTime
7
8
  field :relevantPeriod, type: QDM::Interval
8
9
  field :reason, type: QDM::Code
9
10
  field :result
@@ -13,10 +14,11 @@ module QDM
13
14
  field :facilityLocation, type: QDM::FacilityLocation
14
15
  field :negationRationale, type: QDM::Code
15
16
  field :components, type: Array
17
+ embeds_one :performer, class_name: 'QDM::Entity'
16
18
  field :qdmTitle, type: String, default: 'Diagnostic Study, Performed'
17
19
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.23'
18
20
  field :qdmCategory, type: String, default: 'diagnostic_study'
19
21
  field :qdmStatus, type: String, default: 'performed'
20
- field :qdmVersion, type: String, default: '5.4'
22
+ field :qdmVersion, type: String, default: '5.5'
21
23
  end
22
24
  end
@@ -5,11 +5,12 @@ module QDM
5
5
  embedded_in :patient
6
6
  field :authorDatetime, type: DateTime
7
7
  field :negationRationale, type: QDM::Code
8
+ embeds_one :requester, class_name: 'QDM::Entity'
8
9
  field :qdmTitle, type: String, default: 'Diagnostic Study, Recommended'
9
10
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.24'
10
11
  field :qrdaOid, type: String, default: '2.16.840.1.113883.10.20.24.3.19'
11
12
  field :qdmCategory, type: String, default: 'diagnostic_study'
12
13
  field :qdmStatus, type: String, default: 'recommended'
13
- field :qdmVersion, type: String, default: '5.4'
14
+ field :qdmVersion, type: String, default: '5.5'
14
15
  end
15
16
  end
@@ -7,10 +7,12 @@ module QDM
7
7
  field :reason, type: QDM::Code
8
8
  field :facilityLocation, type: QDM::FacilityLocation
9
9
  field :negationRationale, type: QDM::Code
10
+ embeds_one :requester, class_name: 'QDM::Entity'
11
+ field :priority, type: QDM::Code
10
12
  field :qdmTitle, type: String, default: 'Encounter, Order'
11
13
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.27'
12
14
  field :qdmCategory, type: String, default: 'encounter'
13
15
  field :qdmStatus, type: String, default: 'order'
14
- field :qdmVersion, type: String, default: '5.4'
16
+ field :qdmVersion, type: String, default: '5.5'
15
17
  end
16
18
  end
@@ -9,13 +9,14 @@ module QDM
9
9
  field :dischargeDisposition, type: QDM::Code
10
10
  field :facilityLocations, type: Array, default: []
11
11
  field :diagnoses, type: Array
12
- field :principalDiagnosis, type: QDM::Code
13
12
  field :negationRationale, type: QDM::Code
14
13
  field :lengthOfStay, type: QDM::Quantity
14
+ field :priority, type: QDM::Code
15
+ embeds_one :participant, class_name: 'QDM::Entity'
15
16
  field :qdmTitle, type: String, default: 'Encounter, Performed'
16
17
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.5'
17
18
  field :qdmCategory, type: String, default: 'encounter'
18
19
  field :qdmStatus, type: String, default: 'performed'
19
- field :qdmVersion, type: String, default: '5.4'
20
+ field :qdmVersion, type: String, default: '5.5'
20
21
  end
21
22
  end
@@ -7,10 +7,11 @@ module QDM
7
7
  field :reason, type: QDM::Code
8
8
  field :facilityLocation, type: QDM::FacilityLocation
9
9
  field :negationRationale, type: QDM::Code
10
+ embeds_one :requester, class_name: 'QDM::Entity'
10
11
  field :qdmTitle, type: String, default: 'Encounter, Recommended'
11
12
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.28'
12
13
  field :qdmCategory, type: String, default: 'encounter'
13
14
  field :qdmStatus, type: String, default: 'recommended'
14
- field :qdmVersion, type: String, default: '5.4'
15
+ field :qdmVersion, type: String, default: '5.5'
15
16
  end
16
17
  end
@@ -5,10 +5,11 @@ module QDM
5
5
  embedded_in :patient
6
6
  field :authorDatetime, type: DateTime
7
7
  field :relationship, type: QDM::Code
8
+ embeds_one :recorder, class_name: 'QDM::Entity'
8
9
  field :qdmTitle, type: String, default: 'Family History'
9
10
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.111'
10
11
  field :qrdaOid, type: String, default: '2.16.840.1.113883.10.20.24.3.12'
11
12
  field :qdmCategory, type: String, default: 'family_history'
12
- field :qdmVersion, type: String, default: '5.4'
13
+ field :qdmVersion, type: String, default: '5.5'
13
14
  end
14
15
  end
@@ -4,15 +4,17 @@ module QDM
4
4
  include Mongoid::Document
5
5
  embedded_in :patient
6
6
  field :authorDatetime, type: DateTime
7
+ field :relevantDatetime, type: DateTime
7
8
  field :reason, type: QDM::Code
8
9
  field :dosage, type: QDM::Quantity
9
10
  field :route, type: QDM::Code
10
11
  field :negationRationale, type: QDM::Code
12
+ embeds_one :performer, class_name: 'QDM::Entity'
11
13
  field :qdmTitle, type: String, default: 'Immunization, Administered'
12
14
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.112'
13
15
  field :qrdaOid, type: String, default: '2.16.840.1.113883.10.20.24.3.140'
14
16
  field :qdmCategory, type: String, default: 'immunization'
15
17
  field :qdmStatus, type: String, default: 'administered'
16
- field :qdmVersion, type: String, default: '5.4'
18
+ field :qdmVersion, type: String, default: '5.5'
17
19
  end
18
20
  end
@@ -10,10 +10,11 @@ module QDM
10
10
  field :reason, type: QDM::Code
11
11
  field :route, type: QDM::Code
12
12
  field :negationRationale, type: QDM::Code
13
+ embeds_one :requester, class_name: 'QDM::Entity'
13
14
  field :qdmTitle, type: String, default: 'Immunization, Order'
14
15
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.113'
15
16
  field :qdmCategory, type: String, default: 'immunization'
16
17
  field :qdmStatus, type: String, default: 'order'
17
- field :qdmVersion, type: String, default: '5.4'
18
+ field :qdmVersion, type: String, default: '5.5'
18
19
  end
19
20
  end
@@ -6,10 +6,11 @@ module QDM
6
6
  field :authorDatetime, type: DateTime
7
7
  field :reason, type: QDM::Code
8
8
  field :negationRationale, type: QDM::Code
9
+ embeds_one :requester, class_name: 'QDM::Entity'
9
10
  field :qdmTitle, type: String, default: 'Intervention, Order'
10
11
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.35'
11
12
  field :qdmCategory, type: String, default: 'intervention'
12
13
  field :qdmStatus, type: String, default: 'order'
13
- field :qdmVersion, type: String, default: '5.4'
14
+ field :qdmVersion, type: String, default: '5.5'
14
15
  end
15
16
  end
@@ -4,15 +4,17 @@ module QDM
4
4
  include Mongoid::Document
5
5
  embedded_in :patient
6
6
  field :authorDatetime, type: DateTime
7
+ field :relevantDatetime, type: DateTime
7
8
  field :relevantPeriod, type: QDM::Interval
8
9
  field :reason, type: QDM::Code
9
10
  field :result
10
11
  field :status, type: QDM::Code
11
12
  field :negationRationale, type: QDM::Code
13
+ embeds_one :performer, class_name: 'QDM::Entity'
12
14
  field :qdmTitle, type: String, default: 'Intervention, Performed'
13
15
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.36'
14
16
  field :qdmCategory, type: String, default: 'intervention'
15
17
  field :qdmStatus, type: String, default: 'performed'
16
- field :qdmVersion, type: String, default: '5.4'
18
+ field :qdmVersion, type: String, default: '5.5'
17
19
  end
18
20
  end
@@ -6,10 +6,11 @@ module QDM
6
6
  field :authorDatetime, type: DateTime
7
7
  field :reason, type: QDM::Code
8
8
  field :negationRationale, type: QDM::Code
9
+ embeds_one :requester, class_name: 'QDM::Entity'
9
10
  field :qdmTitle, type: String, default: 'Intervention, Recommended'
10
11
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.37'
11
12
  field :qdmCategory, type: String, default: 'intervention'
12
13
  field :qdmStatus, type: String, default: 'recommended'
13
- field :qdmVersion, type: String, default: '5.4'
14
+ field :qdmVersion, type: String, default: '5.5'
14
15
  end
15
16
  end
@@ -6,10 +6,11 @@ module QDM
6
6
  field :authorDatetime, type: DateTime
7
7
  field :reason, type: QDM::Code
8
8
  field :negationRationale, type: QDM::Code
9
+ embeds_one :requester, class_name: 'QDM::Entity'
9
10
  field :qdmTitle, type: String, default: 'Laboratory Test, Order'
10
11
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.41'
11
12
  field :qdmCategory, type: String, default: 'laboratory_test'
12
13
  field :qdmStatus, type: String, default: 'order'
13
- field :qdmVersion, type: String, default: '5.4'
14
+ field :qdmVersion, type: String, default: '5.5'
14
15
  end
15
16
  end
@@ -4,6 +4,7 @@ module QDM
4
4
  include Mongoid::Document
5
5
  embedded_in :patient
6
6
  field :authorDatetime, type: DateTime
7
+ field :relevantDatetime, type: DateTime
7
8
  field :relevantPeriod, type: QDM::Interval
8
9
  field :status, type: QDM::Code
9
10
  field :method, type: QDM::Code
@@ -13,10 +14,11 @@ module QDM
13
14
  field :referenceRange, type: QDM::Interval
14
15
  field :negationRationale, type: QDM::Code
15
16
  field :components, type: Array
17
+ embeds_one :performer, class_name: 'QDM::Entity'
16
18
  field :qdmTitle, type: String, default: 'Laboratory Test, Performed'
17
19
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.42'
18
20
  field :qdmCategory, type: String, default: 'laboratory_test'
19
21
  field :qdmStatus, type: String, default: 'performed'
20
- field :qdmVersion, type: String, default: '5.4'
22
+ field :qdmVersion, type: String, default: '5.5'
21
23
  end
22
24
  end
@@ -6,10 +6,11 @@ module QDM
6
6
  field :authorDatetime, type: DateTime
7
7
  field :reason, type: QDM::Code
8
8
  field :negationRationale, type: QDM::Code
9
+ embeds_one :requester, class_name: 'QDM::Entity'
9
10
  field :qdmTitle, type: String, default: 'Laboratory Test, Recommended'
10
11
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.43'
11
12
  field :qdmCategory, type: String, default: 'laboratory_test'
12
13
  field :qdmStatus, type: String, default: 'recommended'
13
- field :qdmVersion, type: String, default: '5.4'
14
+ field :qdmVersion, type: String, default: '5.5'
14
15
  end
15
16
  end
@@ -3,14 +3,16 @@ module QDM
3
3
  class MedicationActive < DataElement
4
4
  include Mongoid::Document
5
5
  embedded_in :patient
6
+ field :relevantDatetime, type: DateTime
6
7
  field :relevantPeriod, type: QDM::Interval
7
8
  field :dosage, type: QDM::Quantity
8
9
  field :frequency, type: QDM::Code
9
10
  field :route, type: QDM::Code
11
+ embeds_one :recorder, class_name: 'QDM::Entity'
10
12
  field :qdmTitle, type: String, default: 'Medication, Active'
11
13
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.44'
12
14
  field :qdmCategory, type: String, default: 'medication'
13
15
  field :qdmStatus, type: String, default: 'active'
14
- field :qdmVersion, type: String, default: '5.4'
16
+ field :qdmVersion, type: String, default: '5.5'
15
17
  end
16
18
  end
@@ -4,16 +4,18 @@ module QDM
4
4
  include Mongoid::Document
5
5
  embedded_in :patient
6
6
  field :authorDatetime, type: DateTime
7
+ field :relevantDatetime, type: DateTime
7
8
  field :relevantPeriod, type: QDM::Interval
8
9
  field :dosage, type: QDM::Quantity
9
10
  field :frequency, type: QDM::Code
10
11
  field :route, type: QDM::Code
11
12
  field :reason, type: QDM::Code
12
13
  field :negationRationale, type: QDM::Code
14
+ embeds_one :performer, class_name: 'QDM::Entity'
13
15
  field :qdmTitle, type: String, default: 'Medication, Administered'
14
16
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.45'
15
17
  field :qdmCategory, type: String, default: 'medication'
16
18
  field :qdmStatus, type: String, default: 'administered'
17
- field :qdmVersion, type: String, default: '5.4'
19
+ field :qdmVersion, type: String, default: '5.5'
18
20
  end
19
21
  end
@@ -11,10 +11,12 @@ module QDM
11
11
  field :daysSupplied, type: Integer
12
12
  field :route, type: QDM::Code
13
13
  field :negationRationale, type: QDM::Code
14
+ embeds_one :prescriber, class_name: 'QDM::Entity'
15
+ embeds_one :recorder, class_name: 'QDM::Entity'
14
16
  field :qdmTitle, type: String, default: 'Medication, Discharge'
15
17
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.48'
16
18
  field :qdmCategory, type: String, default: 'medication'
17
19
  field :qdmStatus, type: String, default: 'discharge'
18
- field :qdmVersion, type: String, default: '5.4'
20
+ field :qdmVersion, type: String, default: '5.5'
19
21
  end
20
22
  end
@@ -4,6 +4,7 @@ module QDM
4
4
  include Mongoid::Document
5
5
  embedded_in :patient
6
6
  field :authorDatetime, type: DateTime
7
+ field :relevantDatetime, type: DateTime
7
8
  field :relevantPeriod, type: QDM::Interval
8
9
  field :refills, type: Integer
9
10
  field :dosage, type: QDM::Quantity
@@ -11,13 +12,13 @@ module QDM
11
12
  field :frequency, type: QDM::Code
12
13
  field :daysSupplied, type: Integer
13
14
  field :route, type: QDM::Code
14
- embeds_one :prescriberId, class_name: 'QDM::Id'
15
- embeds_one :dispenserId, class_name: 'QDM::Id'
15
+ embeds_one :prescriber, class_name: 'QDM::Entity'
16
+ embeds_one :dispenser, class_name: 'QDM::Entity'
16
17
  field :negationRationale, type: QDM::Code
17
18
  field :qdmTitle, type: String, default: 'Medication, Dispensed'
18
19
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.49'
19
20
  field :qdmCategory, type: String, default: 'medication'
20
21
  field :qdmStatus, type: String, default: 'dispensed'
21
- field :qdmVersion, type: String, default: '5.4'
22
+ field :qdmVersion, type: String, default: '5.5'
22
23
  end
23
24
  end
@@ -3,8 +3,8 @@ module QDM
3
3
  class MedicationOrder < DataElement
4
4
  include Mongoid::Document
5
5
  embedded_in :patient
6
- field :relevantPeriod, type: QDM::Interval
7
6
  field :authorDatetime, type: DateTime
7
+ field :relevantPeriod, type: QDM::Interval
8
8
  field :refills, type: Integer
9
9
  field :dosage, type: QDM::Quantity
10
10
  field :supply, type: QDM::Quantity
@@ -13,12 +13,12 @@ module QDM
13
13
  field :route, type: QDM::Code
14
14
  field :setting, type: QDM::Code
15
15
  field :reason, type: QDM::Code
16
- embeds_one :prescriberId, class_name: 'QDM::Id'
17
16
  field :negationRationale, type: QDM::Code
17
+ embeds_one :prescriber, class_name: 'QDM::Entity'
18
18
  field :qdmTitle, type: String, default: 'Medication, Order'
19
19
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.51'
20
20
  field :qdmCategory, type: String, default: 'medication'
21
21
  field :qdmStatus, type: String, default: 'order'
22
- field :qdmVersion, type: String, default: '5.4'
22
+ field :qdmVersion, type: String, default: '5.5'
23
23
  end
24
24
  end
@@ -4,9 +4,10 @@ module QDM
4
4
  include Mongoid::Document
5
5
  embedded_in :patient
6
6
  field :participationPeriod, type: QDM::Interval
7
+ embeds_one :recorder, class_name: 'QDM::Entity'
7
8
  field :qdmTitle, type: String, default: 'Participation'
8
9
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.130'
9
10
  field :qdmCategory, type: String, default: 'participation'
10
- field :qdmVersion, type: String, default: '5.4'
11
+ field :qdmVersion, type: String, default: '5.5'
11
12
  end
12
13
  end