health-data-standards 4.2.0 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: ed7ac32f30130f0ea0517470c15e03fdfe779114
4
- data.tar.gz: 206797804b2a887780b08b7250ebf9063c6911c1
2
+ SHA256:
3
+ metadata.gz: b3e9e7e37d4f361d8ebce2aafaa93d7fa32aaccc28d85381ff3cf325f4ba8934
4
+ data.tar.gz: 664647467b139621ce860648beaccb907ed716885f8e6e713c93228347fecf8a
5
5
  SHA512:
6
- metadata.gz: 103de0eb07ad45cf8f1cad1cb52fa58bf150bf4e942fe47aad0be9fe051100580105b5c6d235199eea2f51fdd6b9896f4477bec29509cd7a88d32cf6314f10c3
7
- data.tar.gz: 212134946675814e7519b8e0761c974da0d5be30c0cc3b75e31f28c822c1e184a45c693b7d7974460a157d730c2635d4395f6ee5d48bab9468a92ccfc40bacf1
6
+ metadata.gz: 1a8bc171be92e16d543ae408c64e29d17478c232ad8c8cbda42dec47a33ba9a6b6d669240f05f8623f6046b7e31ccf4b0efa6fbe15c8332b74acbfc5756abffb
7
+ data.tar.gz: 6c64d3251eca602cc91e86964ec7e15d5a5e926d00c88e43dee33a92fb265ecc16abc20d280c111383aa90e729c29f139a5bd506400b50c04246f347b497fb6c
@@ -38,6 +38,7 @@ require_relative 'health-data-standards/models/thing_with_codes'
38
38
  require_relative 'health-data-standards/models/result_value'
39
39
  require_relative 'health-data-standards/models/coded_result_value'
40
40
  require_relative 'health-data-standards/models/physical_quantity_result_value'
41
+ require_relative 'health-data-standards/models/ratio_result_value'
41
42
  require_relative 'health-data-standards/models/cda_identifier'
42
43
  require_relative 'health-data-standards/models/reference'
43
44
  require_relative 'health-data-standards/models/entry'
@@ -14,6 +14,7 @@ module HealthDataStandards
14
14
 
15
15
  def create_entry(entry_element, nrh = NarrativeReferenceHandler.new)
16
16
  communication = super
17
+ # communication.direction is deprecated as of QDM 5.4
17
18
  communication.direction = find_communication_direction(entry_element)
18
19
  extract_reason_or_negation(entry_element, communication)
19
20
  extract_references(entry_element, communication)
@@ -22,6 +23,7 @@ module HealthDataStandards
22
23
 
23
24
  private
24
25
 
26
+ # find_communication_direction is deprecated as of QDM 5.4
25
27
  def find_communication_direction(entry_element)
26
28
  case entry_element.at_xpath(@template_xpath).value
27
29
  when "2.16.840.1.113883.10.20.24.3.3"
@@ -52,4 +54,4 @@ module HealthDataStandards
52
54
  end
53
55
  end
54
56
  end
55
- end
57
+ end
@@ -1,4 +1,5 @@
1
1
  class Assessment < Entry
2
+ # method deprecated for "Assessment, Recommended" and "Assessment, Order" in QDM 5.4. Remains for "Assessment, Performed".
2
3
  field :method, type: Hash
3
4
  field :components, type: Hash
4
5
  end
@@ -1,3 +1,15 @@
1
1
  class Communication < Entry
2
+ # :direction is deprecated as of QDM 5.4
2
3
  field :direction, type: String
4
+
5
+ # QDM 5.4 merges all communication types.
6
+ # The following attributes were added for QDM 5.4
7
+ # * category
8
+ # * sender
9
+ # * recipient
10
+ # * medium
11
+ field :category, type: Hash
12
+ field :sender, type: Hash
13
+ field :recipient, type: Hash
14
+ field :medium, type: Hash
3
15
  end
@@ -7,6 +7,7 @@ class LabResult < Entry
7
7
  field :referenceRangeLow, as: :reference_range_low, type: Hash
8
8
  field :interpretation, type: Hash
