cqm-models 2.0.1 → 3.0.4

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 +8819 -4882
  160. data/dist/index.js +8818 -4881
  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 +396 -320
  175. metadata +40 -19
  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,7 +3,7 @@ module QDM
3
3
  class Patient
4
4
  include Mongoid::Document
5
5
  field :birthDatetime, type: DateTime
6
- field :qdmVersion, type: String, default: '5.4'
6
+ field :qdmVersion, type: String, default: '5.5'
7
7
  embedded_in :cqmPatient, class_name: 'CQM::Patient'
8
8
 
9
9
  # These are the "data criteria", or QDM datatype elements that exist on a
@@ -4,9 +4,10 @@ module QDM
4
4
  include Mongoid::Document
5
5
  embedded_in :patient
6
6
  field :authorDatetime, type: DateTime
7
+ embeds_one :recorder, class_name: 'QDM::Entity'
7
8
  field :qdmTitle, type: String, default: 'Patient Care Experience'
8
9
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.52'
9
10
  field :qdmCategory, type: String, default: 'care_experience'
10
- field :qdmVersion, type: String, default: '5.4'
11
+ field :qdmVersion, type: String, default: '5.5'
11
12
  end
12
13
  end
@@ -7,6 +7,6 @@ module QDM
7
7
  field :qdmTitle, type: String, default: 'Patient Characteristic'
8
8
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.53'
9
9
  field :qdmCategory, type: String, default: 'patient_characteristic'
10
- field :qdmVersion, type: String, default: '5.4'
10
+ field :qdmVersion, type: String, default: '5.5'
11
11
  end
12
12
  end
@@ -8,6 +8,6 @@ module QDM
8
8
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.54'
9
9
  field :qdmCategory, type: String, default: 'patient_characteristic'
10
10
  field :qdmStatus, type: String, default: 'birthdate'
11
- field :qdmVersion, type: String, default: '5.4'
11
+ field :qdmVersion, type: String, default: '5.5'
12
12
  end
13
13
  end
@@ -10,6 +10,6 @@ module QDM
10
10
  field :qrdaOid, type: String, default: '2.16.840.1.113883.10.20.24.3.51'
11
11
  field :qdmCategory, type: String, default: 'patient_characteristic'
12
12
  field :qdmStatus, type: String, default: 'clinical_trial_participant'
13
- field :qdmVersion, type: String, default: '5.4'
13
+ field :qdmVersion, type: String, default: '5.5'
14
14
  end
15
15
  end
@@ -7,6 +7,6 @@ module QDM
7
7
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.56'
8
8
  field :qdmCategory, type: String, default: 'patient_characteristic'
9
9
  field :qdmStatus, type: String, default: 'ethnicity'
10
- field :qdmVersion, type: String, default: '5.4'
10
+ field :qdmVersion, type: String, default: '5.5'
11
11
  end
12
12
  end
@@ -9,6 +9,6 @@ module QDM
9
9
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.57'
10
10
  field :qdmCategory, type: String, default: 'patient_characteristic'
11
11
  field :qdmStatus, type: String, default: 'expired'
12
- field :qdmVersion, type: String, default: '5.4'
12
+ field :qdmVersion, type: String, default: '5.5'
13
13
  end
14
14
  end
@@ -8,6 +8,6 @@ module QDM
8
8
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.58'
9
9
  field :qdmCategory, type: String, default: 'patient_characteristic'
10
10
  field :qdmStatus, type: String, default: 'payer'
11
- field :qdmVersion, type: String, default: '5.4'
11
+ field :qdmVersion, type: String, default: '5.5'
12
12
  end
13
13
  end
@@ -7,6 +7,6 @@ module QDM
7
7
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.59'
8
8
  field :qdmCategory, type: String, default: 'patient_characteristic'
9
9
  field :qdmStatus, type: String, default: 'race'
10
- field :qdmVersion, type: String, default: '5.4'
10
+ field :qdmVersion, type: String, default: '5.5'
11
11
  end
12
12
  end
@@ -7,6 +7,6 @@ module QDM
7
7
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.55'
8
8
  field :qdmCategory, type: String, default: 'patient_characteristic'
9
9
  field :qdmStatus, type: String, default: 'gender'
10
- field :qdmVersion, type: String, default: '5.4'
10
+ field :qdmVersion, type: String, default: '5.5'
11
11
  end
