Skip to main content

Randomization classes for clinicedc/edc projects.

Project description

pypi travis codecov downloads

edc-randomization

Randomization objects for clinicedc projects

Overview

The default randomizer class will refer to and update the randomization list in the default RandomizationList model. You may refer to more than one randomizer within a project by declaring a custom randomizer class and registering it with site_randomizer. Randomizers are referred to by name in site_randomizer. Each randomizer class should have a custom model associated with it. See the RandomizationListModelMixin and its randomizer_cls attribute.

Importing from CSV

You can import data from CSV into the RandomizationList (or your custom model) using the import_randomization_list management command:

python manage.py import_randomization_list

--or--

python manage.py import_randomization_list --name=my_custom_randomizer_name

Customizing the default randomizer

The important values are:

  • sid: unique sequence

  • site: Site name

  • allocation: integer repreasentation of arms (e.g. 1, 2)

The default randomizer is loaded at startup, uses the RandomizationList model and an allocation map of “Active=1” vs “Placebo=2”.

Creating a custom randomizer

Unless you explicitly tell it not to, the site_randomizer will load the default randomizer. This may be OK if you have multiple randomizers within the same protocol where the default is one of them. If not, you can prevent the “default” from loading by updating settings with:

EDC_RANDOMIZATION_REGISTER_DEFAULT_RANDOMIZER=False

To create a custom randomizer class, declare a subclass of Randomizer in file randomizers.py at the root of your app. On startup the site_randomizer will pick it up. See the Randomizer class.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

edc_randomization-0.1.42-py3-none-any.whl (43.0 kB view details)

Uploaded Python 3

File details

Details for the file edc_randomization-0.1.42-py3-none-any.whl.

File metadata

  • Download URL: edc_randomization-0.1.42-py3-none-any.whl
  • Upload date:
  • Size: 43.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0.post20200309 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

File hashes

Hashes for edc_randomization-0.1.42-py3-none-any.whl
Algorithm Hash digest
SHA256 868e3da08eb672dd767716ac93f721196ae6b0775961ec380292da68ee021b8e
MD5 fc6bbf8db78a5e5ab71df89e7479e9ff
BLAKE2b-256 7611f1dc75f16ea7620ea3b0aa60a185094b9e316132990b13d53ebbdbac406c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page