build_context
What the filter builders of every domain share, besides the config.
Classes
FilterBuildContext
class FilterBuildContext( reference_date: date, catalog: dict[str, FieldSpec], column_provenance: Mapping[str, CriterionProvenance],):The inputs that build_eligibility_filters gives to every filter builder.
Attributes
reference_date: The date that dated criteria count back from: today, in UTC. EHR dates are stored as UTC calendar dates, so a UTC reference does not shift by a day on a non-UTC server, wheredate.today()is the local calendar date. One date for every filter of a run.catalog: The field catalog, which resolves a column criterion's column and grain.column_provenance: The provenance of each source column, keyed by its normalised name (seenormalize_column_name).
Variables
-
catalog : dict[str, FieldSpec]
-
column_provenance : Mapping[str, CriterionProvenance]
-
reference_date : date
Static methods
create
def create( catalog: dict[str, FieldSpec] | None, column_provenance: Mapping[str, CriterionProvenance] | None, reference_date: date | None = None,):Build the context for one run.
Arguments
catalog: The field catalog, orNonefor an empty one.column_provenance: The provenance of each source column, orNone.reference_date: The date every dated criterion of the run counts from, orNonefor today in UTC.
Returns The context.