Skip to content

Commit 37f2a87

Browse files
committed
Address initial review findings
1 parent 1de507c commit 37f2a87

3 files changed

Lines changed: 24 additions & 12 deletions

File tree

R/helper_functions.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -429,14 +429,14 @@ generate_plot <- function(dataset,
429429

430430
if (alp_flag) {
431431
if (norm_ref_type == "ULN") {
432-
hover_alp <- sprintf("<br> ALP/ULN %s (%.3f) %s (%.2f)",
432+
hover_alp <- sprintf("<br>&nbsp;&nbsp;ALP/ULN %s (%.3f)<br>&nbsp;&nbsp;%s (%.2f)",
433433
ifelse(dataset[[".norm_alp"]] <= 2, "≤ 2", "> 2"),
434434
dataset[[".norm_alp"]],
435435
ifelse(dataset[[".r_ratio"]] <= 2, "R ≤ 2",
436436
ifelse(dataset[[".r_ratio"]] >= 5, "R ≥ 5", "2 < R < 5")),
437437
dataset[[".r_ratio"]])
438438
} else {
439-
hover_alp <- sprintf("<br> ALP/Baseline %s (%.3f)",
439+
hover_alp <- sprintf("<br>&nbsp;&nbsp;ALP/Baseline %s (%.3f)",
440440
ifelse(dataset[[".norm_alp"]] <= 2, "≤ 2", "> 2"),
441441
dataset[[".norm_alp"]])
442442
}
@@ -453,12 +453,12 @@ generate_plot <- function(dataset,
453453
"Subject: ", dataset[[subjectid_var]],
454454
"<br>Arm: ", dataset[[arm_var]],
455455
"<br>---<br>", sel_x, ": ", sprintf("%.3f", dataset[[".norm_at"]]),
456-
"<br> Visit: ", dataset[[".visit_at"]],
457-
"<br> Date: ", hover_date_x,
456+
"<br>&nbsp;&nbsp;Visit: ", dataset[[".visit_at"]],
457+
"<br>&nbsp;&nbsp;Date: ", hover_date_x,
458458
hover_alp,
459459
"<br>---<br>", sel_y, ": ", sprintf("%.3f", dataset[[".norm_tbili"]]),
460-
"<br> Visit: ", dataset[[".visit_tbili"]],
461-
"<br> Date: ", hover_date_y,
460+
"<br>&nbsp;&nbsp;Visit: ", dataset[[".visit_tbili"]],
461+
"<br>&nbsp;&nbsp;Date: ", hover_date_y,
462462
"<br>---<br>Time between peaks: ", hover_offset
463463
)
464464

R/mock_edish.R

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,19 @@
44
#'
55
#' @keywords internal
66
mock_edish_app <- function() {
7-
dm <- pharmaverseadam::adsl
8-
lb <- pharmaverseadam::adlb
7+
dm <- pharmaverseadam::adsl |> dplyr::mutate(dplyr::across(dplyr::where(is.character), as.factor))
8+
lb <- pharmaverseadam::adlb |> dplyr::mutate(dplyr::across(dplyr::where(is.character), as.factor))
99

1010
mock_edish_UI <- function() { # nolint
11-
shiny::fluidPage(edish_UI("edish"))
11+
shiny::fluidPage(edish_UI(
12+
module_id = "edish",
13+
arm_default_vals = "Xanomeline High Dose",
14+
at_choices = c("Alanine Aminotransferase", "Aspartate Aminotransferase"),
15+
at_default_val = "Alanine Aminotransferase",
16+
tbili_choice = "Bilirubin",
17+
default_by_visit = FALSE,
18+
window_days = NULL
19+
))
1220
}
1321

1422
mock_edish_server <- function(input, output, session) {
@@ -18,6 +26,9 @@ mock_edish_app <- function() {
1826
list("dm" = dm, "lb" = lb)
1927
}),
2028
baseline_visit_val = "SCREENING 1",
29+
at_choices = c("Alanine Aminotransferase", "Aspartate Aminotransferase"),
30+
tbili_choice = "Bilirubin",
31+
alp_choice = "Alkaline Phosphatase",
2132
lb_date_var = "ADT"
2233
)
2334
}

R/mod_edish.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ EDISH <- pack_of_constants(
1919
BY_VISIT_INFO = "Aminotransferase values will be plotted for each visit",
2020
PLOT_TYPE_ID = "plot_type",
2121
PLOT_TYPE_LABEL = "Plot type:",
22-
PLOT_TYPE_CHOICES = c("\u00d7 ULN (eDISH)" = "ULN",
23-
"\u00d7 Baseline (mDISH)" = "Baseline"),
22+
PLOT_TYPE_CHOICES = c("eDISH (\u00d7 ULN)" = "ULN",
23+
"mDISH (\u00d7 Baseline)" = "Baseline"),
2424
PLOT_ID = "plot",
2525
WINDOW_DAYS_ID = "window_days",
2626
WINDOW_DAYS_LABEL = "Max. days between peaks:",
@@ -151,7 +151,8 @@ edish_UI <- function(module_id,
151151
min = 0,
152152
max = 100,
153153
step = 1
154-
)
154+
),
155+
style = "max-height: 85vh; overflow-y: auto; overflow-x: hidden; padding: 10px;"
155156
)
156157

157158
ui <- shiny::tagList(

0 commit comments

Comments
 (0)