class Qrda1R5

Public Class Methods

new(patient, measures, options = {}) click to toggle source
# 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]
  @performance_period_start = options[:start_time]
  @performance_period_end = options[:end_time]
  @submission_program = options[:submission_program]
end

Public Instance Methods

adverse_event() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 64
def adverse_event
  JSON.parse(@qdmPatient.get_data_elements('adverse_event', nil).to_json)
end
allergy_intolerance() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 68
def allergy_intolerance
  JSON.parse(@qdmPatient.get_data_elements('allergy', 'intolerance').to_json)
end
assessment_order() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 72
def assessment_order
  JSON.parse(@qdmPatient.get_data_elements('assessment', 'order').to_json)
end
assessment_performed() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 76
def assessment_performed
  JSON.parse(@qdmPatient.get_data_elements('assessment', 'performed').to_json)
end
communication_performed() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 84
def communication_performed
  JSON.parse(@qdmPatient.get_data_elements('communication', 'performed').to_json)
end
device_applied() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 92
def device_applied
  JSON.parse(@qdmPatient.get_data_elements('device', 'applied').to_json)
end
device_order() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 96
def device_order
  JSON.parse(@qdmPatient.get_data_elements('device', 'order').to_json)
end
diagnosis() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 88
def diagnosis
  JSON.parse(@qdmPatient.get_data_elements('condition', nil).to_json)
end
diagnostic_study_order() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 104
def diagnostic_study_order
  JSON.parse(@qdmPatient.get_data_elements('diagnostic_study', 'order').to_json)
end
diagnostic_study_performed() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 108
def diagnostic_study_performed
  JSON.parse(@qdmPatient.get_data_elements('diagnostic_study', 'performed').to_json)
end
encounter_order() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 116
def encounter_order
  JSON.parse(@qdmPatient.get_data_elements('encounter', 'order').to_json)
end
encounter_performed() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 120
def encounter_performed
  JSON.parse(@qdmPatient.get_data_elements('encounter', 'performed').to_json)
end
family_history() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 128
def family_history
  JSON.parse(@qdmPatient.get_data_elements('family_history', nil).to_json)
end
immunization_administered() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 132
def immunization_administered
  JSON.parse(@qdmPatient.get_data_elements('immunization', 'administered').to_json)
end
immunization_order() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 136
def immunization_order
  JSON.parse(@qdmPatient.get_data_elements('immunization', 'order').to_json)
end
intervention_order() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 140
def intervention_order
  JSON.parse(@qdmPatient.get_data_elements('intervention', 'order').to_json)
end
intervention_performed() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 144
def intervention_performed
  JSON.parse(@qdmPatient.get_data_elements('intervention', 'performed').to_json)
end
laboratory_test_order() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 152
def laboratory_test_order
  JSON.parse(@qdmPatient.get_data_elements('laboratory_test', 'order').to_json)
end
laboratory_test_performed() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 156
def laboratory_test_performed
  JSON.parse(@qdmPatient.get_data_elements('laboratory_test', 'performed').to_json)
end
medication_active() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 164
def medication_active
  JSON.parse(@qdmPatient.get_data_elements('medication', 'active').to_json)
end
medication_administered() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 168
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() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 172
def medication_discharge
  JSON.parse(@qdmPatient.get_data_elements('medication', 'discharge').to_json)
end
medication_dispensed() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 176
def medication_dispensed
  JSON.parse(@qdmPatient.get_data_elements('medication', 'dispensed').to_json)
end
medication_order() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 180
def medication_order
  JSON.parse(@qdmPatient.get_data_elements('medication', 'order').to_json)
end
patient_addresses() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 24
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() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 184
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() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 48
def patient_characteristic_birthdate
  JSON.parse(@qdmPatient.get_data_elements('patient_characteristic', 'birthdate').to_json)
end
patient_characteristic_clinical_trial_participant() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 188
def patient_characteristic_clinical_trial_participant
  JSON.parse(@qdmPatient.get_data_elements('patient_characteristic', 'clinical_trial_participant').to_json)
end
patient_characteristic_ethnicity() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 60
def patient_characteristic_ethnicity
  JSON.parse(@qdmPatient.get_data_elements('patient_characteristic', 'ethnicity').to_json)
end
patient_characteristic_expired() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 192
def patient_characteristic_expired
  JSON.parse(@qdmPatient.get_data_elements('patient_characteristic', 'expired').to_json)
end
patient_characteristic_payer() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 44
def patient_characteristic_payer
  JSON.parse(@qdmPatient.get_data_elements('patient_characteristic', 'payer').to_json)
end
patient_characteristic_race() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 56
def patient_characteristic_race
  JSON.parse(@qdmPatient.get_data_elements('patient_characteristic', 'race').to_json)
end
patient_characteristic_sex() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 52
def patient_characteristic_sex
  JSON.parse(@qdmPatient.get_data_elements('patient_characteristic', 'gender').to_json)
end
patient_telecoms() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 36
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() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 196
def physical_exam_order
  JSON.parse(@qdmPatient.get_data_elements('physical_exam', 'order').to_json)
end
physical_exam_performed() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 200
def physical_exam_performed
  JSON.parse(@qdmPatient.get_data_elements('physical_exam', 'performed').to_json)
end
procedure_order() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 208
def procedure_order
  JSON.parse(@qdmPatient.get_data_elements('procedure', 'order').to_json)
end
procedure_performed() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 212
def procedure_performed
  JSON.parse(@qdmPatient.get_data_elements('procedure', 'performed').to_json)
end
program_participation() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 220
def program_participation
  JSON.parse(@qdmPatient.get_data_elements('participation', nil).to_json)
end
provider_care_experience() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 224
def provider_care_experience
  JSON.parse(@qdmPatient.dataElements.where(hqmfOid: { '$in' => HQMF::Util::HQMFTemplateHelper.get_all_hqmf_oids('provider_care_experience', '') }).to_json)
end
substance_administered() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 232
def substance_administered
  JSON.parse(@qdmPatient.get_data_elements('substance', 'administered').to_json)
end
substance_order() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 236
def substance_order
  JSON.parse(@qdmPatient.get_data_elements('substance', 'order').to_json)
end
symptom() click to toggle source
# File lib/qrda-export/catI-r5/qrda1_r5.rb, line 244
def symptom
  JSON.parse(@qdmPatient.get_data_elements('symptom', nil).to_json)
end