forked from tuva-health/tuva-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdbt_project.yml
More file actions
376 lines (357 loc) · 20 KB
/
Copy pathdbt_project.yml
File metadata and controls
376 lines (357 loc) · 20 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
name: 'the_tuva_project'
version: '0.18.0'
config-version: 2
require-dbt-version: ">=1.10.0"
profile: default
models:
## see docs: https://docs.elementary-data.com/
elementary:
## elementary models will be created in the schema '<your_schema>_elementary'
+schema: |
{%- if var('tuva_schema_prefix',None) != None -%}{{var('tuva_schema_prefix')}}_elementary{% else %}elementary{%- endif -%}
## To disable elementary for dev, uncomment this:
# enabled: "{{ target.name in ['prod','analytics'] }}"
the_tuva_project:
data_quality:
structural:
+enabled: "{{ var('enable_data_quality', false) | as_bool }}"
logical:
+enabled: "{{ var('enable_data_quality', false) | as_bool }}"
analytical:
+enabled: "{{ var('enable_data_quality', false) | as_bool }}"
dqi:
+enabled: "{{ var('enable_legacy_data_quality', false) | as_bool }}"
legacy:
+enabled: "{{ var('enable_legacy_data_quality', false) | as_bool }}"
flags:
require_explicit_package_overrides_for_builtin_materializations: false # Needed for Elementary
require_generic_test_arguments_property: true
vars:
## Broad enablement vars
# clinical_enabled: true
# claims_enabled: true
# provider_attribution_enabled: true
# semantic_layer_enabled: true
# fhir_preprocessing_enabled: true # defaults to false
# Use selectors to run specific marts.
## Seed storage configuration
custom_bucket_name: tuva-public-resources
tuva_seed_version: "1.0.0"
tuva_seed_versions:
concept_library: "1.0.1"
reference_data: "1.0.0"
terminology: "1.1.1"
value_sets: "1.0.0"
provider_data: "1.0.0"
synthetic_data: "1.1.0"
tuva_seed_buckets: {}
## Run metadata
# The date and timestamp of the dbt run that will populate the tuva_last_run column in all models.
# Default timezone is UTC.
tuva_last_run: '{{ run_started_at.astimezone(modules.pytz.timezone("UTC")) }}'
## Optional testing and feature flags
enable_data_quality: false
enable_input_layer_testing: true
enable_legacy_data_quality: false
# enable_normalize_engine: false
# set to false or leave undefined to affect no change
# set to unmapped to enable models in normalize schema that list any codes not mapped to normalized codes
# set to true produce the unmapped code models, and to integrate a seed called custom_mapped to map codes to normalized
## CCSR data mart vars
# Set to "ip" for inpatient data or "op" for outpatient data (more info in the README).
record_type: "ip"
# CCSR version numbers from HCUP.
dxccsr_version: "'2023.1'"
prccsr_version: "'2023.1'"
## CMS HCC data mart vars
# The payment_year variable has a default of the current year.
# To override it, set a numeric value such as cms_hcc_payment_year: 2019.
cms_hcc_payment_year: '{{ run_started_at.strftime("%Y") }}'
## Quality Measures period var
# To run quality measures for a period other than current year, uncomment below.
# quality_measures_period_end: "2020-12-31"
on-run-start:
- "{{ log_invocation_start() }}"
on-run-end:
- "{{ log_warning_for_seeds() }}"
model-paths: ["models"]
analysis-paths: ["analyses"]
test-paths: ["tests"]
seed-paths: ["seeds"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]
clean-targets:
- "target"
- "dbt_packages"
dispatch:
- macro_namespace: 'dbt_utils'
search_order: ['the_tuva_project', 'dbt_utils']
seeds:
the_tuva_project:
concept_library:
concept_library__clinical_concepts:
+post-hook: "{{ load_versioned_seed('concept_library','clinical_concepts.csv') }}"
concept_library__coding_systems:
+post-hook: "{{ load_versioned_seed('concept_library','coding_systems.csv') }}"
concept_library__value_set_members:
+post-hook: "{{ load_versioned_seed('concept_library','value_set_members.csv') }}"
reference_data:
reference_data__code_type:
+post-hook: "{{ load_versioned_seed('reference_data','code_type.csv') }}"
reference_data__ansi_fips_state:
+post-hook: "{{ load_versioned_seed('reference_data','ansi_fips_state.csv') }}"
reference_data__calendar:
+post-hook: "{{ load_versioned_seed('reference_data','calendar.csv') }}"
reference_data__fips_county:
+post-hook: "{{ load_versioned_seed('reference_data','fips_county.csv') }}"
reference_data__ssa_fips_state:
+post-hook: "{{ load_versioned_seed('reference_data','ssa_fips_state.csv') }}"
reference_data__svi_us_county:
+post-hook: "{{ load_versioned_seed('reference_data','svi_us_county.csv') }}"
reference_data__svi_us:
+post-hook: "{{ load_versioned_seed('reference_data','svi_us.csv') }}"
terminology:
terminology__act_site:
+post-hook: "{{ load_versioned_seed('terminology','act_site.csv') }}"
terminology__admit_source:
+post-hook: "{{ load_versioned_seed('terminology','admit_source.csv') }}"
terminology__admit_type:
+post-hook: "{{ load_versioned_seed('terminology','admit_type.csv') }}"
terminology__appointment_cancellation_reason:
+post-hook: "{{ load_versioned_seed('terminology','appointment_cancellation_reason.csv') }}"
terminology__appointment_status:
+post-hook: "{{ load_versioned_seed('terminology','appointment_status.csv') }}"
terminology__appointment_type:
+post-hook: "{{ load_versioned_seed('terminology','appointment_type.csv') }}"
terminology__apr_drg:
+post-hook: "{{ load_versioned_seed('terminology','apr_drg.csv') }}"
terminology__bill_type:
+post-hook: "{{ load_versioned_seed('terminology','bill_type.csv') }}"
terminology__claim_type:
+post-hook: "{{ load_versioned_seed('terminology','claim_type.csv') }}"
terminology__cms_acceptable_provider_specialty_codes:
+post-hook: "{{ load_versioned_seed('value_sets','cms_acceptable_provider_specialty_codes.csv') }}"
terminology__cvx:
+post-hook: "{{ load_versioned_seed('terminology','cvx.csv') }}"
terminology__ccs_services_procedures:
+post-hook: "{{ load_versioned_seed('terminology','ccs_services_procedures.csv') }}"
terminology__discharge_disposition:
+post-hook: "{{ load_versioned_seed('terminology','discharge_disposition.csv') }}"
terminology__electing_teaching_hospital_list:
+post-hook: "{{ load_versioned_seed('terminology','electing_teaching_hospital_list.csv') }}"
terminology__encounter_type:
+post-hook: "{{ load_versioned_seed('terminology','encounter_type.csv') }}"
terminology__ethnicity:
+post-hook: "{{ load_versioned_seed('terminology','ethnicity.csv') }}"
terminology__gender:
+post-hook: "{{ load_versioned_seed('terminology','gender.csv') }}"
terminology__hcpcs_level_2:
+post-hook: "{{ load_versioned_seed('terminology','hcpcs_level_2.csv') }}"
terminology__hcpcs_to_rbcs:
+post-hook: "{{ load_versioned_seed('terminology','hcpcs_to_rbcs.csv') }}"
terminology__icd_10_cm:
+post-hook: "{{ load_versioned_seed('terminology','icd_10_cm.csv') }}"
terminology__icd_10_pcs:
+post-hook: "{{ load_versioned_seed('terminology','icd_10_pcs.csv') }}"
terminology__icd10_pcs_cms_ontology:
+post-hook: "{{ load_versioned_seed('terminology','icd10_pcs_cms_ontology.csv') }}"
terminology__icd_9_cm:
+post-hook: "{{ load_versioned_seed('terminology','icd_9_cm.csv') }}"
terminology__icd_9_pcs:
+post-hook: "{{ load_versioned_seed('terminology','icd_9_pcs.csv') }}"
terminology__immunization_route_code:
+post-hook: "{{ load_versioned_seed('terminology','immunization_route_code.csv') }}"
terminology__immunization_status_reason:
+post-hook: "{{ load_versioned_seed('terminology','immunization_status_reason.csv') }}"
terminology__immunization_status:
+post-hook: "{{ load_versioned_seed('terminology','immunization_status.csv') }}"
terminology__loinc:
+post-hook: "{{ load_versioned_seed('terminology','loinc.csv') }}"
terminology__loinc_deprecated_mapping:
+post-hook: "{{ load_versioned_seed('terminology','loinc_deprecated_mapping.csv') }}"
terminology__mdc:
+post-hook: "{{ load_versioned_seed('terminology','mdc.csv') }}"
terminology__medicare_dual_eligibility:
+post-hook: "{{ load_versioned_seed('terminology','medicare_dual_eligibility.csv') }}"
terminology__medicare_orec:
+post-hook: "{{ load_versioned_seed('terminology','medicare_orec.csv') }}"
terminology__medicare_status:
+post-hook: "{{ load_versioned_seed('terminology','medicare_status.csv') }}"
terminology__ms_drg_weights_los:
+post-hook: "{{ load_versioned_seed('terminology','ms_drg_weights_los.csv') }}"
terminology__ms_drg:
+post-hook: "{{ load_versioned_seed('terminology','ms_drg.csv') }}"
terminology__ndc:
+post-hook: "{{ load_versioned_seed('terminology','ndc.csv') }}"
terminology__nitos:
+post-hook: "{{ load_versioned_seed('terminology','nitos.csv') }}"
terminology__observation_type:
+post-hook: "{{ load_versioned_seed('terminology','terminology__observation_type.csv') }}"
terminology__payer_type:
+post-hook: "{{ load_versioned_seed('terminology','payer_type.csv') }}"
terminology__place_of_service:
+post-hook: "{{ load_versioned_seed('terminology','place_of_service.csv') }}"
terminology__present_on_admission:
+post-hook: "{{ load_versioned_seed('terminology','present_on_admission.csv') }}"
terminology__race:
+post-hook: "{{ load_versioned_seed('terminology','race.csv') }}"
terminology__revenue_center:
+post-hook: "{{ load_versioned_seed('terminology','revenue_center.csv') }}"
terminology__rxnorm_to_atc:
+post-hook: "{{ load_versioned_seed('terminology','rxnorm_to_atc.csv') }}"
terminology__rxnorm_brand_generic:
+post-hook: "{{ load_versioned_seed('terminology','rxnorm_brand_generic.csv') }}"
terminology__snomed_ct:
+post-hook: "{{ load_versioned_seed('terminology','snomed_ct.csv') }}"
terminology__snomed_ct_transitive_closures:
+post-hook: "{{ load_versioned_seed('terminology','snomed_ct_transitive_closures.csv') }}"
terminology__snomed_icd_10_map:
+post-hook: "{{ load_versioned_seed('terminology','snomed_icd_10_map.csv') }}"
terminology__ssa_fips_state_county_crosswalk:
+post-hook: "{{ load_versioned_seed('terminology','ssa_fips_state_county_crosswalk.csv') }}"
provider_data:
provider_data__medicare_provider_and_supplier_taxonomy_crosswalk:
+post-hook: "{{ load_versioned_seed('provider_data','medicare_provider_and_supplier_taxonomy_crosswalk.csv') }}"
provider_data__other_provider_taxonomy:
+post-hook: "{{ load_versioned_seed('provider_data','other_provider_taxonomy.csv') }}"
provider_data__provider:
+post-hook: "{{ load_versioned_seed('provider_data','provider.csv') }}"
provider_data__provider_taxonomy_unpivot:
+post-hook: "{{ load_versioned_seed('provider_data','provider_taxonomy_unpivot.csv') }}"
synthetic_data:
synthetic_data__appointment:
+post-hook: "{{ load_versioned_synthetic_seed('appointment') }}"
synthetic_data__eligibility:
+post-hook: "{{ load_versioned_synthetic_seed('eligibility') }}"
synthetic_data__immunization:
+post-hook: "{{ load_versioned_synthetic_seed('immunization') }}"
synthetic_data__lab_result:
+post-hook: "{{ load_versioned_synthetic_seed('lab_result') }}"
synthetic_data__medical_claim:
+post-hook: "{{ load_versioned_synthetic_seed('medical_claim') }}"
synthetic_data__observation:
+post-hook: "{{ load_versioned_synthetic_seed('observation') }}"
synthetic_data__patient:
+post-hook: "{{ load_versioned_synthetic_seed('patient') }}"
synthetic_data__pharmacy_claim:
+post-hook: "{{ load_versioned_synthetic_seed('pharmacy_claim') }}"
synthetic_data__provider_attribution:
+post-hook: "{{ load_versioned_synthetic_seed('provider_attribution') }}"
value_sets:
ccsr:
ccsr__dxccsr_v2023_1_body_systems:
+post-hook: "{{ load_versioned_seed('value_sets','ccsr__dxccsr_v2023_1_body_systems.csv') }}"
ccsr__dxccsr_v2023_1_cleaned_map:
+post-hook: "{{ load_versioned_seed('value_sets','ccsr__dxccsr_v2023_1_cleaned_map.csv') }}"
ccsr__prccsr_v2023_1_cleaned_map:
+post-hook: "{{ load_versioned_seed('value_sets','ccsr__prccsr_v2023_1_cleaned_map.csv') }}"
ahrq_measures:
pqi__measures:
+post-hook: "{{ load_versioned_seed('value_sets','ahrq_measures__pqi_measures.csv') }}"
pqi__value_sets:
+post-hook: "{{ load_versioned_seed('value_sets','ahrq_measures__pqi.csv') }}"
chronic_conditions:
chronic_conditions__cms_chronic_conditions_hierarchy:
+post-hook: "{{ load_versioned_seed('value_sets','chronic_conditions__cms_chronic_conditions_hierarchy.csv') }}"
chronic_conditions__tuva_chronic_conditions_hierarchy:
+post-hook: "{{ load_versioned_seed('value_sets','chronic_conditions__tuva_chronic_conditions_hierarchy.csv') }}"
cms_hcc:
cms_hcc__adjustment_rates:
+post-hook: "{{ load_versioned_seed('value_sets','cms_hcc__adjustment_rates.csv') }}"
cms_hcc__cpt_hcpcs:
+post-hook: "{{ load_versioned_seed('value_sets','cms_hcc__cpt_hcpcs.csv') }}"
cms_hcc__demographic_factors:
+post-hook: "{{ load_versioned_seed('value_sets','cms_hcc__demographic_factors.csv') }}"
cms_hcc__disabled_interaction_factors:
+post-hook: "{{ load_versioned_seed('value_sets','cms_hcc__disabled_interaction_factors.csv') }}"
cms_hcc__disease_factors:
+post-hook: "{{ load_versioned_seed('value_sets','cms_hcc__disease_factors.csv') }}"
cms_hcc__disease_hierarchy:
+post-hook: "{{ load_versioned_seed('value_sets','cms_hcc__disease_hierarchy.csv') }}"
cms_hcc__disease_hierarchy_flat:
+post-hook: "{{ load_versioned_seed('value_sets','cms_hcc__disease_hierarchy_flat.csv') }}"
cms_hcc__disease_interaction_factors:
+post-hook: "{{ load_versioned_seed('value_sets','cms_hcc__disease_interaction_factors.csv') }}"
cms_hcc__enrollment_interaction_factors:
+post-hook: "{{ load_versioned_seed('value_sets','cms_hcc__enrollment_interaction_factors.csv') }}"
cms_hcc__icd_10_cm_mappings:
+post-hook: "{{ load_versioned_seed('value_sets','cms_hcc__icd_10_cm_mappings.csv') }}"
cms_hcc__payment_hcc_count_factors:
+post-hook: "{{ load_versioned_seed('value_sets','cms_hcc__payment_hcc_count_factors.csv') }}"
data_quality:
data_quality__crosswalk_field_info:
+post-hook: "{{ load_versioned_seed('value_sets','data_quality__crosswalk_field_info.csv') }}"
data_quality__crosswalk_field_to_mart:
+post-hook: "{{ load_versioned_seed('value_sets','data_quality__crosswalk_field_to_mart.csv') }}"
data_quality__crosswalk_mart_to_outcome_measure:
+post-hook: "{{ load_versioned_seed('value_sets','data_quality__crosswalk_mart_to_outcome_measure.csv') }}"
data_quality__crosswalk_measure_reasonable_ranges:
+post-hook: "{{ load_versioned_seed('value_sets','data_quality__crosswalk_measure_reasonable_ranges.csv') }}"
data_quality__reference_mart_analytics:
+post-hook: "{{ load_versioned_seed('value_sets','data_quality__reference_mart_analytics.csv') }}"
ed_classification:
ed_classification__categories:
+post-hook: "{{ load_versioned_seed('value_sets','ed_classification__categories.csv') }}"
ed_classification__icd_10_cm_to_ccs:
+post-hook: "{{ load_versioned_seed('value_sets','ed_classification__icd_10_cm_to_ccs.csv') }}"
ed_classification__johnston_icd10:
+post-hook: "{{ load_versioned_seed('value_sets','ed_classification__johnston_icd10.csv') }}"
ed_classification__johnston_icd9:
+post-hook: "{{ load_versioned_seed('value_sets','ed_classification__johnston_icd9.csv') }}"
hcc_suspecting:
hcc_suspecting__clinical_concepts:
+post-hook: "{{ load_versioned_seed('value_sets','hcc_suspecting__clinical_concepts.csv') }}"
hcc_suspecting__hcc_descriptions:
+post-hook: "{{ load_versioned_seed('value_sets','hcc_suspecting__hcc_descriptions.csv') }}"
hcc_suspecting__icd_10_cm_mappings:
+post-hook: "{{ load_versioned_seed('value_sets','hcc_suspecting__icd_10_cm_mappings.csv') }}"
pharmacy:
pharmacy__rxnorm_generic_available:
+post-hook: "{{ load_versioned_seed('value_sets','pharmacy__rxnorm_generic_available.csv') }}"
quality_measures:
quality_measures__concepts:
+post-hook: "{{ load_versioned_seed('value_sets','quality_measures__concepts.csv') }}"
quality_measures__measures:
+post-hook: "{{ load_versioned_seed('value_sets','quality_measures__measures.csv') }}"
quality_measures__value_sets:
+post-hook: "{{ load_versioned_seed('value_sets','quality_measures__codes.csv') }}"
readmissions:
readmissions__acute_diagnosis_ccs:
+post-hook: "{{ load_versioned_seed('value_sets','readmissions__acute_diagnosis_ccs.csv') }}"
readmissions__acute_diagnosis_icd_10_cm:
+post-hook: "{{ load_versioned_seed('value_sets','readmissions__acute_diagnosis_icd_10_cm.csv') }}"
readmissions__always_planned_ccs_diagnosis_category:
+post-hook: "{{ load_versioned_seed('value_sets','readmissions__always_planned_ccs_diagnosis_category.csv') }}"
readmissions__always_planned_ccs_procedure_category:
+post-hook: "{{ load_versioned_seed('value_sets','readmissions__always_planned_ccs_procedure_category.csv') }}"
readmissions__exclusion_ccs_diagnosis_category:
+post-hook: "{{ load_versioned_seed('value_sets','readmissions__exclusion_ccs_diagnosis_category.csv') }}"
readmissions__icd_10_cm_to_ccs:
+post-hook: "{{ load_versioned_seed('value_sets','readmissions__icd_10_cm_to_ccs.csv') }}"
readmissions__icd_10_pcs_to_ccs:
+post-hook: "{{ load_versioned_seed('value_sets','readmissions__icd_10_pcs_to_ccs.csv') }}"
readmissions__potentially_planned_ccs_procedure_category:
+post-hook: "{{ load_versioned_seed('value_sets','readmissions__potentially_planned_ccs_procedure_category.csv') }}"
readmissions__potentially_planned_icd_10_pcs:
+post-hook: "{{ load_versioned_seed('value_sets','readmissions__potentially_planned_icd_10_pcs.csv') }}"
readmissions__specialty_cohort:
+post-hook: "{{ load_versioned_seed('value_sets','readmissions__specialty_cohort.csv') }}"
readmissions__surgery_gynecology_cohort:
+post-hook: "{{ load_versioned_seed('value_sets','readmissions__surgery_gynecology_cohort.csv') }}"
service_categories:
service_category__service_categories:
+post-hook: "{{ load_versioned_seed('value_sets','service_category__service_categories.csv') }}"
cms_provider_attribution:
cms_provider_attribution__assignment_windows:
+post-hook: "{{ load_versioned_seed('value_sets','cms_provider_attribution___assignment_windows.csv') }}"
cms_provider_attribution__primary_care_hcpcs_codes:
+post-hook: "{{ load_versioned_seed('value_sets','cms_provider_attribution___primary_care_hcpcs_codes.csv') }}"
cms_provider_attribution__provider_specialty_assignment_codes:
+post-hook: "{{ load_versioned_seed('value_sets','cms_provider_attribution___provider_specialty_assignment_codes.csv') }}"
semantic_layer:
encounter_group_sk:
+post-hook: "{{ load_versioned_seed('value_sets','semantic_layer__encounter_group_sk.csv') }}"
encounter_type_sk:
+post-hook: "{{ load_versioned_seed('value_sets','semantic_layer__encounter_type_sk.csv') }}"
predictor_encounter_xwalk:
+post-hook: "{{ load_versioned_seed('value_sets','semantic_layer__predictor_encounter_xwalk.csv') }}"