tuva-health / tuva
Main repo including core data model, data marts, data quality tests, and terminology sets.
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing tuva-health/tuva in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewWhat is the Tuva Project? The Tuva Project is a collection of tools for transforming raw healthcare data into analytics-ready data. The main Tuva package (i.e. this repo) is a dbt package that includes the following components: • Input Layer • Claims Preprocessing • Core Data Model • Data Marts • Terminology & Value Sets Detailed documentation of this package and related tools, including data dictionaries, can be found at www.thetuvaproject.com. Agentic Workflow We are increasingly using agents to use and further develop this package. You can find context for agents in AGENTS.md. Contributing This is the recommended setup for development: • Python 3.10 or later • duckdb • dbt (dbt-core and dbt-duckdb) Connect duckdb and dbt via your profile.yml. Use tuva/integration_tests as your development project. Configure the dbt_project.yml in this folder to connect to duckdb. Run the package from integration_tests. This will: • Load dev data from seed files stored in the project • Build the entire pipeline in your duckdb instance From there we recommend iterating with your preferred coding agent using AGENTS.md. Hello and welcome! Thank you so much for taking the time to contribute to the Tuva Project. People like you are helping to build a community of healthcare data practitioners that shares knowledge and tools. Whether it’s fixing a bug, submitting an idea, updating the docs, or sharing your healthcare knowledge, you can make an impact! In this guide, you will get an overview of the contribution workflow, from how to contribute, setting up your development environment, testing, and creating a pull request. dbt Variables Tuva uses dbt variables ( ) to control which parts of the pipeline are enabled and to configure runtime behavior. Set these in your under the key. Data Source Enablement These variables control which input data types are active. Setting a group-level variable enables all marts in that group; individual mart variables override the group setting. | Variable | Default | Description | |----------|---------|-------------| | | | Enable all claims-based marts | | | | Enable all clinical-based marts | | | | Enable all marts (claims + clinical). Overridden by the more specific variables above. | Individual Mart Enablement Each mart can be independently enabled or disabled. When not set, these inherit from , , or . | Variable | Default | Description | |----------|---------|-------------| | | Inherits | Claims preprocessing (encounters, service categories, normalized input) | | | Inherits | Clinical Classifications Software Refined (CCSR) | | | Inherits | CMS Chronic Conditions | | | Inherits | Tuva Chronic Conditions | | | Inherits | CMS-HCC Risk Adjustment | | | Inherits | ED Classification | | | Inherits | Financial PMPM | | | | HCC Suspecting | | | | HCC Recapture | | | Inherits | Quality Measures (HEDIS/CQM) | | | Inherits | Readmissions | | | | FHIR Preprocessing | | | Inherits | AHRQ Prevention Quality Indicators | | | Inherits | Provider Attribution | | | Inherits | Semantic Layer | | | Inherits | Brand/Generic pharmacy analysis | Runtime Configuration | Variable | Default | Description | |----------|---------|-------------| | | Current UTC timestamp | Populates the column in all output models. Automatically set to the dbt run start time. | | | Current year | The CMS-HCC payment year for risk score calculation. | | | Current year-end | End date of the quality measures reporting period. | | | | CCSR record type: for inpatient, for outpatient. | | | | CCSR diagnosis mapping version. | | | | CCSR procedure mapping version. | Infrastructure & Schema | Variable | Default | Description | |----------|---------|-------------| | | | When set, all Tuva output schemas are prefixed with this value (e.g., ). | | | | S3 bucket for seed data. Override to use a private bucket. | | | | Run DQI data quality tests on the input layer. | | | | Build legacy (pre-DQI) data quality models. | | | | Enable the normalize engine for custom code mapping. Set to to list unmapped codes, or to also integrate custom mappings. | | | None | Reference date for provider attribution calculations. |