Skip to main content

types

Shared types and constants for steps.

The canonical home for the domain types (dataclasses) and column-name constants used across the steps package. Split by kind of thing, so a name is locatable from its module:

  • operators — the comparison vocabulary a filter accepts.
  • clinical_defaults — default clinical bounds and thresholds.
  • scan_columns, dicom_columns, ehr_columns, eligibility_columns, identifiers — column names, grouped by where the column comes from.
  • enrichment — code-system and laterality-code constants for externally supplied patient data.
  • segmentation — the biomarker label universes, display names and colours.
  • mask_groups — a named group of segmentation labels and how its mask is combined.
  • layers — the retinal layers a thickness is measured between.
  • field_specs — building the catalog of matchable fields a step advertises.
  • metrics — the calculation steps' output dataclasses.
  • pdf_report, csv_report — per-report column selection and constants.

Nothing is re-exported here on purpose: import from the submodule that owns the name, so the import line says where the name lives.

The legacy location bitfount.federated.algorithms.ophthalmology. ophth_algo_types holds its own parallel definitions of the same domain types (it does not import from here); the two are kept in step by design, with one intentional divergence: GAMetrics.to_record here maps an absent segmentation-area label to np.nan (resolving to UNKNOWN in criteria matching), whereas the legacy copy maps it to 0.0. New code should depend on this package, not the legacy module.

Module​

Submodules​