9
9
  field :reaction, type: Hash
10
+ # method deprecated for "Laboratory Test, Recommended" and "Laboratory Test, Order" in QDM 5.4. Remains for "Laboratory Test, Performed".
10
11
  field :method, type: Hash
11
12
  # The resulting status of a procedure as defined in the QDM documentation. This is different
12
13
  # than the status associated with the `Entry` object, which relates to the data criteria
@@ -3,6 +3,7 @@ class MedicalEquipment < Entry
3
3
  field :manufacturer, type: String
4
4
  field :anatomicalStructure, as: :anatomical_structure, type: Hash
5
5
  field :removalTime, as: :removal_time, type: Integer
6
+ # anatomical approach deprecated as of QDM 5.4
6
7
  field :anatomical_approach , type: Hash
7
8
  field :reaction, type: Hash
8
9
  def shift_dates(date_diff)
@@ -1,3 +1,4 @@
1
+ # Medication is used for Medication, Immunization and Substance QDM types.
1
2
  class Medication < Entry
2
3
  # administrationTiming is the same as QDM5.3 frequency in Bonnie
3
4
  field :administrationTiming, as: :administration_timing, type: Hash
@@ -5,6 +6,9 @@ class Medication < Entry
5
6
  # QDM 5.0 disambiguates dose to be dosage and suppy. 'dose' here represents the QDM 5.0 'dosage'.
6
7
  # Bonnie displays this as 'dosage'.
7
8
  field :dose, type: Hash
9
+ field :setting, type: Hash
10
+ # Attribute deprecated for "Medication, Active", "Medication, Administered", "Immunization, Administered", "Substance, Administered", "Substance, Recommended" in QDM 5.4.
11
+ # Remains for "Medication, Dispensed", "Medication, Order", "Medication, Discharge", "Immunization, Order", "Substance, Order"
8
12
  field :supply, type: Hash
9
13
  field :refills, type: Hash
10
14
  field :typeOfMedication, as: :type_of_medication, type: Hash
@@ -14,6 +18,7 @@ class Medication < Entry
14
18
 
15
19
  field :route, type: Hash
16
20
  field :anatomical_approach, type: Hash
21
+ field :dispenserIdentifier, as: :dispenser_identifier, type: Hash
17
22
  field :doseRestriction, as: :dose_restriction, type: Hash
18
23
  field :fulfillmentInstructions, as: :fulfillment_instructions, type: String
19
24
  field :indication, type: Hash
@@ -21,9 +26,12 @@ class Medication < Entry
21
26
  field :vehicle, type: Hash
22
27
  field :reaction, type: Hash
23
28
  field :deliveryMethod, as: :delivery_method, type: Hash
29
+ field :prescriberIdentifier, as: :prescriber_identifier, type: Hash
24
30
  field :patientInstructions, as: :patient_instructions, type: String
25
31
  field :doseIndicator, as: :dose_indicator, type: String
32
+ field :daysSupplied, as: :days_supplied, type: Hash
26
33
 
34
+ # In QDM 5.4: method not present on 'medication'. deprecated for 'substance' (particularly, 'Substance, Recommended')
27
35
  field :method , type: Hash
28
36
  field :active_datetime , type: Integer
29
37
  field :signed_datetime , type: Integer
@@ -3,9 +3,13 @@ class Procedure < Entry
3
3
  field :incisionTime, type: Integer, as: :incision_time
4
4
  field :ordinality, type: Hash
5
5
  field :source, type: Hash
6
+ # anatomical approach deprecated as of QDM 5.4
6
7
  field :anatomical_approach, type: Hash
7
8
  field :anatomical_target, type: Hash
8
9
  field :anatomical_location, type: Hash
10
+ # method deprecated for "Procedure, Recommended" and "Procedure, Order" in QDM 5.4. Remains for "Procedure, Performed".
11
+ # method deprecated for "Diagnostic Study, Recommended" and "Diagnostic Study, Order" in QDM 5.4. Remains for "Diagnostic Study, Performed".
12
+ # method deprecated for "Physical Exam, Recommended" and "Physical Exam, Order" in QDM 5.4. Remains for "Physical Exam, Performed".
9
13
  field :method, type: Hash
