Skip to content

Commit

Permalink
replace ifnull with coalesce for cross database functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
thutuva committed Jul 2, 2024
1 parent 3197157 commit 30b0305
Show file tree
Hide file tree
Showing 169 changed files with 209 additions and 209 deletions.
4 changes: 2 additions & 2 deletions integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ vars:
error_empty_seeds: true
## Use this variable to run the project with synthetic data loaded as seeds
# otherwise set to false and set the input vars below
use_synthetic_data: false
use_synthetic_data: true

## Update these vars to use your own data as input, do not comment out
# enabled logic has been added to the sources config
Expand All @@ -23,7 +23,7 @@ vars:

## The vars directly below enable all models related to the type of healthcare data being used

#clinical_enabled: true
clinical_enabled: true
claims_enabled: true


Expand Down
72 changes: 36 additions & 36 deletions integration_tests/models/_integration_tests__models.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,98 +6,98 @@ models:
description: Created from seed or source data depending on test_data_override variable.
config:
schema: |
{%- if 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')}}input_layer
{% else %}input_layer{%- endif -%}
tags: claims
materialized: ephemeral
materialized: table

- name: medical_claim
description: Created from seed or source data depending on test_data_override variable.
config:
schema: |
{%- if 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')}}input_layer
{% else %}input_layer{%- endif -%}
tags: claims
materialized: ephemeral
materialized: table

- name: pharmacy_claim
description: Created from seed or source data depending on test_data_override variable.
config:
schema: |
{%- if 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')}}input_layer
{% else %}input_layer{%- endif -%}
tags: claims
materialized: ephemeral
materialized: table

# clinical input models
- name: condition
description: Created using empty table logic.
config:
schema: |
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}_tuva_clinical
{% else %}_tuva_clinical{%- endif -%}
materialized: ephemeral
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}input_layer
{% else %}input_layer{%- endif -%}
materialized: table

- name: encounter
description: Created using empty table logic.
config:
schema: |
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}_tuva_clinical
{% else %}_tuva_clinical{%- endif -%}
materialized: ephemeral
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}input_layer
{% else %}input_layer{%- endif -%}
materialized: table

- name: lab_result
description: Created from seed or source data depending on test_data_override variable.
config:
schema: |
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}_tuva_clinical
{% else %}_tuva_clinical{%- endif -%}
materialized: ephemeral
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}input_layer
{% else %}input_layer{%- endif -%}
materialized: table

- name: location
description: Created using empty table logic.
config:
schema: |
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}_tuva_clinical
{% else %}_tuva_clinical{%- endif -%}
materialized: ephemeral
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}input_layer
{% else %}input_layer{%- endif -%}
materialized: table

- name: medication
description: Created using empty table logic.
config:
schema: |
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}_tuva_clinical
{% else %}_tuva_clinical{%- endif -%}
materialized: ephemeral
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}input_layer
{% else %}input_layer{%- endif -%}
materialized: table

- name: observation
description: Created using empty table logic.
config:
schema: |
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}_tuva_clinical
{% else %}_tuva_clinical{%- endif -%}
materialized: ephemeral
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}input_layer
{% else %}input_layer{%- endif -%}
materialized: table

- name: patient
description: Created using empty table logic.
config:
schema: |
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}_tuva_clinical
{% else %}_tuva_clinical{%- endif -%}
materialized: ephemeral
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}input_layer
{% else %}input_layer{%- endif -%}
materialized: table

- name: practitioner
description: Created using empty table logic.
config:
schema: |
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}_tuva_clinical
{% else %}_tuva_clinical{%- endif -%}
materialized: ephemeral
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}input_layer
{% else %}input_layer{%- endif -%}
materialized: table

