Healthcare
Claims and value-based care data with Tuva and dbt: CMS, CCLF, HCC, risk adjustment and risk contracts.
Healthcare
Where it connects
- Data pipelines
- HL7 v2 ADT feeds: from pipe-delimited events to an encounters table
- Migrating from SFTP to a roster API: dual-run and reconciliation
- Why flat-file rosters break: CSV over SFTP in healthcare data pipelines
- Connecting Clinical and Operational Data to Tuva with dbt
- Tuva column extensions: carry a custom column from eligibility to core
- The limit_zero macro bug: how dbt resolves macro names across packages
- CCLF is not eligibility: where dual status gets lost in Medicare ACO data
- Tuva's encounter grouper only groups claims. Here's what happens to your ADT encounters
- What's new in cms_hcc v1.0.0: the payer grain fix nobody's docs warned you about
- From raw claims to RAF: what the data pipeline actually looks like
- HCC suspecting explained from a data engineering perspective
- Running the Tuva Project on DuckDB — what breaks and how to fix it
- What 167k synthetic Medicare claims taught me about US healthcare data
- What is the Tuva Project and why should data engineers care
- Data modeling
- Building a member-month churn panel in dbt without leaking the future
- Modeling a patient roster as a FHIR Group (Da Vinci ATR)
- Connecting Clinical and Operational Data to Tuva with dbt
- Tuva column extensions: carry a custom column from eligibility to core
- The limit_zero macro bug: how dbt resolves macro names across packages
- CCLF is not eligibility: where dual status gets lost in Medicare ACO data
- Tuva's encounter grouper only groups claims. Here's what happens to your ADT encounters
- What's new in cms_hcc v1.0.0: the payer grain fix nobody's docs warned you about
- Analytics & BI
- Building a member-month churn panel in dbt without leaking the future
- Synthea vs SynPUF: picking synthetic healthcare data for pipeline tests
- Migrating from SFTP to a roster API: dual-run and reconciliation
- The limit_zero macro bug: how dbt resolves macro names across packages
- Building a data quality dashboard on top of Tuva's DQI mart
- Feature engineering from claims data for a Random Forest classifier
- Predicting patient risk with scikit-learn on top of HCC suspecting data
- Running the Tuva Project on DuckDB — what breaks and how to fix it
- Programming
- De-identifying FHIR data: HIPAA Safe Harbor, limited data sets and leaks
- Synthea vs SynPUF: picking synthetic healthcare data for pipeline tests
- HL7 v2 ADT feeds: from pipe-delimited events to an encounters table
- Roster change notifications with FHIR Subscriptions (R4 backport)
- From SSH keys to SMART Backend Services: auth for system-to-system FHIR
- Bulk export and async jobs: serving large rosters with $davinci-data-export
- From full replace to deltas: $member-add and $member-remove in FastAPI
- Modeling a patient roster as a FHIR Group (Da Vinci ATR)
- API integration
- Cloud & infra
All posts (26)
-
Building a member-month churn panel in dbt without leaking the future
Turn eligibility, medical and pharmacy claims into a leak-free member-month training table for disenrollment prediction, with dbt tests and Snowflake ML.
-
De-identifying FHIR data: HIPAA Safe Harbor, limited data sets and leaks
Dropping name and SSN is not de-identification. Apply HIPAA Safe Harbor to FHIR NDJSON with an allowlist, surrogate keys and a leak check, in Python.
-
Synthea vs SynPUF: picking synthetic healthcare data for pipeline tests
Synthea simulates coherent patients and exports FHIR; SynPUF is perturbed Medicare claims. When to use each, and how to turn Synthea into a messy roster.
-
HL7 v2 ADT feeds: from pipe-delimited events to an encounters table
Parse HL7 v2 ADT messages in plain Python, ACK them over MLLP, and fold admits, discharges and cancellations into one row per hospital visit.
-
Migrating from SFTP to a roster API: dual-run and reconciliation
Cut over from CSV-over-SFTP to a FHIR roster API without a big bang: phased dual-run, DuckDB reconciliation of CSV vs NDJSON, and exit criteria.
-
Roster change notifications with FHIR Subscriptions (R4 backport)
Stop polling for new roster files. Use the ATR list-change topic and FHIR R4 Subscriptions backport: rest-hook, id-only payloads, a FastAPI receiver.
-
From SSH keys to SMART Backend Services: auth for system-to-system FHIR
Replace long-lived SFTP keys with SMART Backend Services: JWKS, signed JWT assertions, short-lived scoped tokens. Client and FastAPI server in Python.
-
Bulk export and async jobs: serving large rosters with $davinci-data-export
Large rosters don't fit in one response. Implement the FHIR Bulk Data async pattern — kick-off, polling, NDJSON manifest — in FastAPI and httpx.
-
From full replace to deltas: $member-add and $member-remove in FastAPI
Replace last-file-wins rosters with explicit FHIR member-add/remove operations, list status gating, inactive flags and versioned Groups in FastAPI.
-
Modeling a patient roster as a FHIR Group (Da Vinci ATR)
Map a roster CSV to FHIR Group, Patient and Coverage using the Da Vinci ATR profile — with a Python converter and namespaced identifiers.
-
Why flat-file rosters break: CSV over SFTP in healthcare data pipelines
CSV rosters over SFTP still run value-based care. Here are the failure modes: full replace, fuzzy identity, no acknowledgements, no deltas.
-
Connecting Clinical and Operational Data to Tuva with dbt
How to map EHR and operational sources into the Tuva Input Layer with dbt, and where to join what Tuva does not model.
-
Tuva column extensions: carry a custom column from eligibility to core
How to carry a custom column like contract_type from Tuva's eligibility input layer to core__eligibility using x_ extension columns, without forking.
-
The limit_zero macro bug: how dbt resolves macro names across packages
· UpdatedWhy a Tuva demo project failed with 'limit_zero' is undefined on DuckDB: bare macro names don't cross packages, dispatch is a second lookup, and the fix.
-
CCLF is not eligibility: where dual status gets lost in Medicare ACO data
How a coalesce and a latest-month rule in Tuva's CCLF + ALR connectors can turn full-dual Medicare beneficiaries into non-duals in CMS-HCC.
-
Tuva's encounter grouper only groups claims. Here's what happens to your ADT encounters
Tuva's encounter grouper only runs on claims. Clinical ADT/EHR encounters are standardized and stacked in core.encounter, never matched or deduped.
-
Full risk vs non-risk contracts: not the same axis as risk adjustment
Full risk and non-risk describe who bears financial risk in a healthcare contract. Risk adjustment describes how much gets paid. They share a word, not a mechanism.
-
What's new in cms_hcc v1.0.0: the payer grain fix nobody's docs warned you about
cms_hcc v1.0.0 fixes a silent grain mismatch between int_members and int_disease_factors that dropped every disease factor for members who switched payers mid-year.
-
Building a data quality dashboard on top of Tuva's DQI mart
Tuva's DQI mart produces fill rates and anomaly flags for every input field in a claims dataset. Here's how to surface that in a Streamlit dashboard with meaningful visualizations.
-
Feature engineering from claims data for a Random Forest classifier
Healthcare claims have dozens of potential features for patient risk models. Here's how to select and validate features from a Tuva Project dataset for a Random Forest classifier predicting HCC gaps.
-
From raw claims to RAF: what the data pipeline actually looks like
The path from a raw Medicare claim file to a patient's Risk Adjustment Factor score involves five distinct transformation layers. This is what each layer does and where the dbt models fit in.
-
HCC suspecting explained from a data engineering perspective
HCC suspecting is about identifying conditions documented in prior years that haven't appeared in claims yet this year. This is what the data pipeline looks like and what the Tuva mart actually produces.
-
Predicting patient risk with scikit-learn on top of HCC suspecting data
A Random Forest classifier on Tuva's hcc_suspecting__summary table, using age, sex, paid amount, and condition count to predict which patients have above-median HCC gaps.
-
Running the Tuva Project on DuckDB — what breaks and how to fix it
Tuva 0.17.2 on DuckDB 1.10 with dbt 1.11 produces three distinct failure modes. This is what actually broke and how each one was fixed.
-
What 167k synthetic Medicare claims taught me about US healthcare data
Running the Tuva Project on 167k synthetic Medicare claims reveals the structural complexity of US healthcare data — before you've dealt with a single real data quality issue.
-
What is the Tuva Project and why should data engineers care
The Tuva Project is an open-source dbt package that transforms raw healthcare claims into analytics-ready mart tables covering HEDIS, HCC, CCSR, readmissions, and data quality. This is what it actually does and why it matters.