12
12
  end
@@ -7,10 +7,11 @@ module QDM
7
7
  field :reason, type: QDM::Code
8
8
  field :anatomicalLocationSite, type: QDM::Code
9
9
  field :negationRationale, type: QDM::Code
10
+ embeds_one :requester, class_name: 'QDM::Entity'
10
11
  field :qdmTitle, type: String, default: 'Physical Exam, Order'
11
12
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.61'
12
13
  field :qdmCategory, type: String, default: 'physical_exam'
13
14
  field :qdmStatus, type: String, default: 'order'
14
- field :qdmVersion, type: String, default: '5.4'
15
+ field :qdmVersion, type: String, default: '5.5'
15
16
  end
16
17
  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 :method, type: QDM::Code
@@ -11,10 +12,11 @@ module QDM
11
12
  field :anatomicalLocationSite, type: QDM::Code
12
13
  field :negationRationale, type: QDM::Code
13
14
  field :components, type: Array
15
+ embeds_one :performer, class_name: 'QDM::Entity'
14
16
  field :qdmTitle, type: String, default: 'Physical Exam, Performed'
15
17
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.62'
16
18
  field :qdmCategory, type: String, default: 'physical_exam'
17
19
  field :qdmStatus, type: String, default: 'performed'
18
- field :qdmVersion, type: String, default: '5.4'
20
+ field :qdmVersion, type: String, default: '5.5'
19
21
  end
20
22
  end
@@ -7,10 +7,11 @@ module QDM
7
7
  field :reason, type: QDM::Code
8
8
  field :anatomicalLocationSite, type: QDM::Code
9
9
  field :negationRationale, type: QDM::Code
10
+ embeds_one :requester, class_name: 'QDM::Entity'
10
11
  field :qdmTitle, type: String, default: 'Physical Exam, Recommended'
11
12
  field :hqmfOid, type: String, default: '22.16.840.1.113883.10.20.28.4.63'
12
13
  field :qdmCategory, type: String, default: 'physical_exam'
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
@@ -6,12 +6,14 @@ module QDM
6
6
  field :authorDatetime, type: DateTime
7
7
  field :reason, type: QDM::Code
8
8
  field :anatomicalLocationSite, type: QDM::Code
9
- field :ordinality, type: QDM::Code
9
+ field :rank, type: Integer
10
+ field :priority, type: QDM::Code
10
11
  field :negationRationale, type: QDM::Code
12
+ embeds_one :requester, class_name: 'QDM::Entity'
11
13
  field :qdmTitle, type: String, default: 'Procedure, Order'
12
14
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.66'
13
15
  field :qdmCategory, type: String, default: 'procedure'
14
16
  field :qdmStatus, type: String, default: 'order'
15
- field :qdmVersion, type: String, default: '5.4'
17
+ field :qdmVersion, type: String, default: '5.5'
16
18
  end
17
19
  end
@@ -4,20 +4,23 @@ 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 :method, type: QDM::Code
10
11
  field :result
11
12
  field :status, type: QDM::Code
12
13
  field :anatomicalLocationSite, type: QDM::Code
13
- field :ordinality, type: QDM::Code
14
+ field :rank, type: Integer
15
+ field :priority, type: QDM::Code
14
16
  field :incisionDatetime, type: DateTime
15
17
  field :negationRationale, type: QDM::Code
16
18
  field :components, type: Array
19
+ embeds_one :performer, class_name: 'QDM::Entity'
17
20
  field :qdmTitle, type: String, default: 'Procedure, Performed'
18
21
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.67'
19
22
  field :qdmCategory, type: String, default: 'procedure'
20
23
  field :qdmStatus, type: String, default: 'performed'
21
- field :qdmVersion, type: String, default: '5.4'
24
+ field :qdmVersion, type: String, default: '5.5'
22
25
  end
23
26
  end
@@ -6,12 +6,13 @@ module QDM
6
6
  field :authorDatetime, type: DateTime
7
7
  field :reason, type: QDM::Code
8
8
  field :anatomicalLocationSite, type: QDM::Code
9
- field :ordinality, type: QDM::Code
9
+ field :rank, type: Integer
10
+ embeds_one :requester, class_name: 'QDM::Entity'
10
11
  field :negationRationale, type: QDM::Code
