def setUpClass(cls): super().setUpClass() import_holidays() site_consents.registry = {} site_consents.register(v1) site_visit_schedules._registry = {} site_visit_schedules.register(visit_schedule) Site.objects.create(id=10, name="edc", domain="edc.example.com")
def consent_factory(self, **kwargs): options = dict( start=kwargs.get('start'), end=kwargs.get('end'), gender=kwargs.get('gender', [MALE, FEMALE]), updates_versions=kwargs.get('updates_versions', []), version=kwargs.get('version', '1'), age_min=kwargs.get('age_min', 16), age_max=kwargs.get('age_max', 64), age_is_adult=kwargs.get('age_is_adult', 18), ) model = kwargs.get('model', 'bcpp_subject.subjectconsent') consent = Consent(model, **options) site_consents.register(consent) return consent
age_max=64, gender=[MALE, FEMALE]) anonymous_v1 = Consent( 'bcpp_subject.anonymousconsent', version='1', group=settings.ANONYMOUS_CONSENT_GROUP, # updates_versions=['4'], start=arrow.get(datetime(2016, 5, 23, 0, 0, 0), tzinfo=tzinfo).to('UTC').datetime, end=arrow.get(datetime(2017, 12, 31, 23, 59, 59), tzinfo=tzinfo).to('UTC').datetime, age_min=16, age_is_adult=18, age_max=64, gender=[MALE, FEMALE]) # clinic_v1 = Consent( # 'bcpp_clinic.clinicconsent', # group='clinic', # start=arrow.get( # datetime(2013, 10, 18, 0, 0, 0), tzinfo=tzinfo).to('UTC').datetime, # end=arrow.get( # datetime(2018, 4, 30, 23, 59, 59), tzinfo=tzinfo).to('UTC').datetime, # age_min=16, # age_is_adult=18, # age_max=64, # gender=[MALE, FEMALE]) site_consents.register(v1, v2, v3, v4, v5, anonymous_v1)
from edc_consent.consent import Consent from edc_consent.site_consents import site_consents from edc_constants.constants import FEMALE, MALE from edc_protocol import Protocol v1 = Consent( "data_manager_app.subjectconsent", version="1", start=Protocol().study_open_datetime, end=Protocol().study_close_datetime, age_min=18, age_is_adult=18, age_max=110, gender=[MALE, FEMALE], ) site_consents.register(v1)
import arrow from dateutil.tz import gettz from datetime import datetime from edc_consent.consent import Consent from edc_consent.site_consents import site_consents from edc_constants.constants import MALE, FEMALE tzinfo = gettz('Africa/Gaborone') clinic_v1 = Consent( 'bcpp_clinic_subject.subjectconsent', version=3, start=arrow.get( datetime(2013, 10, 18, 0, 0, 0), tzinfo=tzinfo).to('UTC').datetime, end=arrow.get( datetime(2018, 4, 30, 23, 59, 59), tzinfo=tzinfo).to('UTC').datetime, age_min=16, age_is_adult=18, age_max=64, gender=[MALE, FEMALE]) site_consents.register(clinic_v1)
age_min=18, age_is_adult=18, age_max=110, gender=[MALE, FEMALE]) # tb_caregiver_v1 = Consent( # 'flourish_caregiver.tbinformedconsent', # version='1', # start=edc_protocol.study_open_datetime, # end=edc_protocol.study_close_datetime, # age_min=18, # age_is_adult=18, # age_max=110, # gender=[FEMALE]) caregiver_v2 = Consent( 'flourish_caregiver.subjectconsent', version='2', start=edc_protocol.study_open_datetime, end=edc_protocol.study_close_datetime, age_min=18, age_is_adult=18, age_max=110, gender=[MALE, FEMALE]) site_consents.validator_cls = ConsentObjectValidator site_consents.register(caregiver_v1) site_consents.register(caregiver_v2) # site_consents.register(tb_caregiver_v1)
def setUpClass(cls): site_consents.register(v1_consent) return super().setUpClass()