Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update expected_results_calculator.rb #212

Open
wants to merge 1 commit into
base: v6_22
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions lib/cypress/expected_results_calculator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,27 @@ def initialize(patients, correlation_id, effective_date, start_date, sub_id = ni
def add_patient_to_sup_map(ps_map, patient)
patient_id = patient.id.to_s
ps_map[patient_id] = {}
ps_map[patient_id]['SEX'] = patient.qdmPatient.get_data_elements('patient_characteristic', 'gender')[0].dataElementCodes[0].code
ps_map[patient_id]['RACE'] = patient.qdmPatient.get_data_elements('patient_characteristic', 'race')[0].dataElementCodes[0].code
ps_map[patient_id]['ETHNICITY'] = patient.qdmPatient.get_data_elements('patient_characteristic', 'ethnicity')[0].dataElementCodes[0].code
ps_map[patient_id]['PAYER'] = patient.qdmPatient.get_data_elements('patient_characteristic', 'payer')[0].dataElementCodes[0].code

gender = patient.qdmPatient.get_data_elements('patient_characteristic', 'gender')[0]
if (gender != nil)
ps_map[patient_id]['SEX'] = gender.dataElementCodes[0].code
end

race = patient.qdmPatient.get_data_elements('patient_characteristic', 'race')[0]
if (race != nil)
ps_map[patient_id]['RACE'] = race.dataElementCodes[0].code
end

ethnicity = patient.qdmPatient.get_data_elements('patient_characteristic', 'ethnicity')[0]
if (ethnicity != nil)
ps_map[patient_id]['ETHNICITY'] = ethnicity.dataElementCodes[0].code
end

payer = patient.qdmPatient.get_data_elements('patient_characteristic', 'payer')[0]
if (payer != nil)
ps_map[patient_id]['PAYER'] = payer.dataElementCodes[0].code
end

end

def prepopulate_measure_result_hash(measure)
Expand Down