NYSETL.Engines.E4.CaseTransferChain (nys_etl v0.1.0) View Source

Uses Commcare.Api to understand transfer chains and creates index case records to reflect the data in CommCare.

Link to this section Summary

Link to this section Functions

Link to this function

contains_county_domain?(chain, search_county_domain)

View Source
Link to this function

fetch_case(case_identifier)

View Source

Specs

fetch_case(NYSETL.Commcare.CaseIdentifier.t()) ::
  {:error, any()}
  | {:more_than_one, [...]}
  | {:no_case_matches, {binary(), any()}}
  | {:ok, any()}
Link to this function

follow_transfers(case_identifier, job, transfer_chain \\ [])

View Source

Specs

follow_transfers(NYSETL.Commcare.CaseIdentifier.t(), Oban.Job.t(), [
  NYSETL.Engines.E4.PatientCaseData.t()
]) :: [
  NYSETL.Engines.E4.PatientCaseData.t() | :cycle_detected | :not_found | any()
]
Link to this function

get_patient_case_data(case_identifier, job)

View Source
Link to this function

get_transfer_destination_cases(transfer_source_case_id)

View Source
Link to this function

get_transfer_destination_county(patient_case_data, current_domain, transfer_chain)

View Source

Specs

resolve([any()]) :: {any(), :no_transfer | :transfer}
Link to this function

try_transfer_source_case_id_match(county_domain, transfer_source_case_id)

View Source