Skip to content

Commit 4bd7958

Browse files
committed
REDCAP: Added event and instrument args to redcap-delete-record
1 parent d859414 commit 4bd7958

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

modules/redcap/redcap.scm

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,8 +716,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
716716
)
717717
)
718718

719-
(define (redcap-delete-records host token records)
720-
(let* ((request (string-append "token=" token "&content=record&action=delete&returnFormat=json"))
719+
(define (redcap-delete-records host token records . xargs)
720+
(let* ((instrument (redcap:arg 'instrument xargs #f))
721+
(event (redcap:arg 'event xargs #f))
722+
(request (string-append "token=" token "&content=record&action=delete&returnFormat=json"
723+
(if instrument (string-append "&instrument=" instrument) "")
724+
(if event (string-append "&event=" event) "")))
721725
(recordstr (if (pair? records)
722726
(let loop ((i 0) (str ""))
723727
(if (= i (length records)) str

0 commit comments

Comments
 (0)