This page provides a sample IP monitoring report generated using the
gsm.kri package. Expand the “Setup” section below to see
the code used to generate the report. Or scroll down for the standard
report output.
# Load libraries
library(gsm.core)
library(gsm.mapping)
library(gsm.kri)
# --- Step 1: Map the subject, study completion and IP non-starter data ------
mappings_wf <- MakeWorkflowList(
strNames = c("SUBJ", "STUDCOMP", "IPNS"),
strPath = "workflow/1_mappings",
strPackage = "gsm.mapping",
bExact = TRUE
)
## Warning: `MakeWorkflowList()` was deprecated in gsm.core 1.3.0.
## ℹ Please use `workr::MakeWorkflowList()` instead.
## This warning is displayed once per session.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
lRaw <- Ingest(gsm.core::lSource, CombineSpecs(mappings_wf))
## ℹ Ingesting data for STUDCOMP.
## [INFO] Creating a new temporary DuckDB connection.
## duckdb keeps downloaded extensions and secrets in a temporary directory:
## ℹ /tmp/RtmpYGM8NR/duckdb
## This is removed when the R session ends.
## • Extensions are re-downloaded each session.
## • Secrets are lost.
## ℹ Run duckdb(shared_home = TRUE) (or create ~/.duckdb) to keep them (suitable for most users).
## ℹ Run duckdb(shared_home = FALSE) to accept the temporary directory (and silence this message).
## ℹ See ?duckdb_storage for details and alternatives.
## [INFO] SQL Query complete: 116 rows returned.
##
## [INFO] Disconnected from temporary DuckDB connection.
##
## ℹ Ingesting data for SUBJ.
##
## [INFO] Creating a new temporary DuckDB connection.
##
## duckdb keeps downloaded extensions and secrets in a temporary directory:
## ℹ /tmp/RtmpYGM8NR/duckdb
## This is removed when the R session ends.
## • Extensions are re-downloaded each session.
## • Secrets are lost.
## ℹ Run duckdb(shared_home = TRUE) (or create ~/.duckdb) to keep them (suitable for most users).
## ℹ Run duckdb(shared_home = FALSE) to accept the temporary directory (and silence this message).
## ℹ See ?duckdb_storage for details and alternatives.
## [INFO] SQL Query complete: 1000 rows returned.
##
## [INFO] Disconnected from temporary DuckDB connection.
##
## ℹ Ingesting data for SUBJ.
##
## [INFO] Creating a new temporary DuckDB connection.
##
## duckdb keeps downloaded extensions and secrets in a temporary directory:
## ℹ /tmp/RtmpYGM8NR/duckdb
## This is removed when the R session ends.
## • Extensions are re-downloaded each session.
## • Secrets are lost.
## ℹ Run duckdb(shared_home = TRUE) (or create ~/.duckdb) to keep them (suitable for most users).
## ℹ Run duckdb(shared_home = FALSE) to accept the temporary directory (and silence this message).
## ℹ See ?duckdb_storage for details and alternatives.
## [INFO] SQL Query complete: 1000 rows returned.
##
## [INFO] Disconnected from temporary DuckDB connection.
lMapped <- RunWorkflows(mappings_wf, lRaw)
## Warning: `RunWorkflows()` was deprecated in gsm.core 1.3.0.
## ℹ Please use `workr::RunWorkflows()` instead.
## This warning is displayed once per session.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
## [INFO] Running 3 Workflows
## [INFO] Initializing `Mapped_STUDCOMP` Workflow
## [INFO] Checking data against spec
## [INFO] Workflow Step 1 of 1: `=`
## [INFO] Evaluating 2 parameter(s) for `=`
## [INFO] lhs = Mapped_STUDCOMP: No matching data found. Passing 'Mapped_STUDCOMP' as a string.
## [INFO] rhs = Raw_STUDCOMP: Passing lData$Raw_STUDCOMP.
## [INFO] Calling `=`
## [INFO] 116x6 data.frame saved as `lData$Mapped_STUDCOMP`.
## [INFO] Returning results from final step: 116x6 data.frame`.
## [INFO] Completed `Mapped_STUDCOMP` Workflow
## [INFO] Initializing `Mapped_SUBJ` Workflow
## [INFO] Checking data against spec
## [INFO] Workflow Step 1 of 1: `workr::RunQuery`
## [INFO] Evaluating 2 parameter(s) for `workr::RunQuery`
## [INFO] df = Raw_SUBJ: Passing lData$Raw_SUBJ.
## [INFO] strQuery = SELECT * FROM df WHERE enrollyn == 'Y': No matching data found. Passing 'SELECT * FROM df WHERE enrollyn == 'Y'' as a string.
## [INFO] Calling `workr::RunQuery`
## [INFO] Creating a new temporary DuckDB connection.
## duckdb keeps downloaded extensions and secrets in a temporary directory:
## ℹ /tmp/RtmpYGM8NR/duckdb
## This is removed when the R session ends.
## • Extensions are re-downloaded each session.
## • Secrets are lost.
## ℹ Run duckdb(shared_home = TRUE) (or create ~/.duckdb) to keep them (suitable for most users).
## ℹ Run duckdb(shared_home = FALSE) to accept the temporary directory (and silence this message).
## ℹ See ?duckdb_storage for details and alternatives.[INFO] SQL Query complete: 754 rows returned.
## [INFO] Disconnected from temporary DuckDB connection.
## [INFO] 754x25 data.frame saved as `lData$Mapped_SUBJ`.
## [INFO] Returning results from final step: 754x25 data.frame`.
## [INFO] Completed `Mapped_SUBJ` Workflow
## [INFO] Initializing `Mapped_IPNS` Workflow
## [INFO] Checking data against spec
## [INFO] Workflow Step 1 of 1: `workr::RunQuery`
## [INFO] Evaluating 2 parameter(s) for `workr::RunQuery`
## [INFO] df = Mapped_SUBJ: Passing lData$Mapped_SUBJ.
## [INFO] strQuery = SELECT studyid, subjid, invid, country,
## drv_enrollment_dt, drv_ip_dosed, drv_ip_first_dose_dt,
## drv_enrl_first_dose_days, drv_days_lapsed_since_enrl,
## drv_ip_nonstarter_status, drv_kit_assigned,
## CASE drv_ip_nonstarter_status
## WHEN 'Dosed' THEN 0
## WHEN 'Potential Non-Starter within window' THEN 1
## WHEN 'Potential Non-Starter outside window' THEN 2
## WHEN 'Confirmed Non-Starter' THEN 3
## END AS ipns_status_ord,
## CASE drv_ip_nonstarter_status
## WHEN 'Dosed' THEN 'Dosed'
## WHEN 'Potential Non-Starter within window' THEN 'Potential IP non-starter - within window'
## WHEN 'Potential Non-Starter outside window' THEN 'Potential IP non-starter - outside window'
## WHEN 'Confirmed Non-Starter' THEN 'Confirmed IP non-starter'
## END AS ipns_status
## FROM df: No matching data found. Passing 'SELECT studyid, subjid, invid, country,
## drv_enrollment_dt, drv_ip_dosed, drv_ip_first_dose_dt,
## drv_enrl_first_dose_days, drv_days_lapsed_since_enrl,
## drv_ip_nonstarter_status, drv_kit_assigned,
## CASE drv_ip_nonstarter_status
## WHEN 'Dosed' THEN 0
## WHEN 'Potential Non-Starter within window' THEN 1
## WHEN 'Potential Non-Starter outside window' THEN 2
## WHEN 'Confirmed Non-Starter' THEN 3
## END AS ipns_status_ord,
## CASE drv_ip_nonstarter_status
## WHEN 'Dosed' THEN 'Dosed'
## WHEN 'Potential Non-Starter within window' THEN 'Potential IP non-starter - within window'
## WHEN 'Potential Non-Starter outside window' THEN 'Potential IP non-starter - outside window'
## WHEN 'Confirmed Non-Starter' THEN 'Confirmed IP non-starter'
## END AS ipns_status
## FROM df' as a string.
## [INFO] Calling `workr::RunQuery`
## [INFO] Creating a new temporary DuckDB connection.
## duckdb keeps downloaded extensions and secrets in a temporary directory:
## ℹ /tmp/RtmpYGM8NR/duckdb
## This is removed when the R session ends.
## • Extensions are re-downloaded each session.
## • Secrets are lost.
## ℹ Run duckdb(shared_home = TRUE) (or create ~/.duckdb) to keep them (suitable for most users).
## ℹ Run duckdb(shared_home = FALSE) to accept the temporary directory (and silence this message).
## ℹ See ?duckdb_storage for details and alternatives.[INFO] SQL Query complete: 754 rows returned.
## [INFO] Disconnected from temporary DuckDB connection.
## [INFO] 754x13 data.frame saved as `lData$Mapped_IPNS`.
## [INFO] Returning results from final step: 754x13 data.frame`.
## [INFO] Completed `Mapped_IPNS` Workflow
# --- Step 2: Pick "today" -----------------------------------------------------
# The bundled data stops years before its reporting snapshots, so "today" is its
# own as-of date, recovered from the not-dosed participants' day counts.
dSnapshotDate <- with(
lMapped$Mapped_IPNS,
max(drv_enrollment_dt + drv_days_lapsed_since_enrl - 1, na.rm = TRUE)
)
lListings <- list(
Mapped_IPNS = lMapped$Mapped_IPNS,
Mapped_SUBJ = lMapped$Mapped_SUBJ,
Mapped_STUDCOMP = lMapped$Mapped_STUDCOMP
)
Study: AA-AA-000-0000
Snapshot date: 2012-04-28
| Total enrolled | Confirmed dosed | Potential IP non-starter - within window | Potential IP non-starter - outside window | Confirmed IP non-starter | Confirmed IP non-starter with WoC | Treatment ongoing | Treatment complete per protocol | Premature treatment discontinuation | Potential premature treatment discontinuation |
|---|---|---|---|---|---|---|---|---|---|
|
754
|
679
90.1% of enrolled
|
18
2.4% of enrolled
|
27
3.6% of enrolled
|
30
4.0% of enrolled
|
10
1.3% of enrolled
|
309
45.5% of dosed
|
152
22.4% of dosed
|
153
22.5% of dosed
|
65
9.6% of dosed
|
One bar per study, as % of its participants: all enrolled, or only dosed or not dosed when the participant filter is set. Use the chart’s position control for counts.
Bars are % of dosed participants in scope; a participant counts once under each of their reasons. A discontinuation without a reason shows as Not yet recorded.
Points on the dashed diagonal have no event yet: potential IP non-starters and dosed participants without a treatment discontinuation date. Points above it had their event: a treatment discontinuation date for dosed participants, whatever their status, or a study completion record (Confirmed IP non-starter). Squares are dosed participants, circles are not dosed. Click a legend entry to hide a status in every scatter; double-click to show only that status.
One bar per country, as % of its participants: all enrolled, or only dosed or not dosed when the participant filter is set. Use the chart’s position control for counts. Click a country bar to filter.
Bars are % of dosed participants in scope; a participant counts once under each of their reasons. A discontinuation without a reason shows as Not yet recorded.
Points on the dashed diagonal have no event yet: potential IP non-starters and dosed participants without a treatment discontinuation date. Points above it had their event: a treatment discontinuation date for dosed participants, whatever their status, or a study completion record (Confirmed IP non-starter). Squares are dosed participants, circles are not dosed. Click a legend entry to hide a status in every scatter; double-click to show only that status.
One bar per site, as % of its participants: all enrolled, or only dosed or not dosed when the participant filter is set. Use the chart’s position control for counts. Click a site bar to filter.
Bars are % of dosed participants in scope; a participant counts once under each of their reasons. A discontinuation without a reason shows as Not yet recorded.
Points on the dashed diagonal have no event yet: potential IP non-starters and dosed participants without a treatment discontinuation date. Points above it had their event: a treatment discontinuation date for dosed participants, whatever their status, or a study completion record (Confirmed IP non-starter). Squares are dosed participants, circles are not dosed. Click a legend entry to hide a status in every scatter; double-click to show only that status.
- Only one Status is assigned to each participant (enrolled only).
- IP non-starter statuses (potential within window, potential outside window, confirmed) = participant not dosed.
- Premature treatment discontinuation = dosed, did not complete study drug per protocol.
- Potential premature treatment discontinuation = dosed, permanently withdrawn from study drug, with no completion outcome recorded yet.
- Treatment complete per protocol = dosed, completed study drug per protocol.
- Treatment ongoing = dosed, still on study drug.
- Study Drug Completed per Protocol shows the delivered treatment completion outcome; Drug discontinuation reason is filled for both discontinuation statuses.
- Study complete is the study completion CRF answer (
compyn): Y, N, or blank when not yet answered. It does not set the status.- Consent withdrawn is a separate flag, not a status: the study completion CRF reports withdrawal of consent (
compreas).