Trial concept calculated: status of recruitment at the time of loading the trial records. Maps the categories that are in fields which specify the state of recruitment. Simplifies the status into three categories.
Arguments
- df
data frame such as from dbGetFieldsIntoDf. If `NULL`, prints fields needed in `df` for calculating this trial concept, which can be used with dbGetFieldsIntoDf.
Value
data frame with columns `_id` and `.statusRecruitment`, which is a factor with levels `ongoing` (includes active, not yet recruiting; temporarily halted; suspended; authorised, not started and similar), `completed` (includes ended; ongoing, recruitment ended), `ended early` (includes prematurely ended, terminated early) and `other` (includes revoked, withdrawn, planned, stopped).
Examples
# fields needed
f.statusRecruitment()
#> $euctr
#> [1] "trialInformation.globalEndOfTrialPremature"
#> [2] "trialInformation.isGlobalEndOfTrialReached"
#> [3] "p_end_of_trial_status"
#>
#> $ctgov
#> [1] "last_known_status" "overall_status"
#>
#> $ctgov2
#> [1] "protocolSection.statusModule.overallStatus"
#>
#> $isrctn
#> [1] "participants.recruitmentEnd"
#> [2] "participants.recruitmentStart"
#> [3] "participants.recruitmentStatusOverride"
#>
#> $ctis
#> [1] "authorizedApplication.memberStatesConcerned.mscName"
#> [2] "mscTrialNotificationsInfoList.mscNotificationsListInfo.notificationType"
#> [3] "events.trialEvents.events.notificationType"
#> [4] "ctPublicStatusCode"
#> [5] "ctStatus"
#>
if (FALSE) { # \dontrun{
# apply trial concept when creating data frame
dbc <- nodbi::src_sqlite(
dbname = system.file("extdata", "demo.sqlite", package = "ctrdata"),
collection = "my_trials", flags = RSQLite::SQLITE_RO)
trialsDf <- dbGetFieldsIntoDf(
calculate = "f.statusRecruitment",
con = dbc)
} # }