tx_new: Subset Clients Starting ART Within a Particular Period.

View source: R/tx_new.R

tx_newR Documentation

Subset Clients Starting ART Within a Particular Period.

Description

Generates the line-list of clients who commenced ARV within the specified period of interest. The default is to generate the list for all clients who commenced ARV in the current Fiscal Year. You can specify the period of interest using the from and to arguments; and the state or facility of interest with the states and facilities arguments. For multiple states or facilities, use the c() to combine the names.

Usage

tx_new(
  data,
  from = NULL,
  to = NULL,
  states = NULL,
  facilities = NULL,
  remove_duplicates = FALSE
)

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").

remove_duplicates

Boolean argument. It specifies if duplicate patient entries in the facilities should be removed or kept

Value

TX_NEW clients in the period of interest

Examples

tx_new(ndr_example, from = "2021-06-01", to = "2021-09-30")

# generate the TX_NEW for a specific state (Ayetoro)
tx_new(ndr_example, states = "Ayetoro")

# Determine the TX_NEW for Quarter 1 of FY21 for State 2
tx_new(ndr_example,
  from = "2021-10-01",
  to = "2021-12-31",
  states = c("Arewa", "Ayetoro")
)

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