Skip to content

Commit 8f5240c

Browse files
authored
Use pharmaverseadam data in safety templates - part 2 (#154)
Closes #147
1 parent 738ac53 commit 8f5240c

20 files changed

+739
-652
lines changed

.github/workflows/docs.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,11 @@ jobs:
4141
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
4242
with:
4343
additional-unit-test-report-directories: unit-test-report-non-cran
44+
deps-installation-method: setup-r-dependencies
45+
lookup-refs: |
46+
insightsengineering/random.cdisc.data
47+
insightsengineering/rtables
48+
insightsengineering/formatters
49+
insightsengineering/tern
50+
insightsengineering/rlistings
51+
pharmaverse/pharmaverseadam

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Depends:
2424
formatters (>= 0.5.9),
2525
R (>= 4.2),
2626
rlistings (>= 0.2.9),
27-
rtables (>= 0.6.8),
27+
rtables (>= 0.6.10),
2828
tern (>= 0.9.6.9015)
2929
Imports:
3030
pharmaverseadam (>= 1.1.0),

tests/testthat/_snaps/table_egt01.md

Lines changed: 143 additions & 98 deletions
Large diffs are not rendered by default.

tests/testthat/_snaps/table_egt02.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,34 @@
33
Code
44
res
55
Output
6-
Assessment A: Drug X B: Placebo C: Combination
7-
Abnormality (N=134) (N=134) (N=132)
8-
————————————————————————————————————————————————————————————————
9-
Heart Rate
10-
Low 40/134 (29.9%) 43/134 (32.1%) 37/132 (28%)
11-
High 39/134 (29.1%) 45/134 (33.6%) 36/132 (27.3%)
12-
QT Duration
13-
Low 33/134 (24.6%) 44/134 (32.8%) 47/132 (35.6%)
14-
High 30/134 (22.4%) 42/134 (31.3%) 34/132 (25.8%)
15-
RR Duration
16-
Low 45/134 (33.6%) 26/134 (19.4%) 38/132 (28.8%)
17-
High 29/134 (21.6%) 49/134 (36.6%) 27/132 (20.5%)
6+
Assessment Placebo Xanomeline High Dose Xanomeline Low Dose
7+
Abnormality (N=86) (N=72) (N=96)
8+
———————————————————————————————————————————————————————————————————————————————————
9+
Heart Rate (beats/min)
10+
Low 0/84 0/72 0/94
11+
High 4/84 (4.8%) 0/72 0/94
12+
QT Duration (msec)
13+
Low 55/84 (65.5%) 44/72 (61.1%) 52/94 (55.3%)
14+
High 84/84 (100%) 72/72 (100%) 93/94 (98.9%)
15+
RR Duration (msec)
16+
Low 84/84 (100%) 72/72 (100%) 94/94 (100%)
17+
High 0/84 0/72 0/94
1818

1919
# (EGT02) 2. Among Subjects Without Abnormality at Baseline
2020

2121
Code
2222
res
2323
Output
24-
Assessment A: Drug X B: Placebo C: Combination
25-
Abnormality (N=134) (N=134) (N=132)
26-
————————————————————————————————————————————————————————————————
27-
Heart Rate
28-
Low 39/128 (30.5%) 42/124 (33.9%) 33/117 (28.2%)
29-
High 37/127 (29.1%) 43/129 (33.3%) 31/122 (25.4%)
30-
QT Duration
31-
Low 29/113 (25.7%) 42/126 (33.3%) 43/124 (34.7%)
32-
High 30/125 (24%) 40/130 (30.8%) 30/119 (25.2%)
33-
RR Duration
34-
Low 45/129 (34.9%) 26/123 (21.1%) 37/126 (29.4%)
35-
High 27/127 (21.3%) 43/122 (35.2%) 25/125 (20%)
24+
Assessment Placebo Xanomeline High Dose Xanomeline Low Dose
25+
Abnormality (N=86) (N=72) (N=96)
26+
———————————————————————————————————————————————————————————————————————————————————
27+
Heart Rate (beats/min)
28+
Low 0/84 0/72 0/94
29+
High 4/84 (4.8%) 0/72 0/94
30+
QT Duration (msec)
31+
Low 52/84 (61.9%) 44/72 (61.1%) 51/94 (54.3%)
32+
High 83/84 (98.8%) 72/72 (100%) 90/94 (95.7%)
33+
RR Duration (msec)
34+
Low 84/84 (100%) 72/72 (100%) 94/94 (100%)
35+
High 0/84 0/72 0/94
3636

tests/testthat/_snaps/table_egt03.md

Lines changed: 79 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -3,99 +3,102 @@
33
Code
44
res
55
Output
6-
LOW NORMAL HIGH Missing
7-
—————————————————————————————————————————————————————————————————
8-
A: Drug X (N=134)
9-
n 40 92 0 2
10-
LOW 1 (0.7%) 5 (3.7%) 0 0
11-
NORMAL 36 (26.9%) 83 (61.9%) 0 1 (0.7%)
12-
HIGH 2 (1.5%) 4 (3%) 0 0
13-
Missing 1 (0.7%) 0 0 1 (0.7%)
14-
B: Placebo (N=134)
15-
n 43 89 0 2
16-
LOW 1 (0.7%) 9 (6.7%) 0 0
17-
NORMAL 40 (29.9%) 75 (56%) 0 2 (1.5%)
18-
HIGH 1 (0.7%) 4 (3%) 0 0
19-
Missing 1 (0.7%) 1 (0.7%) 0 0
20-
C: Combination (N=132)
21-
n 37 94 0 1
22-
LOW 4 (3%) 11 (8.3%) 0 0
23-
NORMAL 31 (23.5%) 75 (56.8%) 0 0
24-
HIGH 1 (0.8%) 8 (6.1%) 0 1 (0.8%)
25-
Missing 1 (0.8%) 0 0 0
6+
LOW NORMAL HIGH Missing
7+
—————————————————————————————————————————————————————————————————
8+
Placebo (N=86)
9+
n 0 333 0 3
10+
LOW 0 84 (25%) 0 0
11+
NORMAL 0 249 (74.1%) 0 0
12+
HIGH 0 0 0 0
13+
Missing 0 0 0 3 (0.9%)
14+
Xanomeline High Dose (N=84)
15+
n 0 327 0 1
16+
LOW 0 82 (25%) 0 0
17+
NORMAL 0 245 (74.7%) 0 0
18+
HIGH 0 0 0 0
19+
Missing 0 0 0 1 (0.3%)
20+
Xanomeline Low Dose (N=84)
21+
n 0 335 0 1
22+
LOW 0 84 (25%) 0 0
23+
NORMAL 0 251 (74.7%) 0 0
24+
HIGH 0 0 0 0
25+
Missing 0 0 0 1 (0.3%)
2626

2727
# EGT03 variant 2 is produced correctly
2828

2929
Code
3030
res
3131
Output
32-
LOW NORMAL HIGH
33-
———————————————————————————————————————————————————————
34-
A: Drug X (N=134)
35-
n 40 94 0
36-
LOW 1 (0.7%) 5 (3.7%) 0
37-
NORMAL 36 (26.9%) 84 (62.7%) 0
38-
HIGH 2 (1.5%) 4 (3%) 0
39-
Missing 1 (0.7%) 1 (0.7%) 0
40-
B: Placebo (N=134)
41-
n 43 91 0
42-
LOW 1 (0.7%) 9 (6.7%) 0
43-
NORMAL 40 (29.9%) 77 (57.5%) 0
44-
HIGH 1 (0.7%) 4 (3%) 0
45-
Missing 1 (0.7%) 1 (0.7%) 0
46-
C: Combination (N=132)
47-
n 37 95 0
48-
LOW 4 (3%) 11 (8.3%) 0
49-
NORMAL 31 (23.5%) 75 (56.8%) 0
50-
HIGH 1 (0.8%) 9 (6.8%) 0
51-
Missing 1 (0.8%) 0 0
32+
NORMAL
33+
—————————————————————————————————————————
34+
Placebo (N=86)
35+
n 336
36+
LOW 84 (25%)
37+
NORMAL 249 (74.1%)
38+
HIGH 0
39+
Missing 3 (0.9%)
40+
Xanomeline High Dose (N=84)
41+
n 328
42+
LOW 82 (25%)
43+
NORMAL 245 (74.7%)
44+
HIGH 0
45+
Missing 1 (0.3%)
46+
Xanomeline Low Dose (N=84)
47+
n 336
48+
LOW 84 (25%)
49+
NORMAL 251 (74.7%)
50+
HIGH 0
51+
Missing 1 (0.3%)
5252

5353
# EGT03 variant 3 is produced correctly
5454

5555
Code
5656
res
5757
Output
58-
LOW NORMAL HIGH Missing
59-
——————————————————————————————————————————————————————————————————
60-
A: Drug X (N=134)
61-
n 39 93 0 2
62-
LOW 1 (0.7%) 5 (3.7%) 0 0
63-
NORMAL 36 (26.9%) 84 (62.7%) 0 1 (0.7%)
64-
HIGH 2 (1.5%) 4 (3%) 0 1 (0.7%)
65-
B: Placebo (N=134)
66-
n 42 90 0 2
67-
LOW 1 (0.7%) 9 (6.7%) 0 0
68-
NORMAL 40 (29.9%) 77 (57.5%) 0 2 (1.5%)
69-
HIGH 1 (0.7%) 4 (3%) 0 0
70-
C: Combination (N=132)
71-
n 36 95 0 1
72-
LOW 4 (3%) 11 (8.3%) 0 0
73-
NORMAL 31 (23.5%) 75 (56.8%) 0 1 (0.8%)
74-
HIGH 1 (0.8%) 9 (6.8%) 0 0
58+
LOW NORMAL HIGH Missing
59+
—————————————————————————————————————————————————————————————————
60+
Placebo (N=86)
61+
n 0 333 0 3
62+
LOW 0 84 (25%) 0 0
63+
NORMAL 0 249 (74.1%) 0 0
64+
HIGH 0 0 0 0
65+
Missing 0 0 0 3 (0.9%)
66+
Xanomeline High Dose (N=84)
67+
n 0 327 0 1
68+
LOW 0 82 (25%) 0 0
69+
NORMAL 0 245 (74.7%) 0 0
70+
HIGH 0 0 0 0
71+
Missing 0 0 0 1 (0.3%)
72+
Xanomeline Low Dose (N=84)
73+
n 0 335 0 1
74+
LOW 0 84 (25%) 0 0
75+
NORMAL 0 251 (74.7%) 0 0
76+
HIGH 0 0 0 0
77+
Missing 0 0 0 1 (0.3%)
7578

7679
# EGT03 variant 4 is produced correctly
7780

7881
Code
7982
res
8083
Output
81-
LOW NORMAL HIGH Missing
84+
LOW NORMAL HIGH Missing
8285
—————————————————————————————————————————————————————————————————
83-
A: Drug X (N=134)
84-
n 0 95 37 2
85-
LOW 0 2 (1.5%) 4 (3%) 0
86-
NORMAL 0 88 (65.7%) 31 (23.1%) 1 (0.7%)
87-
HIGH 0 5 (3.7%) 1 (0.7%) 0
88-
Missing 0 0 1 (0.7%) 1 (0.7%)
89-
B: Placebo (N=134)
90-
n 0 88 44 2
91-
LOW 0 8 (6%) 2 (1.5%) 0
92-
NORMAL 0 76 (56.7%) 39 (29.1%) 2 (1.5%)
93-
HIGH 0 3 (2.2%) 2 (1.5%) 0
94-
Missing 0 1 (0.7%) 1 (0.7%) 0
95-
C: Combination (N=132)
96-
n 0 96 35 1
97-
LOW 0 12 (9.1%) 3 (2.3%) 0
98-
NORMAL 0 79 (59.8%) 27 (20.5%) 0
99-
HIGH 0 5 (3.8%) 4 (3%) 1 (0.8%)
100-
Missing 0 0 1 (0.8%) 0
86+
Placebo (N=86)
87+
n 0 333 0 3
88+
LOW 0 84 (25%) 0 0
89+
NORMAL 0 249 (74.1%) 0 0
90+
HIGH 0 0 0 0
91+
Missing 0 0 0 3 (0.9%)
92+
Xanomeline High Dose (N=84)
93+
n 0 327 0 1
94+
LOW 0 82 (25%) 0 0
95+
NORMAL 0 245 (74.7%) 0 0
96+
HIGH 0 0 0 0
97+
Missing 0 0 0 1 (0.3%)
98+
Xanomeline Low Dose (N=84)
99+
n 0 335 0 1
100+
LOW 0 84 (25%) 0 0
101+
NORMAL 0 251 (74.7%) 0 0
102+
HIGH 0 0 0 0
103+
Missing 0 0 0 1 (0.3%)
101104

tests/testthat/_snaps/table_egt04.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
Code
44
res
55
Output
6-
Normal Abnormal Missing
7-
———————————————————————————————————————————————————————————
8-
A: Drug X (N=134)
9-
Normal 20 (14.9%) 81 (60.4%) 1 (0.7%)
10-
Abnormal 11 (8.2%) 19 (14.2%) 0
11-
Missing 0 1 (0.7%) 1 (0.7%)
12-
B: Placebo (N=134)
13-
Normal 18 (13.4%) 81 (60.4%) 2 (1.5%)
14-
Abnormal 3 (2.2%) 28 (20.9%) 0
15-
Missing 0 2 (1.5%) 0
16-
C: Combination (N=132)
17-
Normal 26 (19.7%) 69 (52.3%) 1 (0.8%)
18-
Abnormal 6 (4.5%) 29 (22%) 0
19-
Missing 1 (0.8%) 0 0
6+
Normal Abnormal Missing
7+
—————————————————————————————————————————————————————————————
8+
Placebo (N=147)
9+
Normal 0 79 (53.7%) 0
10+
Abnormal 0 46 (31.3%) 0
11+
Missing 0 22 (15%) 0
12+
Xanomeline High Dose (N=120)
13+
Normal 0 62 (51.7%) 1 (0.8%)
14+
Abnormal 0 40 (33.3%) 1 (0.8%)
15+
Missing 0 16 (13.3%) 0
16+
Xanomeline Low Dose (N=111)
17+
Normal 0 58 (52.3%) 0
18+
Abnormal 0 26 (23.4%) 2 (1.8%)
19+
Missing 0 24 (21.6%) 1 (0.9%)
2020

0 commit comments

Comments
 (0)