Skip to content

Commit

Permalink
Merge pull request #63 from OxfordIHTM/dev
Browse files Browse the repository at this point in the history
replace placeholder function for icd10 unlikely cod
  • Loading branch information
ernestguevarra authored Jun 27, 2024
2 parents c3c4969 + 4b45550 commit 9c93816
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions R/cod_check_code.R
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,14 @@ cod_check_code_ill_defined_icd11 <- function(cod) {
#' @export
#'
cod_check_code_unlikely_icd10 <- function(cod) {
cod_check <- NA_integer_
cod_check_note <- NA_character_
unlikely_cod <- expand_icd10_code_range(codeditr::icd10_unlikely_cod$code)

cod_check <- ifelse(cod %in% unlikely_cod, 1L, 0L)
cod_check_note <- ifelse(
cod_check == 0L,
"No issues found in CoD code",
"CoD code is an unlikely cause-of-death"
)

tibble(cod_check, cod_check_note)
}
Expand Down

0 comments on commit 9c93816

Please sign in to comment.