Skip to content

Commit 107dd19

Browse files
committed
feat: demo project updated to version V0.15.x
1 parent d32f85d commit 107dd19

6 files changed

Lines changed: 164 additions & 18 deletions

File tree

dbt_project.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,19 @@ clean-targets:
3131

3232
seeds:
3333
the_tuva_project_demo:
34+
appointment:
35+
+post-hook: "{{ the_tuva_project.load_seed('tuva-public-resources/versioned_tuva_synthetic_data/0.15.0','appointment.csv',headers=true) }}"
3436
eligibility:
35-
+post-hook: "{{ the_tuva_project.load_seed('tuva-public-resources/versioned_tuva_synthetic_data/0.14.0','eligibility.csv',headers=true) }}"
37+
+post-hook: "{{ the_tuva_project.load_seed('tuva-public-resources/versioned_tuva_synthetic_data/0.15.0','eligibility.csv',headers=true) }}"
38+
immunization:
39+
+post-hook: "{{ the_tuva_project.load_seed('tuva-public-resources/versioned_tuva_synthetic_data/0.15.0','immunization.csv',headers=true) }}"
3640
lab_result:
37-
+post-hook: "{{ the_tuva_project.load_seed('tuva-public-resources/versioned_tuva_synthetic_data/0.14.0','lab_result.csv',headers=true) }}"
41+
+post-hook: "{{ the_tuva_project.load_seed('tuva-public-resources/versioned_tuva_synthetic_data/0.15.0','lab_result.csv',headers=true) }}"
3842
medical_claim:
39-
+post-hook: "{{ the_tuva_project.load_seed('tuva-public-resources/versioned_tuva_synthetic_data/0.14.0','medical_claim.csv',headers=true) }}"
43+
+post-hook: "{{ the_tuva_project.load_seed('tuva-public-resources/versioned_tuva_synthetic_data/0.15.0','medical_claim.csv',headers=true) }}"
4044
observation:
41-
+post-hook: "{{ the_tuva_project.load_seed('tuva-public-resources/versioned_tuva_synthetic_data/0.14.0','observation.csv',headers=true) }}"
45+
+post-hook: "{{ the_tuva_project.load_seed('tuva-public-resources/versioned_tuva_synthetic_data/0.15.0','observation.csv',headers=true) }}"
4246
pharmacy_claim:
43-
+post-hook: "{{ the_tuva_project.load_seed('tuva-public-resources/versioned_tuva_synthetic_data/0.14.0','pharmacy_claim.csv',headers=true) }}"
47+
+post-hook: "{{ the_tuva_project.load_seed('tuva-public-resources/versioned_tuva_synthetic_data/0.15.0','pharmacy_claim.csv',headers=true) }}"
4448
provider_attribution:
45-
+post-hook: "{{ the_tuva_project.load_seed('tuva-public-resources/versioned_tuva_synthetic_data/0.14.0','provider_attribution.csv',headers=true) }}"
49+
+post-hook: "{{ the_tuva_project.load_seed('tuva-public-resources/versioned_tuva_synthetic_data/0.15.0','provider_attribution.csv',headers=true) }}"

models/patient.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
select {% if target.type == 'fabric' %} top 0 {% else %}{% endif %}
22
cast(null as {{ dbt.type_string() }} ) as person_id
33
, cast(null as {{ dbt.type_string() }} ) as patient_id
4+
, cast(null as {{ dbt.type_string() }} ) as name_suffix
45
, cast(null as {{ dbt.type_string() }} ) as first_name
6+
, cast(null as {{ dbt.type_string() }} ) as middle_name
57
, cast(null as {{ dbt.type_string() }} ) as last_name
68
, cast(null as {{ dbt.type_string() }} ) as sex
79
, cast(null as {{ dbt.type_string() }} ) as race
@@ -17,6 +19,8 @@ select {% if target.type == 'fabric' %} top 0 {% else %}{% endif %}
1719
, cast(null as {{ dbt.type_float() }} ) as latitude
1820
, cast(null as {{ dbt.type_float() }} ) as longitude
1921
, cast(null as {{ dbt.type_string() }} ) as phone
22+
, cast(null as {{ dbt.type_string() }} ) as email
23+
, cast(null as {{ dbt.type_string() }} ) as ethnicity
2024
, cast(null as {{ dbt.type_string() }} ) as data_source
2125
, cast(null as {{ dbt.type_string() }} ) as file_name
2226
, cast(null as {{ dbt.type_timestamp() }} ) as ingest_datetime

packages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
packages:
22
- package: tuva-health/the_tuva_project
3-
version: [">=0.14.0","<0.15.0"]
3+
version: [">=0.15.0","<0.16.0"]
44
- package: dbt-labs/dbt_utils
55
version: [ ">=0.9.2" ]

seeds/_seeds.yml

Lines changed: 147 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,78 @@
11
version: 2
22

