From 9966968c5f9a05ea9a671525d87400d73b1d1d15 Mon Sep 17 00:00:00 2001 From: sarah-tuva Date: Mon, 30 Sep 2024 11:09:21 -0600 Subject: [PATCH] Fix diagnosis code type mapping --- models/intermediate/physician_claims.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/intermediate/physician_claims.sql b/models/intermediate/physician_claims.sql index 8c884005..d18c63e7 100644 --- a/models/intermediate/physician_claims.sql +++ b/models/intermediate/physician_claims.sql @@ -44,8 +44,8 @@ select , {{ cast_numeric('NULL') }} as deductible_amount , {{ cast_numeric('NULL') }} as total_cost_amount , case - when cast(dgns_prcdr_icd_ind as {{ dbt.type_string() }} ) = '0' then 'icd-10-pcs' - when cast(dgns_prcdr_icd_ind as {{ dbt.type_string() }} ) = '9' then 'icd-9-pcs' + when cast(dgns_prcdr_icd_ind as {{ dbt.type_string() }} ) = '0' then 'icd-10-cm' + when cast(dgns_prcdr_icd_ind as {{ dbt.type_string() }} ) = '9' then 'icd-9-cm' else cast(dgns_prcdr_icd_ind as {{ dbt.type_string() }} ) end as diagnosis_code_type , cast(clm_dgns_1_cd as {{ dbt.type_string() }} ) as diagnosis_code_1 , cast(clm_dgns_2_cd as {{ dbt.type_string() }} ) as diagnosis_code_2