Skip to main content

keys

Identity of an EHR patient listing and of each snapshot it produces.

A listing is keyed on the EHR system alone, never on a datasource: a site is one EHR system, so two datasources on one pod read the same listing. Each run of the listing writes its own snapshot partition, so a listing in progress, or one cut short, never changes the rows a reader of the previous snapshot sees.

Module​

Functions​

ehr_listing_key​

def ehr_listing_key(ehr_config: EHRConfig) ‑> str:

Return the key of the listing of the EHR ehr_config points at.

Used as the task_hash of the listing's runs rows and of its grant.

Arguments

  • ehr_config: The pod's EHR configuration.

Returns The listing key.

snapshot_key​

def snapshot_key(listing_key: str, run_id: str) ‑> str:

Return the ehr_patient_ids partition one listing run writes to.

Arguments

  • listing_key: The listing the run belongs to.
  • run_id: The run's runs row id.

Returns The partition key.