model
Pydantic record for the ehr_data cache table (v1).
Classes
EHRDataRecord
class EHRDataRecord(**data: Any):Stored EHR data record for a single patient.
The background flow extracts patient demographic and code data from the
EHR datasource and stores it here. The interactive flow applies code
filters against the stored diagnosis_codes, condition_codes, and
procedure_codes lists to determine EHR eligibility.
file_ids_json holds all imaging file IDs associated with this patient
in the batch. Multiple files for the same patient are accumulated into the
list before the row is written, so no file ID is ever silently overwritten.
It is None for EHR-only tasks that have no associated imaging files.
error is non-None when EHR extraction failed for this patient.
run_id is the UUID of the run that produced this record (for provenance).
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Variables
- static
bitfount_patient_id : str
- static
cell_numbers : list[str]
- static
condition_codes_json : list[dict[str, str | None | datetime.datetime | dict[str, str]]] | None
- static
country : str | None
- static
date_of_birth : str | datetime.date | None
- static
ehr_patient_id : str
- static
emails : list[str]
- static
error : str | None
- static
family_name : str | None
- static
file_ids_json : list[str] | None
- static
gender : str | None
- static
given_name : str | None
- static
home_numbers : list[str]
- static
last_accessed_at : datetime.datetime | None
- static
mailing_address : str | None
- static
medical_record_number : list[str] | None
- static
model_config
- static
patient_id : str | None
- static
patient_metadata_json : dict[str, typing.Any] | None
- static
postal_code : str | None
- static
procedure_codes_json : list[dict[str, str | None | datetime.datetime | dict[str, str]]] | None
- static
processed_at : datetime.datetime
- static
row_number : int | None
- static
run_id : str | None
- static
tags : dict[str, typing.Any] | None
- static
task_hash : str