def test_after_schedule_change2(self): subject_visit = SubjectVisit.objects.create( appointment=self.appointment, reason=SCHEDULED) self.assertEqual(CrfMetadata.objects.all().count(), 5) crfs = FormsCollection( Crf(show_order=1, model="edc_metadata.crfone", required=True), Crf(show_order=2, model="edc_metadata.crftwo", required=True), Crf(show_order=3, model="edc_metadata.crfthree", required=True), Crf(show_order=4, model="edc_metadata.crffour", required=True), ) self.register_new_visit_schedule(crfs) self.assertEqual(CrfMetadata.objects.all().count(), 5) metadata_refresher = MetadataRefresher() metadata_refresher.run() self.assertEqual(CrfMetadata.objects.all().count(), 4) expected = { "edc_metadata.crfone": REQUIRED, "edc_metadata.crftwo": REQUIRED, "edc_metadata.crfthree": REQUIRED, "edc_metadata.crfFour": REQUIRED, } self.check(expected, subject_visit=subject_visit)
def setUp(self): load_list_data( list_data=list_data, model_name="edc_visit_tracking.subjectvisitmissedreasons", ) self.subject_identifier = "12345" self.helper = self.helper_cls( subject_identifier=self.subject_identifier) crfs = FormsCollection( Crf(show_order=1, model="edc_metadata.crfone", required=True), Crf(show_order=2, model="edc_metadata.crftwo", required=True), Crf(show_order=3, model="edc_metadata.crfthree", required=True), Crf(show_order=4, model="edc_metadata.crffour", required=True), Crf(show_order=5, model="edc_metadata.crffive", required=True), ) crfs_missed = FormsCollection( Crf( show_order=1, model="edc_visit_tracking.subjectvisitmissed", required=True, ), ) visit_schedule1 = VisitSchedule( name="visit_schedule1", offstudy_model="edc_visit_tracking.subjectoffstudy", death_report_model="edc_visit_tracking.deathreport", locator_model="edc_locator.subjectlocator", ) schedule1 = Schedule( name="schedule1", onschedule_model="edc_visit_tracking.onscheduleone", offschedule_model="edc_visit_tracking.offscheduleone", consent_model="edc_visit_tracking.subjectconsent", appointment_model="edc_appointment.appointment", ) visits = [] for index in range(0, 4): visits.append( Visit( code=f"{index + 1}000", title=f"Day {index + 1}", timepoint=index, rbase=relativedelta(days=index), rlower=relativedelta(days=0), rupper=relativedelta(days=6), requisitions=[], crfs=crfs, crfs_missed=crfs_missed, allow_unscheduled=True, )) for visit in visits: schedule1.add_visit(visit) visit_schedule1.add_schedule(schedule1) site_visit_schedules._registry = {} site_visit_schedules.register(visit_schedule=visit_schedule1) site_reference_configs.register_from_visit_schedule(visit_models={ "edc_appointment.appointment": "edc_visit_tracking.subjectvisit" })
from edc_visit_schedule import Crf, FormsCollection crfs_prn = FormsCollection( Crf(show_order=212, model="mocca_subject.bloodresultslipid"), Crf(show_order=214, model="mocca_subject.cd4result"), Crf(show_order=215, model="mocca_subject.glucosefollowup"), Crf(show_order=216, model="mocca_subject.viralloadresult"), name="prn", ) all_crfs = [ Crf(show_order=110, model="mocca_subject.clinicalreview"), Crf(show_order=111, model="mocca_subject.indicators"), Crf(show_order=112, model="mocca_subject.hivinitialreview", required=False), Crf(show_order=114, model="mocca_subject.dminitialreview", required=False), Crf(show_order=116, model="mocca_subject.htninitialreview", required=False), Crf(show_order=118, model="mocca_subject.cholinitialreview", required=False), Crf(show_order=120, model="mocca_subject.hivreview", required=False), Crf(show_order=130, model="mocca_subject.dmreview", required=False), Crf(show_order=140, model="mocca_subject.htnreview", required=False), Crf(show_order=142, model="mocca_subject.cholreview", required=False), Crf(show_order=145, model="mocca_subject.medications"), Crf(show_order=150, model="mocca_subject.drugrefillhtn", required=False), Crf(show_order=160, model="mocca_subject.drugrefilldm", required=False), Crf(show_order=170, model="mocca_subject.drugrefillhiv", required=False), Crf(show_order=175, model="mocca_subject.drugrefillchol", required=False), Crf(show_order=185,
from dateutil.relativedelta import relativedelta from edc_visit_schedule import Crf, FormsCollection, Schedule, Visit, VisitSchedule crfs = FormsCollection( Crf(show_order=1, model="edc_fieldsets.mymodel", required=True), Crf(show_order=2, model="edc_fieldsets.mymodel2", required=True), Crf(show_order=3, model="edc_fieldsets.mymodel3", required=True), ) visit0 = Visit( code="1000", title="Day 1", timepoint=0, rbase=relativedelta(days=0), rlower=relativedelta(days=0), rupper=relativedelta(days=6), crfs=crfs, facility_name="default", ) visit1 = Visit( code="2000", title="Day 2", timepoint=1, rbase=relativedelta(days=1), rlower=relativedelta(days=0), rupper=relativedelta(days=6), crfs=crfs, facility_name="default", )
from edc_visit_schedule import Crf, FormsCollection crfs_prn = FormsCollection( Crf(show_order=178, model="inte_subject.familyhistory"), Crf(show_order=180, model="inte_subject.nextappointment"), Crf(show_order=200, model="inte_subject.cd4result"), Crf(show_order=210, model="inte_subject.glucose"), Crf(show_order=220, model="inte_subject.viralloadresult"), name="prn", ) crfs_unscheduled = FormsCollection( Crf(show_order=110, model="inte_subject.clinicalreview"), Crf(show_order=111, model="inte_subject.indicators"), Crf(show_order=112, model="inte_subject.hivinitialreview", required=False), Crf(show_order=114, model="inte_subject.dminitialreview", required=False), Crf(show_order=116, model="inte_subject.htninitialreview", required=False), Crf(show_order=120, model="inte_subject.hivreview", required=False), Crf(show_order=130, model="inte_subject.dmreview", required=False), Crf(show_order=140, model="inte_subject.htnreview", required=False), Crf(show_order=145, model="inte_subject.medications"), Crf(show_order=150, model="inte_subject.drugrefillhtn", required=False), Crf(show_order=160, model="inte_subject.drugrefilldm", required=False), Crf(show_order=170, model="inte_subject.drugrefillhiv", required=False), Crf(show_order=185, model="inte_subject.hivmedicationadherence", required=False), Crf(show_order=190, model="inte_subject.dmmedicationadherence", required=False), Crf(show_order=195,
from edc_visit_schedule import FormsCollection, Crf crfs_prn = FormsCollection( Crf(show_order=120, model="inte_subject.hivinitialreview"), Crf(show_order=130, model="inte_subject.diabetesinitialreview"), Crf(show_order=140, model="inte_subject.hypertensioninitialreview"), name="prn", ) # # crfs_unscheduled = FormsCollection( # Crf(show_order=10, model="inte_subject.bloodresultsglu"), # Crf(show_order=20, model="inte_subject.bloodresultsfbc"), # Crf(show_order=25, model="inte_subject.bloodresultslipid"), # Crf(show_order=30, model="inte_subject.bloodresultslft"), # Crf(show_order=40, model="inte_subject.bloodresultsrft"), # Crf(show_order=50, model="inte_subject.malariatest"), # Crf(show_order=60, model="inte_subject.urinedipsticktest"), # name="unscheduled", # ) crfs_d1 = FormsCollection( Crf(show_order=100, model="inte_subject.baselinecarestatus"), Crf(show_order=110, model="inte_subject.anthropometry"), Crf(show_order=120, model="inte_subject.hivinitialreview"), Crf(show_order=130, model="inte_subject.diabetesinitialreview"), Crf(show_order=140, model="inte_subject.hypertensioninitialreview"), Crf(show_order=150, model="inte_subject.physicalactivity"), Crf(show_order=160, model="inte_subject.riskfactors"), name="day1", ) crfs_1m = FormsCollection(name="1m")
def get_visit_schedule(i=None): i = i or 4 crfs = FormsCollection( Crf(show_order=1, model="edc_metadata.crfone", required=True), Crf(show_order=2, model="edc_metadata.crftwo", required=True), Crf(show_order=3, model="edc_metadata.crfthree", required=True), Crf(show_order=4, model="edc_metadata.crffour", required=True), Crf(show_order=5, model="edc_metadata.crffive", required=True), ) requisitions = FormsCollection( Requisition(show_order=10, panel=Panel("one"), required=True, additional=False), Requisition(show_order=20, panel=Panel("two"), required=True, additional=False), Requisition(show_order=30, panel=Panel("three"), required=True, additional=False), Requisition(show_order=40, panel=Panel("four"), required=True, additional=False), Requisition(show_order=50, panel=Panel("five"), required=True, additional=False), Requisition(show_order=60, panel=Panel("six"), required=True, additional=False), ) visit_schedule = VisitSchedule( name="visit_schedule", offstudy_model="edc_offstudy.subjectoffstudy", death_report_model="edc_visit_tracking.deathreport", locator_model="edc_locator.subjectlocator", ) schedule = Schedule( name="schedule", onschedule_model="edc_visit_tracking.onscheduleone", offschedule_model="edc_visit_tracking.offscheduleone", consent_model="edc_visit_tracking.subjectconsent", appointment_model="edc_appointment.appointment", ) visits = [] for index in range(0, i): visits.append( Visit( code=f"{index + 1}000", title=f"Day {index + 1}", timepoint=index, rbase=relativedelta(days=index), rlower=relativedelta(days=0), rupper=relativedelta(days=6), requisitions=requisitions, crfs=crfs, facility_name="default", allow_unscheduled=True, )) for visit in visits: schedule.add_visit(visit) visit_schedule.add_schedule(schedule) return visit_schedule
from dateutil.relativedelta import relativedelta from edc_visit_schedule import Crf, FormsCollection, Schedule, Visit, VisitSchedule crfs = FormsCollection( Crf(show_order=1, model="edc_timepoint.crfone", required=True), Crf(show_order=2, model="edc_timepoint.crftwo", required=True), ) visit_schedule1 = VisitSchedule( name="visit_schedule1", offstudy_model="edc_offstudy.subjectoffstudy", death_report_model="edc_timepoint.deathreport", locator_model="edc_locator.subjectlocator", ) schedule1 = Schedule( name="schedule1", onschedule_model="edc_timepoint.onschedule", offschedule_model="edc_timepoint.offschedule", appointment_model="edc_appointment.appointment", consent_model="edc_timepoint.subjectconsent", ) visits = [] for index in range(0, 4): visits.append( Visit( code=f"{index + 1}000", title=f"Day {index + 1}", timepoint=index, rbase=relativedelta(days=index),
from edc_visit_schedule import FormsCollection, Crf crfs_prn = FormsCollection(Crf(show_order=1, model='tp_subject.demographic'), Crf(show_order=2, model='tp_subject.education'), Crf(show_order=3, model='tp_subject.educationhoh', required=False), Crf(show_order=4, model='tp_subject.communityengagement'), name='prn') crfs_unscheduled = FormsCollection(Crf(show_order=1, model='tp_subject.demographic'), Crf(show_order=2, model='tp_subject.communityengagement'), name='unscheduled') crfs_d1 = FormsCollection(Crf(show_order=1, model='tp_subject.education'), Crf(show_order=2, model='tp_subject.educationhoh', required=False), Crf(show_order=3, model='tp_subject.demographic'), name='day1') crfs_d3 = FormsCollection( # Crf(show_order=1, model='tp_subject.bloodresult'), Crf(show_order=1, model='tp_subject.education'), Crf(show_order=2, model='tp_subject.educationhoh', required=False), name='day3') crfs_d5 = FormsCollection(
from edc_visit_schedule import FormsCollection, Crf crfs_prn = FormsCollection( Crf(show_order=1, model='flourish_child.childcliniciannotes', required=False, additional=False), name='child_crf_prn') crfs_unscheduled = FormsCollection( Crf(show_order=1, model='flourish_child.childcliniciannotes'), name='unscheduled') child_a_crf_2000 = FormsCollection( Crf(show_order=1, model='flourish_child.childhivrapidtestcounseling'), Crf(show_order=2, model='flourish_child.childbirthscreening', required=False), Crf(show_order=3, model='flourish_child.childimmunizationhistory'), Crf(show_order=4, model='flourish_child.childmedicalhistory'), Crf(show_order=5, model='flourish_child.childsociodemographic'), Crf(show_order=6, model='flourish_child.childclinicalmeasurements'), Crf(show_order=7, model='flourish_child.infantfeeding', required=False), Crf(show_order=8, model='flourish_child.childfoodsecurityquestionnaire'), Crf(show_order=9, model='flourish_child.childcliniciannotes'), Crf(show_order=10, model='flourish_child.childcovid19'), Crf(show_order=11, model='flourish_child.childprevioushospitalization'), name='child_cohort_a_enrollment') child_b_crf_2000 = FormsCollection( Crf(show_order=1, model='flourish_child.childhivrapidtestcounseling'), Crf(show_order=2, model='flourish_child.childimmunizationhistory'), Crf(show_order=3, model='flourish_child.childmedicalhistory'), Crf(show_order=4, model='flourish_child.childclinicalmeasurements'),
from dateutil.relativedelta import relativedelta from edc_visit_schedule import Crf, FormsCollection, Schedule, Visit, VisitSchedule from edc_visit_schedule.tests.dummy_panel import DummyPanel from edc_visit_schedule.visit.requisition import Requisition class MockPanel(DummyPanel): """`requisition_model` is normally set when the lab profile is set up. """ def __init__(self, name): super().__init__(requisition_model="edc_lab.subjectrequisition", name=name) crfs = FormsCollection(Crf(show_order=1, model="edc_lab.crfone", required=True)) requisitions = FormsCollection( Requisition(show_order=10, panel=MockPanel("panel"), required=True, additional=False) ) visit = Visit( code="1000", timepoint=0, rbase=relativedelta(days=0), rlower=relativedelta(days=0), rupper=relativedelta(days=6), requisitions=requisitions, crfs=crfs, requisitions_unscheduled=None,
from dateutil.relativedelta import relativedelta from edc_visit_schedule import Crf, FormsCollection, Schedule, Visit, VisitSchedule crfs = FormsCollection( Crf(show_order=1, model=f"edc_fieldsets.mymodel", required=True)) visit0 = Visit( code="1000", title="Day 1", timepoint=0, rbase=relativedelta(days=0), rlower=relativedelta(days=0), rupper=relativedelta(days=6), crfs=crfs, facility_name="default", ) visit1 = Visit( code="2000", title="Day 2", timepoint=1, rbase=relativedelta(days=1), rlower=relativedelta(days=0), rupper=relativedelta(days=6), crfs=crfs, facility_name="default", ) schedule = Schedule( name="schedule", onschedule_model="edc_form_label.onschedule",
from edc_visit_schedule import FormsCollection, Crf crfs_prn = FormsCollection( Crf(show_order=120, model="inte_subject.hivinitialreview"), Crf(show_order=130, model="inte_subject.diabetesinitialreview"), Crf(show_order=140, model="inte_subject.hypertensioninitialreview"), name="prn", ) # # crfs_unscheduled = FormsCollection( # Crf(show_order=10, model="inte_subject.bloodresultsglu"), # Crf(show_order=20, model="inte_subject.bloodresultsfbc"), # Crf(show_order=25, model="inte_subject.bloodresultslipid"), # Crf(show_order=30, model="inte_subject.bloodresultslft"), # Crf(show_order=40, model="inte_subject.bloodresultsrft"), # Crf(show_order=50, model="inte_subject.malariatest"), # Crf(show_order=60, model="inte_subject.urinedipsticktest"), # name="unscheduled", # ) crfs_d1 = FormsCollection( Crf(show_order=100, model="inte_subject.generalassessmentinitial"), Crf(show_order=110, model="inte_subject.anthropometry"), Crf(show_order=120, model="inte_subject.hivinitialreview"), Crf(show_order=130, model="inte_subject.diabetesinitialreview"), Crf(show_order=140, model="inte_subject.hypertensioninitialreview"), Crf(show_order=150, model="inte_subject.physicalactivity"), Crf(show_order=160, model="inte_subject.riskfactors"), name="day1", )
from edc_visit_schedule.tests import DummyPanel app_label = "edc_metadata" class MockPanel(DummyPanel): """`requisition_model` is normally set when the lab profile is set up. """ def __init__(self, name): super().__init__(requisition_model="edc_metadata.subjectrequisition", name=name) crfs_missed = FormsCollection( Crf(show_order=1, model="edc_metadata.subjectvisitmissed", required=True), ) crfs0 = FormsCollection( Crf(show_order=1, model=f"{app_label}.crfone", required=True), Crf(show_order=2, model=f"{app_label}.crftwo", required=True), Crf(show_order=3, model=f"{app_label}.crfthree", required=True), Crf(show_order=4, model=f"{app_label}.crffour", required=True), Crf(show_order=5, model=f"{app_label}.crffive", required=True), ) crfs1 = FormsCollection( Crf(show_order=1, model=f"{app_label}.crffour", required=True), Crf(show_order=2, model=f"{app_label}.crffive", required=True), Crf(show_order=3, model=f"{app_label}.crfsix", required=True), )
from dateutil.relativedelta import relativedelta from edc_visit_schedule import Crf, FormsCollection, Schedule, Visit, VisitSchedule app_label = "edc_pharmacy" crfs = FormsCollection( Crf(show_order=1, model=f"{app_label}.studymedication", required=True), ) visit0 = Visit( code="1000", title="Week 1", timepoint=0, rbase=relativedelta(days=0), rlower=relativedelta(days=0), rupper=relativedelta(days=6), crfs=crfs, allow_unscheduled=True, facility_name="5-day-clinic", ) visit1 = Visit( code="2000", title="Week 2", timepoint=1, rbase=relativedelta(days=7), rlower=relativedelta(days=0), rupper=relativedelta(days=6), crfs=crfs, facility_name="5-day-clinic", )
from edc_visit_schedule import FormsCollection, Crf crfs_prn = FormsCollection( Crf(show_order=1, model='flourish_caregiver.cliniciannotes', required=False, additional=False), Crf(show_order=2, model='flourish_caregiver.caregiversocialworkreferral', required=False, additional=False), name='caregiver_crf_prn') crfs_prn_referral = FormsCollection(Crf( show_order=1, model='flourish_caregiver.caregiversocialworkreferral', required=False, additional=False), name='caregiver_ref_crf_prn') crf_pre_consent = FormsCollection(Crf( show_order=1, model='flourish_caregiver.sociodemographicdata'), name='pre_flourish') crfs_unscheduled = FormsCollection(Crf( show_order=1, model='flourish_caregiver.cliniciannotes'), name='unscheduled') a_crf_2000 = FormsCollection( Crf(show_order=1, model='flourish_caregiver.hivrapidtestcounseling',
from edc_visit_schedule import FormsCollection, Crf crfs_prn = FormsCollection( Crf(show_order=1, model="ambition_subject.bloodresult"), Crf(show_order=2, model="ambition_subject.lumbarpuncturecsf"), Crf(show_order=3, model="ambition_subject.microbiology"), Crf(show_order=4, model="ambition_subject.radiology"), # Crf(show_order=5, model="ambition_subject.pkpdcrf"), name="prn", ) crfs_unscheduled = FormsCollection( Crf(show_order=1, model="ambition_subject.bloodresult"), name="unscheduled" ) crfs_d1 = FormsCollection( Crf(show_order=1, model="ambition_subject.patienthistory"), Crf(show_order=2, model="ambition_subject.medicalexpenses"), Crf(show_order=3, model="ambition_subject.medicalexpensestwo", required=False), Crf(show_order=4, model="ambition_subject.education"), Crf(show_order=5, model="ambition_subject.educationhoh", required=False), Crf(show_order=6, model="ambition_subject.bloodresult"), Crf(show_order=7, model="ambition_subject.lumbarpuncturecsf"), Crf(show_order=10, model="ambition_subject.microbiology", required=False), Crf(show_order=11, model="ambition_subject.radiology", required=False), name="day1", ) crfs_d3 = FormsCollection( Crf(show_order=1, model="ambition_subject.bloodresult"), name="day3"
is set up. """ def __init__(self, name): super().__init__( requisition_model="edc_appointment.subjectrequisition", name=name) panel_one = MockPanel(name="one") panel_two = MockPanel(name="two") panel_three = MockPanel(name="three") panel_four = MockPanel(name="four") panel_five = MockPanel(name="five") panel_six = MockPanel(name="six") crfs = FormsCollection( Crf(show_order=1, model="edc_metadata.crfone", required=True), Crf(show_order=2, model="edc_metadata.crftwo", required=True), Crf(show_order=3, model="edc_metadata.crfthree", required=True), Crf(show_order=4, model="edc_metadata.crffour", required=True), Crf(show_order=5, model="edc_metadata.crffive", required=True), ) crfs_missed = FormsCollection( Crf(show_order=10, model="edc_metadata.subjectvisitmissed"), name="missed", ) requisitions = FormsCollection( Requisition(show_order=10, panel=panel_one, required=True,
from edc_visit_schedule import FormsCollection, Crf crfs_prn = FormsCollection( Crf(show_order=10, model="meta_subject.bloodresultsfbc"), Crf(show_order=20, model="meta_subject.bloodresultsglu"), Crf(show_order=30, model="meta_subject.bloodresultshba1c"), Crf(show_order=35, model="meta_subject.bloodresultslipid"), Crf(show_order=40, model="meta_subject.bloodresultslft"), Crf(show_order=50, model="meta_subject.bloodresultsrft"), Crf(show_order=55, model="meta_subject.malariatest"), Crf(show_order=60, model="meta_subject.urinedipsticktest"), name="prn", ) crfs_unscheduled = FormsCollection( Crf(show_order=10, model="meta_subject.bloodresultsglu"), Crf(show_order=20, model="meta_subject.bloodresultsfbc"), Crf(show_order=25, model="meta_subject.bloodresultslipid"), Crf(show_order=30, model="meta_subject.bloodresultslft"), Crf(show_order=40, model="meta_subject.bloodresultsrft"), Crf(show_order=50, model="meta_subject.malariatest"), Crf(show_order=60, model="meta_subject.urinedipsticktest"), name="unscheduled", ) crfs_d1 = FormsCollection( Crf(show_order=10, model="meta_subject.physicalexam"), Crf(show_order=15, model="meta_subject.patienthistory"), Crf(show_order=40, model="meta_subject.bloodresultsfbc"), Crf(show_order=50, model="meta_subject.bloodresultslipid"),
from edc_visit_schedule import FormsCollection, Crf crfs_prn = FormsCollection(Crf(show_order=2, model='td_infant.infantcovidscreening', required=False, additional=False), name='infant_crf_prn') crf_prn_2060 = FormsCollection(Crf(show_order=2, model='td_infant.infantarvproph', required=False, additional=False), name='infant_crf_prn_2060') infant_crf_2000 = FormsCollection( Crf(show_order=1, model='td_infant.infantbirthdata'), Crf(show_order=2, model='td_infant.infantbirthexam'), Crf(show_order=3, model='td_infant.infantbirthfeedingvaccine'), Crf(show_order=4, model='td_infant.infantbirtharv'), Crf(show_order=5, model='td_infant.infantcongenitalanomalies'), Crf(show_order=7, model='td_infant.infantnvpdispensing', required=False, additional=True), Crf(show_order=8, model='td_infant.infantcliniciannotes'), name='Birth') infant_crf_2010 = FormsCollection( Crf(show_order=1, model='td_infant.infantfu'), Crf(show_order=2, model='td_infant.infantfuphysical'), Crf(show_order=3, model='td_infant.infantfudx'),
from edc_visit_schedule import FormsCollection, Crf crf = {} crfs_1000 = FormsCollection( Crf(show_order=2, model='trainee_subject.educationquestionnaire'), Crf(show_order=3, model='trainee_subject.communityquestionnaire'), name='enrollment') crf.update({1000: crfs_1000}) crfs_1300 = FormsCollection( Crf(show_order=1, model='trainee_subject.educationquestionnaire'), Crf(show_order=2, model='trainee_subject.communityquestionnaire'), name='month3') crf.update({1300: crfs_1300}) crfs_1600 = FormsCollection( Crf(show_order=1, model='trainee_subject.educationquestionnaire'), Crf(show_order=2, model='trainee_subject.communityquestionnaire'), name='month6') crf.update({1600: crfs_1600}) crfs_1900 = FormsCollection( Crf(show_order=1, model='trainee_subject.educationquestionnaire'), Crf(show_order=2, model='trainee_subject.communityquestionnaire'), name='month12') crf.update({1900: crfs_1900}) crfs_2200 = FormsCollection( Crf(show_order=1, model='trainee_subject.educationquestionnaire'), Crf(show_order=2, model='trainee_subject.communityquestionnaire'), name='month15')
from dateutil.relativedelta import relativedelta from edc_visit_schedule import VisitSchedule, Schedule, Visit from edc_visit_schedule import FormsCollection, Crf crfs = FormsCollection( Crf(show_order=1, model="edc_consent.crfone", required=True)) visit = Visit( code="1000", timepoint=0, rbase=relativedelta(days=0), rlower=relativedelta(days=0), rupper=relativedelta(days=6), requisitions=None, crfs=crfs, requisitions_unscheduled=None, crfs_unscheduled=None, allow_unscheduled=False, facility_name="5-day-clinic", ) schedule = Schedule( name="schedule1", onschedule_model="adverse_event_app.onschedule", offschedule_model="adverse_event_app.StudyTerminationConclusion", appointment_model="edc_appointment.appointment", consent_model="adverse_event_app.subjectconsent", ) visit_schedule = VisitSchedule(
app_label = "edc_metadata_rules" class MockPanel(DummyPanel): """`requisition_model` is normally set when the lab profile is set up. """ def __init__(self, name): super().__init__( requisition_model="edc_metadata_rules.subjectrequisition", name=name) crfs0 = FormsCollection( Crf(show_order=1, model=f"{app_label}.crfone", required=True), Crf(show_order=2, model=f"{app_label}.crftwo", required=True), Crf(show_order=3, model=f"{app_label}.crfthree", required=True), Crf(show_order=4, model=f"{app_label}.crffour", required=True), Crf(show_order=5, model=f"{app_label}.crffive", required=True), ) crfs1 = FormsCollection( Crf(show_order=1, model=f"{app_label}.crffour", required=True), Crf(show_order=2, model=f"{app_label}.crffive", required=True), Crf(show_order=3, model=f"{app_label}.crfsix", required=True), ) crfs2 = FormsCollection( Crf(show_order=1, model=f"{app_label}.crfseven", required=True))
from edc_visit_schedule import FormsCollection, Crf crf = {} crfs_1000 = FormsCollection(Crf(show_order=2, model='pre_flourish.cyhuupreenrollment'), name='enrollment') crf.update({1000: crfs_1000})
from dateutil.relativedelta import relativedelta from edc_visit_schedule import Crf, FormsCollection, Schedule, Visit, VisitSchedule crfs = FormsCollection( Crf(show_order=1, model="edc_action_item.crflongitudinalone", required=True), Crf(show_order=2, model="edc_action_item.crflongitudinaltwo", required=True), ) visit0 = Visit( code="1000", title="Day 1", timepoint=0, rbase=relativedelta(days=0), rlower=relativedelta(days=0), rupper=relativedelta(days=6), requisitions=None, crfs=crfs, crfs_unscheduled=None, requisitions_unscheduled=None, facility_name="7-day-clinic", ) visit1 = Visit( code="2000", title="Day 2", timepoint=1, rbase=relativedelta(days=1),
from dateutil.relativedelta import relativedelta from edc_visit_schedule import Crf, FormsCollection, Schedule, Visit, VisitSchedule crfs = FormsCollection( Crf(show_order=1, model="adverse_event_app.crfone", required=True)) visit = Visit( code="1000", timepoint=0, rbase=relativedelta(days=0), rlower=relativedelta(days=0), rupper=relativedelta(days=6), title="Baseline", requisitions=None, crfs=crfs, requisitions_unscheduled=None, crfs_unscheduled=None, allow_unscheduled=False, facility_name="5-day-clinic", ) schedule = Schedule( name="schedule1", onschedule_model="adverse_event_app.onschedule", offschedule_model="adverse_event_app.StudyTerminationConclusion", appointment_model="edc_appointment.appointment", consent_model="adverse_event_app.subjectconsent", ) visit_schedule = VisitSchedule( name="visit_schedule",
from edc_visit_schedule import FormsCollection, Crf crfs_prn = FormsCollection(Crf(show_order=1, model='td_maternal.maternalcovidscreening', required=False, additional=False), name='maternal_crf_prn') crf_1000 = FormsCollection( Crf(show_order=1, model='td_maternal.maternalultrasoundinitial'), Crf(show_order=2, model='td_maternal.maternalobstericalhistory', required=False), Crf(show_order=3, model='td_maternal.maternalmedicalhistory', required=False), Crf(show_order=4, model='td_maternal.maternaldemographics', required=False), Crf(show_order=5, model='td_maternal.maternallifetimearvhistory', required=False), Crf(show_order=6, model='td_maternal.maternalarvpreg', required=False), Crf(show_order=7, model='td_maternal.maternalclinicalmeasurementsone', required=False), Crf(show_order=8, model='td_maternal.maternalfoodsecurity'), Crf(show_order=9, model='td_maternal.cliniciannotes'), name='enrollment') crf_1010 = FormsCollection( Crf(show_order=1, model='td_maternal.maternalrando', required=False),
from edc_visit_schedule import FormsCollection, Crf crfs_prn = FormsCollection(Crf(show_order=1, model='ambition_subject.bloodresult'), Crf(show_order=2, model='ambition_subject.lumbarpuncturecsf'), Crf(show_order=3, model='ambition_subject.microbiology'), Crf(show_order=4, model='ambition_subject.radiology'), name='prn') crfs_unscheduled = FormsCollection(Crf(show_order=1, model='ambition_subject.bloodresult'), name='unscheduled') crfs_d1 = FormsCollection(Crf(show_order=1, model='ambition_subject.patienthistory'), Crf(show_order=2, model='ambition_subject.medicalexpenses'), Crf(show_order=3, model='ambition_subject.medicalexpensestwo', required=False), Crf(show_order=4, model='ambition_subject.education'), Crf(show_order=5, model='ambition_subject.educationhoh', required=False), Crf(show_order=6, model='ambition_subject.bloodresult'), Crf(show_order=7,
VisitSchedule, ) from edc_visit_schedule.tests.dummy_panel import DummyPanel class Panel(DummyPanel): """`requisition_model` is normally set when the lab profile is set up. """ def __init__(self, name): super().__init__( requisition_model="edc_appointment.subjectrequisition", name=name) crfs = FormsCollection( Crf(show_order=1, model="edc_metadata.crfone", required=True), Crf(show_order=2, model="edc_metadata.crftwo", required=True), Crf(show_order=3, model="edc_metadata.crfthree", required=True), Crf(show_order=4, model="edc_metadata.crffour", required=True), Crf(show_order=5, model="edc_metadata.crffive", required=True), ) requisitions = FormsCollection( Requisition(show_order=10, panel=Panel("one"), required=True, additional=False), Requisition(show_order=20, panel=Panel("two"), required=True, additional=False),
from edc_visit_schedule import FormsCollection, Crf crfs_prn = FormsCollection( Crf(show_order=200, model="mapitio_subject.deathreport", required=False), name="prn", ) crfs_d1 = FormsCollection( Crf(show_order=100, model="mapitio_subject.indicators"), Crf(show_order=110, model="mapitio_subject.hivhistory"), Crf(show_order=120, model="mapitio_subject.ncdhistory"), Crf(show_order=130, model="mapitio_subject.biomedicalhistory"), Crf(show_order=140, model="mapitio_subject.followup"), Crf(show_order=145, model="mapitio_subject.followupindicators"), Crf(show_order=150, model="mapitio_subject.hivfollowup"), Crf(show_order=160, model="mapitio_subject.ncdfollowup"), Crf(show_order=170, model="mapitio_subject.biomedicalfollowup"), Crf(show_order=180, model="mapitio_subject.complications"), Crf(show_order=190, model="mapitio_subject.investigations"), name="day1", )