RepositoryPythonUSUnited States
tuva-health

tuva-health/tuva-core

Main repo including core data model, data marts, data quality tests, and terminology sets.

333stars
144forks
12issues
3views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: data-governance

#1 Repository of the week

1
TINIX TRENDING·Topic: dbt-packages

#1 Repository of the week

1
TINIX TRENDING·Topic: analytics-engineering

#1 Repository of the week

Apache License dbt logo and version

Tuva Project Overview

What is the Tuva Project?

The Tuva Project is a dbt package for transforming raw healthcare data into analytics-ready data. The package includes:

  • Input Layer
  • Claims Preprocessing
  • Core Data Model
  • Data Marts
  • Terminology and Value Sets

Docs

The docs source for the getting-started runbook lives in docs/docs/getting-started.md.

Local Development

Recommended local setup:

  • Python 3.10 or later
  • DuckDB
  • dbt-core and dbt-duckdb

Use integration_tests as your development project. Configure a DuckDB connection in profiles.yml, then run from the repo root:

./scripts/dbt-local deps
./scripts/dbt-local build --full-refresh

dbt seed and dbt build load package-owned synthetic data into synthetic_data from versioned S3 artifacts. dbt run assumes those relations already exist, so on a fresh database you should run seed or build first.

Once the synthetic data is loaded, iterate with:

./scripts/dbt-local run

Agentic Workflow

If you are using coding agents in this repo, the local workflow guidance lives in AGENTS.md.

dbt Variables

Set Tuva vars under the vars: key in your dbt_project.yml. Use dbt selectors to run individual marts; the vars below control broad data domains, shared runtime behavior, and the synthetic bootstrap flow used by integration_tests.

Broad Enablement

VariableRoot Defaultintegration_tests DefaultDescription
claims_enabledfalsetrueEnable claims-based models.
clinical_enabledfalsetrueEnable clinical-based models.
provider_attribution_enabledfalsetrueEnable provider attribution models. Claims input must also be enabled.
semantic_layer_enabledfalsetrueEnable semantic-layer models. Claims-dependent semantic models also require claims_enabled.
fhir_preprocessing_enabledfalsefalseEnable FHIR preprocessing models.

Shared Runtime Configuration

VariableDefaultDescription
tuva_last_runCurrent UTC timestampPopulates the tuva_last_run column in output models.
tuva_schema_prefixunsetPrefixes output schemas, for example myprefix_core.
cms_hcc_payment_yearCurrent yearCMS-HCC payment year used for risk scoring.
quality_measures_period_endCurrent year-endOptional reporting-period end date for quality measures.
record_type"ip"CCSR record type: "ip" for inpatient or "op" for outpatient.
dxccsr_version"2023.1"CCSR diagnosis mapping version.
prccsr_version"2023.1"CCSR procedure mapping version.
provider_attribution_as_of_dateunsetOptional YYYY-MM-DD override for provider attribution current-state calculations.

Seed And Feature Configuration

VariableDefaultDescription
custom_bucket_name"tuva-public-resources"Default bucket for versioned Tuva seed artifacts.
tuva_seed_version"1.0.0"Default versioned seed folder used when no per-database override is provided. Leading v is optional.
tuva_seed_versions{concept_library: "1.0.1", reference_data: "1.0.0", terminology: "1.1.1", value_sets: "1.0.0", provider_data: "1.0.0", synthetic_data: "1.1.0"}Optional per-database version overrides keyed by concept_library, reference_data, terminology, value_sets, provider_data, or synthetic_data.
tuva_seed_buckets{}Optional per-database bucket overrides for concept_library, reference_data, terminology, value_sets, provider_data, or synthetic_data.
synthetic_data_sizesmall in integration_testsSelects the small or large synthetic input payload when running integration_tests.
enable_input_layer_testingtrueRuns DQI checks on the input layer.
enable_legacy_data_qualityfalseBuilds the legacy pre-DQI data-quality models.
enable_normalize_enginefalseSet to unmapped to surface unmapped code models, or true to also use custom mappings.

See the maintained docs reference at thetuvaproject.com/dbt-variables for examples and more detail.

Publishing Versioned Seed Artifacts

Use scripts/publish-dolthub-seeds to publish the latest public DoltHub databases to versioned S3 folders.

Required inputs:

  • --version v1.0.0
  • AWS CLI credentials via AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY

Optional inputs:

  • --bucket reference_data=my-bucket
  • --bucket value_sets=my-other-bucket/prefix
  • --database terminology
  • --download-only

The script publishes to the normalized layout:

  • s3://<bucket>/<database-folder>/<version>/<table>.csv.gz

Mirroring Seed Releases To GCS And Azure

Use scripts/mirror-seed-release after an S3 publish to copy the same versioned release to GCS and Azure Blob Storage.

Required access:

  • AWS CLI access to read s3://tuva-public-resources
  • gsutil access to write gs://tuva-public-resources
  • Azure Storage Blob Data Contributor or equivalent on storage account tuvapublicresources, container tuva-public-resources

Example:

scripts/mirror-seed-release --version v1.0.0

The script mirrors:

  • s3://tuva-public-resources/<database-folder>/<version>/...
  • gs://tuva-public-resources/<database-folder>/<version>/...
  • https://tuvapublicresources.blob.core.windows.net/tuva-public-resources/<database-folder>/<version>/...

Current published defaults:

  • concept-library uses 1.0.1
  • terminology uses 1.1.1
  • reference-data, value-sets, provider-data, and synthetic-data use 1.0.0

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
elementary-data/dbt-data-reliability

This dbt package captures metadata, artifacts, and test results so you can detect anomalies, monitor data quality, and build metadata tables. It powers Elementary OSS and feeds the wider context layer used by Elementary Cloud’s full Data & AI Control Plane.

530
Nov 27, 2026
RepositoryHTML
elementary-data/elementary

The dbt-native data observability solution for data & analytics engineers. Monitor your data pipelines in minutes. Available as self-hosted or cloud service with premium features.

2.4k
Dec 2, 2026
RepositoryPython
zoltanctoth/complete-dbt-bootcamp-zero-to-hero

Supplementary Materials for the The Complete dbt (Data Build Tool) Bootcamp Udemy course

849
Oct 5, 2026
RepositoryPython
unytics/bigfunctions

Supercharge BigQuery with BigFunctions

761
Aug 23, 2026
RepositoryPython
vmware-archive/versatile-data-kit

⛔ [ARCHIVING ON 2026-11-01] One framework to develop, deploy and operate data workflows with Python and SQL.

489
Sep 1, 2026
RepositoryPython
Fszta/parrant

A change-impact decision engine for dbt. Column-level lineage plus a policy-gated verdict on every PR — what breaks, what to rebuild — computed offline from your dbt artifacts. No warehouse, no dbt run. Powered by SQLGlot.

82
Oct 28, 2026
RepositoryPython
pathwaycom/pathway

Python ETL framework for stream processing, real-time analytics, LLM pipelines, and RAG.

62.0k
Nov 16, 2026
RepositoryTypeScript
lightdash/lightdash

Agentic BI. Analytics at the speed of code ⚡️

6.3k
Nov 30, 2026
RepositoryGo
raystack/optimus

Optimus is an easy-to-use, reliable, and performant workflow orchestrator for data transformation, data modeling, pipelines, and data quality management.

769
Jun 8, 2024