Skip to content

Commit f5c8dc2

Browse files
kuljisdJ'aime TueJ'aime Tue
authored
replacing patient_id with person_id (#37)
* replacing patient_id with person_id * updating packages.yml --------- Co-authored-by: J'aime Tue <jaimetue@ip-10-0-0-126.ec2.internal> Co-authored-by: J'aime Tue <jaimetue@Jaimes-MacBook-Air.local>
1 parent aa56dbd commit f5c8dc2

11 files changed

+14
-14
lines changed

models/final/eligibility.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ with eligibility_unpivot as (
142142
, joined as (
143143

144144
select
145-
cast(enrollment_span.desy_sort_key as {{ dbt.type_string() }} ) as patient_id
145+
cast(enrollment_span.desy_sort_key as {{ dbt.type_string() }} ) as person_id
146146
, cast(enrollment_span.desy_sort_key as {{ dbt.type_string() }} ) as member_id
147147
, cast(enrollment_span.desy_sort_key as {{ dbt.type_string() }} ) as subscriber_id
148148
, case eligibility_unpivot.sex_code
@@ -195,7 +195,7 @@ with eligibility_unpivot as (
195195
)
196196

197197
select
198-
patient_id
198+
person_id
199199
, member_id
200200
, subscriber_id
201201
, gender

models/final/medical_claim.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ with unioned as (
2828
, member_months as (
2929

3030
select distinct
31-
a.patient_id
31+
a.person_id
3232
, year_nbr
3333
, month_nbr
3434
, a.payer
@@ -46,7 +46,7 @@ select
4646
c.claim_id
4747
, c.claim_line_number
4848
, c.claim_type
49-
, c.patient_id
49+
, c.person_id
5050
, c.member_id
5151
, c.payer
5252
, c.plan
@@ -192,6 +192,6 @@ select
192192
, c.ingest_datetime
193193
from unioned as c
194194
inner join member_months as mm
195-
on c.patient_id = mm.patient_id
195+
on c.person_id = mm.person_id
196196
and extract(year from c.claim_start_date) = mm.year_nbr
197197
and extract(month from c.claim_start_date) = mm.month_nbr

models/final/pharmacy_claim.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
select
22
cast(null as {{ dbt.type_string() }}) as claim_id
33
, cast(null as {{ dbt.type_string() }}) as claim_line_number
4-
, cast(null as {{ dbt.type_string() }}) as patient_id
4+
, cast(null as {{ dbt.type_string() }}) as person_id
55
, cast(null as {{ dbt.type_string() }}) as member_id
66
, cast(null as {{ dbt.type_string() }}) as payer
77
, cast(null as {{ dbt.type_string() }}) as plan

models/intermediate/carrier_claim.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ select
2626
as claim_id
2727
, cast(l.line_num as integer) as claim_line_number
2828
, 'professional' as claim_type
29-
, cast(b.desy_sort_key as {{ dbt.type_string() }} ) as patient_id
29+
, cast(b.desy_sort_key as {{ dbt.type_string() }} ) as person_id
3030
, cast(b.desy_sort_key as {{ dbt.type_string() }} ) as member_id
3131
, cast('medicare' as {{ dbt.type_string() }} ) as payer
3232
, cast('medicare' as {{ dbt.type_string() }} ) as plan

models/intermediate/dme_claim.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ select
2626
as claim_id
2727
, cast(l.clm_line_num as integer) as claim_line_number
2828
, 'professional' as claim_type
29-
, cast(b.desy_sort_key as {{ dbt.type_string() }} ) as patient_id
29+
, cast(b.desy_sort_key as {{ dbt.type_string() }} ) as person_id
3030
, cast(b.desy_sort_key as {{ dbt.type_string() }} ) as member_id
3131
, cast('medicare' as {{ dbt.type_string() }} ) as payer
3232
, cast('medicare' as {{ dbt.type_string() }} ) as plan

models/intermediate/home_health_claim.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ select
4141
as claim_id
4242
, cast(l.clm_line_num as integer) as claim_line_number
4343
, 'institutional' as claim_type
44-
, cast(b.desy_sort_key as {{ dbt.type_string() }} ) as patient_id
44+
, cast(b.desy_sort_key as {{ dbt.type_string() }} ) as person_id
4545
, cast(b.desy_sort_key as {{ dbt.type_string() }} ) as member_id
4646
, cast('medicare' as {{ dbt.type_string() }} ) as payer
4747
, cast('medicare' as {{ dbt.type_string() }} ) as plan

models/intermediate/hospice_claim.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ select
4141
as claim_id
4242
, cast(l.clm_line_num as integer) as claim_line_number
4343
, 'institutional' as claim_type
44-
, cast(b.desy_sort_key as {{ dbt.type_string() }} ) as patient_id
44+
, cast(b.desy_sort_key as {{ dbt.type_string() }} ) as person_id
4545
, cast(b.desy_sort_key as {{ dbt.type_string() }} ) as member_id
4646
, cast('medicare' as {{ dbt.type_string() }} ) as payer
4747
, cast('medicare' as {{ dbt.type_string() }} ) as plan

models/intermediate/inpatient_claim.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ select
3434
b.claim_id
3535
, cast(l.clm_line_num as integer) as claim_line_number
3636
, 'institutional' as claim_type
37-
, cast(b.desy_sort_key as {{ dbt.type_string() }} ) as patient_id
37+
, cast(b.desy_sort_key as {{ dbt.type_string() }} ) as person_id
3838
, cast(b.desy_sort_key as {{ dbt.type_string() }} ) as member_id
3939
, cast('medicare' as {{ dbt.type_string() }} ) as payer
4040
, cast('medicare' as {{ dbt.type_string() }} ) as plan

models/intermediate/outpatient_claim.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ select
4444
as claim_id
4545
, cast(l.clm_line_num as integer) as claim_line_number
4646
, 'institutional' as claim_type
47-
, cast(b.desy_sort_key as {{ dbt.type_string() }} ) as patient_id
47+
, cast(b.desy_sort_key as {{ dbt.type_string() }} ) as person_id
4848
, cast(b.desy_sort_key as {{ dbt.type_string() }} ) as member_id
4949
, cast('medicare' as {{ dbt.type_string() }} ) as payer
5050
, cast('medicare' as {{ dbt.type_string() }} ) as plan

models/intermediate/snf_claim.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ select
4444
b.claim_id
4545
, cast(l.clm_line_num as integer) as claim_line_number
4646
, 'institutional' as claim_type
47-
, cast(b.desy_sort_key as {{ dbt.type_string() }}) as patient_id
47+
, cast(b.desy_sort_key as {{ dbt.type_string() }}) as person_id
4848
, cast(b.desy_sort_key as {{ dbt.type_string() }}) as member_id
4949
, cast('medicare' as {{ dbt.type_string() }} ) as payer
5050
, cast('medicare' as {{ dbt.type_string() }} ) as plan

0 commit comments

Comments
 (0)