cqm-models 2.0.1 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.eslintrc.json +1 -1
- data/README.md +9 -6
- data/app/assets/javascripts/AdverseEvent.js +9 -3
- data/app/assets/javascripts/AllDataElements.js +18 -6
- data/app/assets/javascripts/AllergyIntolerance.js +8 -2
- data/app/assets/javascripts/AssessmentOrder.js +8 -2
- data/app/assets/javascripts/AssessmentPerformed.js +11 -3
- data/app/assets/javascripts/AssessmentRecommended.js +8 -2
- data/app/assets/javascripts/CareGoal.js +10 -3
- data/app/assets/javascripts/CommunicationPerformed.js +12 -6
- data/app/assets/javascripts/DeviceApplied.js +9 -2
- data/app/assets/javascripts/DeviceOrder.js +8 -2
- data/app/assets/javascripts/DeviceRecommended.js +8 -2
- data/app/assets/javascripts/Diagnosis.js +8 -2
- data/app/assets/javascripts/DiagnosticStudyOrder.js +8 -2
- data/app/assets/javascripts/DiagnosticStudyPerformed.js +9 -2
- data/app/assets/javascripts/DiagnosticStudyRecommended.js +8 -2
- data/app/assets/javascripts/EncounterOrder.js +9 -2
- data/app/assets/javascripts/EncounterPerformed.js +11 -5
- data/app/assets/javascripts/EncounterRecommended.js +8 -2
- data/app/assets/javascripts/FamilyHistory.js +8 -2
- data/app/assets/javascripts/ImmunizationAdministered.js +9 -2
- data/app/assets/javascripts/ImmunizationOrder.js +8 -2
- data/app/assets/javascripts/InterventionOrder.js +8 -2
- data/app/assets/javascripts/InterventionPerformed.js +9 -2
- data/app/assets/javascripts/InterventionRecommended.js +8 -2
- data/app/assets/javascripts/LaboratoryTestOrder.js +8 -2
- data/app/assets/javascripts/LaboratoryTestPerformed.js +9 -2
- data/app/assets/javascripts/LaboratoryTestRecommended.js +8 -2
- data/app/assets/javascripts/MedicationActive.js +9 -2
- data/app/assets/javascripts/MedicationAdministered.js +9 -2
- data/app/assets/javascripts/MedicationDischarge.js +9 -2
- data/app/assets/javascripts/MedicationDispensed.js +10 -4
- data/app/assets/javascripts/MedicationOrder.js +9 -4
- data/app/assets/javascripts/Participation.js +8 -2
- data/app/assets/javascripts/PatientCareExperience.js +8 -2
- data/app/assets/javascripts/PatientCharacteristic.js +7 -2
- data/app/assets/javascripts/PatientCharacteristicBirthdate.js +7 -2
- data/app/assets/javascripts/PatientCharacteristicClinicalTrialParticipant.js +7 -2
- data/app/assets/javascripts/PatientCharacteristicEthnicity.js +7 -2
- data/app/assets/javascripts/PatientCharacteristicExpired.js +7 -2
- data/app/assets/javascripts/PatientCharacteristicPayer.js +7 -2
- data/app/assets/javascripts/PatientCharacteristicRace.js +7 -2
- data/app/assets/javascripts/PatientCharacteristicSex.js +7 -2
- data/app/assets/javascripts/PhysicalExamOrder.js +8 -2
- data/app/assets/javascripts/PhysicalExamPerformed.js +9 -2
- data/app/assets/javascripts/PhysicalExamRecommended.js +8 -2
- data/app/assets/javascripts/ProcedureOrder.js +10 -3
- data/app/assets/javascripts/ProcedurePerformed.js +11 -3
- data/app/assets/javascripts/ProcedureRecommended.js +9 -3
- data/app/assets/javascripts/ProviderCareExperience.js +8 -2
- data/app/assets/javascripts/QDMPatient.js +25 -9
- data/app/assets/javascripts/RelatedPerson.js +42 -0
- data/app/assets/javascripts/SubstanceAdministered.js +9 -2
- data/app/assets/javascripts/SubstanceOrder.js +9 -2
- data/app/assets/javascripts/SubstanceRecommended.js +8 -2
- data/app/assets/javascripts/Symptom.js +8 -2
- data/app/assets/javascripts/attributes/CarePartner.js +31 -0
- data/app/assets/javascripts/attributes/Component.js +22 -1
- data/app/assets/javascripts/attributes/DiagnosisComponent.js +34 -0
- data/app/assets/javascripts/attributes/Entity.js +58 -0
- data/app/assets/javascripts/attributes/FacilityLocation.js +4 -1
- data/app/assets/javascripts/attributes/Identifier.js +23 -0
- data/app/assets/javascripts/attributes/Organization.js +31 -0
- data/app/assets/javascripts/attributes/PatientEntity.js +30 -0
- data/app/assets/javascripts/attributes/Practitioner.js +33 -0
- data/app/assets/javascripts/attributes/ResultComponent.js +31 -0
- data/app/assets/javascripts/basetypes/Any.js +24 -14
- data/app/assets/javascripts/basetypes/AnyEntity.js +44 -0
- data/app/assets/javascripts/basetypes/Code.js +8 -11
- data/app/assets/javascripts/basetypes/DataElement.js +14 -6
- data/app/assets/javascripts/basetypes/Interval.js +2 -2
- data/app/assets/javascripts/basetypes/QDMDate.js +36 -0
- data/app/assets/javascripts/basetypes/Quantity.js +1 -1
- data/app/assets/javascripts/basetypes/Ratio.js +1 -1
- data/app/assets/javascripts/cqm/Provider.js +0 -2
- data/app/models/cqm/provider.rb +4 -4
- data/app/models/hqmfOid_to_datatype_map.json +1 -1
- data/app/models/models.rb +12 -5
- 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 +2 -1
- data/app/models/qdm/assessment_performed.rb +5 -2
- data/app/models/qdm/assessment_recommended.rb +2 -1
- data/app/models/qdm/attributes/care_partner.rb +8 -0
- data/app/models/qdm/attributes/component.rb +1 -1
- data/app/models/qdm/attributes/diagnosis_component.rb +10 -0
- data/app/models/qdm/attributes/entity.rb +15 -0
- data/app/models/qdm/attributes/facility_location.rb +1 -1
- data/app/models/qdm/{id.rb → attributes/identifier.rb} +3 -4
- data/app/models/qdm/attributes/organization.rb +8 -0
- data/app/models/qdm/attributes/patient_entity.rb +7 -0
- data/app/models/qdm/attributes/practitioner.rb +10 -0
- data/app/models/qdm/{result_component.rb → attributes/result_component.rb} +1 -3
- data/app/models/qdm/basetypes/code.rb +8 -10
- data/app/models/qdm/basetypes/data_element.rb +19 -6
- data/app/models/qdm/basetypes/date.rb +38 -0
- data/app/models/qdm/basetypes/interval.rb +2 -2
- data/app/models/qdm/care_goal.rb +4 -2
- data/app/models/qdm/communication_performed.rb +6 -5
- data/app/models/qdm/device_applied.rb +3 -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 -1
- data/app/models/qdm/diagnostic_study_recommended.rb +2 -1
- data/app/models/qdm/encounter_order.rb +3 -1
- data/app/models/qdm/encounter_performed.rb +3 -2
- data/app/models/qdm/encounter_recommended.rb +2 -1
- data/app/models/qdm/family_history.rb +2 -1
- data/app/models/qdm/immunization_administered.rb +3 -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 +3 -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 +3 -1
- data/app/models/qdm/laboratory_test_recommended.rb +2 -1
- data/app/models/qdm/medication_active.rb +3 -1
- data/app/models/qdm/medication_administered.rb +3 -1
- data/app/models/qdm/medication_discharge.rb +3 -1
- data/app/models/qdm/medication_dispensed.rb +4 -3
- data/app/models/qdm/medication_order.rb +3 -3
- data/app/models/qdm/participation.rb +2 -1
- data/app/models/qdm/patient.rb +1 -1
- data/app/models/qdm/patient_care_experience.rb +2 -1
- 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 -1
- data/app/models/qdm/physical_exam_performed.rb +3 -1
- data/app/models/qdm/physical_exam_recommended.rb +2 -1
- data/app/models/qdm/procedure_order.rb +4 -2
- data/app/models/qdm/procedure_performed.rb +5 -2
- data/app/models/qdm/procedure_recommended.rb +3 -2
- data/app/models/qdm/provider_care_experience.rb +2 -1
- data/app/models/qdm/related_person.rb +13 -0
- data/app/models/qdm/substance_administered.rb +3 -1
- data/app/models/qdm/substance_order.rb +3 -1
- data/app/models/qdm/substance_recommended.rb +2 -1
- data/app/models/qdm/symptom.rb +2 -1
- data/bin/validate_generator.sh +1 -1
- data/cqm-models.gemspec +2 -2
- data/data/oids_qdm_5.5.json +321 -0
- data/dist/browser.js +3434 -3356
- data/dist/index.js +3433 -3355
- data/lib/generate_models.rb +78 -39
- data/lib/generate_patients.rb +3 -3
- data/lib/generate_types.rb +1 -1
- data/lib/generator_helpers.rb +14 -0
- data/modelinfo/qdm-modelinfo-5.5.xml +982 -0
- data/package.json +2 -2
- data/templates/entity_extension.rb.erb +6 -0
- data/templates/identifier_extension.rb.erb +58 -0
- data/templates/{id_template.js.erb → identifier_template.js.erb} +6 -5
- data/templates/models_template.rb.erb +19 -4
- data/templates/mongoose_template.js.erb +86 -12
- data/templates/patient_template.js.erb +0 -4
- data/yarn.lock +245 -201
- metadata +31 -11
- data/app/assets/javascripts/Id.js +0 -21
- data/app/assets/javascripts/ProviderCharacteristic.js +0 -36
- data/app/assets/javascripts/ResultComponent.js +0 -33
- data/app/models/qdm/provider_characteristic.rb +0 -12
@@ -1,9 +1,7 @@
|
|
1
1
|
module QDM
|
2
2
|
# app/models/qdm/result_component.rb
|
3
|
-
class ResultComponent <
|
3
|
+
class ResultComponent < Component
|
4
4
|
include Mongoid::Document
|
5
|
-
embedded_in :patient
|
6
5
|
field :referenceRange, type: QDM::Interval
|
7
|
-
field :qdmVersion, type: String, default: '5.4'
|
8
6
|
end
|
9
7
|
end
|
@@ -1,20 +1,19 @@
|
|
1
1
|
module QDM
|
2
2
|
# Represents a Code
|
3
3
|
class Code
|
4
|
-
attr_accessor :code, :
|
4
|
+
attr_accessor :code, :display, :system, :version
|
5
5
|
|
6
6
|
# Code and code system are required (at minimum).
|
7
|
-
def initialize(code,
|
7
|
+
def initialize(code, sys, display = nil, version = nil)
|
8
8
|
@code = code
|
9
|
-
@
|
10
|
-
@
|
11
|
-
@codeSystemOid = codeSystemOid
|
9
|
+
@system = sys
|
10
|
+
@display = display
|
12
11
|
@version = version
|
13
12
|
end
|
14
13
|
|
15
14
|
# Converts an object of this instance into a database friendly value.
|
16
15
|
def mongoize
|
17
|
-
{ code: @code,
|
16
|
+
{ code: @code, system: @system, display: @display, version: @version, _type: 'QDM::Code' }
|
18
17
|
end
|
19
18
|
|
20
19
|
class << self
|
@@ -22,11 +21,11 @@ module QDM
|
|
22
21
|
# this custom class from it.
|
23
22
|
#
|
24
23
|
# The array elements in demongoize are the same 5 elements used in mongoize, i.e.
|
25
|
-
# [ code,
|
24
|
+
# [ code, system, display, version ].
|
26
25
|
def demongoize(object)
|
27
26
|
return nil unless object
|
28
27
|
object = object.symbolize_keys
|
29
|
-
QDM::Code.new(object[:code], object[:
|
28
|
+
QDM::Code.new(object[:code], object[:system], object[:display], object[:version])
|
30
29
|
end
|
31
30
|
|
32
31
|
# Takes any possible object and converts it to how it would be
|
@@ -37,8 +36,7 @@ module QDM
|
|
37
36
|
when QDM::Code then object.mongoize
|
38
37
|
when Hash
|
39
38
|
object = object.symbolize_keys
|
40
|
-
|
41
|
-
QDM::Code.new(object[:code], codeSystemOid, object[:descriptor], object[:codeSystem], object[:version]).mongoize
|
39
|
+
QDM::Code.new(object[:code], object[:system], object[:display], object[:version]).mongoize
|
42
40
|
else object
|
43
41
|
end
|
44
42
|
end
|
@@ -14,12 +14,12 @@ module QDM
|
|
14
14
|
# Valueset oid of the specific type.
|
15
15
|
field :codeListId, type: String
|
16
16
|
|
17
|
-
|
17
|
+
field :id, type: String
|
18
18
|
|
19
19
|
def initialize(options = {})
|
20
20
|
super(options)
|
21
21
|
# default id to the mongo ObjectId for this DataElement if it isnt already defined
|
22
|
-
self.id =
|
22
|
+
self.id = _id.to_s unless id?
|
23
23
|
end
|
24
24
|
|
25
25
|
# Returns the attribute requested on the datatype.
|
@@ -31,7 +31,7 @@ module QDM
|
|
31
31
|
# to the CQL execution engine.
|
32
32
|
def code_system_pairs
|
33
33
|
codes.collect do |code|
|
34
|
-
{ code: code.code, system: code.
|
34
|
+
{ code: code.code, system: code.system }
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
@@ -91,12 +91,25 @@ module QDM
|
|
91
91
|
# back to the 28th in non leap years
|
92
92
|
def shift_years(year_shift)
|
93
93
|
fields.keys.each do |field|
|
94
|
-
if send(field).is_a? DateTime
|
94
|
+
if send(field).is_a?(QDM::Date) || send(field).is_a?(DateTime)
|
95
|
+
# Do not shift Time values. They are stored as DateTimes with year 0.
|
96
|
+
next if send(field).year.zero?
|
95
97
|
if send(field).year + year_shift > 9999 || send(field).year + year_shift < 1
|
96
98
|
raise RangeError, 'Year was shifted after 9999 or before 0001'
|
97
99
|
end
|
98
|
-
if send(field).month == 2 && send(field).day == 29 &&
|
99
|
-
|
100
|
+
if send(field).month == 2 && send(field).day == 29 && !::Date.leap?(year_shift + send(field).year)
|
101
|
+
if send(field).is_a?(QDM::Date)
|
102
|
+
shifted_date = send(field)
|
103
|
+
shifted_date.year = shifted_date.year + year_shift
|
104
|
+
shifted_date.day = 28
|
105
|
+
send(field + '=', shifted_date)
|
106
|
+
else
|
107
|
+
send(field + '=', send(field).change(year: year_shift + send(field).year, day: 28))
|
108
|
+
end
|
109
|
+
elsif send(field).is_a?(QDM::Date)
|
110
|
+
shifted_date = send(field)
|
111
|
+
shifted_date.year = shifted_date.year + year_shift
|
112
|
+
send(field + '=', shifted_date)
|
100
113
|
else
|
101
114
|
send(field + '=', send(field).change(year: year_shift + send(field).year))
|
102
115
|
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module QDM
|
2
|
+
# Represents a QDM/CQL Date
|
3
|
+
class Date
|
4
|
+
attr_accessor :year, :month, :day
|
5
|
+
|
6
|
+
def initialize(year = nil, month = nil, day = nil)
|
7
|
+
@year = year
|
8
|
+
@month = month
|
9
|
+
@day = day
|
10
|
+
end
|
11
|
+
|
12
|
+
# Converts an object of this instance into a database friendly value.
|
13
|
+
def mongoize
|
14
|
+
"#{format('%04d', year)}-#{format('%02d', month)}-#{format('%02d', day)}"
|
15
|
+
end
|
16
|
+
|
17
|
+
class << self
|
18
|
+
# Get the string as it was stored in the database, and instantiate
|
19
|
+
# this custom class from it.
|
20
|
+
def demongoize(date_str)
|
21
|
+
return nil unless date_str
|
22
|
+
year = date_str[0..3].to_i
|
23
|
+
month = date_str[5..6].to_i
|
24
|
+
day = date_str[8..10].to_i
|
25
|
+
QDM::Date.new(year, month, day)
|
26
|
+
end
|
27
|
+
|
28
|
+
# Converts the object that was supplied to a criteria and converts it
|
29
|
+
# into a database friendly form.
|
30
|
+
def evolve(object)
|
31
|
+
case object
|
32
|
+
when QDM::Date then object.mongoize
|
33
|
+
else object
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -38,7 +38,7 @@ module QDM
|
|
38
38
|
raise RangeError, 'Year was shifted after 9999 or before 0001'
|
39
39
|
end
|
40
40
|
low_shift = @low.year + year_shift
|
41
|
-
@low = if @low.month == 2 && @low.day == 29 &&
|
41
|
+
@low = if @low.month == 2 && @low.day == 29 && !::Date.leap?(low_shift)
|
42
42
|
@low.change(year: low_shift, day: 28)
|
43
43
|
else
|
44
44
|
@low.change(year: low_shift)
|
@@ -49,7 +49,7 @@ module QDM
|
|
49
49
|
raise RangeError, 'Year was shifted after 9999 or before 0001'
|
50
50
|
end
|
51
51
|
high_shift = @high.year + year_shift
|
52
|
-
@high = if @high.month == 2 && @high.day == 29 &&
|
52
|
+
@high = if @high.month == 2 && @high.day == 29 && !::Date.leap?(high_shift)
|
53
53
|
@high.change(year: high_shift, day: 28)
|
54
54
|
else
|
55
55
|
@high.change(year: high_shift)
|
data/app/models/qdm/care_goal.rb
CHANGED
@@ -3,12 +3,14 @@ module QDM
|
|
3
3
|
class CareGoal < DataElement
|
4
4
|
include Mongoid::Document
|
5
5
|
embedded_in :patient
|
6
|
+
field :statusDate, type: Date
|
6
7
|
field :relevantPeriod, type: QDM::Interval
|
7
|
-
|
8
|
+
field :relatedTo, type: Array
|
8
9
|
field :targetOutcome
|
10
|
+
embeds_one :performer, class_name: 'QDM::Entity'
|
9
11
|
field :qdmTitle, type: String, default: 'Care Goal'
|
10
12
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.7'
|
11
13
|
field :qdmCategory, type: String, default: 'care_goal'
|
12
|
-
field :qdmVersion, type: String, default: '5.
|
14
|
+
field :qdmVersion, type: String, default: '5.5'
|
13
15
|
end
|
14
16
|
end
|
@@ -6,15 +6,16 @@ module QDM
|
|
6
6
|
field :authorDatetime, type: DateTime
|
7
7
|
field :category, type: QDM::Code
|
8
8
|
field :medium, type: QDM::Code
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
field :
|
9
|
+
embeds_one :sender, class_name: 'QDM::Entity'
|
10
|
+
embeds_one :recipient, class_name: 'QDM::Entity'
|
11
|
+
field :relatedTo, type: Array
|
12
|
+
field :sentDatetime, type: DateTime
|
13
|
+
field :receivedDatetime, type: DateTime
|
13
14
|
field :negationRationale, type: QDM::Code
|
14
15
|
field :qdmTitle, type: String, default: 'Communication, Performed'
|
15
16
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.132'
|
16
17
|
field :qdmCategory, type: String, default: 'communication'
|
17
18
|
field :qdmStatus, type: String, default: 'performed'
|
18
|
-
field :qdmVersion, type: String, default: '5.
|
19
|
+
field :qdmVersion, type: String, default: '5.5'
|
19
20
|
end
|
20
21
|
end
|
@@ -4,14 +4,16 @@ module QDM
|
|
4
4
|
include Mongoid::Document
|
5
5
|
embedded_in :patient
|
6
6
|
field :authorDatetime, type: DateTime
|
7
|
+
field :relevantDatetime, type: DateTime
|
7
8
|
field :relevantPeriod, type: QDM::Interval
|
8
9
|
field :negationRationale, type: QDM::Code
|
9
10
|
field :reason, type: QDM::Code
|
10
11
|
field :anatomicalLocationSite, type: QDM::Code
|
12
|
+
embeds_one :performer, class_name: 'QDM::Entity'
|
11
13
|
field :qdmTitle, type: String, default: 'Device, Applied'
|
12
14
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.13'
|
13
15
|
field :qdmCategory, type: String, default: 'device'
|
14
16
|
field :qdmStatus, type: String, default: 'applied'
|
15
|
-
field :qdmVersion, type: String, default: '5.
|
17
|
+
field :qdmVersion, type: String, default: '5.5'
|
16
18
|
end
|
17
19
|
end
|
@@ -6,10 +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
|
+
embeds_one :requester, class_name: 'QDM::Entity'
|
9
10
|
field :qdmTitle, type: String, default: 'Device, Order'
|
10
11
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.15'
|
11
12
|
field :qdmCategory, type: String, default: 'device'
|
12
13
|
field :qdmStatus, type: String, default: 'order'
|
13
|
-
field :qdmVersion, type: String, default: '5.
|
14
|
+
field :qdmVersion, type: String, default: '5.5'
|
14
15
|
end
|
15
16
|
end
|
@@ -6,10 +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
|
+
embeds_one :requester, class_name: 'QDM::Entity'
|
9
10
|
field :qdmTitle, type: String, default: 'Device, Recommended'
|
10
11
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.16'
|
11
12
|
field :qdmCategory, type: String, default: 'device'
|
12
13
|
field :qdmStatus, type: String, default: 'recommended'
|
13
|
-
field :qdmVersion, type: String, default: '5.
|
14
|
+
field :qdmVersion, type: String, default: '5.5'
|
14
15
|
end
|
15
16
|
end
|
data/app/models/qdm/diagnosis.rb
CHANGED
@@ -7,10 +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
|
+
embeds_one :recorder, class_name: 'QDM::Entity'
|
10
11
|
field :qdmTitle, type: String, default: 'Diagnosis'
|
11
12
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.110'
|
12
13
|
field :qrdaOid, type: String, default: '2.16.840.1.113883.10.20.24.3.135'
|
13
14
|
field :qdmCategory, type: String, default: 'condition'
|
14
|
-
field :qdmVersion, type: String, default: '5.
|
15
|
+
field :qdmVersion, type: String, default: '5.5'
|
15
16
|
end
|
16
17
|
end
|
@@ -6,10 +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
|
+
embeds_one :requester, class_name: 'QDM::Entity'
|
9
10
|
field :qdmTitle, type: String, default: 'Diagnostic Study, Order'
|
10
11
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.22'
|
11
12
|
field :qdmCategory, type: String, default: 'diagnostic_study'
|
12
13
|
field :qdmStatus, type: String, default: 'order'
|
13
|
-
field :qdmVersion, type: String, default: '5.
|
14
|
+
field :qdmVersion, type: String, default: '5.5'
|
14
15
|
end
|
15
16
|
end
|
@@ -4,6 +4,7 @@ module QDM
|
|
4
4
|
include Mongoid::Document
|
5
5
|
embedded_in :patient
|
6
6
|
field :authorDatetime, type: DateTime
|
7
|
+
field :relevantDatetime, type: DateTime
|
7
8
|
field :relevantPeriod, type: QDM::Interval
|
8
9
|
field :reason, type: QDM::Code
|
9
10
|
field :result
|
@@ -13,10 +14,11 @@ module QDM
|
|
13
14
|
field :facilityLocation, type: QDM::FacilityLocation
|
14
15
|
field :negationRationale, type: QDM::Code
|
15
16
|
field :components, type: Array
|
17
|
+
embeds_one :performer, class_name: 'QDM::Entity'
|
16
18
|
field :qdmTitle, type: String, default: 'Diagnostic Study, Performed'
|
17
19
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.23'
|
18
20
|
field :qdmCategory, type: String, default: 'diagnostic_study'
|
19
21
|
field :qdmStatus, type: String, default: 'performed'
|
20
|
-
field :qdmVersion, type: String, default: '5.
|
22
|
+
field :qdmVersion, type: String, default: '5.5'
|
21
23
|
end
|
22
24
|
end
|
@@ -5,11 +5,12 @@ module QDM
|
|
5
5
|
embedded_in :patient
|
6
6
|
field :authorDatetime, type: DateTime
|
7
7
|
field :negationRationale, type: QDM::Code
|
8
|
+
embeds_one :requester, class_name: 'QDM::Entity'
|
8
9
|
field :qdmTitle, type: String, default: 'Diagnostic Study, Recommended'
|
9
10
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.24'
|
10
11
|
field :qrdaOid, type: String, default: '2.16.840.1.113883.10.20.24.3.19'
|
11
12
|
field :qdmCategory, type: String, default: 'diagnostic_study'
|
12
13
|
field :qdmStatus, type: String, default: 'recommended'
|
13
|
-
field :qdmVersion, type: String, default: '5.
|
14
|
+
field :qdmVersion, type: String, default: '5.5'
|
14
15
|
end
|
15
16
|
end
|
@@ -7,10 +7,12 @@ module QDM
|
|
7
7
|
field :reason, type: QDM::Code
|
8
8
|
field :facilityLocation, type: QDM::FacilityLocation
|
9
9
|
field :negationRationale, type: QDM::Code
|
10
|
+
embeds_one :requester, class_name: 'QDM::Entity'
|
11
|
+
field :priority, type: QDM::Code
|
10
12
|
field :qdmTitle, type: String, default: 'Encounter, Order'
|
11
13
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.27'
|
12
14
|
field :qdmCategory, type: String, default: 'encounter'
|
13
15
|
field :qdmStatus, type: String, default: 'order'
|
14
|
-
field :qdmVersion, type: String, default: '5.
|
16
|
+
field :qdmVersion, type: String, default: '5.5'
|
15
17
|
end
|
16
18
|
end
|
@@ -9,13 +9,14 @@ module QDM
|
|
9
9
|
field :dischargeDisposition, type: QDM::Code
|
10
10
|
field :facilityLocations, type: Array, default: []
|
11
11
|
field :diagnoses, type: Array
|
12
|
-
field :principalDiagnosis, type: QDM::Code
|
13
12
|
field :negationRationale, type: QDM::Code
|
14
13
|
field :lengthOfStay, type: QDM::Quantity
|
14
|
+
field :priority, type: QDM::Code
|
15
|
+
embeds_one :participant, class_name: 'QDM::Entity'
|
15
16
|
field :qdmTitle, type: String, default: 'Encounter, Performed'
|
16
17
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.5'
|
17
18
|
field :qdmCategory, type: String, default: 'encounter'
|
18
19
|
field :qdmStatus, type: String, default: 'performed'
|
19
|
-
field :qdmVersion, type: String, default: '5.
|
20
|
+
field :qdmVersion, type: String, default: '5.5'
|
20
21
|
end
|
21
22
|
end
|
@@ -7,10 +7,11 @@ module QDM
|
|
7
7
|
field :reason, type: QDM::Code
|
8
8
|
field :facilityLocation, type: QDM::FacilityLocation
|
9
9
|
field :negationRationale, type: QDM::Code
|
10
|
+
embeds_one :requester, class_name: 'QDM::Entity'
|
10
11
|
field :qdmTitle, type: String, default: 'Encounter, Recommended'
|
11
12
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.28'
|
12
13
|
field :qdmCategory, type: String, default: 'encounter'
|
13
14
|
field :qdmStatus, type: String, default: 'recommended'
|
14
|
-
field :qdmVersion, type: String, default: '5.
|
15
|
+
field :qdmVersion, type: String, default: '5.5'
|
15
16
|
end
|
16
17
|
end
|
@@ -5,10 +5,11 @@ module QDM
|
|
5
5
|
embedded_in :patient
|
6
6
|
field :authorDatetime, type: DateTime
|
7
7
|
field :relationship, type: QDM::Code
|
8
|
+
embeds_one :recorder, class_name: 'QDM::Entity'
|
8
9
|
field :qdmTitle, type: String, default: 'Family History'
|
9
10
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.111'
|
10
11
|
field :qrdaOid, type: String, default: '2.16.840.1.113883.10.20.24.3.12'
|
11
12
|
field :qdmCategory, type: String, default: 'family_history'
|
12
|
-
field :qdmVersion, type: String, default: '5.
|
13
|
+
field :qdmVersion, type: String, default: '5.5'
|
13
14
|
end
|
14
15
|
end
|
@@ -4,15 +4,17 @@ module QDM
|
|
4
4
|
include Mongoid::Document
|
5
5
|
embedded_in :patient
|
6
6
|
field :authorDatetime, type: DateTime
|
7
|
+
field :relevantDatetime, type: DateTime
|
7
8
|
field :reason, type: QDM::Code
|
8
9
|
field :dosage, type: QDM::Quantity
|
9
10
|
field :route, type: QDM::Code
|
10
11
|
field :negationRationale, type: QDM::Code
|
12
|
+
embeds_one :performer, class_name: 'QDM::Entity'
|
11
13
|
field :qdmTitle, type: String, default: 'Immunization, Administered'
|
12
14
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.112'
|
13
15
|
field :qrdaOid, type: String, default: '2.16.840.1.113883.10.20.24.3.140'
|
14
16
|
field :qdmCategory, type: String, default: 'immunization'
|
15
17
|
field :qdmStatus, type: String, default: 'administered'
|
16
|
-
field :qdmVersion, type: String, default: '5.
|
18
|
+
field :qdmVersion, type: String, default: '5.5'
|
17
19
|
end
|
18
20
|
end
|
@@ -10,10 +10,11 @@ module QDM
|
|
10
10
|
field :reason, type: QDM::Code
|
11
11
|
field :route, type: QDM::Code
|
12
12
|
field :negationRationale, type: QDM::Code
|
13
|
+
embeds_one :requester, class_name: 'QDM::Entity'
|
13
14
|
field :qdmTitle, type: String, default: 'Immunization, Order'
|
14
15
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.113'
|
15
16
|
field :qdmCategory, type: String, default: 'immunization'
|
16
17
|
field :qdmStatus, type: String, default: 'order'
|
17
|
-
field :qdmVersion, type: String, default: '5.
|
18
|
+
field :qdmVersion, type: String, default: '5.5'
|
18
19
|
end
|
19
20
|
end
|
@@ -6,10 +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
|
+
embeds_one :requester, class_name: 'QDM::Entity'
|
9
10
|
field :qdmTitle, type: String, default: 'Intervention, Order'
|
10
11
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.35'
|
11
12
|
field :qdmCategory, type: String, default: 'intervention'
|
12
13
|
field :qdmStatus, type: String, default: 'order'
|
13
|
-
field :qdmVersion, type: String, default: '5.
|
14
|
+
field :qdmVersion, type: String, default: '5.5'
|
14
15
|
end
|
15
16
|
end
|
@@ -4,15 +4,17 @@ module QDM
|
|
4
4
|
include Mongoid::Document
|
5
5
|
embedded_in :patient
|
6
6
|
field :authorDatetime, type: DateTime
|
7
|
+
field :relevantDatetime, type: DateTime
|
7
8
|
field :relevantPeriod, type: QDM::Interval
|
8
9
|
field :reason, type: QDM::Code
|
9
10
|
field :result
|
10
11
|
field :status, type: QDM::Code
|
11
12
|
field :negationRationale, type: QDM::Code
|
13
|
+
embeds_one :performer, class_name: 'QDM::Entity'
|
12
14
|
field :qdmTitle, type: String, default: 'Intervention, Performed'
|
13
15
|
field :hqmfOid, type: String, default: '2.16.840.1.113883.10.20.28.4.36'
|
14
16
|
field :qdmCategory, type: String, default: 'intervention'
|
15
17
|
field :qdmStatus, type: String, default: 'performed'
|
16
|
-
field :qdmVersion, type: String, default: '5.
|
18
|
+
field :qdmVersion, type: String, default: '5.5'
|
17
19
|
end
|
18
20
|
end
|