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

rerun ADaM templates #61

Merged
merged 14 commits into from
Jun 6, 2024
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Language: en-US
LazyData: true
LazyDataCompression: bzip2
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
Depends: R (>= 3.5)
Imports:
Suggests:
Expand Down
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

## New Features

- Variables labels are applied to datasets by `metacore`/`metatools`.
- Variables labels are applied to datasets by `metacore`/`metatools`. (#50)
- ADPC, ADPPK and ADPP are updated to handle urine records. (#57)

# pharmaverseadam 0.1.1

Expand Down
3 changes: 2 additions & 1 deletion R/adpc.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#'
#' @name adpc
#' @docType data
#' @format A data frame with 122 columns:
#' @format A data frame with 123 columns:
#' \describe{
#' \item{ STUDYID }{Study Identifier}
#' \item{ USUBJID }{Unique Subject Identifier}
Expand Down Expand Up @@ -51,6 +51,7 @@
#' \item{ PCRFTDT }{Reference Date of Dose for Analyte}
#' \item{ PCRFTTM }{Reference Time of Dose for Analyte}
#' \item{ NRRLT }{Nominal Rel. Time from Ref. Dose}
#' \item{ PARCAT1 }{undocumented field}
#' \item{ ATPTN }{Analysis Timepoint (N)}
#' \item{ ATPT }{Analysis Timepoint}
#' \item{ ATPTREF }{Analysis Timepoint Reference}
Expand Down
10 changes: 6 additions & 4 deletions R/adpp.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#'
#' @name adpp
#' @docType data
#' @format A data frame with 74 columns:
#' @format A data frame with 76 columns:
#' \describe{
#' \item{ STUDYID }{Study Identifier}
#' \item{ USUBJID }{Unique Subject Identifier}
Expand All @@ -25,15 +25,17 @@
#' \item{ ADT }{Analysis Date}
#' \item{ ADY }{Analysis Relative Day}
#' \item{ PARAMCD }{Parameter Code}
#' \item{ PARCAT1 }{Parameter Category}
#' \item{ AVAL }{Numeric Result/Finding in Standard Units}
#' \item{ AVALC }{Character Result/Finding in Std Format}
#' \item{ AVALU }{Standard Units}
#' \item{ SRCDOM }{Domain Abbreviation}
#' \item{ SRCVAR }{Source Variable}
#' \item{ SRCSEQ }{Sequence Number}
#' \item{ VISIT }{Visit Name}
#' \item{ VISITNUM }{Visit Number}
#' \item{ AVISIT }{Analysis Visit}
#' \item{ AVISITN }{Analysis Visit (N)}
#' \item{ AVISIT }{Analysis Visit}
#' \item{ VISITNUM }{Visit Number}
#' \item{ VISIT }{Visit Name}
#' \item{ TRTP }{Planned Treatment}
#' \item{ TRTA }{Actual Treatment}
#' \item{ AVALCA1N }{Analysis Value Category 1 (N)}
Expand Down
5 changes: 4 additions & 1 deletion R/adppk.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#'
#' @name adppk
#' @docType data
#' @format A data frame with 59 columns:
#' @format A data frame with 62 columns:
#' \describe{
#' \item{ STUDYID }{Study Identifier}
#' \item{ USUBJID }{Unique Subject Identifier}
Expand All @@ -15,6 +15,7 @@
#' \item{ NPRLT }{Nominal Rel Time from Previous Dose}
#' \item{ DOSEA }{Actual Treatment Dose}
#' \item{ DOSEP }{Planned Treatment Dose}
#' \item{ PARAMCD }{undocumented field}
#' \item{ ALLOQ }{Analysis Lower Limit of Quantitation}
#' \item{ CMT }{Compartment}
#' \item{ BLQFL }{Below Lower Limit of Quant Flag}
Expand All @@ -29,6 +30,8 @@
#' \item{ II }{Dosing Interval (unit)}
#' \item{ SS }{Steady State}
#' \item{ ASEQ }{Analysis Sequence Number}
#' \item{ PARAM }{undocumented field}
#' \item{ PARAMN }{undocumented field}
#' \item{ PROJID }{Project Identifier}
#' \item{ PROJIDN }{Project Identifier (N)}
#' \item{ STUDYIDN }{Study Identifier (N)}
Expand Down
2 changes: 1 addition & 1 deletion R/adtte_onco.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
#' \describe{
#' \item{ STUDYID }{Study Identifier}
#' \item{ USUBJID }{Unique Subject Identifier}
#' \item{ ADT }{Analysis Date}
#' \item{ EVNTDESC }{Event or Censoring Description}
#' \item{ SRCDOM }{Source Data}
#' \item{ SRCVAR }{Source Variable}
#' \item{ SRCSEQ }{Source Sequence Number}
#' \item{ CNSR }{Censor}
#' \item{ ADT }{Analysis Date}
#' \item{ CNSDTDSC }{Censor Date Description}
#' \item{ STARTDT }{Time-to-Event Origin Date for Subject}
#' \item{ PARAMCD }{Parameter Code}
Expand Down
19 changes: 7 additions & 12 deletions data-raw/create_adams_data.R
kaz462 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ensure every packages are installed

update_pkg <- FALSE
update_pkg <- TRUE
ignore_templates <- list(
"admiralonco" = c("ad_adrs_basic.R")
)
Expand Down Expand Up @@ -123,17 +123,8 @@ run_template <- function(tp) {

if (update_pkg) {
github_pat <- Sys.getenv("GITHUB_TOKEN") # in case of run through github workflows
kaz462 marked this conversation as resolved.
Show resolved Hide resolved
kaz462 marked this conversation as resolved.
Show resolved Hide resolved
if (github_pat == "") {
token_file <- "data-raw/github_token.R"
if (file.exists(token_file)) {
source(token_file)
} else {
"WARNING - you might have issues installing pharmaverse deps -
Please follow instructions in the readme.md"
}
}
# install pharmaversesdtm dep: TODO: see if we install from github or latest release?
install.packages("pharmaverse/pharmaversesdtm")
remotes::install_github("pharmaverse/pharmaversesdtm", ref = "main", force = TRUE)
kaz462 marked this conversation as resolved.
Show resolved Hide resolved
}

# dict to match admiral xlsx specs suffixes
Expand All @@ -152,7 +143,11 @@ for (pkg in packages_list) {
if (update_pkg) {
# TODO: replace by main once done
remotes::install_github(sprintf("pharmaverse/%s", pkg),
ref = "workflow_dispatch_templates", auth_token = github_pat,
kaz462 marked this conversation as resolved.
Show resolved Hide resolved
ref = "main", auth_token = if (github_pat == "") {
NULL
} else {
github_pat
},
upgrade = "always", force = TRUE
)
}
Expand Down
Binary file modified data/adae.rda
Binary file not shown.
Binary file modified data/adbcva_ophtha.rda
Binary file not shown.
Binary file modified data/adce_vaccine.rda
Binary file not shown.
Binary file modified data/adcm.rda
Binary file not shown.
Binary file modified data/adeg.rda
Binary file not shown.
Binary file modified data/adex.rda
Binary file not shown.
Binary file modified data/adface_vaccine.rda
Binary file not shown.
Binary file modified data/adis_vaccine.rda
Binary file not shown.
Binary file modified data/adlb.rda
Binary file not shown.
Binary file modified data/adlbhy.rda
Binary file not shown.
Binary file modified data/admh.rda
Binary file not shown.
Binary file modified data/adoe_ophtha.rda
Binary file not shown.
Binary file modified data/adpc.rda
Binary file not shown.
Binary file modified data/adpp.rda
Binary file not shown.
Binary file modified data/adppk.rda
Binary file not shown.
Binary file modified data/adrs_onco.rda
Binary file not shown.
Binary file modified data/adsl.rda
Binary file not shown.
Binary file modified data/adsl_vaccine.rda
Binary file not shown.
Binary file modified data/adtr_onco.rda
Binary file not shown.
Binary file modified data/adtte_onco.rda
Binary file not shown.
Binary file modified data/advfq_ophtha.rda
Binary file not shown.
Binary file modified data/advs.rda
Binary file not shown.
3 changes: 2 additions & 1 deletion man/adpc.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions man/adpp.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion man/adppk.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/adtte_onco.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading