Skip to content

Commit b16e524

Browse files
authored
Revert "Change line level claim date to header level" (#942)
Revert "Change line level claim date to header level (#928)" This reverts commit 7c5631c.
1 parent 411e473 commit b16e524

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

models/claims_preprocessing/claims_enrollment/claims_enrollment__flag_claims_with_enrollment.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ with claim_dates as (
1414
, payer
1515
, {{ quote_column('plan') }}
1616
, data_source
17-
, coalesce(claim_start_date, admission_date, claim_line_start_date) as inferred_claim_start_date
17+
, coalesce(claim_line_start_date, claim_start_date, admission_date) as inferred_claim_start_date
1818
, case
19-
when claim_start_date is not null then 'claim_start_date'
20-
when claim_start_date is null and admission_date is not null then 'admission_date'
21-
when claim_start_date is null and admission_date is null and claim_line_start_date is not null then 'claim_line_start_date'
19+
when claim_line_start_date is not null then 'claim_line_start_date'
20+
when claim_line_start_date is null and claim_start_date is not null then 'claim_start_date'
21+
when claim_line_start_date is null and claim_start_date is null and admission_date is not null then 'admission_date'
2222
end as inferred_claim_start_column_used
2323
from {{ ref('normalized_input__medical_claim') }}
2424
)

0 commit comments

Comments
 (0)