R/utilsPatientDesigner.R

Defines functions getTestSets

Documented in getTestSets

#' Useful to list available datasets in the testCases folder
#'
#' @param path Optional directory containing JSON test sets.
#' If NULL, the package resolves a default path with testthat integration.
#' @returns A list()
#' @export
#'
#' @importFrom stringr str_remove
getTestSets <- function(path = NULL) {

  testCasesDir <- testSetDir(path = path, create = TRUE)

  list.files(testCasesDir) |>
    stringr::str_remove(".json")

}

Try the PatientGenerator package in your browser

Any scripts or data that you put into this service are public.

PatientGenerator documentation built on Sept. 16, 2026, 1:06 a.m.