Skip to content

Commit 92dbc47

Browse files
authored
Merge pull request #32 from Boehringer-Ingelheim/290181-fix-SAE-labels
290181 fix sae labels
2 parents aaca31b + e17532b commit 92dbc47

4 files changed

Lines changed: 7 additions & 13 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: dv.papo
22
Title: Patient Profile
3-
Version: 2.0.7.9000
3+
Version: 2.0.1-9008
44
Date: 2024-08-13
55
Authors@R:
66
c(person("Boehringer-Ingelheim Pharma GmbH & Co.KG", role = c("cph", "fnd")),

NEWS.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
1-
# dv.papo 2.0.7.9000
2-
- Fixes missing palette colours for AE, CM grading values.
1+
# dv.papo 2.0.1-9008
32

4-
# dv.papo 2.0.6.9000
3+
- Improves SAE label positioning.
4+
- Fixes missing palette colours for AE, CM grading values.
55
- Update to provide early error feedback if a sender_id is not available in list of modules.
6-
7-
# dv.papo 2.0.4.9000
86
- Fixes issue with labels not working fully if a data.frame is passed as input.
9-
10-
# dv.papo 2.0.3.9000
117
- Fixes y-axis getting squashed if blank values present in DECODE variable for AE/CM plots.
12-
13-
# dv.papo 2.0.2.9000
148
- Fixes Serious AE labels mapping when the column is a "Y/N" `character` or `factor` variable instead of `logical`.
159

16-
1710
# dv.papo 2.0.1
1811

1912
- Fixes failed first interaction when a participant is selected from another module

R/create_plots.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,14 @@ create_ae_cm_plot <- function(data, x_limits, palette, sl_info, vline_vars, vlin
4646

4747
if ("serious_ae" %in% names(data)) {
4848
sae_labels <- ifelse(data[["serious_ae"]], "SAE", "")
49+
t_diff <- as.numeric(x_limits[2] - x_limits[1])
4950
p <- p + ggplot2::geom_text(
5051
ggplot2::aes(
5152
x = .data[["start_day_z"]],
5253
y = .data[["decode"]],
5354
label = sae_labels
5455
),
55-
colour = "red", nudge_y = 0.25, nudge_x = 1, size = 3
56+
colour = "red", nudge_y = 0.25, nudge_x = 0.01 * t_diff, size = 3
5657
)
5758
}
5859

R/mod_plots.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ patient_plot_server <- function(id, subject_var,
219219
if ("grading" %in% names(vars)) df[["grading"]] <- df[[vars[["grading"]]]]
220220
if ("serious_ae" %in% names(vars)) {
221221
# FIXME: This is a temporal patch while we fix the modular API part
222-
if (!is.logical(df[["serious_ae"]])) {
222+
if (!is.logical(df[[vars[["serious_ae"]]]])) {
223223
df[["serious_ae"]] <- df[[vars[["serious_ae"]]]] == "Y"
224224
} else {
225225
df[["serious_ae"]] <- df[[vars[["serious_ae"]]]]

0 commit comments

Comments
 (0)