Skip to main content

document_acuity

Collect what reading visual acuity from patients' documents counted in a run.

EHRDataResource._get_patient_resource reads each patient's acuity from their documents and keeps what that read counted on the EHRPatientResource, in memory only. _make_ehr_record adds those counts here as it builds the patient's row, so a run can report its totals once. Counts and masked shapes only: never document text, a display, a document ID or a patient ID.

Module​

Functions​

add_document_acuity​

def add_document_acuity(counts: Mapping[str, int], shapes: Mapping[str, int]) ‑> None:

Add counts and masked shapes to the run's totals.

Does nothing outside collecting_document_acuity.

Arguments

  • counts: How often each outcome happened, by outcome name.
  • shapes: How often each masked shape was seen.

collecting_document_acuity​

def collecting_document_acuity(    ,) ‑> Iterator[tuple[collections.Counter[str], collections.Counter[str]]]:

Collect what every add_document_acuity call inside the block adds.