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

Add file identifiers #502

Merged
merged 1 commit into from
Jun 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
12 changes: 6 additions & 6 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 Down Expand Up @@ -63,15 +63,15 @@ dispatch:
seeds:
integration_tests:
eligibility_seed:
+post-hook: "{{ the_tuva_project.load_seed('tuva-public-resources/tuva_synthetic_data','eligibility.csv',headers=true) }}"
+post-hook: "{{ the_tuva_project.load_seed('tuva-public-resources/versioned_tuva_synthetic_data/0.9.0','eligibility.csv',headers=true) }}"
lab_result_seed:
+post-hook: "{{ the_tuva_project.load_seed('tuva-public-resources/tuva_synthetic_data','lab_result.csv',headers=true) }}"
+post-hook: "{{ the_tuva_project.load_seed('tuva-public-resources/versioned_tuva_synthetic_data/0.9.0','lab_result.csv',headers=true) }}"
medical_claim_seed:
+post-hook: "{{ the_tuva_project.load_seed('tuva-public-resources/tuva_synthetic_data','medical_claim.csv',headers=true) }}"
+post-hook: "{{ the_tuva_project.load_seed('tuva-public-resources/versioned_tuva_synthetic_data/0.9.0','medical_claim.csv',headers=true) }}"
observation_seed:
+post-hook: "{{ the_tuva_project.load_seed('tuva-public-resources/tuva_synthetic_data','observation.csv',headers=true) }}"
+post-hook: "{{ the_tuva_project.load_seed('tuva-public-resources/versioned_tuva_synthetic_data/0.9.0','observation.csv',headers=true) }}"
pharmacy_claim_seed:
+post-hook: "{{ the_tuva_project.load_seed('tuva-public-resources/tuva_synthetic_data','pharmacy_claim.csv',headers=true) }}"
+post-hook: "{{ the_tuva_project.load_seed('tuva-public-resources/versioned_tuva_synthetic_data/0.9.0','pharmacy_claim.csv',headers=true) }}"

models:
integration_tests:
Expand Down
79 changes: 79 additions & 0 deletions integration_tests/docs_generate/models/_models.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ models:
description: >
User-configured field that indicates the data source (e.g. typically
named after the payer and state "BCBS Tennessee").
- name: file_name
description: The file name of the source file from the payer
- name: ingest_datetime
description: >
The date and time the source file was ingested into the data warehouse or
landed in cloud storage

- name: medical_claim
config:
Expand Down Expand Up @@ -675,6 +681,16 @@ models:
description: >
User-configured field that indicates the data source (e.g. typically
named after the payer and state "BCBS Tennessee").
- name: file_name
description: The file name of the source file from the payer
- name: ingest_datetime
description: >
The date and time the source file was ingested into the data warehouse or
landed in cloud storage




- name: pharmacy_claim
config:
database: tuva
Expand Down Expand Up @@ -822,6 +838,13 @@ models:
description: >
User-configured field that indicates the data source (e.g. typically
named after the payer and state "BCBS Tennessee").
- name: file_name
description: The file name of the source file from the payer
- name: ingest_datetime
description: >
The date and time the source file was ingested into the data warehouse or
landed in cloud storage


- name: encounter
config:
Expand Down Expand Up @@ -922,6 +945,12 @@ models:
description: >
User-configured field that indicates the data source (e.g. typically
named after the payer and state "BCBS Tennessee").
- name: file_name
description: The file name of the source file
- name: ingest_datetime
description: >
The date and time the source file/data was ingested into the data warehouse or
landed in cloud storage

- name: lab_result
config:
Expand Down Expand Up @@ -1010,6 +1039,13 @@ models:
terminology_note: "**Note: this terminology set is too large to be loaded as a seed and is instead loaded from public cloud storage for supported adapters."
- name: data_source
description: Custom description of the source system e.g. Epic.
- name: file_name
description: The file name of the source file
- name: ingest_datetime
description: >
The date and time the source file/data was ingested into the data warehouse or
landed in cloud storage


- name: location
config:
Expand Down Expand Up @@ -1049,6 +1085,13 @@ models:
description: The longitude of the location.
- name: data_source
description: Custom description of the source system e.g. Epic.
- name: file_name
description: The file name of the source file
- name: ingest_datetime
description: >
The date and time the source file/data was ingested into the data warehouse or
landed in cloud storage


- name: medication
config:
Expand Down Expand Up @@ -1110,6 +1153,14 @@ models:
Unique identifier for the practitioner who ordered the medication.
- name: data_source
description: Custom description of the source system e.g. Epic.
- name: file_name
description: The file name of the source file
- name: ingest_datetime
description: >
The date and time the source file/data was ingested into the data warehouse or
landed in cloud storage



- name: observation
config:
Expand Down Expand Up @@ -1162,6 +1213,13 @@ models:
description: The normalized high end of the reference range.
- name: data_source
description: Custom description of the source system e.g. Epic.
- name: file_name
description: The file name of the source file
- name: ingest_datetime
description: >
The date and time the source file/data was ingested into the data warehouse or
landed in cloud storage


