Skip to content

ambition-study/ambition-rando

 
 

Repository files navigation

Build Status Coverage Status

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()

About

Randomization class and model for Ambition

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 98.8%
  • HTML 1.2%