8000 Update disposition mapping with discontinuation rather than completion. by samussiah · Pull Request #746 · Gilead-BioStats/gsm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update disposition mapping with discontinuation rather than completion. #746

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 2 commits into from
Sep 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions R/Disp_Map_Raw.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ Disp_Map_Raw <- function(
select(
SubjectID = lMapping[[strDomain]][["strIDCol"]],
DCReason = lMapping[[strDomain]][[glue::glue("str{strContext}DiscontinuationReasonCol")]],
Completion = lMapping[[strDomain]][[glue::glue("str{strContext}CompletionFlagCol")]]
Discontinuation = lMapping[[strDomain]][[glue::glue("str{strContext}DiscontinuationFlagCol")]]
) %>%
filter(!.data$Completion %in% lMapping[[strDomain]][[glue::glue("str{strContext}CompletionFlagVal")]]) %>%
filter(.data$Discontinuation %in% lMapping[[strDomain]][[glue::glue("str{strContext}DiscontinuationFlagVal")]]) %>%
mutate(Count = 1)

dfSUBJ_mapped <- dfs$dfSUBJ %>%
Expand Down
8 changes: 4 additions & 4 deletions inst/mappings/mapping_rawplus.yaml
10000
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ dfSTUDCOMP:
strIDCol: subjid
strStudyDiscontinuationReasonCol: compreas
strStudyDiscontinuationReasonVal: consent
strStudyCompletionFlagCol: compyn
strStudyCompletionFlagVal: "Y"
strStudyDiscontinuationFlagCol: compyn
strStudyDiscontinuationFlagVal: "N"
dfSDRGCOMP:
strIDCol: subjid
strTreatmentPhaseCol: datapagename # or foldername - temporary - should be phase
strTreatmentPhaseVal: Blinded Study Drug Completion
strTreatmentDiscontinuationReasonCol: sdrgreas
strTreatmentDiscontinuationReasonVal: withdrawal
strTreatmentCompletionFlagCol: sdrgyn
strTreatmentCompletionFlagVal: "Y"
strTreatmentDiscontinuationFlagCol: sdrgyn
strTreatmentDiscontinuationFlagVal: "N"
dfLB:
strIDCol: subjid
strVisitCol: visnam
Expand Down
4 changes: 2 additions & 2 deletions inst/specs/Disp_Map_Raw_Study.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ dfSTUDCOMP:
vRequired:
- strIDCol
- strStudyDiscontinuationReasonCol
- strStudyCompletionFlagCol
- strStudyDiscontinuationFlagCol
vNACols:
- strStudyDiscontinuationReasonCol
- strStudyCompletionFlagCol
- strStudyDiscontinuationFlagCol
dfSUBJ:
vRequired:
- strIDCol
Expand Down
4 changes: 2 additions & 2 deletions inst/specs/Disp_Map_Raw_Treatment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ dfSDRGCOMP:
vRequired:
- strIDCol
- strTreatmentDiscontinuationReasonCol
- strTreatmentCompletionFlagCol
- strTreatmentDiscontinuationFlagCol
vNACols:
- strTreatmentDiscontinuationReasonCol
- strTreatmentCompletionFlagCol
- strTreatmentDiscontinuationFlagCol
dfSUBJ:
vRequired:
- strIDCol
Expand Down
2 changes: 1 addition & 1 deletion man/md/Disp_Map_Raw_Study.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
|dfSUBJ |strIDCol |subjid |TRUE |FALSE |TRUE |
|dfSTUDCOMP |strIDCol |subjid |TRUE |FALSE |FALSE |
|dfSTUDCOMP |strStudyDiscontinuationReasonCol |compreas |TRUE |TRUE |FALSE |
|dfSTUDCOMP |strStudyCompletionFlagCol |compyn |TRUE |TRUE |FALSE |
|dfSTUDCOMP |strStudyDiscontinuationFlagCol |compyn |TRUE |TRUE |FALSE |
2 changes: 1 addition & 1 deletion man/md/Disp_Map_Raw_Treatment.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
|dfSUBJ |strIDCol |subjid |TRUE |FALSE |TRUE |
|dfSDRGCOMP |strIDCol |subjid |TRUE |FALSE |FALSE |
|dfSDRGCOMP |strTreatmentDiscontinuationReasonCol |sdrgreas |TRUE |TRUE |FALSE |
|dfSDRGCOMP |strTreatmentCompletionFlagCol |sdrgyn |TRUE |TRUE |FALSE |
|dfSDRGCOMP |strTreatmentDiscontinuationFlagCol |sdrgyn |TRUE |TRUE |FALSE |
10 changes: 5 additions & 5 deletions tests/testthat/_snaps/Disp_Map_Raw.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
{
"type": "character",
"attributes": {},
"value": ["strIDCol", "strStudyDiscontinuationReasonCol", "strStudyCompletionFlagCol"]
"value": ["strIDCol", "strStudyDiscontinuationReasonCol", "strStudyDiscontinuationFlagCol"]
},
{
"type": "character",
"attributes": {},
"value": ["strStudyDiscontinuationReasonCol", "strStudyCompletionFlagCol"]
"value": ["strStudyDiscontinuationReasonCol", "strStudyDiscontinuationFlagCol"]
}
]
},
Expand Down Expand Up @@ -75,7 +75,7 @@
"names": {
"type": "character",
"attributes": {},
"value": ["strIDCol", "strStudyDiscontinuationReasonCol", "strStudyDiscontinuationReasonVal", "strStudyCompletionFlagCol", "strStudyCompletionFlagVal"]
"value": ["strIDCol", "strStudyDiscontinuationReasonCol", "strStudyDiscontinuationReasonVal", "strStudyDiscontinuationFlagCol", "strStudyDiscontinuationFlagVal"]
}
},
"value": [
Expand All @@ -102,7 +102,7 @@
{
"type": "character",
"attributes": {},
"value": ["Y"]
"value": ["N"]
}
]
},
Expand Down Expand Up @@ -383,7 +383,7 @@

-- Checking Input Data for `Disp_Map_Raw_Study()` --

x "mapping" does not contain required parameters: strIDCol, strStudyDiscontinuationReasonCol, strStudyCompletionFlagCol
x "mapping" does not contain required parameters: strIDCol, strStudyDiscontinuationReasonCol, strStudyDiscontinuationFlagCol
x mapping is not a list()
x Non-character column names found in mapping:
x "mapping" does not contain required parameters: strIDCol, strSiteCol
Expand Down
0