FHIR Preprocessing
Overview
FHIR Preprocessing transforms Tuva Core outputs into relational tables aligned with FHIR resources for downstream export and resource generation. These tables are not serialized FHIR JSON bundles. The package is intentionally seedless.
How to run the mart
FHIR Preprocessing is distributed separately from Tuva Core. The root project owns both Core and this package. For Tuva 1.0, install their published Git tags together:
packages:
- git: "https://github.com/tuva-health/tuva-core.git"
revision: "v1.0.0"
- git: "https://github.com/tuva-health/fhir_preprocessing.git"
revision: "v1.0.0"
Run dbt deps after changing packages.yml.
Installing the package makes its models available to dbt; the standalone package does not define an enablement variable. Enable the claims and/or clinical domains your connector supplies. To build FHIR Preprocessing with its Core and connector ancestors:
dbt build --select +package:fhir_preprocessing --indirect-selection cautious
The package produces resource-aligned tables and supporting child tables. Inspect the released model definitions for each table's grain before constructing FHIR resources.
Open eligibility spans have a null enrollment_end_date. FHIR Coverage keeps
the period end null. Medical ExplanationOfBenefit records match Coverage using
claim_start_date, while pharmacy records use paid_date; either date can link
to the open Coverage record when it is on or after the enrollment start.
Tuva 1.0 removes the mutable enrollment end date from eligibility_id. The
first build with this contract changes existing FHIR Coverage resource IDs and
the corresponding ExplanationOfBenefit coverage references. Fully refresh the
FHIR Preprocessing outputs; subsequent updates to an enrollment end date keep
the same eligibility and Coverage identity.