10
14
  field :reaction, type: Hash
11
15
  # The resulting status of a procedure as defined in the QDM documentation. This is different
@@ -0,0 +1,6 @@
1
+ class RatioResultValue < ResultValue
2
+ field :numerator_scalar
3
+ field :numerator_units, type: String
4
+ field :denominator_scalar
5
+ field :denominator_units, type: String
6
+ end
@@ -16,7 +16,6 @@ module HealthDataStandards
16
16
  index "concepts.code" => 1
17
17
  index "concepts.code_system" => 1
18
18
  index "concepts.code_system_name" => 1
19
- index "concepts.display_name" => 1
20
19
  index "bundle_id" => 1
21
20
  scope :by_oid, ->(oid){where(:oid => oid)}
22
21
 
@@ -219,18 +219,6 @@
219
219
  "definition":"care_goal",
220
220
  "status":"",
221
221
  "negation":false},
222
- "2.16.840.1.113883.10.20.28.4.8":{
223
- "definition":"communication_from_patient_to_provider",
224
- "status":"",
225
- "negation":false},
226
- "2.16.840.1.113883.10.20.28.4.9":{
227
- "definition":"communication_from_provider_to_patient",
228
- "status":"",
229
- "negation":false},
230
- "2.16.840.1.113883.10.20.28.4.10":{
231
- "definition":"communication_from_provider_to_provider",
232
- "status":"",
233
- "negation":false},
234
222
  "2.16.840.1.113883.10.20.28.4.13":{
235
223
  "definition":"device",
236
224
  "status":"applied",
@@ -371,6 +359,10 @@
371
359
  "definition":"transfer_to",
372
360
  "status":"",
373
361
  "negation":false},
362
+ "2.16.840.1.113883.10.20.28.4.131":{
363
+ "definition":"assessment",
364
+ "status":"ordered",
365
+ "negation":false},
374
366
  "2.16.840.1.113883.10.20.28.4.117":{
375
367
  "definition":"assessment",
376
368
  "status":"performed",
@@ -390,5 +382,9 @@
390
382
  "2.16.840.1.113883.10.20.28.4.130": {
391
383
  "definition":"participation",
392
384
  "status":"",
393
- "negation":false}
385
+ "negation":false},
386
+ "2.16.840.1.113883.10.20.28.4.132":{
387
+ "definition":"communication",
388
+ "status":"performed",
389
+ "negation":true}
394
390
  }
@@ -647,6 +647,15 @@
647
647
  "hard_status":false,
648
648
  "patient_api_function":"communications",
649
649
  "not_supported":false},
650
+ "communication_performed":{
651
+ "title":"communication, performed",
652
+ "category":"communications",
653
+ "definition":"communication",
654
+ "status":"performed",
655
+ "sub_category":"",
656
+ "hard_status":false,
657
+ "patient_api_function":"communications",
658
+ "not_supported":false},
650
659
  "device":{
651
660
  "title":"device",
652
661
  "category":"devices",
@@ -1007,6 +1016,15 @@
1007
1016
  "hard_status":false,
1008
1017
  "patient_api_function":"encounters",
1009
1018
  "not_supported":false},
