Skip to content

Commit 9f180c7

Browse files
authored
ID:240329 [dv.papo] papo clinlines mismatch (#41)
* Update timeline_limits in patient_plot_server to use dates from sl_info * Update development version to 2.1.1-9000 * RoxygenNote set to 7.3.2
1 parent a1b361d commit 9f180c7

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: dv.papo
22
Title: Patient Profile
3-
Version: 2.1.1
3+
Version: 2.1.1-9000
44
Authors@R:
55
c(person("Boehringer-Ingelheim Pharma GmbH & Co.KG", role = c("cph", "fnd")),
66
person(given = "Korbinian",
@@ -20,7 +20,7 @@ License: Apache License (>= 2)
2020
Encoding: UTF-8
2121
LazyData: true
2222
Roxygen: list(markdown = TRUE)
23-
RoxygenNote: 7.3.0
23+
RoxygenNote: 7.3.2
2424
Depends:
2525
R (>= 4.1.0)
2626
Imports:

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# dv.papo 2.1.1-9000
2+
3+
- Fixed issue with plot displays when POSIXt date-time variables used for the timeline limits.
4+
15
# dv.papo 2.1.1
26

37
- Remove early error feedback for trt_end is NA

R/mod_plots.R

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,19 +158,19 @@ patient_plot_server <- function(id, subject_var,
158158
# Compute plots ----
159159

160160
timeline_limits <- local({ # start...end, but takes icf and part_end dates into account if available
161-
min_total <- subject_level_dataset[[timeline_info[["trt_start_date"]]]]
161+
min_total <- sl_info[["trt_start_date"]]
162162
if ("icf_date" %in% names(timeline_info)) {
163-
icf_date <- subject_level_dataset[[timeline_info[["icf_date"]]]]
163+
icf_date <- sl_info[["icf_date"]]
164164
if (is.finite(icf_date)) min_total <- icf_date
165165
}
166166

167167
max_total <- as.Date(-Inf)
168-
trt_end_date <- subject_level_dataset[[timeline_info[["trt_end_date"]]]]
168+
trt_end_date <- sl_info[["trt_end_date"]]
169169
if (is.finite(trt_end_date)) {
170170
max_total <- trt_end_date
171171
}
172172
if ("part_end_date" %in% names(timeline_info)) {
173-
part_end_date <- subject_level_dataset[[timeline_info[["part_end_date"]]]]
173+
part_end_date <- sl_info[["part_end_date"]]
174174
if (is.finite(part_end_date)) max_total <- part_end_date
175175
}
176176
if (!is.finite(max_total)) max_total <- Sys.Date()
@@ -180,10 +180,11 @@ patient_plot_server <- function(id, subject_var,
180180

181181
x_limits <- local({ # we need to compute combined limits first because ggplot+plotly need them before layout calculation
182182
# the +/-1 avoids clipping the left and right arrows on the plot
183-
diff <- timeline_limits[[2]] - timeline_limits[[1]]
184-
offset_left <- min(-1L, round(-diff / 10))
185-
offset_right <- max(1L, round(diff / 10))
186-
c(timeline_limits[[1]] + offset_left, timeline_limits[[2]] + offset_right)
183+
timeline_limit_lower <- timeline_limits[[1]]
184+
timeline_limit_upper <- timeline_limits[[2]]
185+
diff <- timeline_limit_upper - timeline_limit_lower
186+
offset <- max(1L, round(diff / 10))
187+
c(timeline_limit_lower - offset, timeline_limit_upper + offset)
187188
})
188189

189190
plot_list <- local({

0 commit comments

Comments
 (0)