tx_pvls_den: Subset Clients who have a Documented Viral Load Result

View source: R/tx_pvls_den.R

tx_pvls_denR Documentation

Subset Clients who have a Documented Viral Load Result

Description

Generate the line-list of clients whose date of last viral load result is not more than one year (for adults 20 years and above) and 6 months (for pediatrics and adolescents) from the specified reference date.

Usage

tx_pvls_den(
  data,
  ref = NULL,
  states = NULL,
  facilities = NULL,
  status = "default",
  use_six_months = TRUE,
  remove_duplicates = FALSE
)

Arguments

data

An NDR dataframe imported using the 'read_ndr().

ref

Date provided in ISO8601 format ("yyyy-mm-dd"). Used to determine clients who are eligible for viral load and should have a documented result. 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").

status

Determines how the number of active clients is calculated. The options are to either to use the NDR current_status_28_days column or the derived current_status column ("calculated").

use_six_months

TRUE of FALSE. To determine if six months eligibility should be used for pediatrics and adolescents repeat viral load or the standard annual repeat.

remove_duplicates

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

Value

tx_pvls_den

Examples

tx_pvls_den(ndr_example, status = "default")

# Determine clients who are virally suppressed for two state at the end of Q4
tx_pvls_den(ndr_example,
  ref = "2021-09-30",
  states = c("Okun", "Arewa")
)

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