Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e9fc2c8
temporarily include SDTM datasets as CSV
Gero1999 May 18, 2026
5ce633c
add scripts to transform SDTM inputs to PKNCA
Gero1999 May 18, 2026
bb19a05
Merge pull request #1311 from pharmaverse/1268-enhancement/data-raw-t…
Gero1999 May 20, 2026
d99ebee
correct PCELTM derivation so it uses NRRLT instead of NFRLT
Gero1999 May 21, 2026
9ad6724
Merge remote-tracking branch 'origin/main' into sdtm-input
Gero1999 May 21, 2026
0cf8de9
Add sdtm_to_PKNCAdata, pc_to_PKNCAconc, and ex_to_PKNCAdose functions
Gero1999 May 22, 2026
25d8af0
Add NCA round-trip comparison tests for SDTM vs ADNCA paths
Gero1999 May 22, 2026
ce4387a
Merge branch 'sdtm-input' of https://github.com/pharmaverse/aNCA into…
Gero1999 May 21, 2026
8a67667
fix adnca_example time rounding issues & update all downstream obj (e…
Gero1999 May 21, 2026
46623d2
Fix RRLTU casing and add SDTM-vs-ADNCA equivalence tests
Gero1999 May 22, 2026
fb317a1
Add SDTM upload path to Shiny app
Gero1999 May 22, 2026
9ea830a
Fix DM metadata Core values and add SDTM test CSVs
Gero1999 May 22, 2026
ecbf3db
Fix SDTM mapping panel: visibility, duplicate IDs, selectize population
Gero1999 May 26, 2026
f4ab0f2
Fix SDTM submit freeze, add SDTM General mapping section, add logging
Gero1999 May 26, 2026
54e8e58
Fix vector coercion error in SDTM column rename
Gero1999 May 26, 2026
4ec5bd0
Add TRT01A alias for DOSETRT in SDTM conc data
Gero1999 May 26, 2026
f6b9296
add to-do message
Gero1999 May 26, 2026
d6741b4
Load SDTM example data by default when no files uploaded
Gero1999 May 26, 2026
0312293
Apply column mapping in SDTM script template
Gero1999 May 26, 2026
b92f8b8
Fix 9 test failures: RRLTU casing and tapply array class
Gero1999 May 27, 2026
509856b
update man (roxygenise)
Gero1999 May 27, 2026
a22e698
run rebuild.R
Gero1999 May 27, 2026
edd804d
Merge branch 'sdtm-input' of https://github.com/pharmaverse/aNCA into…
Gero1999 May 27, 2026
3f5eee1
Fix lint issues: naming, indentation, cyclomatic complexity
Gero1999 May 27, 2026
877f99b
fix lintr issues
Gero1999 May 27, 2026
394fb2f
update WORDLIST
Gero1999 May 27, 2026
65fbd19
lint: simplify helper fun name
Gero1999 May 27, 2026
49d8bb4
lintr: identation
Gero1999 May 27, 2026
834fd50
Handle empty EXDUR/EXELTM/PCELTM and extend ISO 8601 duration parser
Gero1999 Jun 2, 2026
930b1f1
Warn when dose duration defaults to 0
Gero1999 Jun 2, 2026
c0474f6
fix warning msg for EXDUR=0 assumed
Gero1999 Jun 2, 2026
4c55739
Map PCSTAT/PCREASND to nca_exclude for SDTM exclusions
Gero1999 Jun 2, 2026
7b9e5ee
Add PCREASND as mappable exclusion column for SDTM
Gero1999 Jun 2, 2026
68b6a8b
Filter excluded samples with missing time (PKNCA workaround)
Gero1999 Jun 2, 2026
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
2 changes: 1 addition & 1 deletion .lintr
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ linters:
seq_linter = seq_linter()
)
encoding: "UTF-8"
exclusions: list("R/PKNCA_extra_parameters.R", "tests/testthat/test-PKNCA_extra_parameters.R", "inst/www/templates/script_template.R")
exclusions: list("R/PKNCA_extra_parameters.R", "tests/testthat/test-PKNCA_extra_parameters.R", "inst/www/templates/script_template.R", "inst/www/templates/script_template_sdtm.R")
4 changes: 4 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export(create_start_impute)
export(delete_settings_version)
export(detect_study_types)
export(dose_profile_duplicates)
export(ex_to_PKNCAdose)
export(exploration_individualplot)
export(exploration_meanplot)
export(export_cdisc)
Expand All @@ -57,6 +58,7 @@ export(interval_remove_impute)
export(l_pkcl01)
export(multiple_matrix_ratios)
export(parse_annotation)
export(pc_to_PKNCAconc)
export(pivot_wider_pknca_results)
export(pk.calc.ermax)
export(pk.calc.ertlst)
Expand All @@ -71,6 +73,7 @@ export(read_settings)
export(read_versioned_settings)
export(remove_pp_not_requested)
export(run_app)
export(sdtm_to_PKNCAdata)
export(settings_version_summary)
export(simplify_unit)
export(translate_terms)
Expand Down Expand Up @@ -158,6 +161,7 @@ importFrom(purrr,pmap_chr)
importFrom(purrr,reduce)
importFrom(reactable,reactable)
importFrom(reactable.extras,reactable_extras_dependency)
importFrom(rlang,.data)
importFrom(rlang,expr)
importFrom(rlang,sym)
importFrom(rlang,syms)
Expand Down
16 changes: 14 additions & 2 deletions R/get_session_code.R
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,21 @@ get_settings_code <- function(
settings_file_path,
data_path,
output_path = "settings_code.R",
template_path = system.file("www/templates/script_template.R", package = "aNCA")
template_path = NULL
) {
settings <- read_settings(settings_file_path)

# Auto-select template based on input_mode if not explicitly provided
if (is.null(template_path)) {
mode <- settings[["input_mode"]] %||% "adnca"
template_file <- if (identical(mode, "sdtm")) {
"www/templates/script_template_sdtm.R"
} else {
"www/templates/script_template.R"
}
template_path <- system.file(template_file, package = "aNCA")
}

session <- list(
settings = settings[["settings"]],
slope_rules = settings[["slope_rules"]],
Expand All @@ -228,7 +239,8 @@ get_settings_code <- function(
extra_vars_to_keep = c(
settings[["mapping"]][["Grouping_Variables"]], "DOSEA", "ATPTREF", "ROUTE"
),
time_duplicate_rows = settings[["time_duplicate_keys"]]
time_duplicate_rows = settings[["time_duplicate_keys"]],
sdtm_metabolites = settings[["sdtm_metabolites"]]
)

get_code(
Expand Down
Loading
Loading