hts_recent: Subset Clients who had Recent Infection Test Done during a...

View source: R/hts_recent.R

hts_recentR Documentation

Subset Clients who had Recent Infection Test Done during a period of Interest

Description

Subset Clients who had Recent Infection Test Done during a period of Interest

Usage

hts_recent(data, from = NULL, to = NULL, states = NULL, facilities = NULL)

Arguments

data

An NDR dataframe imported using the read_ndr().

from

The start date in ISO8601 format (i.e. "yyyy-mm-dd"). The default is to start at the beginning of the current Fiscal Year (i.e. 1st of October).

to

The end date written in ISO8601 format (i.e. "yyyy-mm-dd"). The default is the date of analysis.

states

The name(s) of the State(s) of interest. The default utilizes all the states in the dataframe. If specifying more than one state, combine the states using the c() e.g. c("State 1", "State 2").

facilities

The name(s) of the facilit(ies) of interest. Default is to utilize all the facilities contained in the dataframe. If specifying more than one facility, combine the facilities using the c() e.g. c("Facility 1", "Facility 2").

Value

line-list of clients who had recent HIV infection test done during the period of interest

Examples

### Line-list of clients offered recency testing
hts_recent_clients <- hts_recent(recency_example, from = "2021-07-01", to = "2021-10-31")

hts_pos <- hts_tst_pos(recency_example) # identifies all hts_positive clients
# line-list positive clients offered recency testing in 'Okun' state
hts_recent(hts_pos, state = "Okun")


tidyndr documentation built on April 8, 2022, 9:06 a.m.