cqm-models 3.1.1 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +1 -1
  3. data/README.md +3 -2
  4. data/app/assets/javascripts/AdverseEvent.js +2 -2
  5. data/app/assets/javascripts/AllDataElements.js +2 -2
  6. data/app/assets/javascripts/AllergyIntolerance.js +2 -2
  7. data/app/assets/javascripts/AssessmentOrder.js +2 -2
  8. data/app/assets/javascripts/AssessmentPerformed.js +3 -2
  9. data/app/assets/javascripts/AssessmentRecommended.js +2 -2
  10. data/app/assets/javascripts/CareGoal.js +2 -2
  11. data/app/assets/javascripts/CommunicationPerformed.js +3 -3
  12. data/app/assets/javascripts/DeviceOrder.js +2 -2
  13. data/app/assets/javascripts/DeviceRecommended.js +2 -2
  14. data/app/assets/javascripts/Diagnosis.js +2 -2
  15. data/app/assets/javascripts/DiagnosticStudyOrder.js +2 -2
  16. data/app/assets/javascripts/DiagnosticStudyPerformed.js +4 -2
  17. data/app/assets/javascripts/DiagnosticStudyRecommended.js +2 -2
  18. data/app/assets/javascripts/EncounterOrder.js +2 -2
  19. data/app/assets/javascripts/EncounterPerformed.js +7 -3
  20. data/app/assets/javascripts/EncounterRecommended.js +2 -2
  21. data/app/assets/javascripts/FamilyHistory.js +2 -2
  22. data/app/assets/javascripts/ImmunizationAdministered.js +2 -2
  23. data/app/assets/javascripts/ImmunizationOrder.js +2 -2
  24. data/app/assets/javascripts/InterventionOrder.js +2 -2
  25. data/app/assets/javascripts/InterventionPerformed.js +3 -2
  26. data/app/assets/javascripts/InterventionRecommended.js +2 -2
  27. data/app/assets/javascripts/LaboratoryTestOrder.js +2 -2
  28. data/app/assets/javascripts/LaboratoryTestPerformed.js +4 -2
  29. data/app/assets/javascripts/LaboratoryTestRecommended.js +2 -2
  30. data/app/assets/javascripts/MedicationActive.js +2 -2
  31. data/app/assets/javascripts/MedicationAdministered.js +2 -2
  32. data/app/assets/javascripts/MedicationDischarge.js +3 -3
  33. data/app/assets/javascripts/MedicationDispensed.js +4 -3
  34. data/app/assets/javascripts/MedicationOrder.js +3 -2
  35. data/app/assets/javascripts/Participation.js +1 -2
  36. data/app/assets/javascripts/PatientCareExperience.js +2 -2
  37. data/app/assets/javascripts/PatientCharacteristic.js +1 -1
  38. data/app/assets/javascripts/PatientCharacteristicBirthdate.js +1 -1
  39. data/app/assets/javascripts/PatientCharacteristicClinicalTrialParticipant.js +1 -1
  40. data/app/assets/javascripts/PatientCharacteristicEthnicity.js +1 -1
  41. data/app/assets/javascripts/PatientCharacteristicExpired.js +1 -1
  42. data/app/assets/javascripts/PatientCharacteristicPayer.js +1 -1
  43. data/app/assets/javascripts/PatientCharacteristicRace.js +1 -1
  44. data/app/assets/javascripts/PatientCharacteristicSex.js +1 -1
  45. data/app/assets/javascripts/PhysicalExamOrder.js +2 -2
  46. data/app/assets/javascripts/PhysicalExamPerformed.js +3 -2
  47. data/app/assets/javascripts/PhysicalExamRecommended.js +2 -2
  48. data/app/assets/javascripts/ProcedureOrder.js +2 -2
  49. data/app/assets/javascripts/ProcedurePerformed.js +3 -3
  50. data/app/assets/javascripts/ProcedureRecommended.js +2 -2
  51. data/app/assets/javascripts/ProviderCareExperience.js +2 -2
  52. data/app/assets/javascripts/QDMPatient.js +1 -1
  53. data/app/assets/javascripts/RelatedPerson.js +1 -1
  54. data/app/assets/javascripts/SubstanceAdministered.js +2 -2
  55. data/app/assets/javascripts/SubstanceOrder.js +2 -2
  56. data/app/assets/javascripts/SubstanceRecommended.js +2 -2
  57. data/app/assets/javascripts/Symptom.js +2 -2
  58. data/app/assets/javascripts/attributes/Component.js +2 -2
  59. data/app/assets/javascripts/attributes/DiagnosisComponent.js +1 -1
  60. data/app/assets/javascripts/attributes/Entity.js +2 -2
  61. data/app/assets/javascripts/attributes/FacilityLocation.js +1 -1
  62. data/app/assets/javascripts/attributes/Identifier.js +1 -1
  63. data/app/assets/javascripts/attributes/Location.js +32 -0
  64. data/app/assets/javascripts/attributes/Organization.js +1 -1
  65. data/app/assets/javascripts/basetypes/AnyEntity.js +3 -0
  66. data/app/models/cqm/individual_result.rb +2 -2
  67. data/app/models/cqm/measure.rb +1 -1
  68. data/app/models/cqm/patient.rb +1 -1
  69. data/app/models/hqmfOid_to_datatype_map.json +1 -1
  70. data/app/models/models.rb +2 -2
  71. data/app/models/qdm/adverse_event.rb +2 -2
  72. data/app/models/qdm/allergy_intolerance.rb +2 -2
  73. data/app/models/qdm/assessment_order.rb +2 -2
  74. data/app/models/qdm/assessment_performed.rb +3 -2
  75. data/app/models/qdm/assessment_recommended.rb +2 -2
  76. data/app/models/qdm/attributes/component.rb +1 -1
  77. data/app/models/qdm/attributes/diagnosis_component.rb +1 -1
  78. data/app/models/qdm/attributes/entity.rb +1 -1
  79. data/app/models/qdm/attributes/facility_location.rb +1 -1
  80. data/app/models/qdm/attributes/identifier.rb +1 -1
  81. data/app/models/qdm/attributes/location.rb +9 -0
  82. data/app/models/qdm/attributes/organization.rb +1 -1
  83. data/app/models/qdm/basetypes/data_element.rb +5 -0
  84. data/app/models/qdm/care_goal.rb +2 -2
  85. data/app/models/qdm/communication_performed.rb +3 -3
  86. data/app/models/qdm/device_order.rb +2 -2
  87. data/app/models/qdm/device_recommended.rb +2 -2
  88. data/app/models/qdm/diagnosis.rb +2 -2
  89. data/app/models/qdm/diagnostic_study_order.rb +2 -2
  90. data/app/models/qdm/diagnostic_study_performed.rb +4 -2
  91. data/app/models/qdm/diagnostic_study_recommended.rb +2 -2
  92. data/app/models/qdm/encounter_order.rb +2 -2
  93. data/app/models/qdm/encounter_performed.rb +4 -3
  94. data/app/models/qdm/encounter_recommended.rb +2 -2
  95. data/app/models/qdm/family_history.rb +2 -2
  96. data/app/models/qdm/immunization_administered.rb +2 -2
  97. data/app/models/qdm/immunization_order.rb +2 -2
  98. data/app/models/qdm/intervention_order.rb +2 -2
  99. data/app/models/qdm/intervention_performed.rb +3 -2
  100. data/app/models/qdm/intervention_recommended.rb +2 -2
  101. data/app/models/qdm/laboratory_test_order.rb +2 -2
  102. data/app/models/qdm/laboratory_test_performed.rb +4 -2
  103. data/app/models/qdm/laboratory_test_recommended.rb +2 -2
  104. data/app/models/qdm/medication_active.rb +2 -2
  105. data/app/models/qdm/medication_administered.rb +2 -2
  106. data/app/models/qdm/medication_discharge.rb +3 -3
  107. data/app/models/qdm/medication_dispensed.rb +4 -3
  108. data/app/models/qdm/medication_order.rb +3 -2
  109. data/app/models/qdm/participation.rb +1 -2
  110. data/app/models/qdm/patient.rb +1 -1
  111. data/app/models/qdm/patient_care_experience.rb +2 -2
  112. data/app/models/qdm/patient_characteristic.rb +1 -1
  113. data/app/models/qdm/patient_characteristic_birthdate.rb +1 -1
  114. data/app/models/qdm/patient_characteristic_clinical_trial_participant.rb +1 -1
  115. data/app/models/qdm/patient_characteristic_ethnicity.rb +1 -1
  116. data/app/models/qdm/patient_characteristic_expired.rb +1 -1
  117. data/app/models/qdm/patient_characteristic_payer.rb +1 -1
  118. data/app/models/qdm/patient_characteristic_race.rb +1 -1
  119. data/app/models/qdm/patient_characteristic_sex.rb +1 -1
  120. data/app/models/qdm/physical_exam_order.rb +2 -2
  121. data/app/models/qdm/physical_exam_performed.rb +3 -2
  122. data/app/models/qdm/physical_exam_recommended.rb +2 -2
  123. data/app/models/qdm/procedure_order.rb +2 -2
  124. data/app/models/qdm/procedure_performed.rb +3 -3
  125. data/app/models/qdm/procedure_recommended.rb +2 -2
  126. data/app/models/qdm/provider_care_experience.rb +2 -2
  127. data/app/models/qdm/related_person.rb +1 -1
  128. data/app/models/qdm/substance_administered.rb +2 -2
  129. data/app/models/qdm/substance_order.rb +2 -2
  130. data/app/models/qdm/substance_recommended.rb +2 -2
  131. data/app/models/qdm/symptom.rb +2 -2
  132. data/bin/validate_generator.sh +1 -1
  133. data/cqm-models.gemspec +1 -1
  134. data/data/oids_qdm_5.6.json +335 -0
  135. data/dist/browser.js +229 -230
  136. data/dist/index.js +229 -230
  137. data/lib/generate_entities.rb +18 -10
  138. data/lib/generate_models.rb +27 -19
  139. data/lib/generate_patients.rb +1 -1
  140. data/modelinfo/qdm-modelinfo-5.6.xml +1102 -0
  141. data/package.json +1 -1
  142. data/templates/models_template.rb.erb +3 -1
  143. data/templates/mongoose_template.js.erb +9 -2
  144. metadata +6 -4
  145. data/app/assets/javascripts/DeviceApplied.js +0 -48
  146. data/app/models/qdm/device_applied.rb +0 -19
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7351dbc9be7855d8704c32f8e768d8dd101c60e184e6114b4f908cec95e45ef
4
- data.tar.gz: 764912c1fcc9d6e155853005ec178c973131078a59b85f6ff957a4ae92310503
3
+ metadata.gz: 85bf553127da27f99d10b18c86684ddfa57c4f2f7e992ca54d093c6e27888db6
4
+ data.tar.gz: b899eb5db26a8cf98655d34b82ae8ff2c105c98c6332af7b1e3b37bb18b19a85
5
5
  SHA512:
