-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
91 lines (83 loc) · 6.17 KB
/
config.yml
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
default:
project_name : "{project_name}"
schema_name : "{schema_name}"
dsn_staging : "cdw_cache_staging"
# dsn_mpi : "cdw_mpi_1"
# dsn_outpost : "cdw_outpost"
# dsn_omop : "cdw_omop_1"
# dsn_waystation_meditech : "cdw_waystation_meditech"
# dsn_waystation_gecb : "cdw_waystation_idx"
# dsn_transaction : "cdw_transaction"
# dsn_security : "BbmcSecurity"
# redcap_pid : 1
# redcap_instance : "bbmc"
directory_file_server : "//pedsis/peds/data/BBMC/prairie-outpost/{project_name}"
directory_output : !expr strftime(Sys.time(), "{directory_file_server}/data-private/derived/%Y-%m-%d")
# path_output_summary : !expr strftime(Sys.time(), "{directory_file_server}/data-private/derived/%Y-%m-%d/_summary.csv")
# path_output_description : !expr strftime(Sys.time(), "{directory_file_server}/data-private/derived/%Y-%m-%d/_description.md")
# directory_meditech_triage : "//pedsis/peds/data/BBMC/ou-medicine"
# path_log_flow : !expr strftime(Sys.time(), "data-unshared/log/%Y/%Y-%m/flow-%Y-%m-%d--%H-%M-%S.log")
# path_log_flow : !expr strftime(Sys.time(), "//pedsis/peds/data/BBMC/prairie-outpost/{project_name}/log/%Y/%Y-%m/flow-%Y-%m-%d--%H-%M-%S.log")
# path_metadata_ss_dx : "data-public/metadata/ss-dx.csv"
# time_zone_local : "America/Chicago" # Force time calculations to be local, in case remotely run.
# ---- Validation Ranges & Patterns ----
# range_record_id : !expr c(1L, 999999L)
# range_mrn_epic_external : !expr c(1000000000L, 1099999999L)
# range_mrn_gecb : !expr c(400000L, 3999999L)
# range_mrn_flowcast : !expr c(100000L, 9999999L) # There are a few existing trashy records outside 6 or 7 digits: c(1L, 9999999L)
# range_mrn_flowcast_all : !expr c( 1L, 99999999L)
# range_cpt4 : !expr c(10000L, 99999L)
# omop_concept_min : 0
# omop_concept_local : 2000000000
# omop_concept_max : 2147483647
# range_dob : !expr c(as.Date("2010-01-01"), Sys.Date() + lubridate::days(1))
# range_date_entry : !expr c(as.Date("2019-01-01"), Sys.Date())
# range_datetime_entry : !expr c(as.POSIXct("2019-01-01", tz="America/Chicago"), Sys.time())
# range_hdid : !expr c(-1L, 999999908L)
# range_bp_systolic : !expr c(30L, 200L)
# range_bp_diastolic : !expr c(30L, 200L)
# range_npi : !expr c(1000000000L, 9999999999L) # a 10-digit integer
# max_age : 99
# pattern_zipcode : "^(?<zipcode>\\d{5})(?<zipcode_extension>-\\d{4})?$"
# pattern_mrn_epic : "^10\\d{8}$"
# pattern_mrn_centricity : "^\\d{16}$" # The 64-bit int is more easily validated as a character.
# pattern_mrn_flowcast : "^\\d{6,7}$" # There are 22 values with junky meditech mrns."^(?:\\d{6,8}|E\\d{9})$"
# pattern_mrn_meditech : "^[A-Z]\\d{9}$" # OKC patients start with 'E'; edmond patients start with 'W'
# pattern_mrn_meditech_internal : "^[A-Z]\\d{1,7}$" # OKC patients start with 'E'; edmond patients start with 'W' pattern_mrn_meditech
# pattern_account_meditech : "^[A-Z]\\d{11}$"
# pattern_meditech_print_number : "^\\d{3}\\.\\d{4,5}$"
# pattern_pt_name_full : "^.{2,50}$"
# pattern_race : "^.{5,50}$"
# pattern_ethnicity : "^.{7,25}$"
# pattern_icdcm : "^[A-Z][0-9][0-9AB]\\.?[0-9A-Z]{0,4}|\\d{3}\\.?\\d{0,2}|E\\d{3}\\.?\\d?|V\\d{2}\\.?\\d{0,2}|NOD.X$" # Set database column to `varchar(8)` From https://www.johndcook.com/blog/2019/05/05/regex_icd_codes/
# pattern_icd9cm : "^\\d{3}\\.?\\d{0,2}|E\\d{3}\\.?\\d?|V\\d{2}\\.?\\d{0,2}$" # Set database column to `varchar(6)`
# pattern_icd10cm : "^[A-Z][0-9][0-9AB]\\.?[0-9A-Z]{0,4}|NOD.X$" # Set database column to `varchar(8)`
# pattern_loinc : "^\\d{3,5}-\\d$"
# pattern_cpt : "^\\d{4}[0-9a-z]$"
# pattern_hcpcs : "^[0-9a-z]\\d{4}$"
# pattern_hcpcs_cpt : "^[0-9a-z]\\d{3}[0-9a-z]$" # Meditech has a field that accepts either cpt or hcpcs
# tables_to_scribe:
# -
# name: patient
# sql: "SELECT * FROM {schema_name}.patient"
# columns_include: ""
# path_output: !expr strftime(Sys.time(), "{directory_file_server}/data-private/derived/%Y-%m-%d/patient.csv")
# #path_output: "data-private/derived/%Y-%m-%d/pt.csv"
# row_unit: each row represents a distinct patient.
# -
# name: patient_upcoming
# path_sql: "manipulation/scribe/pt-upcoming.sql"
# path_output: !expr strftime(Sys.time(), "{directory_file_server}/data-private/derived/%Y-%m-%d/patient.csv")
# row_unit: each row represents a distinct patient with any future appt.
# -
# name: obs
# sql: ""
# columns_include: "mrn_flowcast, obs_date, obs_term, obs_value"
# path_output: !expr strftime(Sys.time(), "{directory_file_server}/data-private/derived/%Y-%m-%d/obs.csv")
# row_unit: each row represents a distinct measurement
# -
# name: medicate
# columns_include: "*"
# # columns_exclude: "start_date, stop_date"
# path_output: !expr strftime(Sys.time(), "{directory_file_server}/data-private/derived/%Y-%m-%d/medicate.csv")
# row_unit: each row represents a distinct prescription