diff --git a/edc_ltfu/modelform_mixins.py b/edc_ltfu/modelform_mixins.py index 432a538..0ab0df7 100644 --- a/edc_ltfu/modelform_mixins.py +++ b/edc_ltfu/modelform_mixins.py @@ -6,7 +6,7 @@ from edc_form_validators import FormValidator from edc_utils import convert_php_dateformat from edc_visit_tracking.constants import MISSED_VISIT -from edc_visit_tracking.utils import get_subject_visit_model_cls +from edc_visit_tracking.utils import get_related_visit_model_cls from .constants import LOST_TO_FOLLOWUP @@ -31,7 +31,7 @@ def clean(self): def check_if_last_visit_was_missed(self): last_obj = ( - get_subject_visit_model_cls() + get_related_visit_model_cls() .objects.filter( appointment__subject_identifier=self.cleaned_data.get("subject_identifier"), ) diff --git a/edc_ltfu/tests/tests/test_ltfu.py b/edc_ltfu/tests/tests/test_ltfu.py index b056143..7c6c1f7 100644 --- a/edc_ltfu/tests/tests/test_ltfu.py +++ b/edc_ltfu/tests/tests/test_ltfu.py @@ -4,7 +4,7 @@ from edc_action_item import site_action_items from edc_action_item.models import ActionItem from edc_adverse_event.constants import DEATH_REPORT_ACTION -from edc_appointment.tests.appointment_test_case_mixin import AppointmentTestCaseMixin +from edc_appointment.tests.test_case_mixins import AppointmentTestCaseMixin from edc_consent import site_consents from edc_constants.constants import CLOSED, HOSPITALIZED, OTHER, YES from edc_facility.import_holidays import import_holidays @@ -60,7 +60,7 @@ def setUp(self): site_reference_configs.registry = {} site_reference_configs.register_from_visit_schedule( - visit_models={"edc_appointment.appointment": "edc_metadata.subjectvisit"} + visit_models={"edc_appointment.appointment": "edc_visit_tracking.subjectvisit"} ) self.subject_identifier = "111111111" diff --git a/runtests.py b/runtests.py index 3733c56..4faf2d9 100644 --- a/runtests.py +++ b/runtests.py @@ -18,7 +18,7 @@ ETC_DIR=join(base_dir, app_name, "tests", "etc"), SUBJECT_SCREENING_MODEL="edc_metadata.subjectscreening", SUBJECT_CONSENT_MODEL="edc_metadata.subjectconsent", - SUBJECT_VISIT_MODEL="edc_metadata.subjectvisit", + SUBJECT_VISIT_MODEL="edc_visit_tracking.subjectvisit", SUBJECT_VISIT_MISSED_MODEL="edc_metadata.subjectvisitmissed", INSTALLED_APPS=[ "django.contrib.admin",