6
- metadata.gz: 79e4eac69740a14347989fffc0c211cfcd623c3a4091fa31b0d24da8fcbdd4ce6a296df761f216e61d6e771f59f8f511db68a1fa03c337310253b13b4373964f
7
- data.tar.gz: f9ae102d6d01ca3fc354c5f0d0bc7cce0e0e9516420da71be381070f993a381a5cf5d2c100966a5b91ca194c903004f16fdd2b18b9b823ea48fde33d8567e552
6
+ metadata.gz: aeb672673dbb27b9ecef2d1e1e1b718d84ebd9ad793bfd75a8b733b7c113e45604281865916fe82e5e12fa4034fa1ea6c0598b76e0e615979fc31e3fc822381c
7
+ data.tar.gz: 8102ced4699a1bdd4ec549ffb7cc8c649a61d1fd0d2f123ab5bed1a1b2aeff0c5194d49e1f6163cb4dcc15c822ec1e913558b84ab63af10c855542180fe0c358
@@ -38,7 +38,7 @@ jobs:
38
38
  - name: Run rubocop
39
39
  run: bundle exec rubocop
40
40
  - name: Use Node.js ${{ matrix.node-version }}
41
- uses: actions/setup-node@v1
41
+ uses: actions/setup-node@v2
42
42
  with:
43
43
  node-version: ${{ matrix.node-version }}
44
44
  - name: Install Yarn
data/README.md CHANGED
@@ -17,7 +17,7 @@ See the top of the `lib/generate_models.rb` script for RubyGem requirements.
17
17
 
18
18
  To use, execute the following:
19
19
  ```
20
- ruby lib/generate_models.rb modelinfo/qdm-modelinfo-5.5.xml data/oids_qdm_5.5.json
20
+ ruby lib/generate_models.rb modelinfo/qdm-modelinfo-5.6.xml data/oids_qdm_5.6.json
21
21
  ```
22
22
 
23
23
  The first parameter is the file path to the modelinfo file you wish to generate from. The second parameter is the OID map file. You must include both.
@@ -41,7 +41,7 @@ QDM::PatientGeneration.generate_exhaustive_data_element_patients()
41
41
 
42
42
  To generate a single patient that has every data element from a specific model-info file execute the following:
43
43
  ```
44
- QDM::PatientGeneration.generate_exhaustive_data_element_patients(false, 'qdm-modelinfo-5.3.xml')
44
+ QDM::PatientGeneration.generate_exhaustive_data_element_patients(false, 'qdm-modelinfo-5.6.xml')
45
45
  ```
46
46
 
47
47
  ## Running the tests
@@ -69,6 +69,7 @@ Starting with version **2.0.0** released on 6/20/2019, cqm-models versioning has
69
69
  | --- | --- |
70
70
  | 2 | 5.4 |
71
71
  | 3 | 5.5 |
72
+ | 4 | 5.6 |
72
73
 
73
74
  * **Y** indicates major changes (incompatible API changes)
74
75
 
@@ -25,11 +25,11 @@ const AdverseEventSchema = DataElementSchema({
25
25
  severity: Code,
26
26
  facilityLocation: FacilityLocationSchema,
27
27
  type: Code,
28
- recorder: AnyEntity,
28
+ recorder: [AnyEntity],
29
29
  qdmTitle: { type: String, default: 'Adverse Event' },
30
30
  hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.120' },
31
31
  qdmCategory: { type: String, default: 'adverse_event' },
32
- qdmVersion: { type: String, default: '5.5' },
32
+ qdmVersion: { type: String, default: '5.6' },
33
33
  _type: { type: String, default: 'QDM::AdverseEvent' },
34
34
 
35
35
  });
@@ -12,6 +12,8 @@ module.exports.Practitioner = require('./attributes/Practitioner.js').Practition
12
12
  module.exports.PractitionerSchema = require('./attributes/Practitioner.js').PractitionerSchema;
13
13
  module.exports.Organization = require('./attributes/Organization.js').Organization;
14
14
  module.exports.OrganizationSchema = require('./attributes/Organization.js').OrganizationSchema;
15
+ module.exports.Location = require('./attributes/Location.js').Location;
16
+ module.exports.LocationSchema = require('./attributes/Location.js').LocationSchema;
15
17
  module.exports.PhysicalExamOrder = require('./PhysicalExamOrder.js').PhysicalExamOrder;
16
18
  module.exports.PhysicalExamOrderSchema = require('./PhysicalExamOrder.js').PhysicalExamOrderSchema;
17
19
  module.exports.Participation = require('./Participation.js').Participation;
@@ -96,8 +98,6 @@ module.exports.AdverseEvent = require('./AdverseEvent.js').AdverseEvent;
96
98
  module.exports.AdverseEventSchema = require('./AdverseEvent.js').AdverseEventSchema;
97
99
  module.exports.DeviceRecommended = require('./DeviceRecommended.js').DeviceRecommended;
98
100
  module.exports.DeviceRecommendedSchema = require('./DeviceRecommended.js').DeviceRecommendedSchema;
99
- module.exports.DeviceApplied = require('./DeviceApplied.js').DeviceApplied;
100
- module.exports.DeviceAppliedSchema = require('./DeviceApplied.js').DeviceAppliedSchema;
101
101
  module.exports.MedicationDischarge = require('./MedicationDischarge.js').MedicationDischarge;
102
102
  module.exports.MedicationDischargeSchema = require('./MedicationDischarge.js').MedicationDischargeSchema;
103
103
  module.exports.InterventionPerformed = require('./InterventionPerformed.js').InterventionPerformed;
@@ -24,12 +24,12 @@ const AllergyIntoleranceSchema = DataElementSchema({
24
24
  prevalencePeriod: Interval,
25
25
  type: Code,
26
26
  severity: Code,
27
- recorder: AnyEntity,
27
+ recorder: [AnyEntity],
28
28
  qdmTitle: { type: String, default: 'Allergy/Intolerance' },
29
29
  hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.119' },
30
30
  qdmCategory: { type: String, default: 'allergy' },
31
31
  qdmStatus: { type: String, default: 'intolerance' },
32
- qdmVersion: { type: String, default: '5.5' },
32
+ qdmVersion: { type: String, default: '5.6' },
33
33
  _type: { type: String, default: 'QDM::AllergyIntolerance' },
34
34
 
35
35
  });
@@ -23,12 +23,12 @@ const AssessmentOrderSchema = DataElementSchema({
23
23
  authorDatetime: DateTime,
24
24
  negationRationale: Code,
25
25
  reason: Code,
26
- requester: AnyEntity,
26
+ requester: [AnyEntity],
27
27
  qdmTitle: { type: String, default: 'Assessment, Order' },
28
28
  hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.131' },
29
29
  qdmCategory: { type: String, default: 'assessment' },
30
30
  qdmStatus: { type: String, default: 'order' },
31
- qdmVersion: { type: String, default: '5.5' },
31
+ qdmVersion: { type: String, default: '5.6' },
32
32
  _type: { type: String, default: 'QDM::AssessmentOrder' },
33
33
 
34
34
  });
@@ -27,14 +27,15 @@ const AssessmentPerformedSchema = DataElementSchema({
27
27
  reason: Code,
28
28
  method: Code,
29
29
  result: Any,
30
+ interpretation: Code,
30
31
  components: [ComponentSchema],
31
32
  relatedTo: [String],
32
- performer: AnyEntity,
33
+ performer: [AnyEntity],
33
34
  qdmTitle: { type: String, default: 'Assessment, Performed' },
34
35
  hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.117' },
35
36
  qdmCategory: { type: String, default: 'assessment' },
36
37
  qdmStatus: { type: String, default: 'performed' },
37
- qdmVersion: { type: String, default: '5.5' },
38
+ qdmVersion: { type: String, default: '5.6' },
38
39
  _type: { type: String, default: 'QDM::AssessmentPerformed' },
39
40
 
40
41
  });
@@ -23,12 +23,12 @@ const AssessmentRecommendedSchema = DataElementSchema({
23
23
  authorDatetime: DateTime,
24
24
  negationRationale: Code,
25
25
  reason: Code,
26
- requester: AnyEntity,
26
+ requester: [AnyEntity],
27
27
  qdmTitle: { type: String, default: 'Assessment, Recommended' },
28
28
  hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.118' },
29
29
  qdmCategory: { type: String, default: 'assessment' },
30
30
  qdmStatus: { type: String, default: 'recommended' },
31
- qdmVersion: { type: String, default: '5.5' },
31
+ qdmVersion: { type: String, default: '5.6' },
32
32
  _type: { type: String, default: 'QDM::AssessmentRecommended' },
33
33
 
34
34
  });
@@ -24,11 +24,11 @@ const CareGoalSchema = DataElementSchema({
24
24
  relevantPeriod: Interval,
25
25
  relatedTo: [String],
26
26
  targetOutcome: Any,
27
- performer: AnyEntity,
27
+ performer: [AnyEntity],
28
28
  qdmTitle: { type: String, default: 'Care Goal' },
29
29
  hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.7' },
30
30
  qdmCategory: { type: String, default: 'care_goal' },
31
- qdmVersion: { type: String, default: '5.5' },
31
+ qdmVersion: { type: String, default: '5.6' },
32
32
  _type: { type: String, default: 'QDM::CareGoal' },
33
33
 
34
34
  });
