Runs Define-XML validation rules (DD-prefix) against a
herald_spec object. These rules check the spec structure,
cross-references, and value conformance independently of any data.
See also
Other conformance:
adam_rules(),
build_anchor_index(),
clear_ct(),
fda_rules(),
fetch_core_rules(),
fetch_herald_rules(),
herald_rules_cache_dir(),
list_ct(),
load_herald_config(),
new_herald_context(),
pmda_rules(),
register_ct(),
register_operator(),
rule_catalog(),
rule_config(),
update_core_rules(),
validate(),
validate_spec_define(),
validation_report(),
verify_html_report()
Examples
spec <- herald_spec(
ds_spec = data.frame(dataset = "DM", label = "Demographics",
stringsAsFactors = FALSE),
var_spec = data.frame(dataset = "DM", variable = "STUDYID",
label = "Study ID", data_type = "text",
length = "12", stringsAsFactors = FALSE)
)
result <- validate_spec(spec)
result$findings
#> rule_id impact dataset variable row value expected
#> 1 DD0006 High datasets dataset 1 DM <NA>
#> 2 DD0006 High variables dataset 1 DM <NA>
#> 3 DD0007 High datasets label 1 Demographics <NA>
#> 4 DD0007 High variables label 1 Study ID <NA>
#> 5 DD0021 High variables variable 1 STUDYID <NA>
#> 6 DD0022 High datasets label 1 Demographics <NA>
#> 7 DD0022 High variables label 1 Study ID <NA>
#> message
#> 1 Dataset name is missing. Each row in the Datasets sheet must have a dataset name.
#> 2 Dataset name is missing. Each row in the Datasets sheet must have a dataset name.
#> 3 Dataset label is missing. Description is required for all ItemGroupDef in regulatory submissions.
#> 4 Dataset label is missing. Description is required for all ItemGroupDef in regulatory submissions.
#> 5 Variable name is missing. Each row in the Variables sheet must have a variable name.
#> 6 Variable label is missing. Description is required for all ItemDef corresponding to Variable definitions in regulatory submissions.
#> 7 Variable label is missing. Description is required for all ItemDef corresponding to Variable definitions in regulatory submissions.
