cqm-models 1.0.3 → 1.1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.eslintrc.json +10 -2
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -4
- data/.rubocop.yml +3 -0
- data/.travis.yml +31 -1
- data/README.md +59 -2
- data/app/assets/javascripts/AdverseEvent.js +16 -7
- data/app/assets/javascripts/AllDataElements.js +6 -6
- data/app/assets/javascripts/AllergyIntolerance.js +16 -7
- data/app/assets/javascripts/AssessmentOrder.js +15 -6
- data/app/assets/javascripts/AssessmentPerformed.js +16 -7
- data/app/assets/javascripts/AssessmentRecommended.js +16 -7
- data/app/assets/javascripts/CareGoal.js +16 -7
- data/app/assets/javascripts/CommunicationPerformed.js +15 -6
- data/app/assets/javascripts/DeviceApplied.js +16 -7
- data/app/assets/javascripts/DeviceOrder.js +16 -7
- data/app/assets/javascripts/DeviceRecommended.js +16 -7
- data/app/assets/javascripts/Diagnosis.js +16 -7
- data/app/assets/javascripts/DiagnosticStudyOrder.js +16 -7
- data/app/assets/javascripts/DiagnosticStudyPerformed.js +16 -7
- data/app/assets/javascripts/DiagnosticStudyRecommended.js +16 -7
- data/app/assets/javascripts/EncounterOrder.js +16 -7
- data/app/assets/javascripts/EncounterPerformed.js +16 -7
- data/app/assets/javascripts/EncounterRecommended.js +16 -7
- data/app/assets/javascripts/FamilyHistory.js +16 -7
- data/app/assets/javascripts/Id.js +7 -3
- data/app/assets/javascripts/ImmunizationAdministered.js +16 -7
- data/app/assets/javascripts/ImmunizationOrder.js +16 -7
- data/app/assets/javascripts/IndividualResult.js +7 -2
- data/app/assets/javascripts/InterventionOrder.js +16 -7
- data/app/assets/javascripts/InterventionPerformed.js +16 -7
- data/app/assets/javascripts/InterventionRecommended.js +16 -7
- data/app/assets/javascripts/LaboratoryTestOrder.js +16 -7
- data/app/assets/javascripts/LaboratoryTestPerformed.js +16 -7
- data/app/assets/javascripts/LaboratoryTestRecommended.js +16 -7
- data/app/assets/javascripts/MedicationActive.js +16 -7
- data/app/assets/javascripts/MedicationAdministered.js +16 -7
- data/app/assets/javascripts/MedicationDischarge.js +16 -7
- data/app/assets/javascripts/MedicationDispensed.js +16 -7
- data/app/assets/javascripts/MedicationOrder.js +16 -7
- data/app/assets/javascripts/Participation.js +15 -6
- data/app/assets/javascripts/PatientCareExperience.js +16 -7
- data/app/assets/javascripts/PatientCharacteristic.js +16 -7
- data/app/assets/javascripts/PatientCharacteristicBirthdate.js +16 -7
- data/app/assets/javascripts/PatientCharacteristicClinicalTrialParticipant.js +16 -7
- data/app/assets/javascripts/PatientCharacteristicEthnicity.js +16 -7
- data/app/assets/javascripts/PatientCharacteristicExpired.js +16 -7
- data/app/assets/javascripts/PatientCharacteristicPayer.js +16 -7
- data/app/assets/javascripts/PatientCharacteristicRace.js +16 -7
- data/app/assets/javascripts/PatientCharacteristicSex.js +16 -7
- data/app/assets/javascripts/PhysicalExamOrder.js +16 -7
- data/app/assets/javascripts/PhysicalExamPerformed.js +16 -7
- data/app/assets/javascripts/PhysicalExamRecommended.js +16 -7
- data/app/assets/javascripts/ProcedureOrder.js +16 -7
- data/app/assets/javascripts/ProcedurePerformed.js +16 -7
- data/app/assets/javascripts/ProcedureRecommended.js +16 -7
- data/app/assets/javascripts/ProviderCareExperience.js +16 -7
- data/app/assets/javascripts/ProviderCharacteristic.js +16 -7
- data/app/assets/javascripts/QDMPatient.js +262 -0
- data/app/assets/javascripts/Result.js +7 -2
- data/app/assets/javascripts/ResultComponent.js +14 -6
- data/app/assets/javascripts/SubstanceAdministered.js +16 -7
- data/app/assets/javascripts/SubstanceOrder.js +16 -7
- data/app/assets/javascripts/SubstanceRecommended.js +16 -7
- data/app/assets/javascripts/Symptom.js +16 -7
- data/app/assets/javascripts/attributes/Component.js +30 -0
- data/app/assets/javascripts/attributes/FacilityLocation.js +30 -0
- data/app/assets/javascripts/basetypes/Any.js +1 -1
- data/app/assets/javascripts/basetypes/Code.js +1 -1
- data/app/assets/javascripts/basetypes/DataElement.js +2 -1
- data/app/assets/javascripts/basetypes/DateTime.js +5 -1
- data/app/assets/javascripts/basetypes/Interval.js +1 -1
- data/app/assets/javascripts/basetypes/Quantity.js +1 -1
- data/app/assets/javascripts/basetypes/Ratio.js +1 -1
- data/app/assets/javascripts/browser.js +3 -0
- data/app/assets/javascripts/cqm/AllCQMModels.js +24 -0
- data/app/assets/javascripts/cqm/CQLLibrary.js +32 -0
- data/app/assets/javascripts/cqm/CQLStatementDependency.js +28 -0
- data/app/assets/javascripts/cqm/Concept.js +17 -0
- data/app/assets/javascripts/cqm/Measure.js +108 -0
- data/app/assets/javascripts/{MeasurePackage.js → cqm/MeasurePackage.js} +9 -3
- data/app/assets/javascripts/cqm/Patient.js +38 -0
- data/app/assets/javascripts/cqm/PopulationSet.js +88 -0
- data/app/assets/javascripts/cqm/Provider.js +44 -0
- data/app/assets/javascripts/cqm/ValueSet.js +26 -0
- data/app/assets/javascripts/index.js +18 -8
- data/app/models/{qdm/tacoma → cqm}/concept.rb +4 -4
- data/app/models/cqm/cql_library.rb +22 -0
- data/app/models/cqm/cql_statement_dependency.rb +24 -0
- data/app/models/cqm/measure.rb +105 -0
- data/app/models/{qdm/tacoma → cqm}/measure_package.rb +2 -2
- data/app/models/cqm/patient.rb +20 -0
- data/app/models/cqm/population_set.rb +86 -0
- data/app/models/cqm/provider.rb +110 -0
- data/app/models/cqm/valueset.rb +15 -0
- data/app/models/hqmfOid_to_datatype_map.json +55 -0
- data/app/models/model_finder.rb +12 -0
- data/app/models/models.rb +18 -6
- data/app/models/qdm/adverse_event.rb +3 -2
- data/app/models/qdm/allergy_intolerance.rb +2 -1
- data/app/models/qdm/assessment_order.rb +1 -0
- data/app/models/qdm/assessment_performed.rb +2 -1
- data/app/models/qdm/assessment_recommended.rb +2 -1
- data/app/models/qdm/attributes/attribute.rb +63 -0
- data/app/models/qdm/{component.rb → attributes/component.rb} +1 -1
- data/app/models/qdm/{facility_location.rb → attributes/facility_location.rb} +1 -1
- data/app/models/qdm/basetypes/data_element.rb +21 -6
- data/app/models/qdm/basetypes/interval.rb +2 -1
- data/app/models/qdm/care_goal.rb +2 -1
- data/app/models/qdm/communication_performed.rb +1 -0
- data/app/models/qdm/device_applied.rb +2 -1
- data/app/models/qdm/device_order.rb +2 -1
- data/app/models/qdm/device_recommended.rb +2 -1
- data/app/models/qdm/diagnosis.rb +2 -1
- data/app/models/qdm/diagnostic_study_order.rb +2 -1
- data/app/models/qdm/diagnostic_study_performed.rb +3 -2
- data/app/models/qdm/diagnostic_study_recommended.rb +2 -1
- data/app/models/qdm/encounter_order.rb +3 -2
- data/app/models/qdm/encounter_performed.rb +2 -1
- data/app/models/qdm/encounter_recommended.rb +3 -2
- data/app/models/qdm/family_history.rb +2 -1
- data/app/models/qdm/immunization_administered.rb +2 -1
- data/app/models/qdm/immunization_order.rb +2 -1
- data/app/models/qdm/intervention_order.rb +2 -1
- data/app/models/qdm/intervention_performed.rb +2 -1
- data/app/models/qdm/intervention_recommended.rb +2 -1
- data/app/models/qdm/laboratory_test_order.rb +2 -1
- data/app/models/qdm/laboratory_test_performed.rb +2 -1
- data/app/models/qdm/laboratory_test_recommended.rb +2 -1
- data/app/models/qdm/medication_active.rb +2 -1
- data/app/models/qdm/medication_administered.rb +2 -1
- data/app/models/qdm/medication_discharge.rb +2 -1
- data/app/models/qdm/medication_dispensed.rb +4 -3
- data/app/models/qdm/medication_order.rb +3 -2
- data/app/models/qdm/participation.rb +1 -0
- data/app/models/qdm/patient.rb +7 -4
- data/app/models/qdm/patient_care_experience.rb +2 -1
- data/app/models/qdm/patient_characteristic.rb +2 -1
- data/app/models/qdm/patient_characteristic_birthdate.rb +2 -1
- data/app/models/qdm/patient_characteristic_clinical_trial_participant.rb +2 -1
- data/app/models/qdm/patient_characteristic_ethnicity.rb +2 -1
- data/app/models/qdm/patient_characteristic_expired.rb +2 -1
- data/app/models/qdm/patient_characteristic_payer.rb +2 -1
- data/app/models/qdm/patient_characteristic_race.rb +2 -1
- data/app/models/qdm/patient_characteristic_sex.rb +2 -1
- data/app/models/qdm/physical_exam_order.rb +2 -1
- data/app/models/qdm/physical_exam_performed.rb +2 -1
- data/app/models/qdm/physical_exam_recommended.rb +2 -1
- data/app/models/qdm/procedure_order.rb +2 -1
- data/app/models/qdm/procedure_performed.rb +2 -1
- data/app/models/qdm/procedure_recommended.rb +2 -1
- data/app/models/qdm/provider_care_experience.rb +2 -1
- data/app/models/qdm/provider_characteristic.rb +2 -1
- data/app/models/qdm/substance_administered.rb +2 -1
- data/app/models/qdm/substance_order.rb +2 -1
- data/app/models/qdm/substance_recommended.rb +2 -1
- data/app/models/qdm/symptom.rb +2 -1
- data/bin/build_cql_execution.sh +8 -0
- data/bin/validate_browser.sh +17 -0
- data/bin/validate_generator.sh +12 -0
- data/cqm-models.gemspec +5 -2
- data/data/oids_qdm_5.4.json +321 -0
- data/data/{oids.json → oids_unversioned.json} +0 -0
- data/dist/browser.js +102937 -0
- data/dist/index.js +36637 -36540
- data/lib/generate_models.rb +89 -93
- data/lib/generate_patients.rb +125 -0
- data/lib/generate_types.rb +64 -0
- data/lib/generators/custom_mongo/model.rb.tt +20 -0
- data/lib/generators/custom_mongo/model_generator.rb +34 -0
- data/notice.md +9 -0
- data/package.json +12 -6
- data/templates/id_template.js.erb +8 -3
- data/templates/index_template.js.erb +18 -8
- data/templates/models_template.rb.erb +20 -4
- data/templates/mongoose_template.js.erb +23 -15
- data/templates/patient_extension.rb.erb +7 -4
- data/templates/patient_template.js.erb +88 -87
- data/yarn.lock +552 -347
- metadata +86 -19
- data/app/assets/javascripts/Component.js +0 -26
- data/app/assets/javascripts/Concept.js +0 -14
- data/app/assets/javascripts/FacilityLocation.js +0 -26
- data/app/assets/javascripts/Measure.js +0 -78
- data/app/assets/javascripts/Patient.js +0 -262
- data/app/assets/javascripts/ValueSet.js +0 -30
- data/app/models/qdm/tacoma/measure.rb +0 -174
- data/app/models/qdm/tacoma/valueset.rb +0 -68
@@ -5,9 +5,10 @@ module QDM
|
|
5
5
|
embedded_in :patient
|
6
6
|
field :authorDatetime, type: DateTime
|
7
7
|
field :reason, type: QDM::Code
|
8
|
-
field :facilityLocation, type: QDM::
|
8
|
+
field :facilityLocation, type: QDM::FacilityLocation
|
9
9
|
field :negationRationale, type: QDM::Code
|
10
|
-
field :
|
10
|
+
field :qdmTitle, type: String, default: 'Encounter, Order'
|
11
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.27'
|
11
12
|
field :qdmCategory, type: String, default: 'encounter'
|
12
13
|
field :qdmStatus, type: String, default: 'order'
|
13
14
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -12,7 +12,8 @@ module QDM
|
|
12
12
|
field :principalDiagnosis, type: QDM::Code
|
13
13
|
field :negationRationale, type: QDM::Code
|
14
14
|
field :lengthOfStay, type: QDM::Quantity
|
15
|
-
field :
|
15
|
+
field :qdmTitle, type: String, default: 'Encounter, Performed'
|
16
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.5'
|
16
17
|
field :qdmCategory, type: String, default: 'encounter'
|
17
18
|
field :qdmStatus, type: String, default: 'performed'
|
18
19
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -5,9 +5,10 @@ module QDM
|
|
5
5
|
embedded_in :patient
|
6
6
|
field :authorDatetime, type: DateTime
|
7
7
|
field :reason, type: QDM::Code
|
8
|
-
field :facilityLocation, type: QDM::
|
8
|
+
field :facilityLocation, type: QDM::FacilityLocation
|
9
9
|
field :negationRationale, type: QDM::Code
|
10
|
-
field :
|
10
|
+
field :qdmTitle, type: String, default: 'Encounter, Recommended'
|
11
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.28'
|
11
12
|
field :qdmCategory, type: String, default: 'encounter'
|
12
13
|
field :qdmStatus, type: String, default: 'recommended'
|
13
14
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -5,7 +5,8 @@ module QDM
|
|
5
5
|
embedded_in :patient
|
6
6
|
field :authorDatetime, type: DateTime
|
7
7
|
field :relationship, type: QDM::Code
|
8
|
-
field :
|
8
|
+
field :qdmTitle, type: String, default: 'Family History'
|
9
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.111'
|
9
10
|
field :qrdaOid, type: String, default: '2.16.840.1.113883.10.20.24.3.12'
|
10
11
|
field :qdmCategory, type: String, default: 'family_history'
|
11
12
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -8,7 +8,8 @@ module QDM
|
|
8
8
|
field :dosage, type: QDM::Quantity
|
9
9
|
field :route, type: QDM::Code
|
10
10
|
field :negationRationale, type: QDM::Code
|
11
|
-
field :
|
11
|
+
field :qdmTitle, type: String, default: 'Immunization, Administered'
|
12
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.112'
|
12
13
|
field :qrdaOid, type: String, default: '2.16.840.1.113883.10.20.24.3.140'
|
13
14
|
field :qdmCategory, type: String, default: 'immunization'
|
14
15
|
field :qdmStatus, type: String, default: 'administered'
|
@@ -10,7 +10,8 @@ module QDM
|
|
10
10
|
field :reason, type: QDM::Code
|
11
11
|
field :route, type: QDM::Code
|
12
12
|
field :negationRationale, type: QDM::Code
|
13
|
-
field :
|
13
|
+
field :qdmTitle, type: String, default: 'Immunization, Order'
|
14
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.113'
|
14
15
|
field :qdmCategory, type: String, default: 'immunization'
|
15
16
|
field :qdmStatus, type: String, default: 'order'
|
16
17
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -6,7 +6,8 @@ module QDM
|
|
6
6
|
field :authorDatetime, type: DateTime
|
7
7
|
field :reason, type: QDM::Code
|
8
8
|
field :negationRationale, type: QDM::Code
|
9
|
-
field :
|
9
|
+
field :qdmTitle, type: String, default: 'Intervention, Order'
|
10
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.35'
|
10
11
|
field :qdmCategory, type: String, default: 'intervention'
|
11
12
|
field :qdmStatus, type: String, default: 'order'
|
12
13
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -9,7 +9,8 @@ module QDM
|
|
9
9
|
field :result
|
10
10
|
field :status, type: QDM::Code
|
11
11
|
field :negationRationale, type: QDM::Code
|
12
|
-
field :
|
12
|
+
field :qdmTitle, type: String, default: 'Intervention, Performed'
|
13
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.36'
|
13
14
|
field :qdmCategory, type: String, default: 'intervention'
|
14
15
|
field :qdmStatus, type: String, default: 'performed'
|
15
16
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -6,7 +6,8 @@ module QDM
|
|
6
6
|
field :authorDatetime, type: DateTime
|
7
7
|
field :reason, type: QDM::Code
|
8
8
|
field :negationRationale, type: QDM::Code
|
9
|
-
field :
|
9
|
+
field :qdmTitle, type: String, default: 'Intervention, Recommended'
|
10
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.37'
|
10
11
|
field :qdmCategory, type: String, default: 'intervention'
|
11
12
|
field :qdmStatus, type: String, default: 'recommended'
|
12
13
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -6,7 +6,8 @@ module QDM
|
|
6
6
|
field :authorDatetime, type: DateTime
|
7
7
|
field :reason, type: QDM::Code
|
8
8
|
field :negationRationale, type: QDM::Code
|
9
|
-
field :
|
9
|
+
field :qdmTitle, type: String, default: 'Laboratory Test, Order'
|
10
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.41'
|
10
11
|
field :qdmCategory, type: String, default: 'laboratory_test'
|
11
12
|
field :qdmStatus, type: String, default: 'order'
|
12
13
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -13,7 +13,8 @@ module QDM
|
|
13
13
|
field :referenceRange, type: QDM::Interval
|
14
14
|
field :negationRationale, type: QDM::Code
|
15
15
|
field :components, type: Array
|
16
|
-
field :
|
16
|
+
field :qdmTitle, type: String, default: 'Laboratory Test, Performed'
|
17
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.42'
|
17
18
|
field :qdmCategory, type: String, default: 'laboratory_test'
|
18
19
|
field :qdmStatus, type: String, default: 'performed'
|
19
20
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -6,7 +6,8 @@ module QDM
|
|
6
6
|
field :authorDatetime, type: DateTime
|
7
7
|
field :reason, type: QDM::Code
|
8
8
|
field :negationRationale, type: QDM::Code
|
9
|
-
field :
|
9
|
+
field :qdmTitle, type: String, default: 'Laboratory Test, Recommended'
|
10
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.43'
|
10
11
|
field :qdmCategory, type: String, default: 'laboratory_test'
|
11
12
|
field :qdmStatus, type: String, default: 'recommended'
|
12
13
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -7,7 +7,8 @@ module QDM
|
|
7
7
|
field :dosage, type: QDM::Quantity
|
8
8
|
field :frequency, type: QDM::Code
|
9
9
|
field :route, type: QDM::Code
|
10
|
-
field :
|
10
|
+
field :qdmTitle, type: String, default: 'Medication, Active'
|
11
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.44'
|
11
12
|
field :qdmCategory, type: String, default: 'medication'
|
12
13
|
field :qdmStatus, type: String, default: 'active'
|
13
14
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -10,7 +10,8 @@ module QDM
|
|
10
10
|
field :route, type: QDM::Code
|
11
11
|
field :reason, type: QDM::Code
|
12
12
|
field :negationRationale, type: QDM::Code
|
13
|
-
field :
|
13
|
+
field :qdmTitle, type: String, default: 'Medication, Administered'
|
14
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.45'
|
14
15
|
field :qdmCategory, type: String, default: 'medication'
|
15
16
|
field :qdmStatus, type: String, default: 'administered'
|
16
17
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -11,7 +11,8 @@ module QDM
|
|
11
11
|
field :daysSupplied, type: Integer
|
12
12
|
field :route, type: QDM::Code
|
13
13
|
field :negationRationale, type: QDM::Code
|
14
|
-
field :
|
14
|
+
field :qdmTitle, type: String, default: 'Medication, Discharge'
|
15
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.48'
|
15
16
|
field :qdmCategory, type: String, default: 'medication'
|
16
17
|
field :qdmStatus, type: String, default: 'discharge'
|
17
18
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -11,10 +11,11 @@ module QDM
|
|
11
11
|
field :frequency, type: QDM::Code
|
12
12
|
field :daysSupplied, type: Integer
|
13
13
|
field :route, type: QDM::Code
|
14
|
-
|
15
|
-
|
14
|
+
embeds_one :prescriberId, class_name: 'QDM::Id'
|
15
|
+
embeds_one :dispenserId, class_name: 'QDM::Id'
|
16
16
|
field :negationRationale, type: QDM::Code
|
17
|
-
field :
|
17
|
+
field :qdmTitle, type: String, default: 'Medication, Dispensed'
|
18
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.49'
|
18
19
|
field :qdmCategory, type: String, default: 'medication'
|
19
20
|
field :qdmStatus, type: String, default: 'dispensed'
|
20
21
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -13,9 +13,10 @@ module QDM
|
|
13
13
|
field :route, type: QDM::Code
|
14
14
|
field :setting, type: QDM::Code
|
15
15
|
field :reason, type: QDM::Code
|
16
|
-
|
16
|
+
embeds_one :prescriberId, class_name: 'QDM::Id'
|
17
17
|
field :negationRationale, type: QDM::Code
|
18
|
-
field :
|
18
|
+
field :qdmTitle, type: String, default: 'Medication, Order'
|
19
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.51'
|
19
20
|
field :qdmCategory, type: String, default: 'medication'
|
20
21
|
field :qdmStatus, type: String, default: 'order'
|
21
22
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -4,6 +4,7 @@ module QDM
|
|
4
4
|
include Mongoid::Document
|
5
5
|
embedded_in :patient
|
6
6
|
field :participationPeriod, type: QDM::Interval
|
7
|
+
field :qdmTitle, type: String, default: 'Participation'
|
7
8
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.130'
|
8
9
|
field :qdmCategory, type: String, default: 'participation'
|
9
10
|
field :qdmVersion, type: String, default: '5.4'
|
data/app/models/qdm/patient.rb
CHANGED
@@ -4,9 +4,7 @@ module QDM
|
|
4
4
|
include Mongoid::Document
|
5
5
|
field :birthDatetime, type: DateTime
|
6
6
|
field :qdmVersion, type: String, default: '5.4'
|
7
|
-
|
8
|
-
field :familyName, type: String
|
9
|
-
field :bundleId, type: String
|
7
|
+
embedded_in :tacomaPatient, class_name: 'CQM::Patient'
|
10
8
|
|
11
9
|
# These are the "data criteria", or QDM datatype elements that exist on a
|
12
10
|
# patient.
|
@@ -139,6 +137,11 @@ module QDM
|
|
139
137
|
get_data_elements('medication')
|
140
138
|
end
|
141
139
|
|
140
|
+
# Helper method; returns patient_characteristic data element types on this patient.
|
141
|
+
def patient_characteristics
|
142
|
+
get_data_elements('patient_characteristic')
|
143
|
+
end
|
144
|
+
|
142
145
|
# Helper method; returns physical_exam data element types on this patient.
|
143
146
|
def physical_exams
|
144
147
|
get_data_elements('physical_exam')
|
@@ -206,7 +209,7 @@ module QDM
|
|
206
209
|
|
207
210
|
# Include '_type' in any JSON output. This is necessary for deserialization.
|
208
211
|
def to_json(options = nil)
|
209
|
-
serializable_hash(methods: :_type).to_json(options)
|
212
|
+
serializable_hash(methods: :_type, include: :_type).to_json(options)
|
210
213
|
end
|
211
214
|
end
|
212
215
|
end
|
@@ -4,7 +4,8 @@ module QDM
|
|
4
4
|
include Mongoid::Document
|
5
5
|
embedded_in :patient
|
6
6
|
field :authorDatetime, type: DateTime
|
7
|
-
field :
|
7
|
+
field :qdmTitle, type: String, default: 'Patient Care Experience'
|
8
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.52'
|
8
9
|
field :qdmCategory, type: String, default: 'care_experience'
|
9
10
|
field :qdmVersion, type: String, default: '5.4'
|
10
11
|
end
|
@@ -4,7 +4,8 @@ module QDM
|
|
4
4
|
include Mongoid::Document
|
5
5
|
embedded_in :patient
|
6
6
|
field :authorDatetime, type: DateTime
|
7
|
-
field :
|
7
|
+
field :qdmTitle, type: String, default: 'Patient Characteristic'
|
8
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.53'
|
8
9
|
field :qdmCategory, type: String, default: 'patient_characteristic'
|
9
10
|
field :qdmVersion, type: String, default: '5.4'
|
10
11
|
end
|
@@ -4,7 +4,8 @@ module QDM
|
|
4
4
|
include Mongoid::Document
|
5
5
|
embedded_in :patient
|
6
6
|
field :birthDatetime, type: DateTime
|
7
|
-
field :
|
7
|
+
field :qdmTitle, type: String, default: 'Patient Characteristic Birthdate'
|
8
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.54'
|
8
9
|
field :qdmCategory, type: String, default: 'patient_characteristic'
|
9
10
|
field :qdmStatus, type: String, default: 'birthdate'
|
10
11
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -5,7 +5,8 @@ module QDM
|
|
5
5
|
embedded_in :patient
|
6
6
|
field :reason, type: QDM::Code
|
7
7
|
field :relevantPeriod, type: QDM::Interval
|
8
|
-
field :
|
8
|
+
field :qdmTitle, type: String, default: 'Patient Characteristic Clinical Trial Participant'
|
9
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.6'
|
9
10
|
field :qrdaOid, type: String, default: '2.16.840.1.113883.10.20.24.3.51'
|
10
11
|
field :qdmCategory, type: String, default: 'patient_characteristic'
|
11
12
|
field :qdmStatus, type: String, default: 'clinical_trial_participant'
|
@@ -3,7 +3,8 @@ module QDM
|
|
3
3
|
class PatientCharacteristicEthnicity < DataElement
|
4
4
|
include Mongoid::Document
|
5
5
|
embedded_in :patient
|
6
|
-
field :
|
6
|
+
field :qdmTitle, type: String, default: 'Patient Characteristic Ethnicity'
|
7
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.56'
|
7
8
|
field :qdmCategory, type: String, default: 'patient_characteristic'
|
8
9
|
field :qdmStatus, type: String, default: 'ethnicity'
|
9
10
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -5,7 +5,8 @@ module QDM
|
|
5
5
|
embedded_in :patient
|
6
6
|
field :expiredDatetime, type: DateTime
|
7
7
|
field :cause, type: QDM::Code
|
8
|
-
field :
|
8
|
+
field :qdmTitle, type: String, default: 'Patient Characteristic Expired'
|
9
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.57'
|
9
10
|
field :qdmCategory, type: String, default: 'patient_characteristic'
|
10
11
|
field :qdmStatus, type: String, default: 'expired'
|
11
12
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -4,7 +4,8 @@ module QDM
|
|
4
4
|
include Mongoid::Document
|
5
5
|
embedded_in :patient
|
6
6
|
field :relevantPeriod, type: QDM::Interval
|
7
|
-
field :
|
7
|
+
field :qdmTitle, type: String, default: 'Patient Characteristic Payer'
|
8
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.58'
|
8
9
|
field :qdmCategory, type: String, default: 'patient_characteristic'
|
9
10
|
field :qdmStatus, type: String, default: 'payer'
|
10
11
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -3,7 +3,8 @@ module QDM
|
|
3
3
|
class PatientCharacteristicRace < DataElement
|
4
4
|
include Mongoid::Document
|
5
5
|
embedded_in :patient
|
6
|
-
field :
|
6
|
+
field :qdmTitle, type: String, default: 'Patient Characteristic Race'
|
7
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.59'
|
7
8
|
field :qdmCategory, type: String, default: 'patient_characteristic'
|
8
9
|
field :qdmStatus, type: String, default: 'race'
|
9
10
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -3,7 +3,8 @@ module QDM
|
|
3
3
|
class PatientCharacteristicSex < DataElement
|
4
4
|
include Mongoid::Document
|
5
5
|
embedded_in :patient
|
6
|
-
field :
|
6
|
+
field :qdmTitle, type: String, default: 'Patient Characteristic Sex'
|
7
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.55'
|
7
8
|
field :qdmCategory, type: String, default: 'patient_characteristic'
|
8
9
|
field :qdmStatus, type: String, default: 'gender'
|
9
10
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -7,7 +7,8 @@ module QDM
|
|
7
7
|
field :reason, type: QDM::Code
|
8
8
|
field :anatomicalLocationSite, type: QDM::Code
|
9
9
|
field :negationRationale, type: QDM::Code
|
10
|
-
field :
|
10
|
+
field :qdmTitle, type: String, default: 'Physical Exam, Order'
|
11
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.61'
|
11
12
|
field :qdmCategory, type: String, default: 'physical_exam'
|
12
13
|
field :qdmStatus, type: String, default: 'order'
|
13
14
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -11,7 +11,8 @@ module QDM
|
|
11
11
|
field :anatomicalLocationSite, type: QDM::Code
|
12
12
|
field :negationRationale, type: QDM::Code
|
13
13
|
field :components, type: Array
|
14
|
-
field :
|
14
|
+
field :qdmTitle, type: String, default: 'Physical Exam, Performed'
|
15
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.62'
|
15
16
|
field :qdmCategory, type: String, default: 'physical_exam'
|
16
17
|
field :qdmStatus, type: String, default: 'performed'
|
17
18
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -7,7 +7,8 @@ module QDM
|
|
7
7
|
field :reason, type: QDM::Code
|
8
8
|
field :anatomicalLocationSite, type: QDM::Code
|
9
9
|
field :negationRationale, type: QDM::Code
|
10
|
-
field :
|
10
|
+
field :qdmTitle, type: String, default: 'Physical Exam, Recommended'
|
11
|
+
field :hqmfOid, type: String, default: '22.16.840.1.113883.10.20.28.4.63'
|
11
12
|
field :qdmCategory, type: String, default: 'physical_exam'
|
12
13
|
field :qdmStatus, type: String, default: 'recommended'
|
13
14
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -8,7 +8,8 @@ module QDM
|
|
8
8
|
field :anatomicalLocationSite, type: QDM::Code
|
9
9
|
field :ordinality, type: QDM::Code
|
10
10
|
field :negationRationale, type: QDM::Code
|
11
|
-
field :
|
11
|
+
field :qdmTitle, type: String, default: 'Procedure, Order'
|
12
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.66'
|
12
13
|
field :qdmCategory, type: String, default: 'procedure'
|
13
14
|
field :qdmStatus, type: String, default: 'order'
|
14
15
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -14,7 +14,8 @@ module QDM
|
|
14
14
|
field :incisionDatetime, type: DateTime
|
15
15
|
field :negationRationale, type: QDM::Code
|
16
16
|
field :components, type: Array
|
17
|
-
field :
|
17
|
+
field :qdmTitle, type: String, default: 'Procedure, Performed'
|
18
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.67'
|
18
19
|
field :qdmCategory, type: String, default: 'procedure'
|
19
20
|
field :qdmStatus, type: String, default: 'performed'
|
20
21
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -8,7 +8,8 @@ module QDM
|
|
8
8
|
field :anatomicalLocationSite, type: QDM::Code
|
9
9
|
field :ordinality, type: QDM::Code
|
10
10
|
field :negationRationale, type: QDM::Code
|
11
|
-
field :
|
11
|
+
field :qdmTitle, type: String, default: 'Procedure, Recommended'
|
12
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.68'
|
12
13
|
field :qdmCategory, type: String, default: 'procedure'
|
13
14
|
field :qdmStatus, type: String, default: 'recommended'
|
14
15
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -4,7 +4,8 @@ module QDM
|
|
4
4
|
include Mongoid::Document
|
5
5
|
embedded_in :patient
|
6
6
|
field :authorDatetime, type: DateTime
|
7
|
-
field :
|
7
|
+
field :qdmTitle, type: String, default: 'Provider Care Experience'
|
8
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.70'
|
8
9
|
field :qdmCategory, type: String, default: 'care_experience'
|
9
10
|
field :qdmVersion, type: String, default: '5.4'
|
10
11
|
end
|
@@ -4,7 +4,8 @@ module QDM
|
|
4
4
|
include Mongoid::Document
|
5
5
|
embedded_in :patient
|
6
6
|
field :authorDatetime, type: DateTime
|
7
|
-
field :
|
7
|
+
field :qdmTitle, type: String, default: 'Provider Characteristic'
|
8
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.71'
|
8
9
|
field :qdmCategory, type: String, default: 'provider_characteristic'
|
9
10
|
field :qdmVersion, type: String, default: '5.4'
|
10
11
|
end
|
@@ -9,7 +9,8 @@ module QDM
|
|
9
9
|
field :frequency, type: QDM::Code
|
10
10
|
field :route, type: QDM::Code
|
11
11
|
field :negationRationale, type: QDM::Code
|
12
|
-
field :
|
12
|
+
field :qdmTitle, type: String, default: 'Substance, Administered'
|
13
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.73'
|
13
14
|
field :qdmCategory, type: String, default: 'substance'
|
14
15
|
field :qdmStatus, type: String, default: 'administered'
|
15
16
|
field :qdmVersion, type: String, default: '5.4'
|
@@ -11,7 +11,8 @@ module QDM
|
|
11
11
|
field :refills, type: Integer
|
12
12
|
field :route, type: QDM::Code
|
13
13
|
field :negationRationale, type: QDM::Code
|
14
|
-
field :
|
14
|
+
field :qdmTitle, type: String, default: 'Substance, Order'
|
15
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.77'
|
15
16
|
field :qdmCategory, type: String, default: 'substance'
|
16
17
|
field :qdmStatus, type: String, default: 'order'
|
17
18
|
field :qdmVersion, type: String, default: '5.4'
|