Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add subject disposition #2004

Merged
merged 4 commits into from
Dec 30, 2024
Merged

add subject disposition #2004

merged 4 commits into from
Dec 30, 2024

Conversation

samussiah
Copy link
Contributor

@samussiah samussiah commented Dec 20, 2024

Overview

This branch adds subject-level status using the study completion domain, then aggregates at the study, site, and country levels.

Test Notes/Sample Code

lSourceData <- list(
    Raw_STUDY = clindata::ctms_study,
    Raw_SITE = clindata::ctms_site,
    Raw_SUBJ = clindata::rawplus_dm,
    Raw_STUDCOMP = clindata::rawplus_studcomp
)
lWorkflows <- MakeWorkflowList(c('STUDY', 'SITE', 'COUNTRY', 'SUBJ', 'STUDCOMP'))
lSpec <- CombineSpecs(lWorkflows)
lRawData <- Ingest(lSourceData, lSpec)
lMappedData <- RunWorkflows(
    lWorkflows,
    lRawData
)
dfGroups <- RunWorkflow(
    MakeWorkflowList('Groups')[[1]],
    lMappedData
)
dfGroups %>% filter(Param == 'ActiveParticipants')

Connected Issues

@@ -35,6 +36,8 @@ spec:
type: character
subjid:
type: character
Status:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can remove this Status, right? looks like a duplicate

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one captures subject status, to count the number of active subjects at the site.

@@ -41,6 +42,8 @@ spec:
type: character
subjid:
type: character
Status:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another duplicate Status as far as i can tell

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wait, Mapped_SUBJ$Status is used to calculate the number of active subjects. Raw_STUDY$Status is a study-level attribute.

Copy link
Contributor

@lauramaxwell lauramaxwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few tiny yaml edits that will also require a rerun of tests to update snaps, but other than that (and some investigation into the check failueres), this is looking good!

@samussiah
Copy link
Contributor Author

This PR kind of standardizes Status so the study and each site/participant will have a status, because the RBQM team can only follow up with active sites and participants.

Copy link
Contributor

@lauramaxwell lauramaxwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Status' were not duplicates-misread the yamls. this looks great!

@lauramaxwell lauramaxwell merged commit 1bf657d into dev Dec 30, 2024
6 checks passed
@lauramaxwell lauramaxwell deleted the add-disposition branch December 30, 2024 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Add subject disposition.
3 participants