Skip to main content

Randomization classes for clinicedc/edc

Project description

pypi actions 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 representation 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 Distribution

edc-randomization-0.3.32.tar.gz (46.8 kB view details)

Uploaded Source

Built Distribution

edc_randomization-0.3.32-py3-none-any.whl (55.5 kB view details)

Uploaded Python 3

File details

Details for the file edc-randomization-0.3.32.tar.gz.

File metadata

  • Download URL: edc-randomization-0.3.32.tar.gz
  • Upload date:
  • Size: 46.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.9

File hashes

Hashes for edc-randomization-0.3.32.tar.gz
Algorithm Hash digest
SHA256 c087ce2e03526c380dcdff2369c27a2d142da512b9edd44be0caaf94ac2b378a
MD5 71f9a3c3fd8fa99696f3d3d312e7d78c
BLAKE2b-256 0216764702ac6e5c7907a229403257b0a147adea6548b8eeee000a8ccc2ec856

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for edc_randomization-0.3.32-py3-none-any.whl
Algorithm Hash digest
SHA256 b259ec9c593de8d622b5c8bd8825eb672c5ee7a33503c3218875939541a59f31
MD5 c0d404c27847462fc4966539a1956d0c
BLAKE2b-256 000da8c5ba8a23f391c64d222b94f9e74475c473e2178b67949145685bd3dfec

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