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.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +1 -1
- data/README.md +3 -2
- data/app/assets/javascripts/AdverseEvent.js +2 -2
- data/app/assets/javascripts/AllDataElements.js +2 -2
- data/app/assets/javascripts/AllergyIntolerance.js +2 -2
- data/app/assets/javascripts/AssessmentOrder.js +2 -2
- data/app/assets/javascripts/AssessmentPerformed.js +3 -2
- data/app/assets/javascripts/AssessmentRecommended.js +2 -2
- data/app/assets/javascripts/CareGoal.js +2 -2
- data/app/assets/javascripts/CommunicationPerformed.js +3 -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 -2
- data/app/assets/javascripts/DiagnosticStudyPerformed.js +4 -2
- data/app/assets/javascripts/DiagnosticStudyRecommended.js +2 -2
- data/app/assets/javascripts/EncounterOrder.js +2 -2
- data/app/assets/javascripts/EncounterPerformed.js +7 -3
- data/app/assets/javascripts/EncounterRecommended.js +2 -2
- data/app/assets/javascripts/FamilyHistory.js +2 -2
- data/app/assets/javascripts/ImmunizationAdministered.js +2 -2
- data/app/assets/javascripts/ImmunizationOrder.js +2 -2
- data/app/assets/javascripts/InterventionOrder.js +2 -2
- data/app/assets/javascripts/InterventionPerformed.js +3 -2
- data/app/assets/javascripts/InterventionRecommended.js +2 -2
- data/app/assets/javascripts/LaboratoryTestOrder.js +2 -2
- data/app/assets/javascripts/LaboratoryTestPerformed.js +4 -2
- data/app/assets/javascripts/LaboratoryTestRecommended.js +2 -2
- data/app/assets/javascripts/MedicationActive.js +2 -2
- data/app/assets/javascripts/MedicationAdministered.js +2 -2
- data/app/assets/javascripts/MedicationDischarge.js +3 -3
- data/app/assets/javascripts/MedicationDispensed.js +4 -3
- data/app/assets/javascripts/MedicationOrder.js +3 -2
- data/app/assets/javascripts/Participation.js +1 -2
- data/app/assets/javascripts/PatientCareExperience.js +2 -2
- data/app/assets/javascripts/PatientCharacteristic.js +1 -1
- data/app/assets/javascripts/PatientCharacteristicBirthdate.js +1 -1
- data/app/assets/javascripts/PatientCharacteristicClinicalTrialParticipant.js +1 -1
- data/app/assets/javascripts/PatientCharacteristicEthnicity.js +1 -1
- data/app/assets/javascripts/PatientCharacteristicExpired.js +1 -1
- data/app/assets/javascripts/PatientCharacteristicPayer.js +1 -1
- data/app/assets/javascripts/PatientCharacteristicRace.js +1 -1
- data/app/assets/javascripts/PatientCharacteristicSex.js +1 -1
- data/app/assets/javascripts/PhysicalExamOrder.js +2 -2
- data/app/assets/javascripts/PhysicalExamPerformed.js +3 -2
- data/app/assets/javascripts/PhysicalExamRecommended.js +2 -2
- data/app/assets/javascripts/ProcedureOrder.js +2 -2
- data/app/assets/javascripts/ProcedurePerformed.js +3 -3
- data/app/assets/javascripts/ProcedureRecommended.js +2 -2
- data/app/assets/javascripts/ProviderCareExperience.js +2 -2
- data/app/assets/javascripts/QDMPatient.js +1 -1
- data/app/assets/javascripts/RelatedPerson.js +1 -1
- data/app/assets/javascripts/SubstanceAdministered.js +2 -2
- data/app/assets/javascripts/SubstanceOrder.js +2 -2
- data/app/assets/javascripts/SubstanceRecommended.js +2 -2
- data/app/assets/javascripts/Symptom.js +2 -2
- data/app/assets/javascripts/attributes/Component.js +2 -2
- data/app/assets/javascripts/attributes/DiagnosisComponent.js +1 -1
- data/app/assets/javascripts/attributes/Entity.js +2 -2
- data/app/assets/javascripts/attributes/FacilityLocation.js +1 -1
- data/app/assets/javascripts/attributes/Identifier.js +1 -1
- data/app/assets/javascripts/attributes/Location.js +32 -0
- data/app/assets/javascripts/attributes/Organization.js +1 -1
- data/app/assets/javascripts/basetypes/AnyEntity.js +3 -0
- data/app/models/cqm/individual_result.rb +2 -2
- data/app/models/cqm/measure.rb +1 -1
- data/app/models/cqm/patient.rb +1 -1
- data/app/models/hqmfOid_to_datatype_map.json +1 -1
- data/app/models/models.rb +2 -2
- 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 +2 -2
- data/app/models/qdm/assessment_performed.rb +3 -2
- data/app/models/qdm/assessment_recommended.rb +2 -2
- data/app/models/qdm/attributes/component.rb +1 -1
- data/app/models/qdm/attributes/diagnosis_component.rb +1 -1
- data/app/models/qdm/attributes/entity.rb +1 -1
- data/app/models/qdm/attributes/facility_location.rb +1 -1
- data/app/models/qdm/attributes/identifier.rb +1 -1
- data/app/models/qdm/attributes/location.rb +9 -0
- data/app/models/qdm/attributes/organization.rb +1 -1
- data/app/models/qdm/basetypes/data_element.rb +5 -0
- data/app/models/qdm/care_goal.rb +2 -2
- data/app/models/qdm/communication_performed.rb +3 -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 -2
- data/app/models/qdm/diagnostic_study_performed.rb +4 -2
- data/app/models/qdm/diagnostic_study_recommended.rb +2 -2
- data/app/models/qdm/encounter_order.rb +2 -2
- data/app/models/qdm/encounter_performed.rb +4 -3
- data/app/models/qdm/encounter_recommended.rb +2 -2
- data/app/models/qdm/family_history.rb +2 -2
- data/app/models/qdm/immunization_administered.rb +2 -2
- 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 +3 -2
- data/app/models/qdm/intervention_recommended.rb +2 -2
- data/app/models/qdm/laboratory_test_order.rb +2 -2
- data/app/models/qdm/laboratory_test_performed.rb +4 -2
- data/app/models/qdm/laboratory_test_recommended.rb +2 -2
- data/app/models/qdm/medication_active.rb +2 -2
- data/app/models/qdm/medication_administered.rb +2 -2
- data/app/models/qdm/medication_discharge.rb +3 -3
- 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 -2
- data/app/models/qdm/patient.rb +1 -1
- data/app/models/qdm/patient_care_experience.rb +2 -2
- data/app/models/qdm/patient_characteristic.rb +1 -1
- data/app/models/qdm/patient_characteristic_birthdate.rb +1 -1
- data/app/models/qdm/patient_characteristic_clinical_trial_participant.rb +1 -1
- data/app/models/qdm/patient_characteristic_ethnicity.rb +1 -1
- data/app/models/qdm/patient_characteristic_expired.rb +1 -1
- data/app/models/qdm/patient_characteristic_payer.rb +1 -1
- data/app/models/qdm/patient_characteristic_race.rb +1 -1
- data/app/models/qdm/patient_characteristic_sex.rb +1 -1
- data/app/models/qdm/physical_exam_order.rb +2 -2
- data/app/models/qdm/physical_exam_performed.rb +3 -2
- data/app/models/qdm/physical_exam_recommended.rb +2 -2
- data/app/models/qdm/procedure_order.rb +2 -2
- data/app/models/qdm/procedure_performed.rb +3 -3
- data/app/models/qdm/procedure_recommended.rb +2 -2
- data/app/models/qdm/provider_care_experience.rb +2 -2
- data/app/models/qdm/related_person.rb +1 -1
- data/app/models/qdm/substance_administered.rb +2 -2
- data/app/models/qdm/substance_order.rb +2 -2
- data/app/models/qdm/substance_recommended.rb +2 -2
- data/app/models/qdm/symptom.rb +2 -2
- data/bin/validate_generator.sh +1 -1
- data/cqm-models.gemspec +1 -1
- data/data/oids_qdm_5.6.json +335 -0
- data/dist/browser.js +229 -230
- data/dist/index.js +229 -230
- data/lib/generate_entities.rb +18 -10
- data/lib/generate_models.rb +27 -19
- data/lib/generate_patients.rb +1 -1
- data/modelinfo/qdm-modelinfo-5.6.xml +1102 -0
- data/package.json +1 -1
- data/templates/models_template.rb.erb +3 -1
- data/templates/mongoose_template.js.erb +9 -2
- metadata +6 -4
- data/app/assets/javascripts/DeviceApplied.js +0 -48
- data/app/models/qdm/device_applied.rb +0 -19
@@ -17,7 +17,7 @@ const [Number, String] = [
|
|
17
17
|
const ComponentSchema = new mongoose.Schema({
|
18
18
|
code: Code,
|
19
19
|
result: Any,
|
20
|
-
qdmVersion: { type: String, default: '5.
|
20
|
+
qdmVersion: { type: String, default: '5.6' },
|
21
21
|
_type: { type: String, default: 'QDM::Component' },
|
22
22
|
|
23
23
|
});
|
@@ -34,7 +34,7 @@ function ComponentSchemaFunction(add, options) {
|
|
34
34
|
const extended = new Schema({
|
35
35
|
code: Code,
|
36
36
|
result: Any,
|
37
|
-
qdmVersion: { type: String, default: '5.
|
37
|
+
qdmVersion: { type: String, default: '5.6' },
|
38
38
|
_type: { type: String, default: 'QDM::Component' },
|
39
39
|
|
40
40
|
|
@@ -17,7 +17,7 @@ const DiagnosisComponentSchema = new mongoose.Schema({
|
|
17
17
|
code: Code,
|
18
18
|
presentOnAdmissionIndicator: Code,
|
19
19
|
rank: Number,
|
20
|
-
qdmVersion: { type: String, default: '5.
|
20
|
+
qdmVersion: { type: String, default: '5.6' },
|
21
21
|
_type: { type: String, default: 'QDM::DiagnosisComponent' },
|
22
22
|
|
23
23
|
});
|
@@ -18,7 +18,7 @@ const [Number, String] = [
|
|
18
18
|
const EntitySchema = new mongoose.Schema({
|
19
19
|
id: String,
|
20
20
|
identifier: IdentifierSchema,
|
21
|
-
qdmVersion: { type: String, default: '5.
|
21
|
+
qdmVersion: { type: String, default: '5.6' },
|
22
22
|
_type: { type: String, default: 'QDM::Entity' },
|
23
23
|
|
24
24
|
});
|
@@ -34,7 +34,7 @@ class Entity extends mongoose.Document {
|
|
34
34
|
function EntitySchemaFunction(add, options) {
|
35
35
|
const extended = new Schema({
|
36
36
|
identifier: IdentifierSchema,
|
37
|
-
qdmVersion: { type: String, default: '5.
|
37
|
+
qdmVersion: { type: String, default: '5.6' },
|
38
38
|
_type: { type: String, default: 'QDM::Entity' },
|
39
39
|
|
40
40
|
|
@@ -16,7 +16,7 @@ const [Number, String] = [
|
|
16
16
|
const FacilityLocationSchema = new mongoose.Schema({
|
17
17
|
code: Code,
|
18
18
|
locationPeriod: Interval,
|
19
|
-
qdmVersion: { type: String, default: '5.
|
19
|
+
qdmVersion: { type: String, default: '5.6' },
|
20
20
|
_type: { type: String, default: 'QDM::FacilityLocation' },
|
21
21
|
|
22
22
|
});
|
@@ -8,7 +8,7 @@ const [Number, String] = [
|
|
8
8
|
const IdentifierSchema = mongoose.Schema({
|
9
9
|
namingSystem: String,
|
10
10
|
value: String,
|
11
|
-
qdmVersion: { type: String, default: '5.
|
11
|
+
qdmVersion: { type: String, default: '5.6' },
|
12
12
|
_type: { type: String, default: 'QDM::Identifier' },
|
13
13
|
|
14
14
|
}, { _id: false, id: false });
|
@@ -0,0 +1,32 @@
|
|
1
|
+
const mongoose = require('mongoose/browser');
|
2
|
+
|
3
|
+
const { EntitySchemaFunction } = require('./Entity');
|
4
|
+
const Code = require('../basetypes/Code');
|
5
|
+
const Interval = require('../basetypes/Interval');
|
6
|
+
const Quantity = require('../basetypes/Quantity');
|
7
|
+
const DateTime = require('../basetypes/DateTime');
|
8
|
+
const QDMDate = require('../basetypes/QDMDate');
|
9
|
+
const Any = require('../basetypes/Any');
|
10
|
+
|
11
|
+
const [Number, String] = [
|
12
|
+
mongoose.Schema.Types.Number,
|
13
|
+
mongoose.Schema.Types.String,
|
14
|
+
];
|
15
|
+
|
16
|
+
const LocationSchema = EntitySchemaFunction({
|
17
|
+
locationType: Code,
|
18
|
+
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.142' },
|
19
|
+
_type: { type: String, default: 'QDM::Location' },
|
20
|
+
|
21
|
+
});
|
22
|
+
|
23
|
+
module.exports.LocationSchema = LocationSchema;
|
24
|
+
class Location extends mongoose.Document {
|
25
|
+
constructor(object) {
|
26
|
+
super(object, LocationSchema);
|
27
|
+
this._type = 'QDM::Location';
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
module.exports.Location = Location;
|
32
|
+
|
@@ -14,7 +14,7 @@ const [Number, String] = [
|
|
14
14
|
];
|
15
15
|
|
16
16
|
const OrganizationSchema = EntitySchemaFunction({
|
17
|
-
|
17
|
+
organizationType: Code,
|
18
18
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.135' },
|
19
19
|
qrdaOid: { type: String, default: '2.16.840.1.113883.10.20.24.3.163' },
|
20
20
|
_type: { type: String, default: 'QDM::Organization' },
|
@@ -3,6 +3,7 @@ const { PatientEntity } = require('../attributes/PatientEntity');
|
|
3
3
|
const { Practitioner } = require('../attributes/Practitioner');
|
4
4
|
const { CarePartner } = require('../attributes/CarePartner');
|
5
5
|
const { Organization } = require('../attributes/Organization');
|
6
|
+
const { Location } = require('../attributes/Location');
|
6
7
|
|
7
8
|
function AnyEntity(key, options) {
|
8
9
|
mongoose.SchemaType.call(this, key, options, 'AnyEntity');
|
@@ -32,6 +33,8 @@ AnyEntity.prototype.cast = (entity) => {
|
|
32
33
|
return new CarePartner(entity);
|
33
34
|
case 'QDM::Organization':
|
34
35
|
return new Organization(entity);
|
36
|
+
case 'QDM::Location':
|
37
|
+
return new Location(entity);
|
35
38
|
default:
|
36
39
|
throw new Error(`Could not find entity type "${entity._type}".`);
|
37
40
|
}
|
@@ -35,8 +35,8 @@ module CQM
|
|
35
35
|
field :state, type: String, default: 'queued'
|
36
36
|
|
37
37
|
# Relations to other model classes
|
38
|
-
belongs_to :measure
|
39
|
-
belongs_to :patient
|
38
|
+
belongs_to :measure
|
39
|
+
belongs_to :patient
|
40
40
|
|
41
41
|
# Convert the stored array into a hash between clause and result
|
42
42
|
def clause_results_by_clause
|
data/app/models/cqm/measure.rb
CHANGED
@@ -73,7 +73,7 @@ module CQM
|
|
73
73
|
# hence the 'inverse_of: nil')
|
74
74
|
has_and_belongs_to_many :value_sets, inverse_of: nil
|
75
75
|
|
76
|
-
has_many :calculation_results, class_name: 'CQM::IndividualResult'
|
76
|
+
has_many :calculation_results, class_name: 'CQM::IndividualResult'
|
77
77
|
|
78
78
|
def all_stratifications
|
79
79
|
population_sets.flat_map(&:stratifications)
|
data/app/models/cqm/patient.rb
CHANGED
@@ -11,7 +11,7 @@ module CQM
|
|
11
11
|
|
12
12
|
has_and_belongs_to_many :providers, class_name: 'CQM::Provider'
|
13
13
|
embeds_one :qdmPatient, class_name: 'QDM::Patient', autobuild: true
|
14
|
-
has_many :calculation_results, class_name: 'CQM::IndividualResult'
|
14
|
+
has_many :calculation_results, class_name: 'CQM::IndividualResult'
|
15
15
|
|
16
16
|
# Include '_type' in any JSON output. This is necessary for deserialization.
|
17
17
|
def to_json(options = nil)
|
@@ -4,6 +4,7 @@
|
|
4
4
|
"2.16.840.1.113883.10.20.28.4.141": "RelatedPerson",
|
5
5
|
"2.16.840.1.113883.10.20.28.4.137": "Practitioner",
|
6
6
|
"2.16.840.1.113883.10.20.28.4.135": "Organization",
|
7
|
+
"2.16.840.1.113883.10.20.28.4.142": "Location",
|
7
8
|
"2.16.840.1.113883.10.20.28.4.61": "PhysicalExamOrder",
|
8
9
|
"2.16.840.1.113883.10.20.28.4.130": "Participation",
|
9
10
|
"2.16.840.1.113883.10.20.28.4.55": "PatientCharacteristicSex",
|
@@ -42,7 +43,6 @@
|
|
42
43
|
"2.16.840.1.113883.10.20.28.4.54": "PatientCharacteristicBirthdate",
|
43
44
|
"2.16.840.1.113883.10.20.28.4.120": "AdverseEvent",
|
44
45
|
"2.16.840.1.113883.10.20.28.4.16": "DeviceRecommended",
|
45
|
-
"2.16.840.1.113883.10.20.28.4.13": "DeviceApplied",
|
46
46
|
"2.16.840.1.113883.10.20.28.4.48": "MedicationDischarge",
|
47
47
|
"2.16.840.1.113883.10.20.28.4.36": "InterventionPerformed",
|
48
48
|
"2.16.840.1.113883.10.20.28.4.43": "LaboratoryTestRecommended",
|
data/app/models/models.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Base QDM module (generated from lib/generate_models.rb) for QDM 5.
|
1
|
+
# Base QDM module (generated from lib/generate_models.rb) for QDM 5.6
|
2
2
|
module QDM
|
3
3
|
end
|
4
4
|
require 'mongoid'
|
@@ -25,6 +25,7 @@ require_relative 'qdm/attributes/diagnosis_component'
|
|
25
25
|
require_relative 'qdm/attributes/organization'
|
26
26
|
require_relative 'qdm/attributes/patient_entity'
|
27
27
|
require_relative 'qdm/attributes/practitioner'
|
28
|
+
require_relative 'qdm/attributes/location'
|
28
29
|
require_relative 'qdm/attributes/result_component'
|
29
30
|
|
30
31
|
# Tacoma-specific models
|
@@ -85,7 +86,6 @@ require_relative 'qdm/physical_exam_recommended'
|
|
85
86
|
require_relative 'qdm/patient_characteristic_birthdate'
|
86
87
|
require_relative 'qdm/adverse_event'
|
87
88
|
require_relative 'qdm/device_recommended'
|
88
|
-
require_relative 'qdm/device_applied'
|
89
89
|
require_relative 'qdm/medication_discharge'
|
90
90
|
require_relative 'qdm/intervention_performed'
|
91
91
|
require_relative 'qdm/laboratory_test_recommended'
|
@@ -8,10 +8,10 @@ module QDM
|
|
8
8
|
field :severity, type: QDM::Code
|
9
9
|
field :facilityLocation, type: QDM::FacilityLocation
|
10
10
|
field :type, type: QDM::Code
|
11
|
-
|
11
|
+
embeds_many :recorder, class_name: 'QDM::Entity'
|
12
12
|
field :qdmTitle, type: String, default: 'Adverse Event'
|
13
13
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.120'
|
14
14
|
field :qdmCategory, type: String, default: 'adverse_event'
|
15
|
-
field :qdmVersion, type: String, default: '5.
|
15
|
+
field :qdmVersion, type: String, default: '5.6'
|
16
16
|
end
|
17
17
|
end
|
@@ -7,11 +7,11 @@ module QDM
|
|
7
7
|
field :prevalencePeriod, type: QDM::Interval
|
8
8
|
field :type, type: QDM::Code
|
9
9
|
field :severity, type: QDM::Code
|
10
|
-
|
10
|
+
embeds_many :recorder, class_name: 'QDM::Entity'
|
11
11
|
field :qdmTitle, type: String, default: 'Allergy/Intolerance'
|
12
12
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.119'
|
13
13
|
field :qdmCategory, type: String, default: 'allergy'
|
14
14
|
field :qdmStatus, type: String, default: 'intolerance'
|
15
|
-
field :qdmVersion, type: String, default: '5.
|
15
|
+
field :qdmVersion, type: String, default: '5.6'
|
16
16
|
end
|
17
17
|
end
|
@@ -6,11 +6,11 @@ module QDM
|
|
6
6
|
field :authorDatetime, type: DateTime
|
7
7
|
field :negationRationale, type: QDM::Code
|
8
8
|
field :reason, type: QDM::Code
|
9
|
-
|
9
|
+
embeds_many :requester, class_name: 'QDM::Entity'
|
10
10
|
field :qdmTitle, type: String, default: 'Assessment, Order'
|
11
11
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.131'
|
12
12
|
field :qdmCategory, type: String, default: 'assessment'
|
13
13
|
field :qdmStatus, type: String, default: 'order'
|
14
|
-
field :qdmVersion, type: String, default: '5.
|
14
|
+
field :qdmVersion, type: String, default: '5.6'
|
15
15
|
end
|
16
16
|
end
|
@@ -10,13 +10,14 @@ module QDM
|
|
10
10
|
field :reason, type: QDM::Code
|
11
11
|
field :method, type: QDM::Code
|
12
12
|
field :result
|
13
|
+
field :interpretation, type: QDM::Code
|
13
14
|
field :components, type: Array
|
14
15
|
field :relatedTo, type: Array
|
15
|
-
|
16
|
+
embeds_many :performer, class_name: 'QDM::Entity'
|
16
17
|
field :qdmTitle, type: String, default: 'Assessment, Performed'
|
17
18
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.117'
|
18
19
|
field :qdmCategory, type: String, default: 'assessment'
|
19
20
|
field :qdmStatus, type: String, default: 'performed'
|
20
|
-
field :qdmVersion, type: String, default: '5.
|
21
|
+
field :qdmVersion, type: String, default: '5.6'
|
21
22
|
end
|
22
23
|
end
|
@@ -6,11 +6,11 @@ module QDM
|
|
6
6
|
field :authorDatetime, type: DateTime
|
7
7
|
field :negationRationale, type: QDM::Code
|
8
8
|
field :reason, type: QDM::Code
|
9
|
-
|
9
|
+
embeds_many :requester, class_name: 'QDM::Entity'
|
10
10
|
field :qdmTitle, type: String, default: 'Assessment, Recommended'
|
11
11
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.118'
|
12
12
|
field :qdmCategory, type: String, default: 'assessment'
|
13
13
|
field :qdmStatus, type: String, default: 'recommended'
|
14
|
-
field :qdmVersion, type: String, default: '5.
|
14
|
+
field :qdmVersion, type: String, default: '5.6'
|
15
15
|
end
|
16
16
|
end
|
@@ -5,7 +5,7 @@ module QDM
|
|
5
5
|
embedded_in :data_element
|
6
6
|
field :id, type: String
|
7
7
|
embeds_one :identifier, class_name: 'QDM::Identifier'
|
8
|
-
field :qdmVersion, type: String, default: '5.
|
8
|
+
field :qdmVersion, type: String, default: '5.6'
|
9
9
|
def initialize(options = {})
|
10
10
|
super(options)
|
11
11
|
# default id to the mongo ObjectId for this DataElement if it isnt already defined
|
@@ -3,7 +3,7 @@ module QDM
|
|
3
3
|
class Organization < Entity
|
4
4
|
include Mongoid::Document
|
5
5
|
embedded_in :data_element
|
6
|
-
field :
|
6
|
+
field :organizationType, type: QDM::Code
|
7
7
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.135'
|
8
8
|
field :qrdaOid, type: String, default: '2.16.840.1.113883.10.20.24.3.163'
|
9
9
|
end
|
@@ -17,6 +17,11 @@ module QDM
|
|
17
17
|
field :id, type: String
|
18
18
|
|
19
19
|
def initialize(options = {})
|
20
|
+
# class is reserved word. changed to clazz
|
21
|
+
if options['class']
|
22
|
+
options['clazz'] = options['class']
|
23
|
+
options.delete('class')
|
24
|
+
end
|
20
25
|
super(options)
|
21
26
|
# default id to the mongo ObjectId for this DataElement if it isnt already defined
|
22
27
|
self.id = _id.to_s unless id?
|
data/app/models/qdm/care_goal.rb
CHANGED
@@ -7,10 +7,10 @@ module QDM
|
|
7
7
|
field :relevantPeriod, type: QDM::Interval
|
8
8
|
field :relatedTo, type: Array
|
9
9
|
field :targetOutcome
|
10
|
-
|
10
|
+
embeds_many :performer, class_name: 'QDM::Entity'
|
11
11
|
field :qdmTitle, type: String, default: 'Care Goal'
|
12
12
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.7'
|
13
13
|
field :qdmCategory, type: String, default: 'care_goal'
|
14
|
-
field :qdmVersion, type: String, default: '5.
|
14
|
+
field :qdmVersion, type: String, default: '5.6'
|
15
15
|
end
|
16
16
|
end
|
@@ -6,8 +6,8 @@ module QDM
|
|
6
6
|
field :authorDatetime, type: DateTime
|
7
7
|
field :category, type: QDM::Code
|
8
8
|
field :medium, type: QDM::Code
|
9
|
-
|
10
|
-
|
9
|
+
embeds_many :sender, class_name: 'QDM::Entity'
|
10
|
+
embeds_many :recipient, class_name: 'QDM::Entity'
|
11
11
|
field :relatedTo, type: Array
|
12
12
|
field :sentDatetime, type: DateTime
|
13
13
|
field :receivedDatetime, type: DateTime
|
@@ -16,6 +16,6 @@ module QDM
|
|
16
16
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.132'
|
17
17
|
field :qdmCategory, type: String, default: 'communication'
|
18
18
|
field :qdmStatus, type: String, default: 'performed'
|
19
|
-
field :qdmVersion, type: String, default: '5.
|
19
|
+
field :qdmVersion, type: String, default: '5.6'
|
20
20
|
end
|
21
21
|
end
|
@@ -6,11 +6,11 @@ module QDM
|
|
6
6
|
field :authorDatetime, type: DateTime
|
7
7
|
field :negationRationale, type: QDM::Code
|
8
8
|
field :reason, type: QDM::Code
|
9
|
-
|
9
|
+
embeds_many :requester, class_name: 'QDM::Entity'
|
10
10
|
field :qdmTitle, type: String, default: 'Device, Order'
|
11
11
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.15'
|
12
12
|
field :qdmCategory, type: String, default: 'device'
|
13
13
|
field :qdmStatus, type: String, default: 'order'
|
14
|
-
field :qdmVersion, type: String, default: '5.
|
14
|
+
field :qdmVersion, type: String, default: '5.6'
|
15
15
|
end
|
16
16
|
end
|
@@ -6,11 +6,11 @@ module QDM
|
|
6
6
|
field :authorDatetime, type: DateTime
|
7
7
|
field :negationRationale, type: QDM::Code
|
8
8
|
field :reason, type: QDM::Code
|
9
|
-
|
9
|
+
embeds_many :requester, class_name: 'QDM::Entity'
|
10
10
|
field :qdmTitle, type: String, default: 'Device, Recommended'
|
11
11
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.16'
|
12
12
|
field :qdmCategory, type: String, default: 'device'
|
13
13
|
field :qdmStatus, type: String, default: 'recommended'
|
14
|
-
field :qdmVersion, type: String, default: '5.
|
14
|
+
field :qdmVersion, type: String, default: '5.6'
|
15
15
|
end
|
16
16
|
end
|
data/app/models/qdm/diagnosis.rb
CHANGED
@@ -7,11 +7,11 @@ module QDM
|
|
7
7
|
field :prevalencePeriod, type: QDM::Interval
|
8
8
|
field :anatomicalLocationSite, type: QDM::Code
|
9
9
|
field :severity, type: QDM::Code
|
10
|
-
|
10
|
+
embeds_many :recorder, class_name: 'QDM::Entity'
|
11
11
|
field :qdmTitle, type: String, default: 'Diagnosis'
|
12
12
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.110'
|
13
13
|
field :qrdaOid, type: String, default: '2.16.840.1.113883.10.20.24.3.135'
|
14
14
|
field :qdmCategory, type: String, default: 'condition'
|
15
|
-
field :qdmVersion, type: String, default: '5.
|
15
|
+
field :qdmVersion, type: String, default: '5.6'
|
16
16
|
end
|
17
17
|
end
|
@@ -6,11 +6,11 @@ module QDM
|
|
6
6
|
field :authorDatetime, type: DateTime
|
7
7
|
field :reason, type: QDM::Code
|
8
8
|
field :negationRationale, type: QDM::Code
|
9
|
-
|
9
|
+
embeds_many :requester, class_name: 'QDM::Entity'
|
10
10
|
field :qdmTitle, type: String, default: 'Diagnostic Study, Order'
|
11
11
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.22'
|
12
12
|
field :qdmCategory, type: String, default: 'diagnostic_study'
|
13
13
|
field :qdmStatus, type: String, default: 'order'
|
14
|
-
field :qdmVersion, type: String, default: '5.
|
14
|
+
field :qdmVersion, type: String, default: '5.6'
|
15
15
|
end
|
16
16
|
end
|