Skip to content

Commit

Permalink
Add constants related to user rights
Browse files Browse the repository at this point in the history
ref #163; ref #217
  • Loading branch information
wibeasley committed Sep 17, 2018
1 parent fd46e6b commit 602cf4e
Showing 1 changed file with 33 additions and 2 deletions.
35 changes: 33 additions & 2 deletions R/constant.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,24 @@
#'
#' REDCapR::constant("form_incomplete") # Returns 0L
#' REDCapR::constant("form_unverified") # Returns 1L
#' REDCapR::constant("form_complete") # Returns 2L
#' REDCapR::constant("form_complete" ) # Returns 2L
#'
#' # Adapt for your institution's server:
#' # https://bbmc.ouhsc.edu/redcap/api/help/?content=exp_users
#' REDCapR::constant("data_export_rights_no_access" ) # Returns 0L
#' REDCapR::constant("data_export_rights_deidentified") # Returns 1L
#' REDCapR::constant("data_export_rights_full" ) # Returns 2L
#'
#' # Adapt for your institution's server:
#' # https://bbmc.ouhsc.edu/redcap/api/help/?content=exp_users
#' REDCapR::constant("form_rights_no_access") # Returns 0L
#' REDCapR::constant("form_rights_readonly" ) # Returns 1L
#' REDCapR::constant("form_rights_readwrite") # Returns 2L
#'
#' # Adapt for your institution's server:
#' # https://bbmc.ouhsc.edu/redcap/api/help/?content=exp_users
#' REDCapR::constant("access_no" ) # Returns 0L
#' REDCapR::constant("access_yes") # Returns 1L
#'
#' REDCapR::constant(c("form_complete", "form_complete", "form_incomplete")) # Returns c(2L, 2L, 0L)
#'
Expand Down Expand Up @@ -62,5 +79,19 @@ constant <- function( name, simplify=TRUE ) {
constant_list <- list(
form_incomplete = 0L,
form_unverified = 1L,
form_complete = 2L
form_complete = 2L,

# https://bbmc.ouhsc.edu/redcap/api/help/?content=exp_users
data_export_rights_no_access = 0L,
data_export_rights_deidentified = 1L,
data_export_rights_full = 2L,

# https://bbmc.ouhsc.edu/redcap/api/help/?content=exp_users
form_rights_no_access = 0L,
form_rights_readonly = 1L,
form_rights_readwrite = 2L,

# https://bbmc.ouhsc.edu/redcap/api/help/?content=exp_users
access_no = 0L,
access_yes = 1L
)

0 comments on commit 602cf4e

Please sign in to comment.