Open bms63 opened 1 week ago
@bundfussr did a review of the admiral functions and found 2 occurrences where STUDYID and USUBJID are hardcoded instead of using get_admiral_option("subject_keys") as per https://pharmaverse.github.io/admiral/reference/#admiral-options.
STUDYID
USUBJID
get_admiral_option("subject_keys")
These are derive_vars_atc() and create_single_dose_dataset(), for example:
derive_vars_atc()
create_single_dose_dataset()
derive_vars_atc <- function(dataset, dataset_facm, by_vars = exprs(USUBJID, CMREFID = FAREFID), value_var = FASTRESC)
These functions should be flexible so as if ever set_admiral_options(subject_keys = exprs(STUDYID, USUBJID2)) was set by user then these variables would be used everywhere instead of USUBJID.
set_admiral_options(subject_keys = exprs(STUDYID, USUBJID2))
Background Information
Background Information
@bundfussr did a review of the admiral functions and found 2 occurrences where
STUDYID
andUSUBJID
are hardcoded instead of usingget_admiral_option("subject_keys")
as per https://pharmaverse.github.io/admiral/reference/#admiral-options.These are
derive_vars_atc()
andcreate_single_dose_dataset()
, for example:Definition of Done
These functions should be flexible so as if ever
set_admiral_options(subject_keys = exprs(STUDYID, USUBJID2))
was set by user then these variables would be used everywhere instead ofUSUBJID
.