1019
+ "assessment_ordered":{
1020
+ "title":"assessment order",
1021
+ "category":"assessments",
1022
+ "definition":"assessment",
1023
+ "status":"ordered",
1024
+ "sub_category":"",
1025
+ "hard_status":false,
1026
+ "patient_api_function":"assessments",
1027
+ "not_supported":false},
1010
1028
  "assessment_performed":{
1011
1029
  "title":"assessment performed",
1012
1030
  "category":"assessments",
@@ -24,24 +24,35 @@ module HQMF
24
24
  # `code`: The code for the entry. This should be included to make HQMF generation work properly. This is whatever code is dictated in the HQMF. For Diagnosis, this is in [HQMF QDM IG](http://www.hl7.org/implement/standards/product_brief.cfm?product_id=346) vol 2 page 155 and is `29308-4`.
25
25
  # `code_system`: This is the oid for whatever code system contains `code`. For Diagnosis, this is LOINC: `2.16.840.1.113883.6.1`. This is also located at (http://www.hl7.org/implement/standards/product_brief.cfm?product_id=346) vol 2 page 155.
26
26
  # `template_id`: These appear to be related to HQMFr1 template ids. These appear to be dangerously out of date. Don't use.
27
- FIELDS = {'ABATEMENT_DATETIME' => {title:'Abatement Datetime', coded_entry_method: :end_date, field_type: :timestamp},
27
+ FIELDS = {'ABATEMENT_DATETIME' => {title:'Abatement Datetime', coded_entry_method: :end_date, field_type: :timestamp}, # ABATEMENT_DATETIME is no longer used.
28
28
  'ACTIVE_DATETIME' => {title:'Active Date/Time', coded_entry_method: :active_datetime, field_type: :timestamp},
29
+ # ADMISSION_DATETIME is no longer used.
29
30
  'ADMISSION_DATETIME' => {title:'Admission Date/Time', coded_entry_method: :admit_time, code: '399423000', code_system:'2.16.840.1.113883.6.96', field_type: :timestamp},
30
31
  # QDM 5.0 addition. This is the same as FACILITY_LOCATION.
31
32
  # TODO: (LDY 10/5/2016) this is a new attribute from QDM 5.0. We do not yet have the code or template_id for this. This should be updated when we do.
32
33
  'ADMISSION_SOURCE' => {title:'Admission Source', coded_entry_method: :admission_source, field_type: :value},
34
+ # ANATOMICAL_APPROACH_SITE is no longer used.
33
35
  'ANATOMICAL_APPROACH_SITE' => {title:'Anatomical Approach Site', coded_entry_method: :anatomical_approach, field_type: :value},
34
36
  'ANATOMICAL_LOCATION_SITE' => {title:'Anatomical Location Site', coded_entry_method: :anatomical_location, field_type: :value},
37
+ # ANATOMICAL_STRUCTURE is no longer used.
35
38
  'ANATOMICAL_STRUCTURE' => {title:'Anatomical Structure', coded_entry_method: :anatomical_structure, code: '91723000', code_system:'2.16.840.1.113883.6.96', template_id: '2.16.840.1.113883.3.560.1.1000.2', field_type: :value},
39
+ # Added in QDM 5.4
40
+ 'CATEGORY' => {title:'Category', coded_entry_method: :category, field_type: :value},
36
41
  'CAUSE' => {title:'Cause', coded_entry_method: :cause_of_death, code: '42752001', code_system:'2.16.840.1.113883.6.96', template_id: '2.16.840.1.113883.3.560.1.1017.2', field_type: :value},
37
42
  # TODO: Determine actual code and code_system for component attribute
38
43
  'COMPONENT' => {title: 'Component', coded_entry_method: :components, field_type: :value},
44
+ # CUMULATIVE_MEDICATION_DURATION is no longer used
39
45
  'CUMULATIVE_MEDICATION_DURATION' => {title:'Cumulative Medication Duration', coded_entry_method: :cumulative_medication_duration, code: '261773006', code_system:'2.16.840.1.113883.6.96', template_id: '2.16.840.1.113883.3.560.1.1001.3', field_type: :value},
40
46
  # MISSING Date - The date that the patient passed away. - Patient Characteristic Expired
47
+ # Could not find a code and code_system for this data criteria (days supplied) in HQMF QDM IG v3
48
+ 'DAYS_SUPPLIED' => {title:'Days Supplied', coded_entry_method: :days_supplied, field_type: :value},
41
49
  'DIAGNOSIS' => {title:'Diagnosis', coded_entry_method: :diagnosis, field_type: :value},
50
+ # DISCHARGE_DATETIME is no longer used.
42
51
  'DISCHARGE_DATETIME' => {title:'Discharge Date/Time', coded_entry_method: :discharge_time, code: '442864001', code_system:'2.16.840.1.113883.6.96', template_id: '2.16.840.1.113883.3.560.1.1025.1', field_type: :timestamp},
43
52
  # TODO: (LDY 10/5/2016) this changed from "discharge status" to "discharge disposition". likely there is a code and template id change necessary. these are not yet known.
53
+ # DISCHARGE_STATUS is no longer used.
44
54
  'DISCHARGE_STATUS' => {title:'Discharge Disposition', coded_entry_method: :discharge_disposition, code: '309039003', code_system:'2.16.840.1.113883.6.96', template_id: '2.16.840.1.113883.3.560.1.1003.2', field_type: :value},
55
+ 'DISPENSER_IDENTIFIER' => {title:'Dispenser Identifier', coded_entry_method: :dispenser_identifier, field_type: :value},
45
56
  # TODO: (LDY 10/4/2016) this changed from "dose" to "dosage". it's possible that there's another code associated with this. this code was not available at the time of this change.
46
57
  'DOSE' => {title:'Dosage', coded_entry_method: :dose, code: '398232005', code_system:'2.16.840.1.113883.6.96', template_id: '2.16.840.1.113883.3.560.1.1004.1', field_type: :value},
47
58
  'FACILITY_LOCATION' => {title:'Facility Location', coded_entry_method: :facility, code: 'SDLOC', field_type: :value},
@@ -49,49 +60,72 @@ module HQMF
49
60
  'FACILITY_LOCATION_ARRIVAL_DATETIME' => {title:'Location Period Start Date/Time', coded_entry_method: :facility_arrival, code: 'SDLOC_ARRIVAL', field_type: :nested_timestamp},
50
61
  'FACILITY_LOCATION_DEPARTURE_DATETIME' => {title:'Location Period End Date/Time', coded_entry_method: :facility_departure, code: 'SDLOC_DEPARTURE', field_type: :nested_timestamp},
51
62
  'FREQUENCY' => {title:'Frequency', coded_entry_method: :administration_timing, code: '307430002', code_system:'2.16.840.1.113883.6.96', template_id: '2.16.840.1.113883.3.560.1.1006.1', field_type: :value},
63
+ # HEALTH_RECORD_FIELD is no longer used.
52
64
  'HEALTH_RECORD_FIELD' => {title: 'Health Record Field', coded_entry_method: :health_record_field, code: '395676008', code_system:'2.16.840.1.113883.6.96', template_id: '2.16.840.1.113883.10.20.28.3.102:2014-11-24', field_type: :value},
53
65
  'INCISION_DATETIME' => {title:'Incision Date/Time', coded_entry_method: :incision_time, code: '34896006', code_system:'2.16.840.1.113883.6.96', template_id: '2.16.840.1.113883.10.20.24.3.89', field_type: :timestamp},
66
+ # LATERALITY is no longer used.
54
67
  'LATERALITY' => {title:'Laterality', coded_entry_method: :laterality, code: '272741003', code_system:'2.16.840.1.113883.6.96', template_id: '', field_type: :value},
55
68
  'LENGTH_OF_STAY' => {title:'Length of Stay', coded_entry_method: :length_of_stay, code: '183797002', code_system:'2.16.840.1.113883.6.96', template_id: '2.16.840.1.113883.3.560.1.1029.3', field_type: :value},
69
+ # Added in QDM 5.4
70
+ 'MEDIUM' => {title:'Medium', coded_entry_method: :medium, field_type: :value},
56
71
  'METHOD' => {title:'Method', coded_entry_method: :method, template_id: '', field_type: :value},
57
72
  # Negation Rationale isn't encoded
73
+ # ONSET_AGE is no longer used.
58
74
  'ONSET_AGE' => {title:'Onset Age', coded_entry_method: :onset_age, code: '445518008', code_system:'2.16.840.1.113883.6.96', template_id: '', field_type: :value},
75
+ # ONSET_DATETIME is no longer used.
59
76
  'ONSET_DATETIME' => {title:'Onset Datetime', coded_entry_method: :start_date, field_type: :timestamp},
77
+ # ORDINAL is no longer used.
60
78
  'ORDINAL' => {title:'Ordinality', coded_entry_method: :ordinality, code: '117363000', code_system:'2.16.840.1.113883.6.96', template_id: '2.16.840.1.113883.3.560.1.1012.2', field_type: :value}, # previous
61
79
  'ORDINALITY' => {title:'Ordinality', coded_entry_method: :ordinality, code: '117363000', code_system:'2.16.840.1.113883.6.96', template_id: '2.16.840.1.113883.3.560.1.1012.2', field_type: :value},
80
+ # PATIENT_PREFERENCE is no longer used.
62
81
  'PATIENT_PREFERENCE' => {title:'Patient Preference', coded_entry_method: :patient_preference, code: 'PAT', code_system: '2.16.840.1.113883.5.8', template_id: '2.16.840.1.113883.10.20.24.3.83', field_type: :value},
82
+ 'PRESCRIBER_IDENTIFIER' => {title:'Prescriber Identifier', coded_entry_method: :prescriber_identifier, field_type: :value},
63
83
  'PRINCIPAL_DIAGNOSIS' => {title:'Principal Diagnosis', coded_entry_method: :principal_diagnosis, field_type: :value},
84
+ # PROVIDER_PREFERENCE is no longer used.
64
85
  'PROVIDER_PREFERENCE' => {title:'Provider Preference', coded_entry_method: :provider_preference, code: '103323008', code_system: '2.16.840.1.113883.6.96', template_id: '2.16.840.1.113883.10.20.24.3.84', field_type: :value},
86
+ #RADIATION_DOSAGE is no longer used.
65
87
  'RADIATION_DOSAGE' => {title:'Radiation Dosage', coded_entry_method: :radiation_dose, code: '228815006', code_system:'2.16.840.1.113883.6.96', template_id: '2.16.840.1.113883.10.20.24.3.91', field_type: :value},
88
+ #RADIATION_DURATION is no longer used.
66
89
  'RADIATION_DURATION' => {title:'Radiation Duration', coded_entry_method: :radiation_duration, code: '306751006', code_system:'2.16.840.1.113883.6.96', template_id: '2.16.840.1.113883.10.20.24.3.91', field_type: :value},
90
+ # REACTION is no longer used.
67
91
  'REACTION'=> {title:'Reaction', coded_entry_method: :reaction, code: '263851003', code_system:'2.16.840.1.113883.6.96', template_id: '2.16.840.1.113883.10.20.24.3.85', field_type: :value},
68
92
  'REASON' => {title:'Reason', coded_entry_method: :reason, code: '410666004', code_system:'2.16.840.1.113883.6.96', template_id: '2.16.840.1.113883.10.20.24.3.88', field_type: :value},
93
+ # Added in QDM 5.4
94
+ 'RECIPIENT' => {title:'Recipient', coded_entry_method: :recipient, field_type: :value},
95
+ # RECORDED_DATETIME is no longer used.
69
96
  'RECORDED_DATETIME' => {title:'Recorded Datetime', coded_entry_method: :start_date, field_type: :timestamp},
70
97
  'REFERENCE_RANGE_HIGH' => {title:'Reference Range - High', coded_entry_method: :reference_range_high, field_type: :value},
71
98
  'REFERENCE_RANGE_LOW' => {title:'Reference Range - Low', coded_entry_method: :reference_range_low, field_type: :value},
72
99
  'REFILLS' => {title:'Refills', coded_entry_method: :refills, field_type: :value},
73
100
  'RELATED_TO' => {title:'Related To', coded_entry_method: :related_to, code: 'REL', codeSystem: '2.16.840.1.113883.1.11.11603', field_type: :value},
74
101
  'RELATIONSHIP' => {title:'Relationship', coded_entry_method: :relationship_to_patient, field_type: :value},
102
+ # REMOVAL_DATETIME is no longer used.
75
103
  'REMOVAL_DATETIME' => {title:'Removal Date/Time', coded_entry_method: :removal_time, code: '118292001', code_system:'2.16.840.1.113883.6.96', template_id: '2.16.840.1.113883.3.560.1.1032.1', field_type: :timestamp},
76
104
  # Result isn't encoded
77
105
  # TODO: (LDY 10/4/2016) RESULT_DATETIME is a new attribute in QDM 5.0. We do not yet have codes/template information for this.
78
106
  'RESULT_DATETIME' => {title:'Result Date/Time', coded_entry_method: :result_date_time, field_type: :timestamp},
79
107
  'ROUTE' => {title:'Route', coded_entry_method: :route, code: '263513008', code_system:'2.16.840.1.113883.6.96', template_id: '2.16.840.1.113883.3.560.1.1020.2', field_type: :value},
108
+ # Added in QDM 5.4
109
+ 'SENDER' => {title:'Sender', coded_entry_method: :sender, field_type: :value},
110
+ 'SETTING' => {title:'Setting', coded_entry_method: :setting, field_type: :value},
80
111
  'SEVERITY' => {title:'Severity', coded_entry_method: :severity, code: 'SEV', code_system:'2.16.840.1.113883.5.4', template_id: '2.16.840.1.113883.10.20.22.4.8', field_type: :value},
112
+ # SIGNED_DATETIME is no longer used.
81
113
  'SIGNED_DATETIME' => {title:'Signed Date/Time', coded_entry_method: :signed_date_time, field_type: :timestamp},
114
+ # START_DATETIME is no longer used.
82
115
  'START_DATETIME' => {title:'Start Date/Time', coded_entry_method: :start_date, code: '398201009', code_system:'2.16.840.1.113883.6.96', template_id: '2.16.840.1.113883.3.560.1.1027.1', field_type: :timestamp},
83
116
  # STATUS is referenced in the code as `qdm_status` because entry/Record already has a `status`/`status_code` field which has a different meaning
84
117
  'STATUS' => {title: 'Status', coded_entry_method: :qdm_status, code: '33999-4', code_system:'2.16.840.1.113883.6.1', field_type: :value},
118
+ # STOP_DATETIME is no longer used.
85
119
  'STOP_DATETIME' => {title:'Stop Date/Time', coded_entry_method: :end_date, code: '397898000', code_system:'2.16.840.1.113883.6.96', template_id: '2.16.840.1.113883.3.560.1.1026.1', field_type: :timestamp},
86
120
  # TODO: (LDY 10/4/2016) SUPPLY is a new attribute in QDM 5.0. We do not yet have codes/template information for this.
87
121
  'SUPPLY' => {title:'Supply', coded_entry_method: :supply, field_type: :value},
88
122
  'TARGET_OUTCOME' => {title:'Target Outcome', coded_entry_method: :target_outcome, code: '385676005', code_system:'2.16.840.1.113883.6.96', template_id: '', field_type: :value},
89
- # MISSING Time - The time that the patient passed away
90
123
 
91
124
  # Custom field values
92
125
  # QDM 5.3 Update: "Related To" replaces Fulfills. We are keeping the fulfills code and only make changes to the UI.
93
126
  'FLFS' => {title:'Related To', coded_entry_method: :fulfills, code: 'FLFS', field_type: :reference},
94
127
  'SOURCE' => {title:'Source', coded_entry_method: :source, code: '260753009', code_system:'2.16.840.1.113883.6.96', template_id: '2.16.840.1.113883.3.560.1.2001.2', field_type: :value},
128
+ # TRANSFER_FROM, TRANSFER_FROM_DATETIME, TRANSFER_TO, and TRANSFER_TO_DATETIME are no longer used.
95
129
  'TRANSFER_FROM' => {title:'Transfer From', coded_entry_method: :transfer_from, code: 'TRANSFER_FROM', template_id: '2.16.840.1.113883.10.20.24.3.81', field_type: :value},
96
130
  'TRANSFER_FROM_DATETIME' => {title:'Transfer From Date/Time', coded_entry_method: :transfer_from_time, code: 'ORG_TIME', template_id: '2.16.840.1.113883.10.20.24.3.81', field_type: :nested_timestamp},
97
131
  'TRANSFER_TO' => {title:'Transfer To', coded_entry_method: :transfer_to, code: 'TRANSFER_TO', template_id: '2.16.840.1.113883.10.20.24.3.82', field_type: :value},
@@ -455,6 +489,10 @@ module HQMF
455
489
  value = HQMF::Collection.from_json(json)
456
490
  when 'FAC'
457
491
  value = Facility.new(json)
492
+ when 'ID'
493
+ value = HQMF::Identifier.from_json(json)
494
+ when 'RT'
495
+ value = HQMF::Ratio.from_json(json)
458
496
  else
459
497
  raise "Unknown value type [#{type}]"
460
498
  end
@@ -453,5 +453,42 @@ module HQMF
453
453
  check_equality(self,other)
454
454
  end
455
455
  end
456
+
457
+ class Ratio
458
+ include HQMF::Conversion::Utilities
459
+ attr_accessor :type, :numerator, :denominator
460
+
461
+ # @param [String] type
462
+ # @param [Value] numerator
463
+ # @param [Value] denominator
464
+ def initialize(type, numerator, denominator)
465
+ @type = type || 'RT'
466
+ @numerator = numerator
467
+ @denominator = denominator
468
+ end
469
+
470
+ def self.from_json(json)
471
+ type = json["type"] if json["type"]
472
+ numerator = json["numerator"] if json["numerator"]
473
+ denominator = json["denominator"] if json["denominator"]
474
+ HQMF::Ratio.new(type, numerator, denominator)
475
+ end
476
+
477
+ def numerator?
478
+ @numerator
479
+ end
480
+
481
+ def denominator?
482
+ @denominator
483
+ end
484
+
485
+ def to_json
486
+ build_hash(self, [:type, :numerator, :denominator])
487
+ end
488
+
489
+ def ==(other)
490
+ check_equality(self, other)
491
+ end
492
+ end
456
493
 
457
494
  end
@@ -93,7 +93,9 @@ module HQMF2CQL
93
93
  '2.16.840.1.113883.10.20.28.4.118' => { valueset_path: './*/cda:code', result_path: nil },
94
94
  '2.16.840.1.113883.10.20.28.4.119' => { valueset_path: "./*/cda:participation[@typeCode='CSM']/cda:role[@classCode='MANU']/cda:playingEntity[@classCode='MMAT']/cda:code", result_path: nil },
95
95
  '2.16.840.1.113883.10.20.28.4.120' => { valueset_path: "./*/cda:participation[@typeCode='CSM']/cda:role[@classCode='MANU']/cda:playingEntity[@classCode='MMAT']/cda:code", result_path: nil },
96
- '2.16.840.1.113883.10.20.28.4.130' => { valueset_path: './*/cda:value', result_path: nil }
96
+ '2.16.840.1.113883.10.20.28.4.130' => { valueset_path: './*/cda:value', result_path: nil },
97
+ '2.16.840.1.113883.10.20.28.4.131' => { valueset_path: './*/cda:code', result_path: nil },
98
+ '2.16.840.1.113883.10.20.28.4.132' => { valueset_path: "./*/cda:outboundRelationship[@typeCode='RSON']/cda:observationCriteria/cda:value", result_path: nil },
97
99
  }
98
100
  # rubocop:enable Metrics/LineLength
99
101
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: health-data-standards
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0
4
+ version: 4.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The MITRE Corporation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-22 00:00:00.000000000 Z
11
+ date: 2018-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -375,6 +375,7 @@ files:
375
375
  - lib/health-data-standards/models/qrda/legal_authenticator.rb
376
376
  - lib/health-data-standards/models/qrda/organization.rb
377
377
  - lib/health-data-standards/models/qrda/person.rb
378
+ - lib/health-data-standards/models/ratio_result_value.rb
378
379
  - lib/health-data-standards/models/record.rb
379
380
  - lib/health-data-standards/models/reference.rb
380
381
  - lib/health-data-standards/models/result_value.rb
@@ -964,7 +965,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
964
965
  version: '0'
965
966
  requirements: []
966
967
  rubyforge_project:
967
- rubygems_version: 2.6.12
968
+ rubygems_version: 2.7.7
968
969
  signing_key:
969
970
  specification_version: 4
970
971
  summary: A library for generating and consuming various healthcare related formats.