@@ -23,8 +23,8 @@ const CommunicationPerformedSchema = DataElementSchema({
23
23
  authorDatetime: DateTime,
24
24
  category: Code,
25
25
  medium: Code,
26
- sender: AnyEntity,
27
- recipient: AnyEntity,
26
+ sender: [AnyEntity],
27
+ recipient: [AnyEntity],
28
28
  relatedTo: [String],
29
29
  sentDatetime: DateTime,
30
30
  receivedDatetime: DateTime,
@@ -33,7 +33,7 @@ const CommunicationPerformedSchema = DataElementSchema({
33
33
  hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.132' },
34
34
  qdmCategory: { type: String, default: 'communication' },
35
35
  qdmStatus: { type: String, default: 'performed' },
36
- qdmVersion: { type: String, default: '5.5' },
36
+ qdmVersion: { type: String, default: '5.6' },
37
37
  _type: { type: String, default: 'QDM::CommunicationPerformed' },
38
38
 
39
39
  });
@@ -23,12 +23,12 @@ const DeviceOrderSchema = DataElementSchema({
23
23
  authorDatetime: DateTime,
24
24
  negationRationale: Code,
25
25
  reason: Code,
26
- requester: AnyEntity,
26
+ requester: [AnyEntity],
27
27
  qdmTitle: { type: String, default: 'Device, Order' },
28
28
  hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.15' },
29
29
  qdmCategory: { type: String, default: 'device' },
30
30
  qdmStatus: { type: String, default: 'order' },
31
- qdmVersion: { type: String, default: '5.5' },
31
+ qdmVersion: { type: String, default: '5.6' },
32
32
  _type: { type: String, default: 'QDM::DeviceOrder' },
33
33
 
34
34
  });
@@ -23,12 +23,12 @@ const DeviceRecommendedSchema = DataElementSchema({
23
23
  authorDatetime: DateTime,
24
24
  negationRationale: Code,
25
25
  reason: Code,
26
- requester: AnyEntity,
26
+ requester: [AnyEntity],
27
27
  qdmTitle: { type: String, default: 'Device, Recommended' },
28
28
  hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.16' },
29
29
  qdmCategory: { type: String, default: 'device' },
30
30
  qdmStatus: { type: String, default: 'recommended' },
31
- qdmVersion: { type: String, default: '5.5' },
31
+ qdmVersion: { type: String, default: '5.6' },
32
32
  _type: { type: String, default: 'QDM::DeviceRecommended' },
33
33
 
34
34
  });
@@ -24,12 +24,12 @@ const DiagnosisSchema = DataElementSchema({
24
24
  prevalencePeriod: Interval,
25
25
  anatomicalLocationSite: Code,
26
26
  severity: Code,
27
- recorder: AnyEntity,
27
+ recorder: [AnyEntity],
28
28
  qdmTitle: { type: String, default: 'Diagnosis' },
29
29
  hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.110' },
30
30
  qrdaOid: { type: String, default: '2.16.840.1.113883.10.20.24.3.135' },
31
31
  qdmCategory: { type: String, default: 'condition' },
32
- qdmVersion: { type: String, default: '5.5' },
32
+ qdmVersion: { type: String, default: '5.6' },
33
33
  _type: { type: String, default: 'QDM::Diagnosis' },
34
34
 
35
35
  });
@@ -23,12 +23,12 @@ const DiagnosticStudyOrderSchema = DataElementSchema({
23
23
  authorDatetime: DateTime,
24
24
  reason: Code,
25
25
  negationRationale: Code,
26
- requester: AnyEntity,
26
+ requester: [AnyEntity],
27
27
  qdmTitle: { type: String, default: 'Diagnostic Study, Order' },
28
28
  hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.22' },
29
29
  qdmCategory: { type: String, default: 'diagnostic_study' },
30
30
  qdmStatus: { type: String, default: 'order' },
31
- qdmVersion: { type: String, default: '5.5' },
31
+ qdmVersion: { type: String, default: '5.6' },
32
32
  _type: { type: String, default: 'QDM::DiagnosticStudyOrder' },
33
33
 
34
34
  });
@@ -26,17 +26,19 @@ const DiagnosticStudyPerformedSchema = DataElementSchema({
26
26
  reason: Code,
27
27
  result: Any,
28
28
  resultDatetime: DateTime,
29
+ interpretation: Code,
29
30
  status: Code,
30
31
  method: Code,
31
32
  facilityLocation: FacilityLocationSchema,
32
33
  negationRationale: Code,
33
34
  components: [ComponentSchema],
34
- performer: AnyEntity,
35
+ performer: [AnyEntity],
36
+ relatedTo: [String],
35
37
  qdmTitle: { type: String, default: 'Diagnostic Study, Performed' },
36
38
  hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.23' },
37
39
  qdmCategory: { type: String, default: 'diagnostic_study' },
38
40
  qdmStatus: { type: String, default: 'performed' },
39
- qdmVersion: { type: String, default: '5.5' },
41
+ qdmVersion: { type: String, default: '5.6' },
40
42
  _type: { type: String, default: 'QDM::DiagnosticStudyPerformed' },
41
43
 
42
44
  });
@@ -22,13 +22,13 @@ const [Number, String] = [
22
22
  const DiagnosticStudyRecommendedSchema = DataElementSchema({
23
23
  authorDatetime: DateTime,
24
24
  negationRationale: Code,
25
- requester: AnyEntity,
25
+ requester: [AnyEntity],
26
26
  qdmTitle: { type: String, default: 'Diagnostic Study, Recommended' },
27
27
  hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.24' },
28
28
  qrdaOid: { type: String, default: '2.16.840.1.113883.10.20.24.3.19' },
29
29
  qdmCategory: { type: String, default: 'diagnostic_study' },
30
30
  qdmStatus: { type: String, default: 'recommended' },
31
- qdmVersion: { type: String, default: '5.5' },
31
+ qdmVersion: { type: String, default: '5.6' },
32
32
  _type: { type: String, default: 'QDM::DiagnosticStudyRecommended' },
33
33
 
34
34
  });
@@ -24,13 +24,13 @@ const EncounterOrderSchema = DataElementSchema({
24
24
  reason: Code,
25
25
  facilityLocation: FacilityLocationSchema,
26
26
  negationRationale: Code,
27
- requester: AnyEntity,
27
+ requester: [AnyEntity],
28
28
  priority: Code,
29
29
  qdmTitle: { type: String, default: 'Encounter, Order' },
30
30
  hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.27' },
31
31
  qdmCategory: { type: String, default: 'encounter' },
32
32
  qdmStatus: { type: String, default: 'order' },
33
- qdmVersion: { type: String, default: '5.5' },
33
+ qdmVersion: { type: String, default: '5.6' },
34
34
  _type: { type: String, default: 'QDM::EncounterOrder' },
35
35
 
36
36
  });
@@ -22,19 +22,20 @@ const [Number, String] = [
22
22
  const EncounterPerformedSchema = DataElementSchema({
23
23
  authorDatetime: DateTime,
24
24
  admissionSource: Code,
25
+ class: Code,
25
26
  relevantPeriod: Interval,
26
27
  dischargeDisposition: Code,
27
28
  facilityLocations: [FacilityLocationSchema],
28
29
  diagnoses: [DiagnosisComponentSchema],
29
- negationRationale: Code,
30
30
  lengthOfStay: Quantity,
31
31
  priority: Code,
32
- participant: AnyEntity,
32
+ participant: [AnyEntity],
33
+ relatedTo: [String],
33
34
  qdmTitle: { type: String, default: 'Encounter, Performed' },
34
35
  hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.5' },
35
36
  qdmCategory: { type: String, default: 'encounter' },
36
37
  qdmStatus: { type: String, default: 'performed' },
37
- qdmVersion: { type: String, default: '5.5' },
38
+ qdmVersion: { type: String, default: '5.6' },
38
39
  _type: { type: String, default: 'QDM::EncounterPerformed' },
39
40
 
40
41
  });
@@ -44,6 +45,9 @@ class EncounterPerformed extends mongoose.Document {
44
45
  constructor(object) {
45
46
  super(object, EncounterPerformedSchema);
46
47
  this._type = 'QDM::EncounterPerformed';
48
+ if (object && object.clazz) {
49
+ this.class = object.clazz;
50
+ }
47
51
  }
48
52
  }
49
53
 
@@ -24,12 +24,12 @@ const EncounterRecommendedSchema = DataElementSchema({
24
24
  reason: Code,
25
25
  facilityLocation: FacilityLocationSchema,
26
26
  negationRationale: Code,
27
- requester: AnyEntity,
27
+ requester: [AnyEntity],
28
28
  qdmTitle: { type: String, default: 'Encounter, Recommended' },
29
29
  hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.28' },
30
30
  qdmCategory: { type: String, default: 'encounter' },
31
31
  qdmStatus: { type: String, default: 'recommended' },
32
- qdmVersion: { type: String, default: '5.5' },
32
+ qdmVersion: { type: String, default: '5.6' },
33
33
  _type: { type: String, default: 'QDM::EncounterRecommended' },
34
34
 
35
35
  });
@@ -22,12 +22,12 @@ const [Number, String] = [
22
22
  const FamilyHistorySchema = DataElementSchema({
23
23
  authorDatetime: DateTime,
24
24
  relationship: Code,
25
- recorder: AnyEntity,
25
+ recorder: [AnyEntity],
26
26
  qdmTitle: { type: String, default: 'Family History' },
27
27
  hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.111' },
28
28
  qrdaOid: { type: String, default: '2.16.840.1.113883.10.20.24.3.12' },
29
29
  qdmCategory: { type: String, default: 'family_history' },
30
- qdmVersion: { type: String, default: '5.5' },
30
+ qdmVersion: { type: String, default: '5.6' },
31
31
  _type: { type: String, default: 'QDM::FamilyHistory' },
32
32
 
33
33
  });
@@ -26,13 +26,13 @@ const ImmunizationAdministeredSchema = DataElementSchema({
26
26
  dosage: Quantity,
27
27
  route: Code,
28
28
  negationRationale: Code,
29
- performer: AnyEntity,
29
+ performer: [AnyEntity],
30
30
  qdmTitle: { type: String, default: 'Immunization, Administered' },
31
31
  hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.112' },
32
32
  qrdaOid: { type: String, default: '2.16.840.1.113883.10.20.24.3.140' },
33
33
  qdmCategory: { type: String, default: 'immunization' },
34
34
  qdmStatus: { type: String, default: 'administered' },
35
- qdmVersion: { type: String, default: '5.5' },
35
+ qdmVersion: { type: String, default: '5.6' },
36
36
  _type: { type: String, default: 'QDM::ImmunizationAdministered' },
37
37
 
38
38
  });
@@ -27,12 +27,12 @@ const ImmunizationOrderSchema = DataElementSchema({
27
27
  reason: Code,
28
28
  route: Code,
29
29
  negationRationale: Code,
30
- requester: AnyEntity,
30
+ requester: [AnyEntity],
31
31
  qdmTitle: { type: String, default: 'Immunization, Order' },
32
32
  hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.113' },
33
33
  qdmCategory: { type: String, default: 'immunization' },
34
34
  qdmStatus: { type: String, default: 'order' },
35
- qdmVersion: { type: String, default: '5.5' },
35
+ qdmVersion: { type: String, default: '5.6' },
36
36
  _type: { type: String, default: 'QDM::ImmunizationOrder' },
37
37
 
38
38
  });
@@ -23,12 +23,12 @@ const InterventionOrderSchema = DataElementSchema({
23
23
  authorDatetime: DateTime,
24
24
  reason: Code,
25
25
  negationRationale: Code,
26
- requester: AnyEntity,
26
+ requester: [AnyEntity],
27
27
  qdmTitle: { type: String, default: 'Intervention, Order' },
28
28
  hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.35' },
29
29
  qdmCategory: { type: String, default: 'intervention' },
30
30
  qdmStatus: { type: String, default: 'order' },
31
- qdmVersion: { type: String, default: '5.5' },
31
+ qdmVersion: { type: String, default: '5.6' },
32
32
  _type: { type: String, default: 'QDM::InterventionOrder' },
33
33
 
34
34
  });
@@ -27,12 +27,13 @@ const InterventionPerformedSchema = DataElementSchema({
27
27
  result: Any,
28
28
  status: Code,
29
29
  negationRationale: Code,
30
- performer: AnyEntity,
30
+ performer: [AnyEntity],
31
+ relatedTo: [String],
31
32
  qdmTitle: { type: String, default: 'Intervention, Performed' },
32
33
  hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.36' },
33
34
  qdmCategory: { type: String, default: 'intervention' },
34
35
  qdmStatus: { type: String, default: 'performed' },
35
- qdmVersion: { type: String, default: '5.5' },
36
+ qdmVersion: { type: String, default: '5.6' },
36
37
  _type: { type: String, default: 'QDM::InterventionPerformed' },
37
38
 
38
39
  });
@@ -23,12 +23,12 @@ const InterventionRecommendedSchema = DataElementSchema({
23
23
  authorDatetime: DateTime,
24
24
  reason: Code,
25
25
  negationRationale: Code,
26
- requester: AnyEntity,
26
+ requester: [AnyEntity],
27
27
  qdmTitle: { type: String, default: 'Intervention, Recommended' },
28
28
  hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.37' },
29
29
  qdmCategory: { type: String, default: 'intervention' },
30
30
  qdmStatus: { type: String, default: 'recommended' },
31
- qdmVersion: { type: String, default: '5.5' },
31
+ qdmVersion: { type: String, default: '5.6' },
32
32
  _type: { type: String, default: 'QDM::InterventionRecommended' },
33
33
 
34
34
  });