Skip to content

Commit

Permalink
Closes #2534 fixed bug for INR Increased (#2553)
Browse files Browse the repository at this point in the history
* 2534 fixed bug for INR Increased

* 2534 empty commit to trigger checks
  • Loading branch information
millerg23 authored Nov 6, 2024
1 parent a273c94 commit e9f4f79
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

## Updates of Existing Functions

- NCICTCAEv5 grading criteria 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).

## Breaking Changes

- The following function arguments are entering the next phase of the deprecation process: (#2487)
Expand Down
Binary file modified data/atoxgr_criteria_ctcv5.rda
Binary file not shown.
Binary file modified inst/adlb_grading/adlb_grading_spec.xlsx
Binary file not shown.
50 changes: 24 additions & 26 deletions tests/testthat/test-derive_var_atoxgr.R
Original file line number Diff line number Diff line change
Expand Up @@ -1490,38 +1490,36 @@ test_that("derive_var_atoxgr Test 35: CTCAEv4 INR increased", {
)
})

### INR increased (NCICTCV4)
### NCICTCV5 different for grade 1
### Grade 3: >2.5 x ULN; >2.5 times above baseline if on anticoagulation
### Grade 2: >1.5 - 2.5 x ULN; >1.5 - 2.5 times above baseline if on anticoagulation
### Grade 1: >1.2 - 1.5 x ULN; >1 - 1.5 times above baseline if on anticoagulation
### INR increased (NCICTCV5)
### NCICTCV5 different to NCICTCv4 (do not use x ULN)
### Grade 3: >2.5; >2.5 times above baseline if on anticoagulation
### Grade 2: >1.5 - 2.5; >1.5 - 2.5 times above baseline if on anticoagulation
### Grade 1: >1.2 - 1.5; >1 - 1.5 times above baseline if on anticoagulation

## Test 36: CTCAEv5 INR increased ----
test_that("derive_var_atoxgr Test 36: CTCAEv5 INR increased", {
expected_inri <- tibble::tribble(
~ATOXDSCH, ~AVAL, ~BASE, ~ANRHI, ~AVALU, ~ATOXGRH, ~TESTNUM,
"Not a term", 80, 120, 200, NA_character_, NA, 1,
NA_character_, 60, 50, 100, NA_character_, NA, 2,
# GRADE derived from AVAL against ANRHI
"INR IncreaSed", 251, 200, 100, NA_character_, "3", 3,
"INR Increased", 250, 199, 100, NA_character_, "2", 4,
"INR Increased", 151, 150, 100, NA_character_, "2", 5,
"INR Increased", 150, 150, 100, NA_character_, "1", 6,
"INR Increased", 121, 150, 100, NA_character_, "1", 7,
"INR Increased", 120, 120, 100, NA_character_, "0", 8,
~ATOXDSCH, ~AVAL, ~BASE, ~AVALU, ~ATOXGRH, ~TESTNUM,
"Not a term", 80, 120, NA_character_, NA, 1,
NA_character_, 60, 50, NA_character_, NA, 2,
# GRADE derived from AVAL against first half of criteria
"INR IncreaSed", 2.51, 2.6, NA_character_, "3", 3,
"INR Increased", 2.5, 1, NA_character_, "2", 4,
"INR Increased", 1.51, 1, NA_character_, "2", 5,
"INR Increased", 1.5, 1, NA_character_, "1", 6,
"INR Increased", 1.2, 1, NA_character_, "1", 7,
"INR Increased", 1.19, 1.19, NA_character_, "0", 8,
# GRADE derived from AVAL against BASE
"INR IncreaSed", 251, 100, 200, NA_character_, "3", 9,
"INR Increased", 250, 100, 199, NA_character_, "2", 10,
"INR Increased", 151, 100, 150, NA_character_, "2", 11,
"INR Increased", 150, 100, 150, NA_character_, "1", 12,
"INR Increased", 101, 100, 150, NA_character_, "1", 13,
"INR Increased", 100, 100, 100, NA_character_, "0", 14,
# BASE missing - AVAL <= ANRLO cannot grade as NORMAL
"INR Increased", 100, NA, 100, NA_character_, NA, 15,
# ANRHI missing - AVAL <= BASE cannot grade as NORMAL
"INR Increased", 100, 100, NA, NA_character_, NA, 16,
"INR IncreaSed", 2.5, 0.99, NA_character_, "3", 9,
"INR Increased", 1.5, 0.6, NA_character_, "2", 10,
"INR Increased", 1.5, 0.99, NA_character_, "2", 11,
"INR Increased", 1.2, 0.8, NA_character_, "1", 12,
"INR Increased", 1.2, 1.19, NA_character_, "1", 13,
"INR Increased", 1.2, 1.2, NA_character_, "0", 14,
# BASE missing - AVAL <= 1.2 cannot grade as NORMAL
"INR Increased", 1.2, NA, NA_character_, NA, 15,
# AVAL missing cannot grade
"INR Increased", NA, 100, 100, NA_character_, NA, 17,
"INR Increased", NA, 100, NA_character_, NA, 16,
)
input_inri <- expected_inri %>%
select(-ATOXGRH)
Expand Down

0 comments on commit e9f4f79

Please sign in to comment.