cqm-models 0.8.4 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/javascripts/AdverseEvent.js +2 -2
- data/app/assets/javascripts/AllDataElements.js +4 -8
- data/app/assets/javascripts/AllergyIntolerance.js +2 -2
- data/app/assets/javascripts/{CommunicationFromProviderToPatient.js → AssessmentOrder.js} +9 -9
- data/app/assets/javascripts/AssessmentPerformed.js +2 -2
- data/app/assets/javascripts/AssessmentRecommended.js +2 -3
- data/app/assets/javascripts/CareGoal.js +2 -2
- data/app/assets/javascripts/{CommunicationFromPatientToProvider.js → CommunicationPerformed.js} +13 -8
- data/app/assets/javascripts/Component.js +1 -1
- data/app/assets/javascripts/DeviceApplied.js +2 -3
- data/app/assets/javascripts/DeviceOrder.js +2 -2
- data/app/assets/javascripts/DeviceRecommended.js +2 -2
- data/app/assets/javascripts/Diagnosis.js +2 -2
- data/app/assets/javascripts/DiagnosticStudyOrder.js +2 -3
- data/app/assets/javascripts/DiagnosticStudyPerformed.js +2 -2
- data/app/assets/javascripts/DiagnosticStudyRecommended.js +2 -3
- data/app/assets/javascripts/EncounterOrder.js +2 -2
- data/app/assets/javascripts/EncounterPerformed.js +2 -2
- data/app/assets/javascripts/EncounterRecommended.js +2 -2
- data/app/assets/javascripts/FacilityLocation.js +1 -1
- data/app/assets/javascripts/FamilyHistory.js +2 -2
- data/app/assets/javascripts/Id.js +1 -1
- data/app/assets/javascripts/ImmunizationAdministered.js +2 -3
- data/app/assets/javascripts/ImmunizationOrder.js +2 -2
- data/app/assets/javascripts/InterventionOrder.js +2 -2
- data/app/assets/javascripts/InterventionPerformed.js +2 -2
- data/app/assets/javascripts/InterventionRecommended.js +2 -2
- data/app/assets/javascripts/LaboratoryTestOrder.js +2 -3
- data/app/assets/javascripts/LaboratoryTestPerformed.js +2 -2
- data/app/assets/javascripts/LaboratoryTestRecommended.js +2 -3
- data/app/assets/javascripts/MedicationActive.js +2 -3
- data/app/assets/javascripts/MedicationAdministered.js +2 -3
- data/app/assets/javascripts/MedicationDischarge.js +3 -2
- data/app/assets/javascripts/MedicationDispensed.js +5 -2
- data/app/assets/javascripts/MedicationOrder.js +5 -4
- data/app/assets/javascripts/Participation.js +2 -2
- data/app/assets/javascripts/Patient.js +4 -4
- data/app/assets/javascripts/PatientCareExperience.js +2 -2
- data/app/assets/javascripts/PatientCharacteristic.js +2 -2
- data/app/assets/javascripts/PatientCharacteristicBirthdate.js +2 -2
- data/app/assets/javascripts/PatientCharacteristicClinicalTrialParticipant.js +2 -2
- data/app/assets/javascripts/PatientCharacteristicEthnicity.js +2 -2
- data/app/assets/javascripts/PatientCharacteristicExpired.js +2 -2
- data/app/assets/javascripts/PatientCharacteristicPayer.js +2 -2
- data/app/assets/javascripts/PatientCharacteristicRace.js +2 -2
- data/app/assets/javascripts/PatientCharacteristicSex.js +2 -2
- data/app/assets/javascripts/PhysicalExamOrder.js +2 -3
- data/app/assets/javascripts/PhysicalExamPerformed.js +2 -2
- data/app/assets/javascripts/PhysicalExamRecommended.js +2 -3
- data/app/assets/javascripts/ProcedureOrder.js +2 -4
- data/app/assets/javascripts/ProcedurePerformed.js +2 -3
- data/app/assets/javascripts/ProcedureRecommended.js +2 -4
- data/app/assets/javascripts/ProviderCareExperience.js +2 -2
- data/app/assets/javascripts/ProviderCharacteristic.js +2 -2
- data/app/assets/javascripts/ResultComponent.js +1 -1
- data/app/assets/javascripts/SubstanceAdministered.js +2 -3
- data/app/assets/javascripts/SubstanceOrder.js +2 -3
- data/app/assets/javascripts/SubstanceRecommended.js +2 -4
- data/app/assets/javascripts/Symptom.js +2 -2
- data/app/assets/javascripts/basetypes/Any.js +3 -3
- data/app/assets/javascripts/basetypes/DateTime.js +1 -1
- data/app/assets/javascripts/basetypes/Interval.js +2 -2
- data/app/assets/javascripts/basetypes/Ratio.js +20 -0
- data/app/models/models.rb +4 -5
- data/app/models/qdm/adverse_event.rb +2 -2
- data/app/models/qdm/allergy_intolerance.rb +2 -2
- data/app/models/qdm/assessment_order.rb +14 -0
- data/app/models/qdm/assessment_performed.rb +2 -2
- data/app/models/qdm/assessment_recommended.rb +2 -3
- data/app/models/qdm/basetypes/ratio.rb +52 -0
- data/app/models/qdm/care_goal.rb +2 -2
- data/app/models/qdm/communication_performed.rb +19 -0
- data/app/models/qdm/component.rb +1 -1
- data/app/models/qdm/device_applied.rb +2 -3
- data/app/models/qdm/device_order.rb +2 -2
- data/app/models/qdm/device_recommended.rb +2 -2
- data/app/models/qdm/diagnosis.rb +2 -2
- data/app/models/qdm/diagnostic_study_order.rb +2 -3
- data/app/models/qdm/diagnostic_study_performed.rb +2 -2
- data/app/models/qdm/diagnostic_study_recommended.rb +2 -3
- data/app/models/qdm/encounter_order.rb +2 -2
- data/app/models/qdm/encounter_performed.rb +2 -2
- data/app/models/qdm/encounter_recommended.rb +2 -2
- data/app/models/qdm/facility_location.rb +1 -1
- data/app/models/qdm/family_history.rb +2 -2
- data/app/models/qdm/id.rb +1 -1
- data/app/models/qdm/immunization_administered.rb +2 -3
- data/app/models/qdm/immunization_order.rb +2 -2
- data/app/models/qdm/intervention_order.rb +2 -2
- data/app/models/qdm/intervention_performed.rb +2 -2
- data/app/models/qdm/intervention_recommended.rb +2 -2
- data/app/models/qdm/laboratory_test_order.rb +2 -3
- data/app/models/qdm/laboratory_test_performed.rb +2 -2
- data/app/models/qdm/laboratory_test_recommended.rb +2 -3
- data/app/models/qdm/medication_active.rb +2 -3
- data/app/models/qdm/medication_administered.rb +2 -3
- data/app/models/qdm/medication_discharge.rb +3 -2
- data/app/models/qdm/medication_dispensed.rb +5 -2
- data/app/models/qdm/medication_order.rb +5 -4
- data/app/models/qdm/participation.rb +2 -2
- data/app/models/qdm/patient.rb +3 -3
- data/app/models/qdm/patient_care_experience.rb +2 -2
- data/app/models/qdm/patient_characteristic.rb +2 -2
- data/app/models/qdm/patient_characteristic_birthdate.rb +2 -2
- data/app/models/qdm/patient_characteristic_clinical_trial_participant.rb +2 -2
- data/app/models/qdm/patient_characteristic_ethnicity.rb +2 -2
- data/app/models/qdm/patient_characteristic_expired.rb +2 -2
- data/app/models/qdm/patient_characteristic_payer.rb +2 -2
- data/app/models/qdm/patient_characteristic_race.rb +2 -2
- data/app/models/qdm/patient_characteristic_sex.rb +2 -2
- data/app/models/qdm/physical_exam_order.rb +2 -3
- data/app/models/qdm/physical_exam_performed.rb +2 -2
- data/app/models/qdm/physical_exam_recommended.rb +2 -3
- data/app/models/qdm/procedure_order.rb +2 -4
- data/app/models/qdm/procedure_performed.rb +2 -3
- data/app/models/qdm/procedure_recommended.rb +2 -4
- data/app/models/qdm/provider_care_experience.rb +2 -2
- data/app/models/qdm/provider_characteristic.rb +2 -2
- data/app/models/qdm/result_component.rb +1 -1
- data/app/models/qdm/substance_administered.rb +2 -3
- data/app/models/qdm/substance_order.rb +2 -3
- data/app/models/qdm/substance_recommended.rb +2 -4
- data/app/models/qdm/symptom.rb +2 -2
- data/cqm-models.gemspec +1 -1
- data/data/oids.json +209 -197
- data/dist/index.js +2114 -1230
- data/lib/generate_models.rb +14 -12
- data/modelinfo/qdm-modelinfo-5.4.xml +503 -0
- data/package.json +2 -2
- data/templates/models_template.rb.erb +2 -1
- data/templates/patient_extension.rb.erb +2 -2
- data/templates/patient_template.js.erb +3 -3
- data/yarn.lock +3 -3
- metadata +10 -11
- data/app/assets/javascripts/CommunicationFromProviderToProvider.js +0 -30
- data/app/assets/javascripts/Ratio.js +0 -26
- data/app/models/qdm/communication_from_patient_to_provider.rb +0 -14
- data/app/models/qdm/communication_from_provider_to_patient.rb +0 -14
- data/app/models/qdm/communication_from_provider_to_provider.rb +0 -14
- data/app/models/qdm/ratio.rb +0 -10
@@ -20,14 +20,13 @@ const SubstanceOrderSchema = DataElementSchema({
|
|
20
20
|
dosage: Quantity,
|
21
21
|
supply: Quantity,
|
22
22
|
frequency: Code,
|
23
|
-
method: Code,
|
24
23
|
refills: Number,
|
25
24
|
route: Code,
|
26
25
|
negationRationale: Code,
|
27
26
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.77' },
|
28
|
-
|
27
|
+
qdmCategory: { type: String, default: 'substance' },
|
29
28
|
qdmStatus: { type: String, default: 'order' },
|
30
|
-
qdmVersion: { type: String, default: '5.
|
29
|
+
qdmVersion: { type: String, default: '5.4' },
|
31
30
|
_type: { type: String, default: 'SubstanceOrder' },
|
32
31
|
|
33
32
|
});
|
@@ -18,16 +18,14 @@ const SubstanceRecommendedSchema = DataElementSchema({
|
|
18
18
|
authorDatetime: DateTime,
|
19
19
|
reason: Code,
|
20
20
|
dosage: Quantity,
|
21
|
-
supply: Quantity,
|
22
21
|
frequency: Code,
|
23
|
-
method: Code,
|
24
22
|
refills: Number,
|
25
23
|
route: Code,
|
26
24
|
negationRationale: Code,
|
27
25
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.78' },
|
28
|
-
|
26
|
+
qdmCategory: { type: String, default: 'substance' },
|
29
27
|
qdmStatus: { type: String, default: 'recommended' },
|
30
|
-
qdmVersion: { type: String, default: '5.
|
28
|
+
qdmVersion: { type: String, default: '5.4' },
|
31
29
|
_type: { type: String, default: 'SubstanceRecommended' },
|
32
30
|
|
33
31
|
});
|
@@ -19,8 +19,8 @@ const SymptomSchema = DataElementSchema({
|
|
19
19
|
severity: Code,
|
20
20
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.116' },
|
21
21
|
qrdaOid: { type: String, default: '2.16.840.1.113883.10.20.24.3.136' },
|
22
|
-
|
23
|
-
qdmVersion: { type: String, default: '5.
|
22
|
+
qdmCategory: { type: String, default: 'symptom' },
|
23
|
+
qdmVersion: { type: String, default: '5.4' },
|
24
24
|
_type: { type: String, default: 'Symptom' },
|
25
25
|
|
26
26
|
});
|
@@ -39,10 +39,10 @@ function RecursiveCast(any) {
|
|
39
39
|
|
40
40
|
// Cast to DateTime if it is a string representing a DateTime
|
41
41
|
if (casted.low && Date.parse(casted.low)) {
|
42
|
-
casted.low = cql.DateTime.
|
42
|
+
casted.low = cql.DateTime.fromJSDate(new Date(casted.low), 0);
|
43
43
|
}
|
44
44
|
if (casted.high && Date.parse(casted.high)) {
|
45
|
-
casted.high = cql.DateTime.
|
45
|
+
casted.high = cql.DateTime.fromJSDate(new Date(casted.high), 0);
|
46
46
|
}
|
47
47
|
return casted;
|
48
48
|
}
|
@@ -57,7 +57,7 @@ function RecursiveCast(any) {
|
|
57
57
|
return any;
|
58
58
|
}
|
59
59
|
if (Date.parse(any)) {
|
60
|
-
return cql.DateTime.
|
60
|
+
return cql.DateTime.fromJSDate(new Date(any), 0);
|
61
61
|
}
|
62
62
|
return any;
|
63
63
|
}
|
@@ -11,7 +11,7 @@ DateTime.prototype.cast = (dateTime) => {
|
|
11
11
|
throw new Error(`DateTime: ${dateTime} is not a valid DateTime`);
|
12
12
|
}
|
13
13
|
|
14
|
-
return cql.DateTime.
|
14
|
+
return cql.DateTime.fromJSDate(new Date(dateTime), 0);
|
15
15
|
};
|
16
16
|
|
17
17
|
mongoose.Schema.Types.DateTime = DateTime;
|
@@ -23,10 +23,10 @@ Interval.prototype.cast = (interval) => {
|
|
23
23
|
|
24
24
|
// Cast to DateTime if it is a string representing a DateTime
|
25
25
|
if (casted.low && Date.parse(casted.low)) {
|
26
|
-
casted.low = cql.DateTime.
|
26
|
+
casted.low = cql.DateTime.fromJSDate(new Date(casted.low), 0);
|
27
27
|
}
|
28
28
|
if (casted.high && Date.parse(casted.high)) {
|
29
|
-
casted.high = cql.DateTime.
|
29
|
+
casted.high = cql.DateTime.fromJSDate(new Date(casted.high), 0);
|
30
30
|
}
|
31
31
|
return casted;
|
32
32
|
};
|
@@ -0,0 +1,20 @@
|
|
1
|
+
const mongoose = require('mongoose');
|
2
|
+
const cql = require('cql-execution');
|
3
|
+
|
4
|
+
function Ratio(key, options) {
|
5
|
+
mongoose.SchemaType.call(this, key, options, 'Ratio');
|
6
|
+
}
|
7
|
+
Ratio.prototype = Object.create(mongoose.SchemaType.prototype);
|
8
|
+
|
9
|
+
Ratio.prototype.cast = (ratio) => {
|
10
|
+
if (typeof ratio.numerator === 'undefined') {
|
11
|
+
throw new Error(`Ratio: ${ratio} does not have a numerator`);
|
12
|
+
} else if (typeof ratio.denominator === 'undefined') {
|
13
|
+
throw new Error(`Ratio: ${ratio} does not have a denominator`);
|
14
|
+
}
|
15
|
+
|
16
|
+
return new cql.Ratio(ratio);
|
17
|
+
};
|
18
|
+
|
19
|
+
mongoose.Schema.Types.Ratio = Ratio;
|
20
|
+
module.exports = Ratio;
|
data/app/models/models.rb
CHANGED
@@ -8,9 +8,10 @@ require_relative 'qdm/id'
|
|
8
8
|
|
9
9
|
# base types
|
10
10
|
require_relative 'qdm/basetypes/code'
|
11
|
+
require_relative 'qdm/basetypes/data_element'
|
11
12
|
require_relative 'qdm/basetypes/interval'
|
12
13
|
require_relative 'qdm/basetypes/quantity'
|
13
|
-
require_relative 'qdm/basetypes/
|
14
|
+
require_relative 'qdm/basetypes/ratio'
|
14
15
|
|
15
16
|
# Tacoma-specific models
|
16
17
|
require_relative 'qdm/tacoma/measure'
|
@@ -21,7 +22,6 @@ require_relative 'qdm/tacoma/individual_result'
|
|
21
22
|
|
22
23
|
# Generated models
|
23
24
|
require_relative 'qdm/patient'
|
24
|
-
require_relative 'qdm/ratio'
|
25
25
|
require_relative 'qdm/physical_exam_order'
|
26
26
|
require_relative 'qdm/participation'
|
27
27
|
require_relative 'qdm/patient_characteristic_sex'
|
@@ -35,7 +35,7 @@ require_relative 'qdm/medication_administered'
|
|
35
35
|
require_relative 'qdm/procedure_recommended'
|
36
36
|
require_relative 'qdm/encounter_performed'
|
37
37
|
require_relative 'qdm/diagnosis'
|
38
|
-
require_relative 'qdm/
|
38
|
+
require_relative 'qdm/communication_performed'
|
39
39
|
require_relative 'qdm/assessment_performed'
|
40
40
|
require_relative 'qdm/patient_characteristic_clinical_trial_participant'
|
41
41
|
require_relative 'qdm/device_order'
|
@@ -45,13 +45,13 @@ require_relative 'qdm/family_history'
|
|
45
45
|
require_relative 'qdm/component'
|
46
46
|
require_relative 'qdm/result_component'
|
47
47
|
require_relative 'qdm/facility_location'
|
48
|
-
require_relative 'qdm/communication_from_provider_to_provider'
|
49
48
|
require_relative 'qdm/medication_active'
|
50
49
|
require_relative 'qdm/laboratory_test_order'
|
51
50
|
require_relative 'qdm/diagnostic_study_order'
|
52
51
|
require_relative 'qdm/substance_order'
|
53
52
|
require_relative 'qdm/patient_characteristic_payer'
|
54
53
|
require_relative 'qdm/patient_characteristic_expired'
|
54
|
+
require_relative 'qdm/assessment_order'
|
55
55
|
require_relative 'qdm/assessment_recommended'
|
56
56
|
require_relative 'qdm/immunization_administered'
|
57
57
|
require_relative 'qdm/substance_administered'
|
@@ -63,7 +63,6 @@ require_relative 'qdm/provider_characteristic'
|
|
63
63
|
require_relative 'qdm/physical_exam_recommended'
|
64
64
|
require_relative 'qdm/patient_characteristic_birthdate'
|
65
65
|
require_relative 'qdm/adverse_event'
|
66
|
-
require_relative 'qdm/communication_from_patient_to_provider'
|
67
66
|
require_relative 'qdm/device_recommended'
|
68
67
|
require_relative 'qdm/device_applied'
|
69
68
|
require_relative 'qdm/medication_discharge'
|
@@ -9,7 +9,7 @@ module QDM
|
|
9
9
|
field :facilityLocation, type: QDM::Code
|
10
10
|
field :type, type: QDM::Code
|
11
11
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.3.120'
|
12
|
-
field :
|
13
|
-
field :qdmVersion, type: String, default: '5.
|
12
|
+
field :qdmCategory, type: String, default: 'adverse_event'
|
13
|
+
field :qdmVersion, type: String, default: '5.4'
|
14
14
|
end
|
15
15
|
end
|
@@ -8,8 +8,8 @@ module QDM
|
|
8
8
|
field :type, type: QDM::Code
|
9
9
|
field :severity, type: QDM::Code
|
10
10
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.3.119'
|
11
|
-
field :
|
11
|
+
field :qdmCategory, type: String, default: 'allergy'
|
12
12
|
field :qdmStatus, type: String, default: 'intolerance'
|
13
|
-
field :qdmVersion, type: String, default: '5.
|
13
|
+
field :qdmVersion, type: String, default: '5.4'
|
14
14
|
end
|
15
15
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module QDM
|
2
|
+
# app/models/qdm/assessment_order.rb
|
3
|
+
class AssessmentOrder < DataElement
|
4
|
+
include Mongoid::Document
|
5
|
+
embedded_in :patient
|
6
|
+
field :authorDatetime, type: DateTime
|
7
|
+
field :negationRationale, type: QDM::Code
|
8
|
+
field :reason, type: QDM::Code
|
9
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.131'
|
10
|
+
field :qdmCategory, type: String, default: 'assessment'
|
11
|
+
field :qdmStatus, type: String, default: 'order'
|
12
|
+
field :qdmVersion, type: String, default: '5.4'
|
13
|
+
end
|
14
|
+
end
|
@@ -11,8 +11,8 @@ module QDM
|
|
11
11
|
field :components, type: Array
|
12
12
|
embeds_many :relatedTo, class_name: 'QDM::Id'
|
13
13
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.3.117'
|
14
|
-
field :
|
14
|
+
field :qdmCategory, type: String, default: 'assessment'
|
15
15
|
field :qdmStatus, type: String, default: 'performed'
|
16
|
-
field :qdmVersion, type: String, default: '5.
|
16
|
+
field :qdmVersion, type: String, default: '5.4'
|
17
17
|
end
|
18
18
|
end
|
@@ -6,10 +6,9 @@ module QDM
|
|
6
6
|
field :authorDatetime, type: DateTime
|
7
7
|
field :negationRationale, type: QDM::Code
|
8
8
|
field :reason, type: QDM::Code
|
9
|
-
field :method, type: QDM::Code
|
10
9
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.3.118'
|
11
|
-
field :
|
10
|
+
field :qdmCategory, type: String, default: 'assessment'
|
12
11
|
field :qdmStatus, type: String, default: 'recommended'
|
13
|
-
field :qdmVersion, type: String, default: '5.
|
12
|
+
field :qdmVersion, type: String, default: '5.4'
|
14
13
|
end
|
15
14
|
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
module QDM
|
2
|
+
# Represents a Ratio
|
3
|
+
class Ratio
|
4
|
+
attr_accessor :numerator, :denominator
|
5
|
+
|
6
|
+
# Numerator and denominator are required
|
7
|
+
def initialize(numerator, denominator)
|
8
|
+
@numerator = numerator
|
9
|
+
@denominator = denominator
|
10
|
+
end
|
11
|
+
|
12
|
+
# Converts an object of this instance into a database friendly value.
|
13
|
+
def mongoize
|
14
|
+
{ numerator: @numerator, denominator: @denominator, _type: 'QDM::Ratio' }
|
15
|
+
end
|
16
|
+
|
17
|
+
class << self
|
18
|
+
# Get the object as it was stored in the database, and instantiate
|
19
|
+
# this custom class from it.
|
20
|
+
#
|
21
|
+
# The array elements in demongoize are the same 2 elements used in mongoize, i.e.
|
22
|
+
# [ numerator, denominator ].
|
23
|
+
def demongoize(object)
|
24
|
+
return nil unless object
|
25
|
+
object = object.symbolize_keys
|
26
|
+
QDM::Ratio.new(object[:numerator], object[:denominator]) if object.is_a?(Hash)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Takes any possible object and converts it to how it would be
|
30
|
+
# stored in the database.
|
31
|
+
def mongoize(object)
|
32
|
+
case object
|
33
|
+
when nil then nil
|
34
|
+
when QDM::Ratio then object.mongoize
|
35
|
+
when Hash
|
36
|
+
object = object.symbolize_keys
|
37
|
+
QDM::Ratio.new(object[:numerator], object[:denominator]).mongoize
|
38
|
+
else object
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
# Converts the object that was supplied to a criteria and converts it
|
43
|
+
# into a database friendly form.
|
44
|
+
def evolve(object)
|
45
|
+
case object
|
46
|
+
when QDM::Ratio then object.mongoize
|
47
|
+
else object
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
data/app/models/qdm/care_goal.rb
CHANGED
@@ -7,7 +7,7 @@ module QDM
|
|
7
7
|
embeds_many :relatedTo, class_name: 'QDM::Id'
|
8
8
|
field :targetOutcome
|
9
9
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.3.7'
|
10
|
-
field :
|
11
|
-
field :qdmVersion, type: String, default: '5.
|
10
|
+
field :qdmCategory, type: String, default: 'care_goal'
|
11
|
+
field :qdmVersion, type: String, default: '5.4'
|
12
12
|
end
|
13
13
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module QDM
|
2
|
+
# app/models/qdm/communication_performed.rb
|
3
|
+
class CommunicationPerformed < DataElement
|
4
|
+
include Mongoid::Document
|
5
|
+
embedded_in :patient
|
6
|
+
field :authorDatetime, type: DateTime
|
7
|
+
field :category, type: QDM::Code
|
8
|
+
field :medium, type: QDM::Code
|
9
|
+
field :sender, type: QDM::Code
|
10
|
+
field :recipient, type: QDM::Code
|
11
|
+
embeds_many :relatedTo, class_name: 'QDM::Id'
|
12
|
+
field :relevantPeriod, type: QDM::Interval
|
13
|
+
field :negationRationale, type: QDM::Code
|
14
|
+
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.132'
|
15
|
+
field :qdmCategory, type: String, default: 'communication'
|
16
|
+
field :qdmStatus, type: String, default: 'performed'
|
17
|
+
field :qdmVersion, type: String, default: '5.4'
|
18
|
+
end
|
19
|
+
end
|
data/app/models/qdm/component.rb
CHANGED
@@ -8,10 +8,9 @@ module QDM
|
|
8
8
|
field :negationRationale, type: QDM::Code
|
9
9
|
field :reason, type: QDM::Code
|
10
10
|
field :anatomicalLocationSite, type: QDM::Code
|
11
|
-
field :anatomicalApproachSite, type: QDM::Code
|
12
11
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.3.13'
|
13
|
-
field :
|
12
|
+
field :qdmCategory, type: String, default: 'device'
|
14
13
|
field :qdmStatus, type: String, default: 'applied'
|
15
|
-
field :qdmVersion, type: String, default: '5.
|
14
|
+
field :qdmVersion, type: String, default: '5.4'
|
16
15
|
end
|
17
16
|
end
|
@@ -7,8 +7,8 @@ module QDM
|
|
7
7
|
field :negationRationale, type: QDM::Code
|
8
8
|
field :reason, type: QDM::Code
|
9
9
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.3.15'
|
10
|
-
field :
|
10
|
+
field :qdmCategory, type: String, default: 'device'
|
11
11
|
field :qdmStatus, type: String, default: 'order'
|
12
|
-
field :qdmVersion, type: String, default: '5.
|
12
|
+
field :qdmVersion, type: String, default: '5.4'
|
13
13
|
end
|
14
14
|
end
|
@@ -7,8 +7,8 @@ module QDM
|
|
7
7
|
field :negationRationale, type: QDM::Code
|
8
8
|
field :reason, type: QDM::Code
|
9
9
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.3.16'
|
10
|
-
field :
|
10
|
+
field :qdmCategory, type: String, default: 'device'
|
11
11
|
field :qdmStatus, type: String, default: 'recommended'
|
12
|
-
field :qdmVersion, type: String, default: '5.
|
12
|
+
field :qdmVersion, type: String, default: '5.4'
|
13
13
|
end
|
14
14
|
end
|
data/app/models/qdm/diagnosis.rb
CHANGED
@@ -9,7 +9,7 @@ module QDM
|
|
9
9
|
field :severity, type: QDM::Code
|
10
10
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.3.110'
|
11
11
|
field :qrdaOid, type: String, default: '2.16.840.1.113883.10.20.24.3.135'
|
12
|
-
field :
|
13
|
-
field :qdmVersion, type: String, default: '5.
|
12
|
+
field :qdmCategory, type: String, default: 'condition'
|
13
|
+
field :qdmVersion, type: String, default: '5.4'
|
14
14
|
end
|
15
15
|
end
|
@@ -5,11 +5,10 @@ module QDM
|
|
5
5
|
embedded_in :patient
|
6
6
|
field :authorDatetime, type: DateTime
|
7
7
|
field :reason, type: QDM::Code
|
8
|
-
field :method, type: QDM::Code
|
9
8
|
field :negationRationale, type: QDM::Code
|
10
9
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.3.22'
|
11
|
-
field :
|
10
|
+
field :qdmCategory, type: String, default: 'diagnostic_study'
|
12
11
|
field :qdmStatus, type: String, default: 'order'
|
13
|
-
field :qdmVersion, type: String, default: '5.
|
12
|
+
field :qdmVersion, type: String, default: '5.4'
|
14
13
|
end
|
15
14
|
end
|
@@ -14,8 +14,8 @@ module QDM
|
|
14
14
|
field :negationRationale, type: QDM::Code
|
15
15
|
field :components, type: Array
|
16
16
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.3.23'
|
17
|
-
field :
|
17
|
+
field :qdmCategory, type: String, default: 'diagnostic_study'
|
18
18
|
field :qdmStatus, type: String, default: 'performed'
|
19
|
-
field :qdmVersion, type: String, default: '5.
|
19
|
+
field :qdmVersion, type: String, default: '5.4'
|
20
20
|
end
|
21
21
|
end
|
@@ -4,12 +4,11 @@ module QDM
|
|
4
4
|
include Mongoid::Document
|
5
5
|
embedded_in :patient
|
6
6
|
field :authorDatetime, type: DateTime
|
7
|
-
field :method, type: QDM::Code
|
8
7
|
field :negationRationale, type: QDM::Code
|
9
8
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.3.24'
|
10
9
|
field :qrdaOid, type: String, default: '2.16.840.1.113883.10.20.24.3.19'
|
11
|
-
field :
|
10
|
+
field :qdmCategory, type: String, default: 'diagnostic_study'
|
12
11
|
field :qdmStatus, type: String, default: 'recommended'
|
13
|
-
field :qdmVersion, type: String, default: '5.
|
12
|
+
field :qdmVersion, type: String, default: '5.4'
|
14
13
|
end
|
15
14
|
end
|
@@ -8,8 +8,8 @@ module QDM
|
|
8
8
|
field :facilityLocation, type: QDM::Code
|
9
9
|
field :negationRationale, type: QDM::Code
|
10
10
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.3.27'
|
11
|
-
field :
|
11
|
+
field :qdmCategory, type: String, default: 'encounter'
|
12
12
|
field :qdmStatus, type: String, default: 'order'
|
13
|
-
field :qdmVersion, type: String, default: '5.
|
13
|
+
field :qdmVersion, type: String, default: '5.4'
|
14
14
|
end
|
15
15
|
end
|
@@ -13,8 +13,8 @@ module QDM
|
|
13
13
|
field :negationRationale, type: QDM::Code
|
14
14
|
field :lengthOfStay, type: QDM::Quantity
|
15
15
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.3.5'
|
16
|
-
field :
|
16
|
+
field :qdmCategory, type: String, default: 'encounter'
|
17
17
|
field :qdmStatus, type: String, default: 'performed'
|
18
|
-
field :qdmVersion, type: String, default: '5.
|
18
|
+
field :qdmVersion, type: String, default: '5.4'
|
19
19
|
end
|
20
20
|
end
|