Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade connector to Tuva v0.13.0 #69

Merged
merged 2 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions models/_models.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ models:
- enrollment_start_date
- enrollment_end_date
columns:
- name: patient_id
- name: person_id
tests:
- not_null
- name: member_id
Expand Down Expand Up @@ -50,7 +50,7 @@ models:
- name: claim_line_number
tests:
- not_null
- name: patient_id
- name: person_id
tests:
- not_null
- name: member_id
Expand Down Expand Up @@ -116,7 +116,7 @@ models:
- name: claim_line_number
tests:
- not_null
- name: patient_id
- name: person_id
tests:
- not_null
- name: member_id
Expand Down
4 changes: 2 additions & 2 deletions models/final/eligibility.sql
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ with demographics as (
, joined as (

select
cast(demographics.current_bene_mbi_id as {{ dbt.type_string() }} ) as patient_id
cast(demographics.current_bene_mbi_id as {{ dbt.type_string() }} ) as person_id
, cast(demographics.current_bene_mbi_id as {{ dbt.type_string() }} ) as member_id
, cast(null as {{ dbt.type_string() }} ) as subscriber_id
, case demographics.bene_sex_cd
Expand Down Expand Up @@ -138,7 +138,7 @@ with demographics as (
)

select
patient_id
person_id
, member_id
, subscriber_id
, gender
Expand Down
2 changes: 1 addition & 1 deletion models/final/medical_claim.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ select
claim_id
, claim_line_number
, claim_type
, patient_id
, person_id
, member_id
, payer
, {{ the_tuva_project.quote_column('plan') }}
Expand Down
4 changes: 2 additions & 2 deletions models/final/pharmacy_claim.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ with deduped_claims as (
select
cast(claim_id as {{ dbt.type_string() }}) as claim_id
, cast(claim_line_number as integer) as claim_line_number
, cast(patient_id as {{ dbt.type_string() }}) as patient_id
, cast(person_id as {{ dbt.type_string() }}) as person_id
, cast(member_id as {{ dbt.type_string() }}) as member_id
, cast(payer as {{ dbt.type_string() }}) as payer
, cast({{ the_tuva_project.quote_column('plan') }} as {{ dbt.type_string() }}) as {{ the_tuva_project.quote_column('plan') }}
Expand Down Expand Up @@ -38,7 +38,7 @@ with deduped_claims as (
select
claim_id
, claim_line_number
, patient_id
, person_id
, member_id
, payer
, {{ the_tuva_project.quote_column('plan') }}
Expand Down
6 changes: 3 additions & 3 deletions models/intermediate/int_dme_claim_deduped.sql
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ with sort_adjusted_claims as (
cur_clm_uniq_id as claim_id
, clm_line_num as claim_line_number
, cast('professional' as {{ dbt.type_string() }} ) as claim_type
, current_bene_mbi_id as patient_id
, current_bene_mbi_id as person_id
, current_bene_mbi_id as member_id
, cast('medicare' as {{ dbt.type_string() }} ) as payer
, cast('medicare'as {{ dbt.type_string() }} ) as {{ the_tuva_project.quote_column('plan') }}
Expand Down Expand Up @@ -279,7 +279,7 @@ with sort_adjusted_claims as (
cast(claim_id as {{ dbt.type_string() }} ) as claim_id
, cast(claim_line_number as integer) as claim_line_number
, cast(claim_type as {{ dbt.type_string() }} ) as claim_type
, cast(patient_id as {{ dbt.type_string() }} ) as patient_id
, cast(person_id as {{ dbt.type_string() }} ) as person_id
, cast(member_id as {{ dbt.type_string() }} ) as member_id
, cast(payer as {{ dbt.type_string() }} ) as payer
, cast({{ the_tuva_project.quote_column('plan') }} as {{ dbt.type_string() }} ) as {{ the_tuva_project.quote_column('plan') }}
Expand Down Expand Up @@ -431,7 +431,7 @@ select
claim_id
, claim_line_number
, claim_type
, patient_id
, person_id
, member_id
, payer
, {{ the_tuva_project.quote_column('plan') }}
Expand Down
6 changes: 3 additions & 3 deletions models/intermediate/int_institutional_claim_deduped.sql
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ with sort_adjusted_claims as (
/* fill in line number for claims with no revenue center details */
, coalesce(cast(clm_line_num as integer), 1) as claim_line_number
, cast('institutional' as {{ dbt.type_string() }} ) as claim_type
, current_bene_mbi_id as patient_id
, current_bene_mbi_id as person_id
, current_bene_mbi_id as member_id
, cast('medicare' as {{ dbt.type_string() }} ) as payer
, cast('medicare'as {{ dbt.type_string() }} ) as {{ the_tuva_project.quote_column('plan') }}
Expand Down Expand Up @@ -545,7 +545,7 @@ with sort_adjusted_claims as (
cast(claim_id as {{ dbt.type_string() }} ) as claim_id
, cast(claim_line_number as integer) as claim_line_number
, cast(claim_type as {{ dbt.type_string() }} ) as claim_type
, cast(patient_id as {{ dbt.type_string() }} ) as patient_id
, cast(person_id as {{ dbt.type_string() }} ) as person_id
, cast(member_id as {{ dbt.type_string() }} ) as member_id
, cast(payer as {{ dbt.type_string() }} ) as payer
, cast({{ the_tuva_project.quote_column('plan') }} as {{ dbt.type_string() }} ) as {{ the_tuva_project.quote_column('plan') }}
Expand Down Expand Up @@ -697,7 +697,7 @@ select
claim_id
, claim_line_number
, claim_type
, patient_id
, person_id
, member_id
, payer
, {{ the_tuva_project.quote_column('plan') }}
Expand Down
4 changes: 2 additions & 2 deletions models/intermediate/int_pharmacy_claim_deduped.sql
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ with sort_adjusted_claims as (
select
cur_clm_uniq_id as claim_id
, 1 as claim_line_number
, current_bene_mbi_id as patient_id
, current_bene_mbi_id as person_id
, current_bene_mbi_id as member_id
, cast('medicare' as {{ dbt.type_string() }} ) as payer
, cast('medicare'as {{ dbt.type_string() }} ) as {{ the_tuva_project.quote_column('plan') }}
Expand Down Expand Up @@ -126,7 +126,7 @@ with sort_adjusted_claims as (
select
claim_id
, claim_line_number
, patient_id
, person_id
, member_id
, payer
, {{ the_tuva_project.quote_column('plan') }}
Expand Down
6 changes: 3 additions & 3 deletions models/intermediate/int_physician_claim_deduped.sql
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ with sort_adjusted_claims as (
cur_clm_uniq_id as claim_id
, clm_line_num as claim_line_number
, cast('professional' as {{ dbt.type_string() }} ) as claim_type
, current_bene_mbi_id as patient_id
, current_bene_mbi_id as person_id
, current_bene_mbi_id as member_id
, cast('medicare' as {{ dbt.type_string() }} ) as payer
, cast('medicare' as {{ dbt.type_string() }} ) as {{ the_tuva_project.quote_column('plan') }}
Expand Down Expand Up @@ -321,7 +321,7 @@ with sort_adjusted_claims as (
cast(claim_id as {{ dbt.type_string() }} ) as claim_id
, cast(claim_line_number as integer) as claim_line_number
, cast(claim_type as {{ dbt.type_string() }} ) as claim_type
, cast(patient_id as {{ dbt.type_string() }} ) as patient_id
, cast(person_id as {{ dbt.type_string() }} ) as person_id
, cast(member_id as {{ dbt.type_string() }} ) as member_id
, cast(payer as {{ dbt.type_string() }} ) as payer
, cast({{ the_tuva_project.quote_column('plan') }} as {{ dbt.type_string() }} ) as {{ the_tuva_project.quote_column('plan') }}
Expand Down Expand Up @@ -473,7 +473,7 @@ select
claim_id
, claim_line_number
, claim_type
, patient_id
, person_id
, member_id
, payer
, {{ the_tuva_project.quote_column('plan') }}
Expand Down
2 changes: 1 addition & 1 deletion packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ packages:
- package: dbt-labs/dbt_utils
version: [">=0.9.2","<1.0.0"]
- package: tuva-health/the_tuva_project
version: [">=0.12.0","<0.13.0"]
version: [">=0.13.0","<0.14.0"]
Loading