Code Monkey home page Code Monkey logo

randapi's Introduction

API to allow usage of the RedCap Randomization from plugins

Open Source Love REDCap

Help

The help page can be viewed by accessing https://localhost/api/?type=module&prefix=randapi&page=api&pid=20

Randomization Test

A test for this API was written in testrandomization.php.

The test can be executed by calling url https://localhost/api/?type=module&prefix=randapi&page=testrandomization&pid=20&NOAUTH&token=F33F6876ADC5EC63CE79EBFF88FF0092

It requires:

  • The RandomizationTest project to be loaded. cfr. resources/RandomizationTest_dist.csv for the project dictionary or RandomizationTest.xml for the full project metadata xml.
  • A user with an access token who is assigned to the Project Admin role. This user must be able to perform randomization and to add records.
  • The Allocation table should be loaded. Cfr. resources/RandomizationAllocation.csv

There are 3 groups (A,B and C). They are saved in randgroup. Randomization must occur within these groups for 2 possible outcomes (X and Y). The result is saved in assignedto.

The test adds 3 records.

  1. randgroup = 1 (A), expected = 1 (X)
  2. randgroup = 1 (A), expected = 2 (Y)
  3. randgroup = 2 (B), expected = 1 (X)

Allocation Test

The allocation test adds 6 new allocations to the allocation table. It assumes the original allocation table is loaded prior to executing the test.

You can execute it by altering the url below to your configuration.

https://localhost/api/?type=module&prefix=randapi&page=testallocation&pid=20&NOAUTH&token=F33F6876ADC5EC63CE79EBFF88FF0092

randapi's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

randapi's Issues

Change target

In limited cases it might be necessary to change the outcome of the randomization. E.g. in an automated process a record was assigned to a certain target group. Due to some manual changes, the record is unrandomized. Correcting the error and randomizing the record again, results in a different target value.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.