Skip to content

Commit

Permalink
Added STUDYID column to fix error with derive_vars_atc after correcti…
Browse files Browse the repository at this point in the history
…ng by_vars.
  • Loading branch information
ProfessorP-beep committed Oct 2, 2024
1 parent c8922f3 commit e908b48
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions vignettes/occds.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -173,33 +173,33 @@ The expected result is the input dataset with ATC variables added.

```{r eval=TRUE}
cm <- tibble::tribble(
~USUBJID, ~CMGRPID, ~CMREFID, ~CMDECOD,
"BP40257-1001", "14", "1192056", "PARACETAMOL",
"BP40257-1001", "18", "2007001", "SOLUMEDROL",
"BP40257-1002", "19", "2791596", "SPIRONOLACTONE"
~STUDYID, ~USUBJID, ~CMGRPID, ~CMREFID, ~CMDECOD,
"STUDY01", "BP40257-1001", "14", "1192056", "PARACETAMOL",
"STUDY01", "BP40257-1001", "18", "2007001", "SOLUMEDROL",
"STUDY01", "BP40257-1002", "19", "2791596", "SPIRONOLACTONE"
)
facm <- tibble::tribble(
~USUBJID, ~FAGRPID, ~FAREFID, ~FATESTCD, ~FASTRESC,
"BP40257-1001", "1", "1192056", "CMATC1CD", "N",
"BP40257-1001", "1", "1192056", "CMATC2CD", "N02",
"BP40257-1001", "1", "1192056", "CMATC3CD", "N02B",
"BP40257-1001", "1", "1192056", "CMATC4CD", "N02BE",
"BP40257-1001", "1", "2007001", "CMATC1CD", "D",
"BP40257-1001", "1", "2007001", "CMATC2CD", "D10",
"BP40257-1001", "1", "2007001", "CMATC3CD", "D10A",
"BP40257-1001", "1", "2007001", "CMATC4CD", "D10AA",
"BP40257-1001", "2", "2007001", "CMATC1CD", "D",
"BP40257-1001", "2", "2007001", "CMATC2CD", "D07",
"BP40257-1001", "2", "2007001", "CMATC3CD", "D07A",
"BP40257-1001", "2", "2007001", "CMATC4CD", "D07AA",
"BP40257-1001", "3", "2007001", "CMATC1CD", "H",
"BP40257-1001", "3", "2007001", "CMATC2CD", "H02",
"BP40257-1001", "3", "2007001", "CMATC3CD", "H02A",
"BP40257-1001", "3", "2007001", "CMATC4CD", "H02AB",
"BP40257-1002", "1", "2791596", "CMATC1CD", "C",
"BP40257-1002", "1", "2791596", "CMATC2CD", "C03",
"BP40257-1002", "1", "2791596", "CMATC3CD", "C03D",
"BP40257-1002", "1", "2791596", "CMATC4CD", "C03DA"
~STUDYID, ~USUBJID, ~FAGRPID, ~FAREFID, ~FATESTCD, ~FASTRESC,
"STUDY01", "BP40257-1001", "1", "1192056", "CMATC1CD", "N",
"STUDY01", "BP40257-1001", "1", "1192056", "CMATC2CD", "N02",
"STUDY01", "BP40257-1001", "1", "1192056", "CMATC3CD", "N02B",
"STUDY01", "BP40257-1001", "1", "1192056", "CMATC4CD", "N02BE",
"STUDY01", "BP40257-1001", "1", "2007001", "CMATC1CD", "D",
"STUDY01", "BP40257-1001", "1", "2007001", "CMATC2CD", "D10",
"STUDY01", "BP40257-1001", "1", "2007001", "CMATC3CD", "D10A",
"STUDY01", "BP40257-1001", "1", "2007001", "CMATC4CD", "D10AA",
"STUDY01", "BP40257-1001", "2", "2007001", "CMATC1CD", "D",
"STUDY01", "BP40257-1001", "2", "2007001", "CMATC2CD", "D07",
"STUDY01", "BP40257-1001", "2", "2007001", "CMATC3CD", "D07A",
"STUDY01", "BP40257-1001", "2", "2007001", "CMATC4CD", "D07AA",
"STUDY01", "BP40257-1001", "3", "2007001", "CMATC1CD", "H",
"STUDY01", "BP40257-1001", "3", "2007001", "CMATC2CD", "H02",
"STUDY01", "BP40257-1001", "3", "2007001", "CMATC3CD", "H02A",
"STUDY01", "BP40257-1001", "3", "2007001", "CMATC4CD", "H02AB",
"STUDY01", "BP40257-1002", "1", "2791596", "CMATC1CD", "C",
"STUDY01", "BP40257-1002", "1", "2791596", "CMATC2CD", "C03",
"STUDY01", "BP40257-1002", "1", "2791596", "CMATC3CD", "C03D",
"STUDY01", "BP40257-1002", "1", "2791596", "CMATC4CD", "C03DA"
)
derive_vars_atc(cm, facm)
Expand Down

0 comments on commit e908b48

Please sign in to comment.