getContacts: Get contact tracing list and plot.

Description Usage Arguments Value Examples

View source: R/getContacts.R

Description

To get primary, secondary & tertiary contact list from data for specific staff/patient id.

Usage

1
2
3
getContacts(staff_id = NA, patient_id = NA,
  reference_date = "2020-03-01", look_forward_days = 7,
  look_back_days = 0, plot = F, data = NULL)

Arguments

staff_id

character - unique staff identifier for each staff in the homecare dataset

patient_id

character - unique patient identifier for each patient in the homecare dataset

reference_date

character - The date user assume that staff/patient started showing onset symptoms. ('2020-03-01')

look_forward_days

character - How many days forward you want to look from reference date ('7')

look_back_days

character - How many days backward you want to look from reference date ('0')

plot

logical - If TRUE then plot object will be added in the output list. (FALSE)

data

data.table - Data with following columns: PATIENT_ID, PATIENT_NAME (required), VISIT_DATE (required), STAFF_ID, STAFF_NAME (required), PATIENT_STATUS, STAFF_STATUS

Value

returns a list with 4 elements:

The second example below generates plot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Below example is used to get contact tracing lists based on staff id.
            
getContacts(staff_id= '1',
             patient_id = NA,
             reference_date = "2020-03-01",
             look_forward_days = 20,
             look_back_days = 3,
             data= hcvisits,
             plot=FALSE)
             
# Below example is used to get contact tracing lists based on patient id. 
           
 getContacts(staff_id= NA,
             patient_id = '1000',
             reference_date = "2020-03-01",
             look_forward_days = 50,
             look_back_days = 3,
             data= hcvisits,
             plot=TRUE)     

vnsny-bia/VisitContactTrace documentation built on July 30, 2020, 10:19 p.m.