-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add original_reason_entitlement_code to Eligibility (#55)
* Add new field * Replace custom string macro * Add underscore to schema name for models created by the connector * Add claims enabled var and bump project version * Update package version to latest minor release * Fix data types causing errors * Materialize final tables to prevent issues coming up during CI testing * Add tuva_schema_prefix variable to Github actions to help prevent overlap with other runners from other repos
- Loading branch information
1 parent
594c9ca
commit 419dbb7
Showing
17 changed files
with
396 additions
and
433 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ jobs: | |
- name: dbt-build | ||
uses: mwhitaker/[email protected] | ||
with: | ||
dbt_command: 'dbt build --full-refresh --profiles-dir ./integration_tests/profiles/bigquery --vars {"tuva_database":"dev-ci-testing","input_database":"dev-ci-testing","input_schema":"cclf"}' | ||
dbt_command: 'dbt build --full-refresh --profiles-dir ./integration_tests/profiles/bigquery --vars {"tuva_database":"dev-ci-testing","input_database":"dev-ci-testing","input_schema":"cclf","tuva_schema_prefix":"cclf"}' | ||
|
||
|
||
- name: Get the result | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ jobs: | |
- name: dbt-build | ||
uses: mwhitaker/[email protected] | ||
with: | ||
dbt_command: 'dbt build --full-refresh --profiles-dir ./integration_tests/profiles/redshift --vars {"tuva_database":"dev_ci_testing","input_database":"dev_ci_testing","input_schema":"cclf"}' | ||
dbt_command: 'dbt build --full-refresh --profiles-dir ./integration_tests/profiles/redshift --vars {"tuva_database":"dev_ci_testing","input_database":"dev_ci_testing","input_schema":"cclf","tuva_schema_prefix":"cclf"}' | ||
|
||
- name: Get the result | ||
if: ${{ always() }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ jobs: | |
- name: dbt-build | ||
uses: mwhitaker/[email protected] | ||
with: | ||
dbt_command: 'dbt build --full-refresh --profiles-dir ./integration_tests/profiles/snowflake --vars {"tuva_database":"dev_ci_testing","input_database":"dev_ci_testing","input_schema":"cclf"}' | ||
dbt_command: 'dbt build --full-refresh --profiles-dir ./integration_tests/profiles/snowflake --vars {"tuva_database":"dev_ci_testing","input_database":"dev_ci_testing","input_schema":"cclf","tuva_schema_prefix":"cclf"}' | ||
|
||
- name: Get the result | ||
if: ${{ always() }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ jobs: | |
- name: dbt-build | ||
uses: mwhitaker/[email protected] | ||
with: | ||
dbt_command: 'dbt build --full-refresh --profiles-dir ./integration_tests/profiles/bigquery --vars {"tuva_database":"dev-ci-testing","input_database":"dev-ci-testing","input_schema":"cclf"}' | ||
dbt_command: 'dbt build --full-refresh --profiles-dir ./integration_tests/profiles/bigquery --vars {"tuva_database":"dev-ci-testing","input_database":"dev-ci-testing","input_schema":"cclf","tuva_schema_prefix":"cclf"}' | ||
|
||
|
||
- name: Get the result | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ jobs: | |
- name: dbt-build | ||
uses: mwhitaker/[email protected] | ||
with: | ||
dbt_command: 'dbt build --full-refresh --profiles-dir ./integration_tests/profiles/redshift --vars {"tuva_database":"dev_ci_testing","input_database":"dev_ci_testing","input_schema":"cclf"}' | ||
dbt_command: 'dbt build --full-refresh --profiles-dir ./integration_tests/profiles/redshift --vars {"tuva_database":"dev_ci_testing","input_database":"dev_ci_testing","input_schema":"cclf","tuva_schema_prefix":"cclf"}' | ||
|
||
- name: Get the result | ||
if: ${{ always() }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ jobs: | |
- name: dbt-build | ||
uses: mwhitaker/[email protected] | ||
with: | ||
dbt_command: 'dbt build --full-refresh --profiles-dir ./integration_tests/profiles/snowflake --vars {"tuva_database":"dev_ci_testing","input_database":"dev_ci_testing","input_schema":"cclf"}' | ||
dbt_command: 'dbt build --full-refresh --profiles-dir ./integration_tests/profiles/snowflake --vars {"tuva_database":"dev_ci_testing","input_database":"dev_ci_testing","input_schema":"cclf","tuva_schema_prefix":"cclf"}' | ||
|
||
|
||
- name: Get the result | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,7 @@ jobs: | |
- name: dbt-build | ||
uses: mwhitaker/[email protected] | ||
with: | ||
dbt_command: 'dbt build --full-refresh --profiles-dir ./integration_tests/profiles/snowflake --vars {"tuva_database":"dev_ci_testing","input_database":"dev_ci_testing","input_schema":"cclf"}' | ||
dbt_command: 'dbt build --full-refresh --profiles-dir ./integration_tests/profiles/snowflake --vars {"tuva_database":"dev_ci_testing","input_database":"dev_ci_testing","input_schema":"cclf","tuva_schema_prefix":"cclf"}' | ||
|
||
- name: Get the result | ||
if: ${{ always() }} | ||
|
@@ -76,7 +76,7 @@ jobs: | |
- name: dbt-build | ||
uses: mwhitaker/[email protected] | ||
with: | ||
dbt_command: 'dbt build --full-refresh --profiles-dir ./integration_tests/profiles/redshift --vars {"tuva_database":"dev_ci_testing","input_database":"dev_ci_testing","input_schema":"cclf"}' | ||
dbt_command: 'dbt build --full-refresh --profiles-dir ./integration_tests/profiles/redshift --vars {"tuva_database":"dev_ci_testing","input_database":"dev_ci_testing","input_schema":"cclf","tuva_schema_prefix":"cclf"}' | ||
|
||
- name: Get the result | ||
if: ${{ always() }} | ||
|
@@ -106,7 +106,7 @@ jobs: | |
- name: dbt-build | ||
uses: mwhitaker/[email protected] | ||
with: | ||
dbt_command: 'dbt build --full-refresh --profiles-dir ./integration_tests/profiles/bigquery --vars {"tuva_database":"dev-ci-testing","input_database":"dev-ci-testing","input_schema":"cclf"}' | ||
dbt_command: 'dbt build --full-refresh --profiles-dir ./integration_tests/profiles/bigquery --vars {"tuva_database":"dev-ci-testing","input_database":"dev-ci-testing","input_schema":"cclf","tuva_schema_prefix":"cclf"}' | ||
|
||
- name: Get the result | ||
if: ${{ always() }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,77 @@ | ||
version: 2 | ||
|
||
models: | ||
|
||
### staging | ||
- name: base_parta_diagnosis_code | ||
description: Base model used as ref for pivot transformation | ||
### final | ||
- name: eligibility | ||
description: > | ||
Member enrollment and demographic detail, converts member months to | ||
enrollment spans. | ||
config: | ||
schema: | | ||
{%- if var('medicare_cclf_connector_schema',None) != None -%}{{ var('medicare_cclf_connector_schema') }}{%- elif var('tuva_schema_prefix',None) != None -%}{{var('tuva_schema_prefix')}}_tuva_claims{% else %}tuva_claims{%- endif -%} | ||
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}_tuva_claims{% else %}_tuva_claims{%- endif -%} | ||
materialized: table | ||
|
||
- name: base_parta_procedure_code | ||
description: Base model used as ref for pivot transformation | ||
- name: medical_claim | ||
description: Claim line level medical data. | ||
config: | ||
schema: | | ||
{%- if var('medicare_cclf_connector_schema',None) != None -%}{{ var('medicare_cclf_connector_schema') }}{%- elif var('tuva_schema_prefix',None) != None -%}{{var('tuva_schema_prefix')}}_tuva_claims{% else %}tuva_claims{%- endif -%} | ||
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}_tuva_claims{% else %}_tuva_claims{%- endif -%} | ||
materialized: table | ||
|
||
- name: pharmacy_claim | ||
description: Claim line level pharmacy data. | ||
config: | ||
schema: | | ||
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}_tuva_claims{% else %}_tuva_claims{%- endif -%} | ||
materialized: table | ||
|
||
### intermediate | ||
- name: diagnosis_pivot | ||
description: Pivot of diagnosis from long (1 row/diagnosis) to wide (multiple diagnosis per row) | ||
description: > | ||
Pivot of diagnosis from long (1 row/diagnosis) to wide (multiple diagnosis | ||
per row). | ||
config: | ||
schema: | | ||
{%- if var('medicare_cclf_connector_schema',None) != None -%}{{ var('medicare_cclf_connector_schema') }}{%- elif var('tuva_schema_prefix',None) != None -%}{{var('tuva_schema_prefix')}}_tuva_claims{% else %}tuva_claims{%- endif -%} | ||
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}_tuva_claims{% else %}_tuva_claims{%- endif -%} | ||
- name: dme_claims | ||
description: Mapping of durable medical equipment claims to Tuva claims data model | ||
description: > | ||
Mapping of durable medical equipment claims to Tuva claims data model. | ||
config: | ||
schema: | | ||
{%- if var('medicare_cclf_connector_schema',None) != None -%}{{ var('medicare_cclf_connector_schema') }}{%- elif var('tuva_schema_prefix',None) != None -%}{{var('tuva_schema_prefix')}}_tuva_claims{% else %}tuva_claims{%- endif -%} | ||
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}_tuva_claims{% else %}_tuva_claims{%- endif -%} | ||
- name: institutional_claims | ||
description: > | ||
Mapping of institution claims to Tuva claims data model | ||
Mapping of institution claims to Tuva claims data model. | ||
config: | ||
schema: | | ||
{%- if var('medicare_cclf_connector_schema',None) != None -%}{{ var('medicare_cclf_connector_schema') }}{%- elif var('tuva_schema_prefix',None) != None -%}{{var('tuva_schema_prefix')}}_tuva_claims{% else %}tuva_claims{%- endif -%} | ||
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}_tuva_claims{% else %}_tuva_claims{%- endif -%} | ||
- name: physician_claims | ||
description: > | ||
Mapping of professional claims to Tuva claims data model | ||
Mapping of professional claims to Tuva claims data model. | ||
config: | ||
schema: | | ||
{%- if var('medicare_cclf_connector_schema',None) != None -%}{{ var('medicare_cclf_connector_schema') }}{%- elif var('tuva_schema_prefix',None) != None -%}{{var('tuva_schema_prefix')}}_tuva_claims{% else %}tuva_claims{%- endif -%} | ||
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}_tuva_claims{% else %}_tuva_claims{%- endif -%} | ||
- name: procedure_pivot | ||
description: Pivot of procedures from long (1 row/procedure) to wide (multiple procedure per row) | ||
config: | ||
schema: | | ||
{%- if var('medicare_cclf_connector_schema',None) != None -%}{{ var('medicare_cclf_connector_schema') }}{%- elif var('tuva_schema_prefix',None) != None -%}{{var('tuva_schema_prefix')}}_tuva_claims{% else %}tuva_claims{%- endif -%} | ||
### final | ||
- name: eligibility | ||
description: > | ||
Member enrollment and demographic detail, converts member months to enrollment spans. | ||
Pivot of procedures from long (1 row/procedure) to wide (multiple | ||
procedure per row). | ||
config: | ||
schema: | | ||
{%- if var('medicare_cclf_connector_schema',None) != None -%}{{ var('medicare_cclf_connector_schema') }}{%- elif var('tuva_schema_prefix',None) != None -%}{{var('tuva_schema_prefix')}}_tuva_claims{% else %}tuva_claims{%- endif -%} | ||
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}_tuva_claims{% else %}_tuva_claims{%- endif -%} | ||
- name: medical_claim | ||
description: Claim line level medical data | ||
### staging | ||
- name: base_parta_diagnosis_code | ||
description: Base model used as ref for pivot transformation. | ||
config: | ||
schema: | | ||
{%- if var('medicare_cclf_connector_schema',None) != None -%}{{ var('medicare_cclf_connector_schema') }}{%- elif var('tuva_schema_prefix',None) != None -%}{{var('tuva_schema_prefix')}}_tuva_claims{% else %}tuva_claims{%- endif -%} | ||
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}_tuva_claims{% else %}_tuva_claims{%- endif -%} | ||
- name: pharmacy_claim | ||
description: Claim line level medical data | ||
- name: base_parta_procedure_code | ||
description: Base model used as ref for pivot transformation. | ||
config: | ||
schema: | | ||
{%- if var('medicare_cclf_connector_schema',None) != None -%}{{ var('medicare_cclf_connector_schema') }}{%- elif var('tuva_schema_prefix',None) != None -%}{{var('tuva_schema_prefix')}}_tuva_claims{% else %}tuva_claims{%- endif -%} | ||
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}_tuva_claims{% else %}_tuva_claims{%- endif -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.