Skip to main content

v2

scan_eligibility record, v2 — canonical aliases.

v2 adds the nullable score column to v1 — see schema.py.

Module​

Submodules​

Functions​

downgrade​

def downgrade(op: Operations) ‑> None:

Migrate scan_eligibility v2 -> v1 (see the module docstring).

upgrade​

def upgrade(op: Operations) ‑> None:

Migrate scan_eligibility v1 -> v2 (see the module docstring).

Classes​

ORM​

class ORM(**kwargs):

SQLAlchemy model for the scan_eligibility 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.

Variables​

  • bitfount_patient_id : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
  • evidence_json : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
  • file_path : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
  • file_path_digest : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
  • laterality : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
  • processed_at : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
  • project_id : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
  • run_id : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
  • scan_id : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
  • score : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
  • status : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
  • study_date : 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 per-scan eligibility record (one per scan, trial).

Extends EligibilityEvidenceRecord with the scan-specific columns; see the base for the shared fields (task_hash, project_id, bitfount_patient_id, status, evidence, processed_at, run_id, tags).

Attributes

  • scan_id: The scan identifier (part of the composite key).
  • file_path: Original scan-file path (captured for later file serving).
  • study_date: The scan's study date, if known.
  • laterality: The scanned eye, if known.
  • score: This scan's own criteria_tree root score, or None when not recorded. A ranking signal only, entirely separate from status.

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 file_path : str
  • static laterality : str | None
  • static model_config
  • static scan_id : str
  • static score : float | None
  • static study_date : str | None