Skip to main content

Randomization class and models for ambition/edc

Project description

pypi travis codecov downloads

ambition-rando

Randomization class and model for Ambition

To load the randomization list:

python manage.py import_randomization_list

To rebuild the records in RandomizationList:

from django.core.exceptions import ObjectDoesNotExist
from django.contrib.sites.models import Site
from edc_registration.models import RegisteredSubject
from ambition_rando.models import RandomizationList

current_site = Site.objects.get_current()
for obj in RegisteredSubject.on_site.all():
    try:
        randobj = RandomizationList.objects.get(sid=obj.sid)
    except ObjectDoesNotExist:
        print(f'missing for {obj.subject_identifier}, {obj.sid}.')
    else:
        randobj.alocated_site=current_site
        randobj.subject_identifier=obj.subject_identifier
        randobj.allocated_datetime=obj.consent_datetime
        randobj.allocated=True
        randobj.save()

Project details


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

ambition_rando-0.1.28-py3-none-any.whl (37.5 kB view details)

Uploaded Python 3

File details

Details for the file ambition_rando-0.1.28-py3-none-any.whl.

File metadata

  • Download URL: ambition_rando-0.1.28-py3-none-any.whl
  • Upload date:
  • Size: 37.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for ambition_rando-0.1.28-py3-none-any.whl
Algorithm Hash digest
SHA256 588c2d5993853518a1e19845ebfb3dca6f3de029244d172a2b04b7d3aacadba8
MD5 d4a7936a080d771c9cc0d564382a6d0f
BLAKE2b-256 bd22e56fc8d8f44c5d27649cfbdeb34a7f0a3f5ee7e82935fb950e5e289f5b6f

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