33
seeds:
4+
- name: appointment
5+
config:
6+
schema: input_layer
7+
tags: tuva_demo
8+
column_types:
9+
appointment_id: |
10+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
11+
person_id: |
12+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
13+
patient_id: |
14+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
15+
encounter_id: |
16+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
17+
source_appointment_type_code: |
18+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
19+
source_appointment_type_description: |
20+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
21+
normalized_appointment_type_code: |
22+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
23+
normalized_appointment_type_description: |
24+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
25+
start_datetime: |
26+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
27+
end_datetime: |
28+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
29+
duration: |
30+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
31+
location_id: |
32+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
33+
practitioner_id: |
34+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
35+
source_status: |
36+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
37+
normalized_status: |
38+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
39+
appointment_specialty: |
40+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
41+
reason: |
42+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
43+
source_reason_code_type: |
44+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
45+
source_reason_code: |
46+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
47+
source_reason_description: |
48+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
49+
normalized_reason_code_type: |
50+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
51+
normalized_reason_code: |
52+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
53+
normalized_reason_description: |
54+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
55+
cancellation_reason: |
56+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
57+
source_cancellation_reason_code_type: |
58+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
59+
source_cancellation_reason_code: |
60+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
61+
source_cancellation_reason_description: |
62+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
63+
normalized_cancellation_reason_code_type: |
64+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
65+
normalized_cancellation_reason_code: |
66+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
67+
normalized_cancellation_reason_description: |
68+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
69+
data_source: |
70+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
71+
file_name: |
72+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
73+
ingest_datetime: |
74+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
75+
476
- name: eligibility
577
config:
678
schema: input_layer
@@ -37,6 +109,10 @@ seeds:
37109
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
38110
group_name: |
39111
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
112+
name_suffix: |
113+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
114+
middle_name: |
115+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
40116
first_name: |
41117
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
42118
last_name: |
@@ -55,6 +131,10 @@ seeds:
55131
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
56132
phone: |
57133
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
134+
email: |
135+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
136+
ethnicity: |
137+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
58138
data_source: |
59139
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
60140
file_name: |
@@ -65,43 +145,101 @@ seeds:
65145
{%- elif target.type == "fabric" -%} datetime2(6)
66146
{%- else -%} datetime {%- endif -%}
67147
68-
- name: lab_result
148+
- name: immunization
69149
config:
70150
schema: input_layer
71151
tags: tuva_demo
72152
column_types:
73-
lab_result_id: |
153+
immunization_id: |
74154
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
75155
person_id: |
76156
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
77157
patient_id: |
78158
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
79159
encounter_id: |
80160
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
81-
accession_number: |
82-
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
83161
source_code_type: |
84162
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
85163
source_code: |
86164
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
87165
source_description: |
88166
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
89-
source_component: |
90-
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
91167
normalized_code_type: |
92168
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
93169
normalized_code: |
94170
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
95171
normalized_description: |
96172
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
97-
normalized_component: |
173+
status: |
174+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
175+
status_reason: |
176+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
177+
occurrence_date: |
178+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
179+
source_dose: |
180+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
181+
lot_number: |
182+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
183+
body_site: |
184+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
185+
route: |
186+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
187+
location_id: |
188+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
189+
practitioner_id: |
190+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
191+
data_source: |
192+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
193+
file_name: |
194+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
195+
ingest_datetime: |
196+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
197+
198+
- name: lab_result
199+
config:
200+
schema: input_layer
201+
tags: tuva_demo
202+
column_types:
203+
lab_result_id: |
204+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
205+
person_id: |
206+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
207+
patient_id: |
208+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
209+
encounter_id: |
210+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
211+
accession_number: |
212+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
213+
source_order_type: |
214+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
215+
source_order_code: |
216+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
217+
source_order_description: |
218+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
219+
source_component_type: |
220+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
221+
source_component_code: |
222+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
223+
source_component_description: |
224+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
225+
normalized_order_type: |
226+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
227+
normalized_order_code: |
228+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
229+
normalized_order_description: |
230+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
231+
normalized_component_type: |
232+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
233+
normalized_component_code: |
234+
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
235+
normalized_component_description: |
98236
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
99237
status: |
100238
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
101239
result: |
102240
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
103-
result_date: date
104-
collection_date: date
241+
result_datetime: datetime
242+
collection_datetime: datetime
105243
source_units: |
106244
{%- if target.type in ("bigquery", "databricks") -%} string {%- else -%} varchar(255) {%- endif -%}
107245
normalized_units: |

seeds/eligibility.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
person_id,member_id,subscriber_id,gender,race,birth_date,death_date,death_flag,enrollment_start_date,enrollment_end_date,payer,payer_type,plan,original_reason_entitlement_code,dual_status_code,medicare_status_code,group_id,group_name,first_name,last_name,social_security_number,subscriber_relation,address,city,state,zip_code,phone,data_source,file_name,file_date,ingest_datetime
1+
person_id,member_id,subscriber_id,gender,race,birth_date,death_date,death_flag,enrollment_start_date,enrollment_end_date,payer,payer_type,plan,original_reason_entitlement_code,dual_status_code,medicare_status_code,group_id,group_name,name_suffix,first_name,middle_name,last_name,social_security_number,subscriber_relation,address,city,state,zip_code,phone,email,ethnicity,data_source,file_name,file_date,ingest_datetime

seeds/lab_result.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
lab_result_id,person_id,patient_id,encounter_id,accession_number,source_code_type,source_code,source_description,source_component,normalized_code_type,normalized_code,normalized_description,normalized_component,status,result,result_date,collection_date,source_units,normalized_units,source_reference_range_low,source_reference_range_high,normalized_reference_range_low,normalized_reference_range_high,source_abnormal_flag,normalized_abnormal_flag,specimen,ordering_practitioner_id,data_source,file_name,ingest_datetime
1+
lab_result_id,person_id,patient_id,encounter_id,accession_number,source_order_type,source_order_code,source_order_description,source_component_type,source_component_code,source_component_description,normalized_order_type,normalized_order_code,normalized_order_description,normalized_component_type,normalized_component_code,normalized_component_description,status,result,result_datetime,collection_datetime,source_units,normalized_units,source_reference_range_low,source_reference_range_high,normalized_reference_range_low,normalized_reference_range_high,source_abnormal_flag,normalized_abnormal_flag,specimen,ordering_practitioner_id,data_source,file_name,ingest_datetime

0 commit comments

Comments
 (0)