Skip to content

Commit

Permalink
Merge pull request #65 from InsightRX/RXR-2295_cefepime-neurotoxicity
Browse files Browse the repository at this point in the history
RXR-2295 Add `calc_cefepime_neurotoxicity()` function
  • Loading branch information
mccarthy-m-g authored Jan 16, 2025
2 parents b81e0ee + a432843 commit 2c165cb
Show file tree
Hide file tree
Showing 9 changed files with 75 additions and 6 deletions.
8 changes: 5 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ Authors@R: c(person("Ron", "Keizer", email = "ron@insight-rx.com", role
= c("aut", "cre")), person("Jasmine", "Hughes", email =
"jasmine@insight-rx.com", role = "aut"), person("Dominic",
"Tong", email = "dominic@insight-rx.com", role = "aut"),
person("Kara", "Woo", email = "kara@insight-rx.com", role =
c("aut")), person("InsightRX", role = c("cph", "fnd")))
person("Kara", "Woo", email = "kara@insight-rx.com", role = c("aut")),
person("Michael", "McCarthy", email = "michael.mccarthy@insight-rx.com",
role = "aut"),
person("InsightRX", role = c("cph", "fnd")))
Description: Provides equations commonly used in clinical
pharmacokinetics and clinical pharmacology, such as equations
for dose individualization, compartmental pharmacokinetics,
Expand All @@ -20,6 +22,6 @@ URL: https://github.com/InsightRX/clinPK,
https://insightrx.github.io/clinPK/
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Suggests: testthat (>= 3.0.0)
Config/testthat/edition: 3
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export(calc_baseline_scr)
export(calc_bmi)
export(calc_bsa)
export(calc_carboplatin_calvert)
export(calc_cefepime_neurotoxicity)
export(calc_creat)
export(calc_creat_neo)
export(calc_dosing_weight)
Expand Down
25 changes: 25 additions & 0 deletions R/calc_cefepime_neurotoxicity.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#' Calculate Cefepime-associated Neurotoxicity
#'
#' Calculate probability of cefepime-associated neurotoxicity as a function of
#' cefepime plasma trough concentrations. This model was based on a data set
#' of adult patients receiving thrice-daily cefepime and may not correspond to
#' other dosing intervals or patient populations.
#'
#' @note
#' The intercept and slope used in this function match Figure 2 in the cited
#' paper, but differ slightly from the values provided in the text. This
#' interpretation was confirmed via correspondence with the authors.
#'
#' @param trough_concentration Cefepime plasma trough concentration (mg/L).
#' @references \href{https://doi.org/10.1016/j.cmi.2019.06.028}{
#' Boschung-Pasquier et al., Clinical Microbiology and Infection (2020)}
#'
#' @return Probability of cefepime-associated neurotoxicity.
#' @examples
#' calc_cefepime_neurotoxicity(trough_concentration = c(13.7, 17.8))
#' @export
calc_cefepime_neurotoxicity <- function(trough_concentration) {
b0 <- -4.7777798
b1 <- 0.2684747
stats::plogis(b0 + b1*trough_concentration)
}
2 changes: 1 addition & 1 deletion R/calc_creat.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#' @param digits number of digits to round to
#' @examples
#' calc_creat(sex = "male", age = 40)
#' calc_creat(sex = "male", age = 40, wt = 100, ht = 175, method="brooks)
#' calc_creat(sex = "male", age = 40, weight = 100, height = 175, adult_method = "brooks")
#' calc_creat(sex = "male", age = c(10, 17, 60))
#' @export
calc_creat <- function (
Expand Down
3 changes: 1 addition & 2 deletions R/clinPK-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
#'
#' Equations and tool for clinical pharmacokinetics
#'
#' @docType package
#' @name clinPK-package
#' @author Ron Keizer \email{ronkeizer@@gmail.com}
#' @importFrom stats coef lm
#' @importFrom utils read.table tail
#' @keywords internal
NULL
"_PACKAGE"
1 change: 1 addition & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ reference:
- egfr_cov_reqs
- check_covs_available
- calc_carboplatin_calvert
- calc_cefepime_neurotoxicity
- calc_kel_single_tdm
- calc_kel_double_tdm
- calc_t12
Expand Down
32 changes: 32 additions & 0 deletions man/calc_cefepime_neurotoxicity.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions man/calc_creat.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions tests/testthat/test-calc_cefepime_neurotoxicity.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
test_that("cefepime neurotoxicity calculation is correct", {
expect_equal(signif(calc_cefepime_neurotoxicity(13.7), 2), .25)
expect_equal(signif(calc_cefepime_neurotoxicity(17.8), 2), .50)
})

0 comments on commit 2c165cb

Please sign in to comment.