Class: Qrda1R5
Constant Summary
Qrda::Export::Helper::FrequencyHelper::FREQUENCY_CODE_MAP
Instance Method Summary
collapse
#care_partner_entity?, #location_entity?, #organization_entity?, #patient_entity?, #practitioner_entity?
#institution_not_specified_point_frequency, #institution_not_specified_range_frequency, #institution_specified_point_frequency, #institution_specified_range_frequency, #medication_frequency
#birthdate, #ethnic_group, #expiration, #gender, #given_name, #mrn, #onc_gender_code?, #patient, #payer, #provider, #provider_ccn, #provider_npi, #provider_street, #provider_tin, #provider_type_code, #race
#authordatetime_or_dispenserid?, #code_and_codesystem, #display_author_dispenser_id?, #display_author_prescriber_id?, #dose_quantity_value, #id_or_null_flavor, #integer_or_pq, #multiple_codes?, #negated, #negation_ind, #primary_code_and_codesystem, #refills_as_repeat_number, #result_value, #result_value_as_string, #translation_codes_and_codesystem_list, #value_as_float
#as_id, #hicn, #measures, #medicare_beneficiary_identifier, #object_id, #random_id, #submission_program
#active_date_time, #author_effective_time, #author_time, #birth_date_time, #completed_prevalence_period, #current_time, #expired_date_time, #facility_period, #incision_datetime, #medication_duration_author_effective_time, #medication_duration_effective_time, #medication_supply_request_period, #participation_period, #performance_period_end, #performance_period_start, #prevalence_period, #received_date_time, #relevant_date_period_or_null_flavor, #relevant_date_time_value, #relevant_period, #result_date_time, #result_date_time?, #sent_date_time, #value_or_null_flavor
Constructor Details
#initialize(patient, measures, options = {}) ⇒ Qrda1R5
Returns a new instance of Qrda1R5.
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 12
def initialize(patient, measures, options = {})
@patient = patient
@qdmPatient = patient.qdmPatient
@measures = measures
@provider = options[:provider]
@patient_address_option = options[:patient_addresses]
@patient_telecom_option = options[:patient_telecoms]
@patient_email_option = options[:patient_email]
@performance_period_start = options[:start_time]
@performance_period_end = options[:end_time]
@submission_program = options[:submission_program]
@ry2026_submission = options[:ry2026_submission]
@medicare_beneficiary_identifier = options[:medicare_beneficiary_identifier]
@hicn = options[:hicn]
@authoring_system = options[:authoring_system]
end
|
Instance Method Details
#adverse_event ⇒ Object
87
88
89
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 87
def adverse_event
JSON.parse(@qdmPatient.get_data_elements('adverse_event', nil).to_json)
end
|
#allergy_intolerance ⇒ Object
91
92
93
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 91
def allergy_intolerance
JSON.parse(@qdmPatient.get_data_elements('allergy', 'intolerance').to_json)
end
|
#assessment_order ⇒ Object
95
96
97
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 95
def assessment_order
JSON.parse(@qdmPatient.get_data_elements('assessment', 'order').to_json)
end
|
99
100
101
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 99
def assessment_performed
JSON.parse(@qdmPatient.get_data_elements('assessment', 'performed').to_json)
end
|
#assessment_recommended ⇒ Object
103
104
105
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 103
def assessment_recommended
JSON.parse(@qdmPatient.get_data_elements('assessment', 'recommended').to_json)
end
|
#authoring_system ⇒ Object
34
35
36
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 34
def authoring_system
@authoring_system || 'TestSystem'
end
|
107
108
109
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 107
def communication_performed
JSON.parse(@qdmPatient.get_data_elements('communication', 'performed').to_json)
end
|
#device_applied ⇒ Object
115
116
117
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 115
def device_applied
JSON.parse(@qdmPatient.get_data_elements('device', 'applied').to_json)
end
|
#device_order ⇒ Object
119
120
121
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 119
def device_order
JSON.parse(@qdmPatient.get_data_elements('device', 'order').to_json)
end
|
#device_recommended ⇒ Object
123
124
125
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 123
def device_recommended
JSON.parse(@qdmPatient.get_data_elements('device', 'recommended').to_json)
end
|
#diagnosis ⇒ Object
111
112
113
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 111
def diagnosis
JSON.parse(@qdmPatient.get_data_elements('condition', nil).to_json)
end
|
#diagnostic_study_order ⇒ Object
127
128
129
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 127
def diagnostic_study_order
JSON.parse(@qdmPatient.get_data_elements('diagnostic_study', 'order').to_json)
end
|
131
132
133
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 131
def diagnostic_study_performed
JSON.parse(@qdmPatient.get_data_elements('diagnostic_study', 'performed').to_json)
end
|
#diagnostic_study_recommended ⇒ Object
135
136
137
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 135
def diagnostic_study_recommended
JSON.parse(@qdmPatient.get_data_elements('diagnostic_study', 'recommended').to_json)
end
|
#encounter_order ⇒ Object
139
140
141
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 139
def encounter_order
JSON.parse(@qdmPatient.get_data_elements('encounter', 'order').to_json)
end
|
143
144
145
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 143
def encounter_performed
JSON.parse(@qdmPatient.get_data_elements('encounter', 'performed').to_json)
end
|
#encounter_recommended ⇒ Object
147
148
149
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 147
def encounter_recommended
JSON.parse(@qdmPatient.get_data_elements('encounter', 'recommended').to_json)
end
|
#family_history ⇒ Object
151
152
153
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 151
def family_history
JSON.parse(@qdmPatient.get_data_elements('family_history', nil).to_json)
end
|
#immunization_administered ⇒ Object
155
156
157
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 155
def immunization_administered
JSON.parse(@qdmPatient.get_data_elements('immunization', 'administered').to_json)
end
|
#immunization_order ⇒ Object
159
160
161
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 159
def immunization_order
JSON.parse(@qdmPatient.get_data_elements('immunization', 'order').to_json)
end
|
#intervention_order ⇒ Object
163
164
165
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 163
def intervention_order
JSON.parse(@qdmPatient.get_data_elements('intervention', 'order').to_json)
end
|
167
168
169
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 167
def intervention_performed
JSON.parse(@qdmPatient.get_data_elements('intervention', 'performed').to_json)
end
|
#intervention_recommended ⇒ Object
171
172
173
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 171
def intervention_recommended
JSON.parse(@qdmPatient.get_data_elements('intervention', 'recommended').to_json)
end
|
#laboratory_test_order ⇒ Object
175
176
177
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 175
def laboratory_test_order
JSON.parse(@qdmPatient.get_data_elements('laboratory_test', 'order').to_json)
end
|
179
180
181
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 179
def laboratory_test_performed
JSON.parse(@qdmPatient.get_data_elements('laboratory_test', 'performed').to_json)
end
|
#laboratory_test_recommended ⇒ Object
183
184
185
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 183
def laboratory_test_recommended
JSON.parse(@qdmPatient.get_data_elements('laboratory_test', 'recommended').to_json)
end
|
#medication_active ⇒ Object
187
188
189
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 187
def medication_active
JSON.parse(@qdmPatient.get_data_elements('medication', 'active').to_json)
end
|
#medication_administered ⇒ Object
191
192
193
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 191
def medication_administered
JSON.parse(@qdmPatient.get_data_elements('medication', 'administered').to_json) + JSON.parse(@qdmPatient.get_data_elements('substance', 'administered').to_json)
end
|
#medication_discharge ⇒ Object
195
196
197
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 195
def medication_discharge
JSON.parse(@qdmPatient.get_data_elements('medication', 'discharge').to_json)
end
|
#medication_dispensed ⇒ Object
199
200
201
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 199
def medication_dispensed
JSON.parse(@qdmPatient.get_data_elements('medication', 'dispensed').to_json)
end
|
#medication_order ⇒ Object
203
204
205
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 203
def medication_order
JSON.parse(@qdmPatient.get_data_elements('medication', 'order').to_json)
end
|
#patient_addresses ⇒ Object
38
39
40
41
42
43
44
45
46
47
48
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 38
def patient_addresses
@patient_address_option ||= [CQM::Address.new(
use: 'HP',
street: ['202 Burlington Rd.'],
city: 'Bedford',
state: 'MA',
zip: '01730',
country: 'US'
)]
JSON.parse(@patient_address_option.to_json)
end
|
#patient_care_experience ⇒ Object
207
208
209
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 207
def patient_care_experience
JSON.parse(@qdmPatient.dataElements.where(hqmfOid: { '$in' => HQMF::Util::HQMFTemplateHelper.get_all_hqmf_oids('patient_care_experience', '') }).to_json)
end
|
#patient_characteristic_birthdate ⇒ Object
71
72
73
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 71
def patient_characteristic_birthdate
JSON.parse(@qdmPatient.get_data_elements('patient_characteristic', 'birthdate').to_json)
end
|
#patient_characteristic_clinical_trial_participant ⇒ Object
211
212
213
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 211
def patient_characteristic_clinical_trial_participant
JSON.parse(@qdmPatient.get_data_elements('patient_characteristic', 'clinical_trial_participant').to_json)
end
|
#patient_characteristic_ethnicity ⇒ Object
83
84
85
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 83
def patient_characteristic_ethnicity
JSON.parse(@qdmPatient.get_data_elements('patient_characteristic', 'ethnicity').to_json)
end
|
#patient_characteristic_expired ⇒ Object
215
216
217
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 215
def patient_characteristic_expired
JSON.parse(@qdmPatient.get_data_elements('patient_characteristic', 'expired').to_json)
end
|
#patient_characteristic_payer ⇒ Object
67
68
69
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 67
def patient_characteristic_payer
JSON.parse(@qdmPatient.get_data_elements('patient_characteristic', 'payer').to_json)
end
|
#patient_characteristic_race ⇒ Object
79
80
81
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 79
def patient_characteristic_race
JSON.parse(@qdmPatient.get_data_elements('patient_characteristic', 'race').to_json)
end
|
#patient_characteristic_sex ⇒ Object
75
76
77
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 75
def patient_characteristic_sex
JSON.parse(@qdmPatient.get_data_elements('patient_characteristic', 'gender').to_json)
end
|
#patient_email ⇒ Object
58
59
60
61
62
63
64
65
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 58
def patient_email
return unless @patient_email_option
telecom_email = [CQM::Telecom.new(
use: 'HP',
value: @patient_email_option
)]
JSON.parse(telecom_email.to_json)
end
|
#patient_telecoms ⇒ Object
50
51
52
53
54
55
56
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 50
def patient_telecoms
@patient_telecom_option ||= [CQM::Telecom.new(
use: 'HP',
value: '555-555-2003'
)]
JSON.parse(@patient_telecom_option.to_json)
end
|
#physical_exam_order ⇒ Object
219
220
221
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 219
def physical_exam_order
JSON.parse(@qdmPatient.get_data_elements('physical_exam', 'order').to_json)
end
|
223
224
225
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 223
def physical_exam_performed
JSON.parse(@qdmPatient.get_data_elements('physical_exam', 'performed').to_json)
end
|
#physical_exam_recommended ⇒ Object
227
228
229
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 227
def physical_exam_recommended
JSON.parse(@qdmPatient.get_data_elements('physical_exam', 'recommended').to_json)
end
|
#procedure_order ⇒ Object
231
232
233
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 231
def procedure_order
JSON.parse(@qdmPatient.get_data_elements('procedure', 'order').to_json)
end
|
235
236
237
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 235
def procedure_performed
JSON.parse(@qdmPatient.get_data_elements('procedure', 'performed').to_json)
end
|
#procedure_recommended ⇒ Object
239
240
241
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 239
def procedure_recommended
JSON.parse(@qdmPatient.get_data_elements('procedure', 'recommended').to_json)
end
|
#program_participation ⇒ Object
243
244
245
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 243
def program_participation
JSON.parse(@qdmPatient.get_data_elements('participation', nil).to_json)
end
|
#provider_care_experience ⇒ Object
247
248
249
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 247
def provider_care_experience
JSON.parse(@qdmPatient.dataElements.where(hqmfOid: { '$in' => HQMF::Util::HQMFTemplateHelper.get_all_hqmf_oids('provider_care_experience', '') }).to_json)
end
|
251
252
253
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 251
def related_person
JSON.parse(@qdmPatient.get_data_elements('related_person', nil).to_json)
end
|
#ry2026_submission? ⇒ Boolean
use 2026 template ids if 2026 submission is specified as true, or if it unspecified
30
31
32
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 30
def ry2026_submission?
@ry2026_submission || @ry2026_submission.nil?
end
|
#substance_administered ⇒ Object
255
256
257
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 255
def substance_administered
JSON.parse(@qdmPatient.get_data_elements('substance', 'administered').to_json)
end
|
#substance_order ⇒ Object
259
260
261
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 259
def substance_order
JSON.parse(@qdmPatient.get_data_elements('substance', 'order').to_json)
end
|
#substance_recommended ⇒ Object
263
264
265
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 263
def substance_recommended
JSON.parse(@qdmPatient.get_data_elements('substance', 'recommended').to_json)
end
|
#symptom ⇒ Object
267
268
269
|
# File 'lib/qrda-export/catI-r5/qrda1_r5.rb', line 267
def symptom
JSON.parse(@qdmPatient.get_data_elements('symptom', nil).to_json)
end
|