Runs a single step of an assessment workflow. This function is called by RunWorkflow
for each
step in the workflow. It prepares the parameters for the function call, including the metadata,
mapping, and data inputs. It then calls the function specified in lStep$name
with the prepared
parameters.
Arguments
- lStep
list
single workflow step (typically defined inlWorkflow$workflow
). Should include the name of the function to run (lStep$name
), data inputs (lStep$inputs
), name of output (lStep$output
) and configurable parameters (lStep$params
) (if any)- lData
list
a named list of domain level data frames.- lMeta
list
a named list of meta data.
Value
list
containing the results of the lStep$name
function call should contain .$checks
parameter with results from is_mapping_vald
for each domain in lStep$inputs
.
Examples
wf_mapping <- MakeWorkflowList("mapping")
lStep <- MakeWorkflowList("kri0001")[["kri0001"]][["steps"]][[1]]
lMeta <- MakeWorkflowList("kri0001")[["kri0001"]][["meta"]]
lData <- list(
dfSUBJ = clindata::rawplus_dm,
dfAE = clindata::rawplus_ae,
dfPD = clindata::ctms_protdev,
dfCONSENT = clindata::rawplus_consent,
dfIE = clindata::rawplus_ie
)
lMapped <- RunWorkflow(wf_mapping, lData)$lData
#>
#> ── Initializing `` Workflow ────────────────────────────────────────────────────
#> → Colnames: dfSUBJ, dfAE, dfPD, dfCONSENT, and dfIE
#> → Workflow `` has no `steps` property.
#> → Workflow `` has no `meta` property.
#> ℹ Returning workflow outputs:
#>
#> ── Completed `` Workflow ───────────────────────────────────────────────────────
ae_step <- RunStep(lStep = lStep, lData = lMapped, lMeta = lMeta)
#>
#> ── Evaluating 1 parameter(s) for `ParseThreshold()`
#> ✔ strThreshold = Threshold: Passing lMeta$Threshold.
#>
#> ── Calling `ParseThreshold()`
#> ✔ Parsed -2,-1,2,3 to numeric vector: -2, -1, 2, and 3