redcap-dq-trigger
Trigger a REDCap data quality rule
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (6.6%) to scientific vocabulary
Keywords
Repository
Trigger a REDCap data quality rule
Basic Info
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 2
Topics
Metadata Files
README.md
Data Quality Rule Trigger for REDCap
This API extension is implemented as a REDCap external module and allows you to progmatically trigger a data quality rule and run 'Fix Calcs' on that rule.
Sample Usage
~~~ function executeRule($pid, $ruleid, $apitoken) { $data = ['ruleid' => $ruleid, 'token' => $apitoken]; $ch = curlinit(); curlsetopt($ch, CURLOPTURL, 'URLTOREDCAP/redcap/api/?prefix=dqtrigger&page=trigger&pid=' . $pid . '&type=module&NOAUTH'); curlsetopt($ch, CURLOPTRETURNTRANSFER, true); curlsetopt($ch, CURLOPTSSLVERIFYPEER, false); curlsetopt($ch, CURLOPTVERBOSE, 0); curlsetopt($ch, CURLOPTFOLLOWLOCATION, true); curlsetopt($ch, CURLOPTAUTOREFERER, true); curlsetopt($ch, CURLOPTMAXREDIRS, 10); curlsetopt($ch, CURLOPTCUSTOMREQUEST, 'POST'); curlsetopt($ch, CURLOPTFRESHCONNECT, 1); curlsetopt($ch, CURLOPTPOSTFIELDS, httpbuildquery($data, '', '&')); curlexec($ch); curl_close($ch); }
executeRule('PROJECT_ID', 'RULE_ID', 'API_TOKEN', true);
~~~
Note on Rule ID
Built-in REDCap data quality rules can be executed by simply passing the letter of the rule. All other rules must be prefixed with "pd-" and the number of the rule, plus 9. For example, to execute the calculations on user-defined rule 1, pass "pd-10" as the $rule_id.
For Support
Source code can be found at https://github.com/metrc/redcap-dq-trigger. Additional suggestions, comments, and basic help can be obtained by emailing psullivan@jhu.edu
Owner
- Name: Paige Julianne Sullivan
- Login: paigejulianne
- Kind: user
- Location: Raleigh, NC USA
- Company: @metrc
- Website: https://paigejulianne.com
- Repositories: 1
- Profile: https://github.com/paigejulianne
Currently working at @metrc as the REDCap administrator and developer
Citation (CITATION.cff)
cff-version: 1.2.0
title: Data Quality Trigger External Module for REDCap
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Paige
family-names: Sullivan
email: psullivan@jhu.edu
affiliation: Johns Hopkins University
orcid: 'https://orcid.org/0009-0002-7041-9547'
repository-code: 'https://github.com/metrc/redcap-dq-trigger'
abstract: >-
This is an external module for REDCap that allows users to
trigger a data quality rule via API call
keywords:
- redcap
- redcap-external-module
- redcap-repo
license: MIT