-
Notifications
You must be signed in to change notification settings - Fork 1
/
script.R
30 lines (22 loc) · 891 Bytes
/
script.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
require(devtools)
install_github("pepfar-datim/SIMS-Validation", force=TRUE)
require(SIMS4Validation)
secrets <- "/directory/secret.json"
# folder where file xzx is located, and where output files will be written to
out_dir <- "/directory/"
# name of the file to validate
filename <- "file.csv"
# type of the file (json, xml, or csv)
file_type <- "csv"
# identifier scheme used in the input file
#mechanism identifier: id or code
idScheme <- "id"
#id, code or name
dataElementIdScheme <- "name"
#id or code
orgUnitIdScheme <-"id"
# calendar period (quarter) covered by the input file in YYYYQN format, e.g. 2019Q3 for July-September 2019
isoPeriod <- "2022Q4"
# whether the input file has the header as the first line
fileHasHeader <- TRUE
SIMS4Validation::SIMSValidationScript(out_dir,filename,file_type,idScheme,dataElementIdScheme,orgUnitIdScheme,isoPeriod,fileHasHeader,secrets)