- name: patient
config:
Expand Down Expand Up @@ -1211,6 +1269,13 @@ models:
description: >
User-configured field that indicates the data source (e.g. typically
named after the payer and state "BCBS Tennessee").
- name: file_name
description: The file name of the source file
- name: ingest_datetime
description: >
The date and time the source file/data was ingested into the data warehouse or
landed in cloud storage


- name: practitioner
config:
Expand Down Expand Up @@ -1242,6 +1307,14 @@ models:
description: >
User-configured field that indicates the data source (e.g. typically
named after the payer and state "BCBS Tennessee").
- name: file_name
description: The file name of the source file
- name: ingest_datetime
description: >
The date and time the source file/data was ingested into the data warehouse or
landed in cloud storage



- name: procedure
config:
Expand Down Expand Up @@ -1316,3 +1389,9 @@ models:
description: >
User-configured field that indicates the data source (e.g. typically
named after the payer and state "BCBS Tennessee").
- name: file_name
description: The file name of the source file
- name: ingest_datetime
description: >
The date and time the source file/data was ingested into the data warehouse or
landed in cloud storage
2 changes: 2 additions & 0 deletions integration_tests/docs_generate/models/condition.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ select
, cast(null as {{ dbt.type_string() }} ) as present_on_admit_code
, cast(null as {{ dbt.type_string() }} ) as present_on_admit_description
, cast(null as {{ dbt.type_string() }} ) as data_source
, cast(null as {{ dbt.type_string() }} ) as file_name
, cast(null as {{ dbt.type_timestamp() }} ) as ingest_datetime
limit 0
2 changes: 2 additions & 0 deletions integration_tests/docs_generate/models/eligibility.sql
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ select
, zip_code
, phone
, data_source
, file_name
, ingest_datetime
from {{ ref('eligibility_seed') }}
2 changes: 2 additions & 0 deletions integration_tests/docs_generate/models/encounter.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ select
, cast(null as {{ dbt.type_numeric() }} ) as allowed_amount
, cast(null as {{ dbt.type_numeric() }} ) as charge_amount
, cast(null as {{ dbt.type_string() }} ) as data_source
, cast(null as {{ dbt.type_string() }} ) as file_name
, cast(null as {{ dbt.type_timestamp() }} ) as ingest_datetime
limit 0
2 changes: 2 additions & 0 deletions integration_tests/docs_generate/models/lab_result.sql
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,6 @@ select
, cast(null as {{ dbt.type_string() }} ) as specimen
, cast(null as {{ dbt.type_string() }} ) as ordering_practitioner_id
, cast(null as {{ dbt.type_string() }} ) as data_source
, cast(null as {{ dbt.type_string() }} ) as file_name
, cast(null as {{ dbt.type_timestamp() }} ) as ingest_datetime
limit 0
2 changes: 2 additions & 0 deletions integration_tests/docs_generate/models/location.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ select
, cast(null as {{ dbt.type_float() }} ) as latitude
, cast(null as {{ dbt.type_float() }} ) as longitude
, cast(null as {{ dbt.type_string() }} ) as data_source
, cast(null as {{ dbt.type_string() }} ) as file_name
, cast(null as {{ dbt.type_timestamp() }} ) as ingest_datetime
limit 0
2 changes: 2 additions & 0 deletions integration_tests/docs_generate/models/medical_claim.sql
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,6 @@ select
, procedure_date_24
, procedure_date_25
, data_source
, file_name
, ingest_datetime
from {{ ref('medical_claim_seed') }}
2 changes: 2 additions & 0 deletions integration_tests/docs_generate/models/medication.sql
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ select
, cast(null as {{ dbt.type_int() }} ) as days_supply
, cast(null as {{ dbt.type_string() }} ) as practitioner_id
, cast(null as {{ dbt.type_string() }} ) as data_source
, cast(null as {{ dbt.type_string() }} ) as file_name
, cast(null as {{ dbt.type_timestamp() }} ) as ingest_datetime
limit 0
2 changes: 2 additions & 0 deletions integration_tests/docs_generate/models/observation.sql
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ select
, cast(null as {{ dbt.type_string() }} ) as normalized_reference_range_low
, cast(null as {{ dbt.type_string() }} ) as normalized_reference_range_high
, cast(null as {{ dbt.type_string() }} ) as data_source
, cast(null as {{ dbt.type_string() }} ) as file_name
, cast(null as {{ dbt.type_timestamp() }} ) as ingest_datetime
limit 0
2 changes: 2 additions & 0 deletions integration_tests/docs_generate/models/patient.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ select
, cast(null as {{ dbt.type_float() }} ) as latitude
, cast(null as {{ dbt.type_float() }} ) as longitude
, cast(null as {{ dbt.type_string() }} ) as data_source
, cast(null as {{ dbt.type_string() }} ) as file_name
, cast(null as {{ dbt.type_timestamp() }} ) as ingest_datetime
limit 0
2 changes: 2 additions & 0 deletions integration_tests/docs_generate/models/pharmacy_claim.sql
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ select
, copayment_amount
, deductible_amount
, data_source
, file_name
, ingest_datetime
from {{ ref('pharmacy_claim_seed') }}
2 changes: 2 additions & 0 deletions integration_tests/docs_generate/models/practitioner.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ select
, cast(null as {{ dbt.type_string() }} ) as specialty
, cast(null as {{ dbt.type_string() }} ) as sub_specialty
, cast(null as {{ dbt.type_string() }} ) as data_source
, cast(null as {{ dbt.type_string() }} ) as file_name
, cast(null as {{ dbt.type_timestamp() }} ) as ingest_datetime
limit 0
2 changes: 2 additions & 0 deletions integration_tests/docs_generate/models/procedure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ select
, cast(null as {{ dbt.type_string() }} ) as modifier_5
, cast(null as {{ dbt.type_string() }} ) as practitioner_id
, cast(null as {{ dbt.type_string() }} ) as data_source
, cast(null as {{ dbt.type_string() }} ) as file_name
, cast(null as {{ dbt.type_timestamp() }} ) as ingest_datetime
limit 0
2 changes: 2 additions & 0 deletions integration_tests/models/condition.sql
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ select
, cast(null as {{ dbt.type_string() }} ) as present_on_admit_code
, cast(null as {{ dbt.type_string() }} ) as present_on_admit_description
, cast(null as {{ dbt.type_string() }} ) as data_source
, cast(null as {{ dbt.type_string() }} ) as file_name
, cast(null as {{ dbt.type_timestamp() }} ) as ingest_datetime
, cast(null as {{ dbt.type_timestamp() }} ) as tuva_last_run
limit 0

