View source: R/tx_vl_eligible.R
| tx_vl_eligible | R Documentation | 
Generates the line-list of clients who have been (or would have been) on ARV medications for at least 6 months from the reference date. The default reference date is the date of analysis.
tx_vl_eligible( data, ref = NULL, states = NULL, facilities = NULL, status = "default", sample = FALSE, use_six_months = TRUE, remove_duplicates = FALSE )
| 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  | 
| 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  | 
| 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"). | 
| sample | Logical (TRUE or FALSE) indicating whether all clients eligible for viral load test should be filtered irrespective of their eligibility for sample collection or only those due for sample collection. | 
| use_six_months | 
 | 
| remove_duplicates | Boolean argument. It specifies if duplicate patient entries in the facilities should be removed or kept | 
tx_vl_eligible
tx_vl_eligible(ndr_example, ref = "2021-09-30")
# Determine clients who are going to be eligible for VL by the end of Q1 of FY22
tx_vl_eligible(ndr_example,
  ref = "2021-12-31"
)
# Subset clients from "Arewa" and "Okun" who are due for viral load in Q1 of FY22
tx_vl_eligible(ndr_example,
  ref = "2021-12-31",
  states = c("Arewa", "Okun"),
  sample = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.