11
12
  field :qdmTitle, type: String, default: 'Procedure, Recommended'
12
13
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.68'
13
14
  field :qdmCategory, type: String, default: 'procedure'
14
15
  field :qdmStatus, type: String, default: 'recommended'
15
- field :qdmVersion, type: String, default: '5.4'
16
+ field :qdmVersion, type: String, default: '5.5'
16
17
  end
17
18
  end
@@ -4,9 +4,10 @@ module QDM
4
4
  include Mongoid::Document
5
5
  embedded_in :patient
6
6
  field :authorDatetime, type: DateTime
7
+ embeds_one :recorder, class_name: 'QDM::Entity'
7
8
  field :qdmTitle, type: String, default: 'Provider Care Experience'
8
9
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.70'
9
10
  field :qdmCategory, type: String, default: 'care_experience'
10
- field :qdmVersion, type: String, default: '5.4'
11
+ field :qdmVersion, type: String, default: '5.5'
11
12
  end
12
13
  end
@@ -0,0 +1,13 @@
1
+ module QDM
2
+ # app/models/qdm/related_person.rb
3
+ class RelatedPerson < DataElement
4
+ include Mongoid::Document
5
+ embedded_in :patient
6
+ embeds_one :identifier, class_name: 'QDM::Identifier'
7
+ field :linkedPatientId, type: String
8
+ field :qdmTitle, type: String, default: 'Related Person'
9
+ field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.141'
10
+ field :qdmCategory, type: String, default: 'related_person'
11
+ field :qdmVersion, type: String, default: '5.5'
12
+ end
13
+ 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 :dosage, type: QDM::Quantity
9
10
  field :frequency, type: QDM::Code
10
11
  field :route, 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: 'Substance, Administered'
13
15
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.73'
14
16
  field :qdmCategory, type: String, default: 'substance'
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
@@ -4,6 +4,7 @@ module QDM
4
4
  include Mongoid::Document
5
5
  embedded_in :patient
6
6
  field :authorDatetime, type: DateTime
7
+ field :relevantPeriod, type: QDM::Interval
7
8
  field :reason, type: QDM::Code
8
9
  field :dosage, type: QDM::Quantity
9
10
  field :supply, type: QDM::Quantity
@@ -11,10 +12,11 @@ module QDM
11
12
  field :refills, type: Integer
12
13
  field :route, type: QDM::Code
13
14
  field :negationRationale, type: QDM::Code
15
+ embeds_one :requester, class_name: 'QDM::Entity'
14
16
  field :qdmTitle, type: String, default: 'Substance, Order'
15
17
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.77'
16
18
  field :qdmCategory, type: String, default: 'substance'
17
19
  field :qdmStatus, type: String, default: 'order'
18
- field :qdmVersion, type: String, default: '5.4'
20
+ field :qdmVersion, type: String, default: '5.5'
19
21
  end
20
22
  end
@@ -10,10 +10,11 @@ module QDM
10
10
  field :refills, type: Integer
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: 'Substance, Recommended'
14
15
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.78'
15
16
  field :qdmCategory, type: String, default: 'substance'
16
17
  field :qdmStatus, type: String, default: 'recommended'
17
- field :qdmVersion, type: String, default: '5.4'
18
+ field :qdmVersion, type: String, default: '5.5'
18
19
  end
19
20
  end
@@ -5,10 +5,11 @@ module QDM
5
5
  embedded_in :patient
6
6
  field :prevalencePeriod, type: QDM::Interval
7
7
  field :severity, type: QDM::Code
8
+ embeds_one :recorder, class_name: 'QDM::Entity'
8
9
  field :qdmTitle, type: String, default: 'Symptom'
9
10
  field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.116'
10
11
  field :qrdaOid, type: String, default: '2.16.840.1.113883.10.20.24.3.136'
11
12
  field :qdmCategory, type: String, default: 'symptom'
12
- field :qdmVersion, type: String, default: '5.4'
13
+ field :qdmVersion, type: String, default: '5.5'
13
14
  end
14
15
  end
@@ -1,6 +1,6 @@
1
1
  #!/bin/bash
2
2
 
3
- yes | ruby lib/generate_models.rb modelinfo/qdm-modelinfo-5.4.xml data/oids_qdm_5.4.json
3
+ yes | ruby lib/generate_models.rb modelinfo/qdm-modelinfo-5.5.xml data/oids_qdm_5.5.json
4
4
 
