Title: | An R interface to the REDCap Locking API |
---|---|
Description: | Provides R bindings for the REDCap Locking API, an external module for REDCap. Supports locking and unlocking records and instruments, as well as querying locking status. |
Authors: | Sam Gardiner |
Maintainer: | Sam Gardiner <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2025-02-14 05:11:57 UTC |
Source: | https://github.com/gardiners/lockr |
Perform data-level locking operations
data_action( record, event = NULL, instrument = NULL, instance = NULL, arm = NULL, action, redcap_uri, token ) data_status( record, event = NULL, instrument = NULL, instance = NULL, arm = NULL, redcap_uri, token ) lock_data( record, event = NULL, instrument = NULL, instance = NULL, arm = NULL, redcap_uri, token ) unlock_data( record, event = NULL, instrument = NULL, instance = NULL, arm = NULL, redcap_uri, token )
data_action( record, event = NULL, instrument = NULL, instance = NULL, arm = NULL, action, redcap_uri, token ) data_status( record, event = NULL, instrument = NULL, instance = NULL, arm = NULL, redcap_uri, token ) lock_data( record, event = NULL, instrument = NULL, instance = NULL, arm = NULL, redcap_uri, token ) unlock_data( record, event = NULL, instrument = NULL, instance = NULL, arm = NULL, redcap_uri, token )
record |
A vector of REDCap record names to affect. Required. |
event |
A character vector specifying the event/s to affect. Ignored if REDCap project is not longitudinal |
instrument |
A character vector specifying the instrument/s to affect. If NULL, all instruments for the given record/event specification are affected |
instance |
A vector specifying which instance of a repeating instrument to affect. If not specified, affects every instance. |
arm |
A vector specifying which arm to affect. |
action |
A character string for the action to perform on records. One of "lock", "unlock" or "status" |
redcap_uri |
A character string of the REDCap server's API endpoint URL |
token |
A character string of the REDCap API token |
data_status
: Get the lock status of specified instruments
lock_data
: Lock specified instruments
unlock_data
: Unlock specified instruments
Perform record-level locking operations
record_action( record, action = c("status", "lock", "unlock"), redcap_uri, token ) record_status(record, redcap_uri, token) lock_record(record, redcap_uri, token) unlock_record(record, redcap_uri, token)
record_action( record, action = c("status", "lock", "unlock"), redcap_uri, token ) record_status(record, redcap_uri, token) lock_record(record, redcap_uri, token) unlock_record(record, redcap_uri, token)
record |
A vector of REDCap record names to affect. Required. |
action |
A character string for the action to perform on records. One of "lock", "unlock" or "status" |
redcap_uri |
A character string of the REDCap server's API endpoint URL |
token |
A character string of the REDCap API token |
A dataframe with one row per record affected by the operation.
record_status
: Return the lock status of record/s
lock_record
: Lock named record/s
unlock_record
: Unlock named record/s