Skip to content

Transforms flattened data from Metriport's FHIR API into Tuva

Notifications You must be signed in to change notification settings

metriport/metriport_connector

 
 

Repository files navigation

Apache License dbt logo and version

Metriport Connector

🔗 Docs

Check out our docs to learn about the Tuva Project and how you can use it on your healthcare data.

🧰 What does this repo do?

The Metriport Connector is a dbt project that maps flattened Metriport FHIR data to the Tuva input layer, and then builds all of the available clinical Tuva Data Marts. You can flatten Metriport FHIR data into the tabular format this project expects using the FHIR_Inferno utility and the provided Metriport configuration files. See our guide for a more detailed step by step walkthrough of that process.

🔌 Database Support

  • BigQuery
  • Redshift
  • Snowflake

✅ Quickstart Guide

Step 1: Pre-requisites

You must have Metriport data in FHIR format that has been flattened and loaded to your warehouse. See the FHIR_inferno repo including the Metriport configurations, and the FHIR preprocessing guide. You must have dbt installed and a profile set up, or you must have a connection to your warehouse set up in dbt cloud.

Step 2: Configure Input Database and Schema

Next you need to tell dbt where your source data is located.

  • In the dbt_project.yml file, specify these variables: input_database, input_schema, and profile.

For your tests, also set up the following:

  • In the integration_tests/profiles/<your-preferred-database>/profile.yml, see the environment variables required for the successful connection.
  • Point dbt to the desired profile by setting up the env var, like so: export DBT_PROFILES_DIR=full/path/to/integration_tests/profiles/snowflake



Step 3: dbt deps && dbt debug

Execute the command dbt deps to install The Tuva Project. By default, this connector will use any version of the Tuva Project after 0.5.0 which is when clinical support was released.

Execute the command dbt debug to ensure your data warehouse connection is successful.

Step 4: Run

Now you're ready to run the connector and the Tuva Project. For example, using dbt CLI you would cd to the project root folder in the command line and execute dbt build. You're now ready to do clinical data analytics! Check out the data mart in our docs to learn what tables you should query.

🙋🏻‍♀️ How do I contribute?

Have an opinion on the mappings? Notice any bugs when installing and running the project? If so, we highly encourage and welcome feedback! Feel free to submit an issue or drop a message in Slack.

🤝 Join our community!

Join our growing community of healthcare data practitioners on Slack!

About

Transforms flattened data from Metriport's FHIR API into Tuva

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published