recalculate_outcome: Recalculate outcome

Description Usage Arguments Details Value Author(s) See Also

View source: R/recalculate_outcome.R

Description

This function detects whether DR-TB failure criteria have been encourntered during the course of a treatment episode.

Usage

1
2
recalculate_outcome(adm, adhere, change, lab, stop_days = 30,
  no_cc_days = 240)

Arguments

adm

data frame of individual patient admission records cleaned with 'tbcleanr'.

adhere

data frame of individual patient follow-up data including monthly drug-specific adherence data cleaned by 'tbcleanr::adhere_cleanr()'

change

data frame of individual patient follow-up data including monthly drug-specific change data cleaned by 'tbcleanr::change_cleanr()'

lab

data frame of laboratory TB data cleaned using 'tbcleanr'

stop_days

define interval in days where two drugs being stopped would result in failure.

no_cc_days

time cut-off in days to define failure to culture convert - default = 240 days

Details

The purpose of this function is to detect whether failure criteria for DR-TB have occured during the course of a treatment record and to propose a new "failure" date.

This proposed failure date may then be compared to the recorded failure date to see whether a new treament episode should be defined for any ongoing treatment being provided. This decision may depend upon, amongst other things, whether the ongoing treatment length was significant, or whether a new regimen was initiated.

Value

tibble with same class as input admission data with two columns. The first represents the unique record ID number and second "fail_date" identifies all dates where a failure criteria was detected within the treatment course.

Author(s)

Jay Achar

See Also

tbgeneratr


JayAchar/tbgeneratr documentation built on Oct. 13, 2019, 1:47 a.m.