v1
ehr_fetch_failures record, v1 — canonical aliases.
Consumers and the record registry import from here and never touch the inner
module names, mirroring flow_specs/v1/__init__.py.
Module
Submodules
- bitfount.cache.types.ehr_fetch_failures.v1.migrations - No inbound migration — this is the base version.
- bitfount.cache.types.ehr_fetch_failures.v1.model - Pydantic record for the
ehr_fetch_failurescache table (v1). - bitfount.cache.types.ehr_fetch_failures.v1.schema - SQLAlchemy ORM for the
ehr_fetch_failurescache table (v1). - bitfount.cache.types.ehr_fetch_failures.v1.store - Patients whose latest EHR refetch failed (v1).
Classes
Record
class Record(**data: Any):One patient whose latest EHR refetch failed.
Attributes
task_hash: The task partition the refetch was for.bitfount_patient_id: The patient whose refetch failed.failed_at: When the failure was recorded, timezone-aware UTC.reason: Why the fetch failed.tags: Arbitrary flat metadata.
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
failed_at : datetime.datetime
- static
model_config
- static
reason : str
- static
tags : dict[str, typing.Any] | None
- static
task_hash : str
ORM
class ORM(**kwargs):SQLAlchemy model for the ehr_fetch_failures cache table.
One row per (task_hash, bitfount_patient_id) whose latest refetch failed
while a stored ehr_data row kept its older data. A later successful write
for the patient removes the row.
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 : sqlalchemy.orm.base.Mapped[str]
-
failed_at : sqlalchemy.orm.base.Mapped[str]
-
reason : sqlalchemy.orm.base.Mapped[str]
-
tags : sqlalchemy.orm.base.Mapped[dict[str, typing.Any] | None]
-
task_hash : sqlalchemy.orm.base.Mapped[str]