-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdmrun.R
47 lines (19 loc) · 1.42 KB
/
dmrun.R
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
source("freq.R")
################################################################################################################################
################################################################################################################################
################################################################################################################################
########## THIS SCRIPT RUNS ORPHAN KEYS' TESTS
################################################################################################################################
################################################################################################################################
## create data frame to store only columns and tables that have related key and/or primary keys for data model test
if (CDM %in% c("PCORNET3","PCORNET31")) {
DQTBL_KEYS <- select(subset(DQTBL, ColNam %in% c("patid","encounterid","providerid","prescribingid","enc_type")),TabNam, ColNam, UNIQFRQ)
## creating an index for plotting: Count In means number rof unique frequencies that exist in the reference table
DQTBL_KEYS$Index <- "Count_In"
dmtest <- parse(file = "dmtest_pcornet3.R")
}
for (i in seq_along(dmtest)) {
tryCatch(eval(dmtest[[i]]),
error = function(e) message("No Worries!! HE thinks it is fine if there is an ", as.character(e)))
}
###### this test is working based on DQTBL_KEYS