v1
patients record, v1 — canonical aliases.
Module
Submodules
- bitfount.cache.types.patients.v1.migrations - No inbound migration — this is the base version.
- bitfount.cache.types.patients.v1.model - Pydantic record for the
patientscache table (v1). - bitfount.cache.types.patients.v1.schema - SQLAlchemy ORM for the
patientsidentity cache table (v1). - bitfount.cache.types.patients.v1.store - Store for the
patientsidentity table (v1).
Classes
ORM
class ORM(**kwargs):SQLAlchemy model for the patients identity table.
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and
values in kwargs.
Only keys that are present as attributes of the instance's class are allowed. These could be, for example, any mapped columns or relationships.
Ancestors
Variables
-
bitfount_patient_id : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
-
ehr_patient_id : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
-
mrns : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
-
name : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
-
processed_at : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
-
run_id : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
-
tags : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
-
task_hash : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
Record
class Record(**data: Any):Stored patient identity record (one per Bitfount patient ID).
Attributes
bitfount_patient_id: The Bitfount patient ID (primary key).name: Patient display name (always present).ehr_patient_id: EHR patient ID, orNonefor non-EHR flows.processed_at: When this row was written.task_hash: Provenance — the run's task hash.run_id: Provenance — the run ID.tags: Arbitrary flat metadata.mrns: The patient's medical record number(s), if known.
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
ehr_patient_id : str | None
- static
model_config
- static
mrns : list[str] | None
- static
name : str
- static
processed_at : datetime.datetime
- static
run_id : str | None
- static
tags : dict[str, typing.Any] | None
- static
task_hash : str | None