Closed taylorrodgers closed 3 weeks ago
Relevant code in {gsmApp}:
# ---- demographics
dfSUBJ <- reactive({
get_domain(
snapshot,
"dfSUBJ",
"strSiteCol",
site()
)
})
# ---- study disposition
dfSTUDCOMP <- reactive({
get_domain(
snapshot,
"dfSTUDCOMP",
"strIDCol",
dfSUBJ()$data[[dfSUBJ()$mapping$strIDCol]]
)
})
### Participant Status Functions
participant_list <- reactive({
list(
screened = list(
eligible = sum(dfSUBJ()$data$enrollyn == "Y"),
ineligible = sum(dfSUBJ()$data$enrollyn == "N")
),
enrolled = list(
completed = sum(dfSTUDCOMP()$data$compyn == "Y"),
discontinued = sum(dfSTUDCOMP()$data$compyn == "N"),
active = sum(!c(dfSTUDCOMP()$data$compyn %in% c("Y", "N")))
),
discontinued_reasons = dfSTUDCOMP()$data$compreas
)
})
This functionality should go into a data domain-level module built on dfSTUDCOMP
.
I don't think this belongs in {gsm}. We can revisit as a custom gsmApp Module as mentioned above
Summary
We'd like to amend both both the data model for
dfGroups
andgsm::reportingGroups
to include the following params:Background
These params are reported in
gsmApp
. We haveParticipantCount
, which is reported asEnrolled
in the report, but not these other variables.Example Code
Ideally, these params would appear when running the following code: