Skip to main content

model

Pydantic record for the patients cache table (v1).

Classes

PatientRecord

class PatientRecord(**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, or None for 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 run_id : str | None
  • static task_hash : str | None