Expand Down
2 changes: 2 additions & 0 deletions integration_tests/models/encounter.sql
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ cast(null as {{ dbt.type_string() }} ) as encounter_id
, cast(null as {{ dbt.type_float() }} ) as allowed_amount
, cast(null as {{ dbt.type_float() }} ) as charge_amount
, cast(null as {{ dbt.type_string() }} ) as data_source
, cast(null as {{ dbt.type_string() }} ) as file_name
, cast(null as {{ dbt.type_timestamp() }} ) as ingest_datetime
, cast(null as {{ dbt.type_timestamp() }} ) as tuva_last_run
limit 0

Expand Down
2 changes: 2 additions & 0 deletions integration_tests/models/location.sql
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ cast(null as {{ dbt.type_string() }} ) as location_id
, cast(null as {{ dbt.type_float() }} ) as latitude
, cast(null as {{ dbt.type_float() }} ) as longitude
, cast(null as {{ dbt.type_string() }} ) as data_source
, cast(null as {{ dbt.type_string() }} ) as file_name
, cast(null as {{ dbt.type_timestamp() }} ) as ingest_datetime
, cast(null as {{ dbt.type_timestamp() }} ) as tuva_last_run
limit 0

Expand Down
2 changes: 2 additions & 0 deletions integration_tests/models/medication.sql
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ cast(null as {{ dbt.type_string() }} ) as medication_id
, cast(null as {{ dbt.type_int() }} ) as days_supply
, cast(null as {{ dbt.type_string() }} ) as practitioner_id
, cast(null as {{ dbt.type_string() }} ) as data_source
, cast(null as {{ dbt.type_string() }} ) as file_name
, cast(null as {{ dbt.type_timestamp() }} ) as ingest_datetime
, cast(null as {{ dbt.type_timestamp() }} ) as tuva_last_run
limit 0

Expand Down
2 changes: 2 additions & 0 deletions integration_tests/models/patient.sql
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ cast(null as {{ dbt.type_string() }} ) as patient_id
, cast(null as {{ dbt.type_float() }} ) as latitude
, cast(null as {{ dbt.type_float() }} ) as longitude
, cast(null as {{ dbt.type_string() }} ) as data_source
, cast(null as {{ dbt.type_string() }} ) as file_name
, cast(null as {{ dbt.type_timestamp() }} ) as ingest_datetime
, cast(null as {{ dbt.type_timestamp() }} ) as tuva_last_run
limit 0

Expand Down
2 changes: 2 additions & 0 deletions integration_tests/models/practitioner.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ select
, cast(null as {{ dbt.type_string() }} ) as specialty
, cast(null as {{ dbt.type_string() }} ) as sub_specialty
, cast(null as {{ dbt.type_string() }} ) as data_source
, cast(null as {{ dbt.type_string() }} ) as file_name
, cast(null as {{ dbt.type_timestamp() }} ) as ingest_datetime
, cast(null as {{ dbt.type_timestamp() }} ) as tuva_last_run
limit 0

Expand Down
2 changes: 2 additions & 0 deletions integration_tests/models/procedure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ select
, cast(null as {{ dbt.type_string() }} ) as modifier_5
, cast(null as {{ dbt.type_string() }} ) as practitioner_id
, cast(null as {{ dbt.type_string() }} ) as data_source
, cast(null as {{ dbt.type_string() }} ) as file_name
, cast(null as {{ dbt.type_timestamp() }} ) as ingest_datetime
, cast(null as {{ dbt.type_timestamp() }} ) as tuva_last_run
limit 0

Expand Down
Loading
Loading