8000 Fix #611: Update library to be compatible with updates to rawplus data standard in clindata. by samussiah · Pull Request #700 · Gilead-BioStats/gsm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix #611: Update library to be compatible with updates to rawplus data standard in clindata. #700

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

Merged
merged 21 commits into from
Aug 31, 2022

Conversation

samussiah
Copy link
Contributor
@samussiah samussiah commented Aug 19, 2022

Overview

Updates to data model to sync with recent updates in {clindata}

Test Notes/Sample Code

My verbose test code is below.

#detach("package:clindata", unload=TRUE)
#devtools::install("../clindata")
#detach("package:gsm", unload=TRUE)
#devtools::install('../gsm')
devtools::load_all("../clindata")
devtools::load_all('../gsm')

# map functions
ae_in <- AE_Map_Raw()
ae <- AE_Assess(ae_in)
ae$chart

pd_in <- PD_Map_Raw()
pd<-PD_Assess(pd_in)
pd$chart 

disp_in <- Disp_Map_Raw(strContext="Study")
disp<-Disp_Assess(disp_in)
disp$chart 

trt_in <- Disp_Map_Raw(strContext="Treatment",bQuiet=FALSE)
trt<-Disp_Assess(trt_in)
trt$chart 

lb_in <- LB_Map_Raw(bQuiet=FALSE)
lb<-LB_Assess(lb_in)
lb$chart 

ie_in <- IE_Map_Raw()
ie<-IE_Assess(ie_in)
ie$chart 

consent_in <- Consent_Map_Raw()
consent<-Consent_Assess(consent_in)
consent$chart 

#run_assessment
runone<-function(n){
    lAssessments <- MakeAssessmentList()
    lData <- list(
        dfAE = clindata::rawplus_ae,
        dfCONSENT = clindata::rawplus_consent,
        dfSTUDCOMP = clindata::rawplus_studcomp,
        dfSDRGCOMP = clindata::rawplus_s
8000
drgcomp,
        dfIE = clindata::rawplus_ie,
        dfLB = clindata::rawplus_lb,
        dfPD = clindata::rawplus_protdev,
        dfSUBJ = clindata::rawplus_dm
    )

    lTags <- list(
        Study = "myStudy"
    )  

    lMapping <- yaml::read_yaml(system.file("mappings", "mapping_rawplus.yaml", package = "gsm"))  

    res<-RunAssessment(
        lAssessments[[paste0('kri000',n)]], 
        lData,
        lMapping,
        lTags,
        bQuiet=FALSE
    )

    print(res$bStatus)
    print(res$lResults$chart)
    return(res)
}

kri1<-runone(1)
kri2<-runone(2)
kri3<-runone(3)
kri4<-runone(4)
kri5<-runone(5)
kri6<-runone(6)
kri7<-runone(7)
kri8<-runone(8)


# study_assess
result<- Study_Assess(bQuiet=FAlSE)

Notes:

@samussiah samussiah requested a review from jwildfire August 19, 2022 21:14
@jwildfire
Copy link
Contributor

cc: @gwu05

@gwu05
Copy link
Contributor
gwu05 commented Aug 22, 2022

We likely need Vinh to update the rawplus_lb data set - currently the subjectid vs subjid is causing issues since I can't re-create the identifier, for rawplus_ie and rawplus_consent as well to update the column names (right now it's "SubjectID")

@gwu05
Copy link
Contributor
gwu05 commented Aug 22, 2022

Also not sure how the strStudyCompletionFlagVal is working with default setting of "TRUE" when the values are "Y" and "N"?

@gwu05
Copy link
Contributor
gwu05 commented Aug 22, 2022

Was able to get AE, SAE, etc., PD, IPD, etc. working , but was not able to get IE, LB, Consent, Disp working completely (some worked but have questions)

@gwu05
Copy link
Contributor
gwu05 commented Aug 23, 2022

There's also something funky going on with the subjectID derivations (we'll probably need to follow-up with Vinh)

Basically, there's usually INVID vs SITENUMBER vs SITEID
and SUBJID vs SUBJECTID vs SUBJECT
(luckily only one SCRNID)

and how you put them all together to turn into subjectid

@jwildfire
Copy link
Contributor

@gwu05 @samussiah Just an FYI - I just merged in some of Matt's recent updates that are in Dev and very likely broke some stuff. Will start debugging now ...

@samussiah
Copy link
Contributor Author
samussiah commented Aug 23, 2022

@gwu05 generally we want to use subjid from rawplus as our unique subject identifier but this variable is empty for screen failures, which triggers invalid and duplicate value checks. Initial thought was to apply RemoveInvalidSubjectIDs to input data but this would need to occur before CheckInputs, which is an issue because we rely on those checks to trust the structure of the input data.

@jwildfire's thought is to rely on the workflows to filter the input data prior to mapping. I like this idea but if we just want to run a mapping function I'm not sure what the best approach is.

@mattroumaya
Copy link
Contributor

Will this cover #681 when it's approved?

Copy link
Contributor
@mattroumaya mattroumaya left a comment

Choose a reason for hiding this comment

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

This all looks great!

Going to merge with some notes about next steps:

  1. Unit tests will be failing. Looking to future development, we will be doing some moderate refactoring, so only going to clean up *_Map unit tests.
  2. Experimental workflows need to be fixed
  3. Report does not run (which is fine, we'll be updating this at the end of, or after v1.3.0)

@mattroumaya mattroumaya merged commit 060872a into dev Aug 31, 2022
@samussiah samussiah deleted the fix-611 branch August 31, 2022 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants
0