Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refine templates #593

Merged
merged 17 commits into from
Aug 3, 2023
Merged

refine templates #593

merged 17 commits into from
Aug 3, 2023

Conversation

clarkliming
Copy link
Contributor

@clarkliming clarkliming commented Jul 25, 2023

close #592
close #587

provide insights to #588

@clarkliming clarkliming requested a review from Teninq July 25, 2023 12:11
@github-actions
Copy link
Contributor

github-actions bot commented Jul 25, 2023

🧪 $Test coverage: 97.50%$

Code Coverage Summary

Filename                     Stmts    Miss  Cover    Missing
-------------------------  -------  ------  -------  -----------------------------------------------------------
R/ael01_nollt.R                 21       1  95.24%   72
R/aet01_aesi.R                 149       1  99.33%   211
R/aet01.R                       94       1  98.94%   158
R/aet02.R                       50       0  100.00%
R/aet03.R                       77       0  100.00%
R/aet04.R                       89       0  100.00%
R/aet05_all.R                   11       0  100.00%
R/aet05.R                       36       1  97.22%   101
R/aet10.R                       43       0  100.00%
R/assertions.R                  99       6  93.94%   88-93
R/cfbt01.R                     104       0  100.00%
R/checks.R                      14       0  100.00%
R/chevron_tlg-S4class.R         18       0  100.00%
R/chevron_tlg-S4methods.R      166       2  98.80%   90-91
R/cmt01a.R                      57       6  89.47%   58-63
R/coxt01.R                      48       1  97.92%   126
R/dmt01.R                       27       0  100.00%
R/dst01.R                       95       0  100.00%
R/dtht01.R                     103       6  94.17%   48, 52-56
R/egt02.R                       37       0  100.00%
R/egt03.R                       73       1  98.63%   142
R/egt05_qtcat.R                 77       0  100.00%
R/ext01.R                       61       1  98.36%   40
R/fstg01.R                      42       1  97.62%   95
R/kmg01.R                       29       1  96.55%   71
R/lbt04.R                       81       0  100.00%
R/lbt05.R                       67       5  92.54%   125-130
R/lbt06.R                       68       3  95.59%   137-140
R/lbt07.R                       94       0  100.00%
R/lbt14.R                       62       0  100.00%
R/lbt15.R                       19       0  100.00%
R/mht01.R                       72       0  100.00%
R/mng01.R                       97       1  98.97%   111
R/pdt01.R                       61       0  100.00%
R/pdt02.R                       69       0  100.00%
R/rmpt01.R                      65      11  83.08%   91-100, 143
R/rspt01.R                      73       3  95.89%   156-159
R/rtables_utils.R              299      19  93.65%   46, 62, 108, 220, 240, 442, 457-459, 461, 479-485, 495, 516
R/standard_rules.R              11       0  100.00%
R/ttet01.R                     129       3  97.67%   229-232
R/utils.R                       68       0  100.00%
R/vst02.R                       47       1  97.87%   107
TOTAL                         3002      75  97.50%

Diff against main

Filename             Stmts    Miss  Cover
-----------------  -------  ------  --------
R/aet02.R              -10       0  +100.00%
R/cmt01a.R             -20      +6  -10.53%
R/egt03.R              +12       0  +0.27%
R/kmg01.R               +1       0  +0.12%
R/lbt04.R               +7       0  +100.00%
R/lbt06.R               +5       0  +0.35%
R/lbt14.R               +5       0  +100.00%
R/rtables_utils.R      +53      +2  +0.56%
R/utils.R               +3       0  +100.00%
TOTAL                  +56      +8  -0.22%

Results for commit: c7621d66d8f887d991ffe698233240597c3b50f6

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@github-actions
Copy link
Contributor

github-actions bot commented Jul 25, 2023

Unit Tests Summary

    1 files    50 suites   3m 8s ⏱️
229 tests 166 ✔️   63 💤 0
464 runs  320 ✔️ 144 💤 0

Results for commit f4befd1.

♻️ This comment has been updated with latest results.

@Teninq
Copy link
Contributor

Teninq commented Jul 27, 2023

LGTM, thanks for the updates.

Teninq
Teninq previously approved these changes Jul 27, 2023
@clarkliming clarkliming requested a review from Teninq July 27, 2023 10:09
@clarkliming clarkliming changed the title update egt03 and kmg01 refine templates Jul 27, 2023
@clarkliming clarkliming requested a review from duanx9 July 27, 2023 16:50
@tianfang1121
Copy link
Contributor

