-
Notifications
You must be signed in to change notification settings - Fork 64
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
Closes #2492 use ANRIND for abnormal baseline #2555
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if it is a good idea to use explicit conditions based on BNRIND
because it's values are not standardized. In the definitions it is assumed that "HIGH"
indicates an abnormal high value. If this is not the case, the grading variables are created without an error or warning but the results are wrong. But they are not obviously wrong, i.e., without double-programming the grading variables it will most likely be missed.
Maybe the condition for baseline abnormal should be specified by the user.
What do you think?
Would we have a default value, in |
I would not set a default value because then we get the same problem as before. I.e., users just use the default and don't notice that the results are wrong. |
Yes, agreed. So do you think allowing users to pass in values of BNRIND that are deemed abnormal for HYPER (HIGH values) lab tests would be sufficient. |
Most likely this would be sufficient. However, I would add "high" to the argument name. Then it is clearer and we don't need to rename it if in future we need an argument for low abnormalities. Maybe we could also remove the "b". Then we could use it also if we need to use |
@bundfussr @bms63 can you look at recent updates. We only call the function for HIGH or LOW, so will only need one variable to capture LOW and HIGH. I updated function to check if BNRIND is a required variable for a lab test, then |
@millerg23 , looks good to me. I assume a scalar is expected for |
@@ -214,6 +221,11 @@ derive_var_atoxgr_dir <- function(dataset, | |||
# check variables required in criteria exist on data | |||
assert_data_frame(grade_this_filter, required_vars = exprs(!!!syms(list_of_vars))) | |||
|
|||
if ("BNRIND" %in% list_of_vars) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the list of variables is fixed (Alanine aminotransferase increased
, Alkaline phosphatase increased
, Aspartate aminotransferase increased
, Blood bilirubin increased
and GGT Increased
) should we do anything to check their presence, alert user to missing or some other skullduggery?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If BNRIND is a required variable, as it is for those 5 lab tests, then as well as checking for existence on line 222, I then check that abnormal_indicator
is not NULL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are all 5 labs covered for testing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, see diffs in unit tests where I have added abnormal_indicator = "HIGH",
to the function call, should be in 5 places. ALT, AST, ALKPH, BILI, GGT.
Ah!! It needs to be a character vector, right? As c("HIGH", "HIGH HIGH") could be a valid entry, or in odd cases c("H", "HIGH"). I will update metadata to use BNRIND %in% abnormal_indicator (although will that work with single values??, need to test). |
R doesn't distinguish vectors and scalars, i.e., I think it makes sense to accept character vectors. Then we don't need to update if users need something like |
thanks for initial QC, think I have made all updates now. |
I don't see any updates for the Vignette? did you mean documenation? |
…ral into 2492_use_bnrind_grading
Apologies, my push failed!! Its there now... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zdz2101 can we get your eyes on these lab updates as well?
@@ -13,6 +13,12 @@ | |||
|
|||
## Updates of Existing Functions | |||
|
|||
- NCICTCAEv5 grading criteria (`atoxgr_criteria_ctcv5`): | |||
|
|||
- fixed for `TERM = "INR increased"`, criteria was wrongly using `x ULN`, for first part of criteria for grades 1 to 3. For example, `">2.5 x ULN"` changed to `">2.5"` for grade 3. (#2534). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- fixed for `TERM = "INR increased"`, criteria was wrongly using `x ULN`, for first part of criteria for grades 1 to 3. For example, `">2.5 x ULN"` changed to `">2.5"` for grade 3. (#2534). | |
- fix for `TERM = "INR increased"`, criteria was wrongly using `x ULN`, for first part of criteria for grades 1 to 3. For example, `">2.5 x ULN"` changed to `">2.5"` for grade 3. (#2534). |
Thank you for your Pull Request! We have developed this task checklist from the Development Process Guide to help with the final steps of the process. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the admiral codebase remains robust and consistent.
Please check off each taskbox as an acknowledgment that you completed the task or check off that it is not relevant to your Pull Request. This checklist is part of the Github Action workflows and the Pull Request will not be merged into the
main
branch until you have checked off each task.styler::style_file()
to style R and Rmd filesinst/cheatsheet/admiral_cheatsheet.pptx
and re-upload a PDF and a PNG version of it to the same folder. (The PNG version can be created by taking a screenshot of the PDF version.)devtools::document()
so all.Rd
files in theman
folder and theNAMESPACE
file in the project root are updated appropriatelyNEWS.md
under the header# admiral (development version)
if the changes pertain to a user-facing function (i.e. it has an@export
tag) or documentation aimed at users (rather than developers). A Developer Notes section is available inNEWS.md
for tracking developer-facing issues.pkgdown::build_site()
and check that all affected examples are displayed correctly and that all new functions occur on the "Reference" page.lintr::lint_package()
R CMD check
locally and address all errors and warnings -devtools::check()