- name: procedure
description: Created using empty table logic.
config:
schema: |
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}_tuva_clinical
{% else %}_tuva_clinical{%- endif -%}
materialized: ephemeral
{%- if var('tuva_schema_prefix',None) != None -%}_{{var('tuva_schema_prefix')}}input_layer
{% else %}input_layer{%- endif -%}
materialized: table
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT
,coalesce(M.RECORDED_DATE,cast('1900-01-01' as date)) AS SOURCE_DATE
,'CONDITION' AS TABLE_NAME
,'Condition ID' as DRILL_DOWN_KEY
,IFNULL(CONDITION_ID, 'NULL') AS DRILL_DOWN_VALUE
, coalesce(condition_id, 'NULL') AS DRILL_DOWN_VALUE
-- ,M.CLAIM_TYPE AS CLAIM_TYPE
,'CLAIM_ID' AS FIELD_NAME
,case when M.CLAIM_ID is not null then 'valid' else 'null' end as BUCKET_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT
,coalesce(M.RECORDED_DATE,cast('1900-01-01' as date)) AS SOURCE_DATE
,'CONDITION' AS TABLE_NAME
,'Condition ID' as DRILL_DOWN_KEY
,IFNULL(CONDITION_ID, 'NULL') AS DRILL_DOWN_VALUE
, coalesce(condition_id, 'NULL') AS DRILL_DOWN_VALUE
-- ,M.CLAIM_TYPE AS CLAIM_TYPE
,'CONDITION_ID' AS FIELD_NAME
,case when M.CONDITION_ID is not null then 'valid' else 'null' end as BUCKET_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT
,coalesce(M.RECORDED_DATE,cast('1900-01-01' as date)) AS SOURCE_DATE
,'CONDITION' AS TABLE_NAME
,'Condition ID' as DRILL_DOWN_KEY
,IFNULL(CONDITION_ID, 'NULL') AS DRILL_DOWN_VALUE
, coalesce(condition_id, 'NULL') AS DRILL_DOWN_VALUE
-- ,M.CLAIM_TYPE AS CLAIM_TYPE
,'CONDITION_RANK' AS FIELD_NAME
,case when M.CONDITION_RANK is not null then 'valid' else 'null' end as BUCKET_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT
,coalesce(M.RECORDED_DATE,cast('1900-01-01' as date)) AS SOURCE_DATE
,'CONDITION' AS TABLE_NAME
,'Condition ID' as DRILL_DOWN_KEY
,IFNULL(CONDITION_ID, 'NULL') AS DRILL_DOWN_VALUE
, coalesce(condition_id, 'NULL') AS DRILL_DOWN_VALUE
-- ,M.CLAIM_TYPE AS CLAIM_TYPE
,'CONDITION_TYPE' AS FIELD_NAME
,case when M.CONDITION_TYPE is not null then 'valid' else 'null' end as BUCKET_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT
,coalesce(M.RECORDED_DATE,cast('1900-01-01' as date)) AS SOURCE_DATE
,'CONDITION' AS TABLE_NAME
,'Condition ID' as DRILL_DOWN_KEY
,IFNULL(CONDITION_ID, 'NULL') AS DRILL_DOWN_VALUE
, coalesce(condition_id, 'NULL') AS DRILL_DOWN_VALUE
-- ,M.CLAIM_TYPE AS CLAIM_TYPE
,'DATA_SOURCE' AS FIELD_NAME
,case when M.DATA_SOURCE is not null then 'valid' else 'null' end as BUCKET_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT
,coalesce(M.RECORDED_DATE,cast('1900-01-01' as date)) AS SOURCE_DATE
,'CONDITION' AS TABLE_NAME
,'Condition ID' as DRILL_DOWN_KEY
,IFNULL(CONDITION_ID, 'NULL') AS DRILL_DOWN_VALUE
, coalesce(condition_id, 'NULL') AS DRILL_DOWN_VALUE
-- ,M.CLAIM_TYPE AS CLAIM_TYPE
,'ENCOUNTER_ID' AS FIELD_NAME
,case when M.ENCOUNTER_ID is not null then 'valid' else 'null' end as BUCKET_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT
,coalesce(M.RECORDED_DATE,cast('1900-01-01' as date)) AS SOURCE_DATE
,'CONDITION' AS TABLE_NAME
,'Condition ID' as DRILL_DOWN_KEY
,IFNULL(CONDITION_ID, 'NULL') AS DRILL_DOWN_VALUE
, coalesce(condition_id, 'NULL') AS DRILL_DOWN_VALUE
-- ,M.CLAIM_TYPE AS CLAIM_TYPE
,'NORMALIZED_CODE' AS FIELD_NAME
,case when TERM.icd_10_cm is not null then 'valid'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT
,coalesce(M.RECORDED_DATE,cast('1900-01-01' as date)) AS SOURCE_DATE
,'CONDITION' AS TABLE_NAME
,'Condition ID' as DRILL_DOWN_KEY
,IFNULL(CONDITION_ID, 'NULL') AS DRILL_DOWN_VALUE
, coalesce(condition_id, 'NULL') AS DRILL_DOWN_VALUE
-- ,M.CLAIM_TYPE AS CLAIM_TYPE
,'NORMALIZED_CODE_TYPE' AS FIELD_NAME
,case when TERM.CODE_TYPE is not null then 'valid'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT
,coalesce(M.RECORDED_DATE,cast('1900-01-01' as date)) AS SOURCE_DATE
,'CONDITION' AS TABLE_NAME
,'Condition ID' as DRILL_DOWN_KEY
,IFNULL(CONDITION_ID, 'NULL') AS DRILL_DOWN_VALUE
, coalesce(condition_id, 'NULL') AS DRILL_DOWN_VALUE
-- ,M.CLAIM_TYPE AS CLAIM_TYPE
,'NORMALIZED_DESCRIPTION' AS FIELD_NAME
,case when M.NORMALIZED_DESCRIPTION is not null then 'valid' else 'null' end as BUCKET_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT
,coalesce(M.RECORDED_DATE,cast('1900-01-01' as date)) AS SOURCE_DATE
,'CONDITION' AS TABLE_NAME
,'Condition ID' as DRILL_DOWN_KEY
,IFNULL(CONDITION_ID, 'NULL') AS DRILL_DOWN_VALUE
, coalesce(condition_id, 'NULL') AS DRILL_DOWN_VALUE
-- ,M.CLAIM_TYPE AS CLAIM_TYPE
,'ONSET_DATE' AS FIELD_NAME
,CASE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT
,coalesce(M.RECORDED_DATE,cast('1900-01-01' as date) ) AS SOURCE_DATE
,'CONDITION' AS TABLE_NAME
,'Condition ID' as DRILL_DOWN_KEY
,IFNULL(CONDITION_ID, 'NULL') AS DRILL_DOWN_VALUE
, coalesce(condition_id, 'NULL') AS DRILL_DOWN_VALUE
-- ,M.CLAIM_TYPE AS CLAIM_TYPE
,'PATIENT_ID' AS FIELD_NAME
,case when M.PATIENT_ID is not null then 'valid' else 'null' end as BUCKET_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT
,coalesce(M.RECORDED_DATE,cast('1900-01-01' as date)) AS SOURCE_DATE
,'CONDITION' AS TABLE_NAME
,'Condition ID' as DRILL_DOWN_KEY
,IFNULL(CONDITION_ID, 'NULL') AS DRILL_DOWN_VALUE
, coalesce(condition_id, 'NULL') AS DRILL_DOWN_VALUE
-- ,M.CLAIM_TYPE AS CLAIM_TYPE
,'PRESENT_ON_ADMIT_CODE' AS FIELD_NAME
,case when TERM.PRESENT_ON_ADMIT_CODE is not null then 'valid'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT
,coalesce(M.RECORDED_DATE,cast('1900-01-01' as date)) AS SOURCE_DATE
,'CONDITION' AS TABLE_NAME
,'Condition ID' as DRILL_DOWN_KEY
,IFNULL(CONDITION_ID, 'NULL') AS DRILL_DOWN_VALUE
, coalesce(condition_id, 'NULL') AS DRILL_DOWN_VALUE
-- ,M.CLAIM_TYPE AS CLAIM_TYPE
,'PRESENT_ON_ADMIT_DESCRIPTION' AS FIELD_NAME
,case when M.PRESENT_ON_ADMIT_DESCRIPTION is not null then 'valid' else 'null' end as BUCKET_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT
,coalesce(M.RECORDED_DATE,cast('1900-01-01' as date)) AS SOURCE_DATE
,'CONDITION' AS TABLE_NAME
,'Condition ID' as DRILL_DOWN_KEY
,IFNULL(CONDITION_ID, 'NULL') AS DRILL_DOWN_VALUE
, coalesce(condition_id, 'NULL') AS DRILL_DOWN_VALUE
-- ,M.CLAIM_TYPE AS CLAIM_TYPE
,'RECORDED_DATE' AS FIELD_NAME
,CASE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT
,coalesce(M.RECORDED_DATE,cast('1900-01-01' as date)) AS SOURCE_DATE
,'CONDITION' AS TABLE_NAME
,'Condition ID' as DRILL_DOWN_KEY
,IFNULL(CONDITION_ID, 'NULL') AS DRILL_DOWN_VALUE
, coalesce(condition_id, 'NULL') AS DRILL_DOWN_VALUE
-- ,M.CLAIM_TYPE AS CLAIM_TYPE
,'RESOLVED_DATE' AS FIELD_NAME
,CASE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT
,coalesce(M.RECORDED_DATE,cast('1900-01-01' as date)) AS SOURCE_DATE
,'CONDITION' AS TABLE_NAME
,'Condition ID' as DRILL_DOWN_KEY
,IFNULL(CONDITION_ID, 'NULL') AS DRILL_DOWN_VALUE
, coalesce(condition_id, 'NULL') AS DRILL_DOWN_VALUE
-- ,M.CLAIM_TYPE AS CLAIM_TYPE
,'SOURCE_CODE' AS FIELD_NAME
,case when M.SOURCE_CODE is not null then 'valid' else 'null' end as BUCKET_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT
,coalesce(M.RECORDED_DATE,cast('1900-01-01' as date)) AS SOURCE_DATE
,'CONDITION' AS TABLE_NAME
,'Condition ID' as DRILL_DOWN_KEY
,IFNULL(CONDITION_ID, 'NULL') AS DRILL_DOWN_VALUE
, coalesce(condition_id, 'NULL') AS DRILL_DOWN_VALUE
-- ,M.CLAIM_TYPE AS CLAIM_TYPE
,'SOURCE_CODE_TYPE' AS FIELD_NAME
,case when M.SOURCE_CODE_TYPE is not null then 'valid' else 'null' end as BUCKET_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT
,coalesce(M.RECORDED_DATE,cast('1900-01-01' as date)) AS SOURCE_DATE
,'CONDITION' AS TABLE_NAME
,'Condition ID' as DRILL_DOWN_KEY
,IFNULL(CONDITION_ID, 'NULL') AS DRILL_DOWN_VALUE
, coalesce(condition_id, 'NULL') AS DRILL_DOWN_VALUE
-- ,M.CLAIM_TYPE AS CLAIM_TYPE
,'SOURCE_DESCRIPTION' AS FIELD_NAME
,case when M.SOURCE_DESCRIPTION is not null then 'valid' else 'null' end as BUCKET_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT
,coalesce(M.RECORDED_DATE,cast('1900-01-01' as date)) AS SOURCE_DATE
,'CONDITION' AS TABLE_NAME
,'Condition ID' as DRILL_DOWN_KEY
,IFNULL(CONDITION_ID, 'NULL') AS DRILL_DOWN_VALUE
, coalesce(condition_id, 'NULL') AS DRILL_DOWN_VALUE
-- ,M.CLAIM_TYPE AS CLAIM_TYPE
,'STATUS' AS FIELD_NAME
,case when M.STATUS is not null then 'valid' else 'null' end as BUCKET_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT
,coalesce(M.ENCOUNTER_START_DATE,cast('1900-01-01' as date)) AS SOURCE_DATE
,'ENCOUNTER' AS TABLE_NAME
,'Encounter ID' as DRILL_DOWN_KEY
,IFNULL(ENCOUNTER_ID, 'NULL') AS DRILL_DOWN_VALUE
, coalesce(encounter_id, 'NULL') AS DRILL_DOWN_VALUE
-- ,M.CLAIM_TYPE AS CLAIM_TYPE
,'ADMIT_SOURCE_CODE' AS FIELD_NAME
,case when TERM.ADMIT_SOURCE_CODE is not null then 'valid'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT
,coalesce(M.ENCOUNTER_START_DATE,cast('1900-01-01' as date)) AS SOURCE_DATE
,'ENCOUNTER' AS TABLE_NAME
,'Encounter ID' as DRILL_DOWN_KEY
,IFNULL(ENCOUNTER_ID, 'NULL') AS DRILL_DOWN_VALUE
, coalesce(encounter_id, 'NULL') AS DRILL_DOWN_VALUE
-- ,M.CLAIM_TYPE AS CLAIM_TYPE
,'ADMIT_SOURCE_DESCRIPTION' AS FIELD_NAME
,case when M.ADMIT_SOURCE_DESCRIPTION is not null then 'valid' else 'null' end as BUCKET_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT
,coalesce(M.ENCOUNTER_START_DATE,cast('1900-01-01' as date)) AS SOURCE_DATE
,'ENCOUNTER' AS TABLE_NAME
,'Encounter ID' as DRILL_DOWN_KEY
,IFNULL(ENCOUNTER_ID, 'NULL') AS DRILL_DOWN_VALUE
, coalesce(encounter_id, 'NULL') AS DRILL_DOWN_VALUE
-- ,M.CLAIM_TYPE AS CLAIM_TYPE
,'ADMIT_TYPE_CODE' AS FIELD_NAME
,case when TERM.ADMIT_TYPE_CODE is not null then 'valid'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT
,coalesce(M.ENCOUNTER_START_DATE,cast('1900-01-01' as date)) AS SOURCE_DATE
,'ENCOUNTER' AS TABLE_NAME
,'Encounter ID' as DRILL_DOWN_KEY
,IFNULL(ENCOUNTER_ID, 'NULL') AS DRILL_DOWN_VALUE
, coalesce(encounter_id, 'NULL') AS DRILL_DOWN_VALUE
-- ,M.CLAIM_TYPE AS CLAIM_TYPE
,'ADMIT_TYPE_DESCRIPTION' AS FIELD_NAME
,case when M.ADMIT_TYPE_DESCRIPTION is not null then 'valid' else 'null' end as BUCKET_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT
,coalesce(M.ENCOUNTER_START_DATE,cast('1900-01-01' as date)) AS SOURCE_DATE
,'ENCOUNTER' AS TABLE_NAME
,'Encounter ID' as DRILL_DOWN_KEY
,IFNULL(ENCOUNTER_ID, 'NULL') AS DRILL_DOWN_VALUE
, coalesce(encounter_id, 'NULL') AS DRILL_DOWN_VALUE
-- ,M.CLAIM_TYPE AS CLAIM_TYPE
,'ALLOWED_AMOUNT' AS FIELD_NAME
,case when M.ALLOWED_AMOUNT is not null then 'valid' else 'null' end as BUCKET_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT
,coalesce(M.ENCOUNTER_START_DATE,cast('1900-01-01' as date)) AS SOURCE_DATE
,'ENCOUNTER' AS TABLE_NAME
,'Encounter ID' as DRILL_DOWN_KEY
,IFNULL(ENCOUNTER_ID, 'NULL') AS DRILL_DOWN_VALUE
, coalesce(encounter_id, 'NULL') AS DRILL_DOWN_VALUE
-- ,M.CLAIM_TYPE AS CLAIM_TYPE
,'APR_DRG_CODE' AS FIELD_NAME
,case when TERM.APR_DRG_CODE is not null then 'valid'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT
,coalesce(M.ENCOUNTER_START_DATE,cast('1900-01-01' as date)) AS SOURCE_DATE
,'ENCOUNTER' AS TABLE_NAME
,'Encounter ID' as DRILL_DOWN_KEY
,IFNULL(ENCOUNTER_ID, 'NULL') AS DRILL_DOWN_VALUE
, coalesce(encounter_id, 'NULL') AS DRILL_DOWN_VALUE
-- ,M.CLAIM_TYPE AS CLAIM_TYPE
,'APR_DRG_DESCRIPTION' AS FIELD_NAME
,case when M.APR_DRG_DESCRIPTION is not null then 'valid' else 'null' end as BUCKET_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SELECT
,coalesce(M.ENCOUNTER_START_DATE,cast('1900-01-01' as date)) AS SOURCE_DATE
,'ENCOUNTER' AS TABLE_NAME
,'Encounter ID' as DRILL_DOWN_KEY
,IFNULL(ENCOUNTER_ID, 'NULL') AS DRILL_DOWN_VALUE
, coalesce(encounter_id, 'NULL') AS DRILL_DOWN_VALUE
-- ,M.CLAIM_TYPE AS CLAIM_TYPE
,'ATTENDING_PROVIDER_ID' AS FIELD_NAME
,case when TERM.NPI is not null then 'valid'
Expand Down
Loading

0 comments on commit 30b0305

Please sign in to comment.