tianfang1121 commented Aug 1, 2023

@clarkliming , I reviewed AET02 using study data from the following CENSORED path, no findings in results so far.

I noticed that the column labels directly come from the labels of variable being tabulated. The label of columns in an output does not necessarily match exactly with variable label, thus, if the column label is not re-set by default within Chevron, users are expected to re-assign the proper label to the variables, is my understanding of the process correct here?
image

@clarkliming
Copy link
Contributor Author

users are expected to re-assign the proper label to the variables

you are right. There are usually too many labels to control (and we often need to modify them) and it looks bad to have too many arguments. So we decided to use the labels in the data to control the printing (just like in dmt01, the labels of variables are used to display). So if users want to change the label in table, they just update the label in dataset

@tianfang1121
Copy link
Contributor

tianfang1121 commented Aug 1, 2023

@clarkliming , I reviewed CMT02_PT & CMT01A with data from the following CENSORED path, no findings in results.

Comment on lines 41 to +44
lbl_armvar <- var_labels_for(adam_db$adeg, arm_var)
lbl_summaryvars <- var_labels_for(adam_db$adeg, summaryvar)
lbl_splitvar <- var_labels_for(adam_db$adeg, splitvar)
lbl_param <- var_labels_for(adam_db$adeg, "PARAM")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'd better leave flexibility for users to define lbl_param %||% var_labels_for(adam_db$adeg, "PARAM")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no such argument like lbl_param. And I don't think we should add that argument (will lead to too many arguments)

@tianfang1121
Copy link
Contributor

I don't have study data to review EGT03 results, thus, would just review very generally.

I think the text below needs some modification to be a little bit more robust. Basically, the input dataset is expected to have one post-baseline record per subject (the selection of records is pre-defined, e.g. post-baseline maximum, post-baseline minimum, first post-baseline observation etc.). For Roche studies, If the output looks at change from baseline to post-baseline maximum, then they should subset AVISIT=POST-BASELINE MAXIMUM; if the outputs looks at change from baseline to post-baseline minimum, they should subset AVISIT=POST-BASELINE MAXIMUM.
image

@tianfang1121
Copy link
Contributor

tianfang1121 commented Aug 2, 2023

LBT14 Help: The following statement is applicable for ADLB created under Roche standards. Different companies actually may have different interpretation of ADaM IG on how to utilize ATOXGR/BTOXGR and how to handle direction in ADLB. If this help page is public, I think it's worthwhile to 1) briefly explain how Roche construct ADLB and the meaning of negative, positive grades 2) mention that the ADLB is following ADaMIG 1.1 (because ADLB following ADaM IG 1.2 changes a lot and this program here would not work)
image

@clarkliming
Copy link
Contributor Author

documentation updated

@tianfang1121
Copy link
Contributor

tianfang1121 commented Aug 2, 2023

LBT14: Tested this template with data from the following CENSORED path, no findings in calculated results.

However, one comment
Ordering the grade categories should be pre-fixed? (see circled 'Missing' in the image below)
image

@clarkliming
Copy link
Contributor Author

the issue can be related to tern. see https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt14.html examples.

Need to investigate into this. Since chevron provide wrappers around tern, let's move forward (and after tern fix this chevron will work correctly)

@clarkliming clarkliming mentioned this pull request Aug 2, 2023
Copy link
Contributor

@tianfang1121 tianfang1121 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review comments addressed

lbl_row_split <- var_labels_for(adam_db$adae, row_split_var)
lbl_aedecod <- var_labels_for(adam_db$adae, "AEDECOD")
lbl_overall <- render_safe(lbl_overall)
lyt <- aet02_lyt(
lyt <- occurrence_lyt(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just curious for a design purpose: aet02 uses occurence_lyt implemented in cmt01a and in aet02 <- chevron_t() we dont want to expose lyt <- occurence_lyt

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is defined in main function and no need to expose this function right? the layout thing is internal only

@clarkliming clarkliming merged commit 3d03e88 into main Aug 3, 2023
@clarkliming clarkliming deleted the 592_stratified_kmg01@main branch August 3, 2023 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

adopt user feedback Allow CMT01 and AET02 to choose the summary statistics for the groups
4 participants