NYSETL.Engines.E2.Processor (nys_etl v0.1.0) View Source
For a TestResult record, decide the following
- Find or create a Person record, based on :patient_key or unique (dob/last_name/first_name)
- Create or update one more IndexCase records for this county
- Create or update a LabResult record for the IndexCase
Edge cases
- Pre-existing data in CommCare may not be well deduplicated for people. If we have deduped a person, but there are multiple IndexCase records for that person in this county, creation of new LabResult records is duplicated across all IndexCase records.
Link to this section Summary
Functions
Returns a tuple where the first element is a map of additions and the second element is a map of updated values.
Link to this section Functions
Specs
Returns a tuple where the first element is a map of additions and the second element is a map of updated values.
Examples
iex> a = %{a: 1, b: 2, z: 26}
iex> b = %{a: 1, b: 3, y: 25}
iex> diff(a, b)
{%{y: 25}, %{b: 3}}
Link to this function
process( test_result, ignore_before \\ Application.get_env(:nys_etl, :eclrs_ignore_before_timestamp) )
View Source
Link to this function