Description
The Partial Interval Calculations section (Parameter Selection tab) lets users define partial-AUC and related interval parameters (AUCINT, CAVGINT, RCAMINT, FREXINT, ...). Today each row has only three fields: Parameter, Start, End, and the interval is:
- always named with the standard auto-generated pattern (
PPTESTCD_<start>-<end>, e.g. AUCINT_0-24), with no way to give it a meaningful label; and
- always calculated for every study type in the dataset, with no way to restrict it (e.g. compute a urine
FREXINT interval only for Excretion Data).
This makes results harder to read and forces irrelevant calculations.
Proposed change
Extend each partial-interval row with two optional fields:
- Custom name — optional free-text label. When provided, it replaces the standard
PPTESTCD_<start>-<end> name in the user-facing outputs (results table, descriptive statistics, plots, and ratio-parameter options). When empty, the current standard naming is kept. The underlying PKNCA parameter and CDISC PPTESTCD used for the actual calculation are unchanged.
- Study type — restrict which study type the interval is calculated for. Choices are
All (default, current behaviour) plus each study type detected in the loaded data (via detect_study_types()). Selecting a specific type calculates that partial interval only for groups of that type. To target several specific types, add one row per type.
Both fields must round-trip through the settings YAML and the exported R script, so saved/restored settings and generated scripts reproduce the same intervals.
Affected areas
inst/shiny/modules/tab_nca/setup/settings.R — int_parameters schema (new custom_name, study_type columns), table columns, edit observers, help text, settings serialize/restore
R/intervals.R — update_main_intervals(): carry custom_name onto interval rows; filter each manual interval by study_type
- Naming sites:
R/utils.R (rename_interval_params), R/label_operators.R (add_label_attribute), R/pivot_wider_pknca_results.R, and ratio-parameter options
inst/www/templates/settings_template.yaml and inst/www/templates/script_template.R
R/zzz.R globalVariables if needed
- Tests under
tests/testthat/
Definition of Done
Description
The Partial Interval Calculations section (Parameter Selection tab) lets users define partial-AUC and related interval parameters (AUCINT, CAVGINT, RCAMINT, FREXINT, ...). Today each row has only three fields: Parameter, Start, End, and the interval is:
PPTESTCD_<start>-<end>, e.g.AUCINT_0-24), with no way to give it a meaningful label; andFREXINTinterval only forExcretion Data).This makes results harder to read and forces irrelevant calculations.
Proposed change
Extend each partial-interval row with two optional fields:
PPTESTCD_<start>-<end>name in the user-facing outputs (results table, descriptive statistics, plots, and ratio-parameter options). When empty, the current standard naming is kept. The underlying PKNCA parameter and CDISCPPTESTCDused for the actual calculation are unchanged.All(default, current behaviour) plus each study type detected in the loaded data (viadetect_study_types()). Selecting a specific type calculates that partial interval only for groups of that type. To target several specific types, add one row per type.Both fields must round-trip through the settings YAML and the exported R script, so saved/restored settings and generated scripts reproduce the same intervals.
Affected areas
inst/shiny/modules/tab_nca/setup/settings.R—int_parametersschema (newcustom_name,study_typecolumns), table columns, edit observers, help text, settings serialize/restoreR/intervals.R—update_main_intervals(): carrycustom_nameonto interval rows; filter each manual interval bystudy_typeR/utils.R(rename_interval_params),R/label_operators.R(add_label_attribute),R/pivot_wider_pknca_results.R, and ratio-parameter optionsinst/www/templates/settings_template.yamlandinst/www/templates/script_template.RR/zzz.RglobalVariables if neededtests/testthat/Definition of Done
Allkeeps current behaviour