5
5
  if git diff-index --quiet HEAD --; then
6
6
  echo "Generator script produces no differences."
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'cqm-models'
7
- spec.version = '2.0.1'
7
+ spec.version = '3.0.4'
8
8
  spec.authors = ['aholmes@mitre.org', 'mokeefe@mitre.org', 'lades@mitre.org']
9
9
 
10
10
  spec.summary = 'Mongo models that correspond to the QDM specification.'
@@ -20,12 +20,12 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ['lib']
21
21
 
22
22
  spec.add_development_dependency 'bundle-audit'
23
- spec.add_development_dependency 'bundler', '~> 1.15'
24
- spec.add_development_dependency 'byebug', '~> 10.0.0'
23
+ spec.add_development_dependency 'bundler', '~> 2.1.4'
24
+ spec.add_development_dependency 'byebug', '~> 11.0.1'
25
25
  spec.add_development_dependency 'codecov'
26
- spec.add_development_dependency 'mongoid', '~> 6.3.0'
26
+ spec.add_development_dependency 'mongoid', '~> 6.4'
27
27
  spec.add_development_dependency 'rails', '~> 5.2'
28
- spec.add_development_dependency 'rake', '~> 10.0'
28
+ spec.add_development_dependency 'rake', '~> 12.3.3'
29
29
  spec.add_development_dependency 'rspec', '~> 3.0'
30
30
  spec.add_development_dependency 'rubocop', '~> 0.54.0'
31
31
  spec.add_development_dependency 'simplecov'
@@ -0,0 +1,337 @@
1
+ {
2
+ "adverse_event": {
3
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.120",
4
+ "qrda_oid": "",
5
+ "qdm_category": "adverse_event",
6
+ "qdm_status": ""
7
+ },
8
+ "allergy_intolerance": {
9
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.119",
10
+ "qrda_oid": "",
11
+ "qdm_category": "allergy",
12
+ "qdm_status": "intolerance"
13
+ },
14
+ "assessment_order": {
15
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.131",
16
+ "qrda_oid": "",
17
+ "qdm_category": "assessment",
18
+ "qdm_status": "order"
19
+ },
20
+ "assessment_performed": {
21
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.117",
22
+ "qrda_oid": "",
23
+ "qdm_category": "assessment",
24
+ "qdm_status": "performed"
25
+ },
26
+ "assessment_recommended": {
27
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.118",
28
+ "qrda_oid": "",
29
+ "qdm_category": "assessment",
30
+ "qdm_status": "recommended"
31
+ },
32
+ "care_goal": {
33
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.7",
34
+ "qrda_oid": "",
35
+ "qdm_category": "care_goal",
36
+ "qdm_status": ""
37
+ },
38
+ "care_partner": {
39
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.134",
40
+ "qrda_oid": "2.16.840.1.113883.10.20.24.3.160"
41
+ },
42
+ "communication_performed": {
43
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.132",
44
+ "qrda_oid": "",
45
+ "qdm_category": "communication",
46
+ "qdm_status": "performed"
47
+ },
48
+ "device_applied": {
49
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.13",
50
+ "qrda_oid": "",
51
+ "qdm_category": "device",
52
+ "qdm_status": "applied"
53
+ },
54
+ "device_order": {
55
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.15",
56
+ "qrda_oid": "",
57
+ "qdm_category": "device",
58
+ "qdm_status": "order"
59
+ },
60
+ "device_recommended": {
61
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.16",
62
+ "qrda_oid": "",
63
+ "qdm_category": "device",
64
+ "qdm_status": "recommended"
65
+ },
66
+ "diagnosis": {
67
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.110",
68
+ "qrda_oid": "2.16.840.1.113883.10.20.24.3.135",
69
+ "qdm_category": "condition",
70
+ "qdm_status": ""
71
+ },
72
+ "diagnostic_study_order": {
73
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.22",
74
+ "qrda_oid": "",
75
+ "qdm_category": "diagnostic_study",
76
+ "qdm_status": "order"
77
+ },
78
+ "diagnostic_study_performed": {
79
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.23",
80
+ "qrda_oid": "",
81
+ "qdm_category": "diagnostic_study",
82
+ "qdm_status": "performed"
83
+ },
84
+ "diagnostic_study_recommended": {
85
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.24",
86
+ "qrda_oid": "2.16.840.1.113883.10.20.24.3.19",
87
+ "qdm_category": "diagnostic_study",
88
+ "qdm_status": "recommended"
89
+ },
90
+ "encounter_order": {
91
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.27",
92
+ "qrda_oid": "",
93
+ "qdm_category": "encounter",
94
+ "qdm_status": "order"
95
+ },
96
+ "encounter_performed": {
97
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.5",
98
+ "qrda_oid": "",
99
+ "qdm_category": "encounter",
100
+ "qdm_status": "performed"
101
+ },
102
+ "encounter_recommended": {
103
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.28",
104
+ "qrda_oid": "",
105
+ "qdm_category": "encounter",
106
+ "qdm_status": "recommended"
107
+ },
108
+ "family_history": {
109
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.111",
110
+ "qrda_oid": "2.16.840.1.113883.10.20.24.3.12",
111
+ "qdm_category": "family_history",
112
+ "qdm_status": ""
113
+ },
114
+ "immunization_administered": {
115
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.112",
116
+ "qrda_oid": "2.16.840.1.113883.10.20.24.3.140",
117
+ "qdm_category": "immunization",
118
+ "qdm_status": "administered"
119
+ },
120
+ "immunization_order": {
121
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.113",
122
+ "qrda_oid": "",
123
+ "qdm_category": "immunization",
124
+ "qdm_status": "order"
125
+ },
126
+ "intervention_order": {
127
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.35",
128
+ "qrda_oid": "",
129
+ "qdm_category": "intervention",
130
+ "qdm_status": "order"
131
+ },
132
+ "intervention_performed": {
133
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.36",
134
+ "qrda_oid": "",
135
+ "qdm_category": "intervention",
136
+ "qdm_status": "performed"
137
+ },
138
+ "intervention_recommended": {
139
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.37",
140
+ "qrda_oid": "",
141
+ "qdm_category": "intervention",
142
+ "qdm_status": "recommended"
143
+ },
144
+ "laboratory_test_order": {
145
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.41",
146
+ "qrda_oid": "",
147
+ "qdm_category": "laboratory_test",
148
+ "qdm_status": "order"
149
+ },
150
+ "laboratory_test_performed": {
151
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.42",
152
+ "qrda_oid": "",
153
+ "qdm_category": "laboratory_test",
154
+ "qdm_status": "performed"
155
+ },
156
+ "laboratory_test_recommended": {
157
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.43",
158
+ "qrda_oid": "",
159
+ "qdm_category": "laboratory_test",
160
+ "qdm_status": "recommended"
161
+ },
162
+ "medication_active": {
163
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.44",
164
+ "qrda_oid": "",
165
+ "qdm_category": "medication",
166
+ "qdm_status": "active"
167
+ },
168
+ "medication_administered": {
169
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.45",
170
+ "qrda_oid": "",
171
+ "qdm_category": "medication",
172
+ "qdm_status": "administered"
173
+ },
174
+ "medication_discharge": {
175
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.48",
176
+ "qrda_oid": "",
177
+ "qdm_category": "medication",
178
+ "qdm_status": "discharge"
179
+ },
180
+ "medication_dispensed": {
181
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.49",
182
+ "qrda_oid": "",
183
+ "qdm_category": "medication",
184
+ "qdm_status": "dispensed"
185
+ },
186
+ "medication_order": {
187
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.51",
188
+ "qrda_oid": "",
189
+ "qdm_category": "medication",
190
+ "qdm_status": "order"
191
+ },
192
+ "organization": {
193
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.135",
194
+ "qrda_oid": "2.16.840.1.113883.10.20.24.3.163"
195
+ },
196
+ "participation": {
197
+ "hqmf_title": "Program Participation",
198
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.130",
199
+ "qrda_oid": "",
200
+ "qdm_category": "participation",
201
+ "qdm_status": ""
202
+ },
203
+ "patient_care_experience": {
204
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.52",
205
+ "qrda_oid": "",
206
+ "qdm_category": "care_experience",
207
+ "qdm_status": ""
208
+ },
209
+ "patient_characteristic": {
210
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.53",
211
+ "qrda_oid": "",
212
+ "qdm_category": "patient_characteristic",
213
+ "qdm_status": ""
214
+ },
215
+ "patient_characteristic_birthdate": {
216
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.54",
217
+ "qrda_oid": "",
218
+ "qdm_category": "patient_characteristic",
219
+ "qdm_status": "birthdate"
220
+ },
221
+ "patient_characteristic_clinical_trial_participant": {
222
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.6",
223
+ "qrda_oid": "2.16.840.1.113883.10.20.24.3.51",
224
+ "qdm_category": "patient_characteristic",
225
+ "qdm_status": "clinical_trial_participant"
226
+ },
227
+ "patient_characteristic_ethnicity": {
228
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.56",
229
+ "qrda_oid": "",
230
+ "qdm_category": "patient_characteristic",
231
+ "qdm_status": "ethnicity"
232
+ },
233
+ "patient_characteristic_expired": {
234
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.57",
235
+ "qrda_oid": "",
236
+ "qdm_category": "patient_characteristic",
237
+ "qdm_status": "expired"
238
+ },
239
+ "patient_characteristic_payer": {
240
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.58",
241
+ "qrda_oid": "",
242
+ "qdm_category": "patient_characteristic",
243
+ "qdm_status": "payer"
244
+ },
245
+ "patient_characteristic_race": {
246
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.59",
247
+ "qrda_oid": "",
248
+ "qdm_category": "patient_characteristic",
249
+ "qdm_status": "race"
250
+ },
251
+ "patient_characteristic_sex": {
252
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.55",
253
+ "qrda_oid": "",
254
+ "qdm_category": "patient_characteristic",
255
+ "qdm_status": "gender"
256
+ },
257
+ "patient_entity": {
258
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.136",
259
+ "qrda_oid": "2.16.840.1.113883.10.20.24.3.161"
260
+ },
261
+ "physical_exam_order": {
262
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.61",
263
+ "qrda_oid": "",
264
+ "qdm_category": "physical_exam",
265
+ "qdm_status": "order"
266
+ },
267
+ "physical_exam_performed": {
268
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.62",
269
+ "qrda_oid": "",
270
+ "qdm_category": "physical_exam",
271
+ "qdm_status": "performed"
272
+ },
273
+ "physical_exam_recommended": {
274
+ "hqmf_oid": "22.16.840.1.113883.10.20.28.4.63",
275
+ "qrda_oid": "",
276
+ "qdm_category": "physical_exam",
277
+ "qdm_status": "recommended"
278
+ },
279
+ "practitioner": {
280
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.137",
281
+ "qrda_oid": "2.16.840.1.113883.10.20.24.3.162"
282
+ },
283
+ "procedure_order": {
284
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.66",
285
+ "qrda_oid": "",
286
+ "qdm_category": "procedure",
287
+ "qdm_status": "order"
288
+ },
289
+ "procedure_performed": {
290
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.67",
291
+ "qrda_oid": "",
292
+ "qdm_category": "procedure",
293
+ "qdm_status": "performed"
294
+ },
295
+ "procedure_recommended": {
296
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.68",
297
+ "qrda_oid": "",
298
+ "qdm_category": "procedure",
299
+ "qdm_status": "recommended"
300
+ },
301
+ "provider_care_experience": {
302
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.70",
303
+ "qrda_oid": "",
304
+ "qdm_category": "care_experience",
305
+ "qdm_status": ""
306
+ },
307
+ "related_person": {
308
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.141",
309
+ "qrda_oid": "",
310
+ "qdm_category": "related_person",
311
+ "qdm_status": ""
312
+ },
313
+ "substance_administered": {
314
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.73",
315
+ "qrda_oid": "",
316
+ "qdm_category": "substance",
317
+ "qdm_status": "administered"
318
+ },
319
+ "substance_order": {
320
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.77",
321
+ "qrda_oid": "",
322
+ "qdm_category": "substance",
323
+ "qdm_status": "order"
324
+ },
325
+ "substance_recommended": {
326
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.78",
327
+ "qrda_oid": "",
328
+ "qdm_category": "substance",
329
+ "qdm_status": "recommended"
330
+ },
331
+ "symptom": {
332
+ "hqmf_oid": "2.16.840.1.113883.10.20.28.4.116",
333
+ "qrda_oid": "2.16.840.1.113883.10.20.24.3.136",
334
+ "qdm_category": "symptom",
335
+ "qdm_status": ""
336
+ }
337
+ }