NYSETL.Engines.E5.Processor (nys_etl v0.1.0) View Source

Run for each patient case extracted from CommCare.

  • case_id already present in our DB:
    • update it with changes from CommCare (but ignore any new lab results)
  • case_id does not exist, Person exists and can be matched by dob | last_name | first_name:
    • create an IndexCase and LabResult record(s)
  • case_id does not exist, Person cannot be matched:
    • create a Person, IndexCase and LabResult record(s)

Link to this section Summary

Link to this section Functions

Link to this function

case_has_lab_result?(arg1)

View Source
Link to this function

case_is_a_lab_result?(arg1)

View Source
Link to this function

create_index_case(case, person, county)

View Source
Link to this function

create_lab_results(index_case, lab_results, county)

View Source
Link to this function

create_person(patient_case)

View Source
Link to this function

extract_case_data(patient_case)

View Source
Link to this function

find_and_update_index_case(patient_case, county)

View Source
Link to this function

find_patient_key(case, lab_results)

View Source
Link to this function

find_person(patient_case, dob, patient_key)

View Source
Link to this function

patient_key_from_external_id(binary)

View Source
Link to this function

patient_key_from_lab_result(lab_results)

View Source
Link to this function

patient_key_from_name_and_id(binary)

View Source