Skip to main content

Randomization class and models for ambition/edc

Project description

pypi travis coverage

ambition-rando

Randomization class and model for Ambition

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 Distribution

Built Distribution

ambition_rando-0.1.4-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file ambition-rando-0.1.4.macosx-10.13-x86_64.tar.gz.

File metadata

File hashes

Hashes for ambition-rando-0.1.4.macosx-10.13-x86_64.tar.gz
Algorithm Hash digest
SHA256 5c13c8c051809d07de4202424e17ba6429ba5652410fb737f7311160e3601d69
MD5 6a9cb1ada33152714e7e87b7bd74b700
BLAKE2b-256 2be2213b12c768578ddc18463db7ba5851531d887d83555dfdb1f0a3ddf441a7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ambition_rando-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6f8d36fc824a34e5a2d42e07d6202204eb47bf452ef1db6abf5cf1b7fc08e554
MD5 412174598ba77bd1ae6c070054add61c
BLAKE2b-256 2977bf67e48db2446c17669ab2bf3452feb526e6dc74edc3ce7f924165fcd47e

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