estimateTimeToDiagnosis: Rule-based Time to Diagnosis Estimation

Description Usage Arguments Details Value

View source: R/estimateTimeToDiagnosis.R

Description

estimateTimeToDiagnosis estimates time to diagnosis for each patient using simple pre-defined rules. This time is not directly available in the data but can be got at in most cases indirectly.

Usage

1

Arguments

data

Individual patient records

Details

The rules for estimating time to diagnosis are in priority order:

  1. If culture +ve then min(report time, start treatment) [previously, take report time only.]

  2. What is means of diagnosis? Use corresponding times. Latest date of those for the means of diagnosis used.

  3. If diagnosis date is too late (130 days after first test) then use DateDiagCon if <130 days

  4. If diagnosis date still NA then use DateDiagCon.

  5. could use min(DateDiagCon, lasttestDate) isntead?

Value

data with the start.to.diag column appended


n8thangreen/IDEAdectree documentation built on Feb. 10, 2020, 11:35 a.m.