Skip to content

Commit

Permalink
remove edc-reference as a dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed Oct 31, 2023
1 parent 556f74f commit b5e7d9f
Show file tree
Hide file tree
Showing 11 changed files with 64 additions and 54 deletions.
1 change: 0 additions & 1 deletion effect_consent/tests/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
path("edc_export/", include("edc_export.urls")),
path("edc_device/", include("edc_device.urls")),
path("edc_protocol/", include("edc_protocol.urls")),
path("edc_reference/", include("edc_reference.urls")),
path("edc_visit_schedule/", include("edc_visit_schedule.urls")),
path("effect_consent/", include("effect_consent.urls")),
path("administration", RedirectView.as_view(url="admin/"), name="administration_url"),
Expand Down
3 changes: 0 additions & 3 deletions effect_dashboard/tests/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from edc_consent.admin_site import edc_consent_admin
from edc_dashboard.views import AdministrationView
from edc_locator.admin_site import edc_locator_admin
from edc_reference.admin_site import edc_reference_admin

from effect_ae.admin_site import effect_ae_admin
from effect_consent.admin_site import effect_consent_admin
Expand All @@ -24,7 +23,6 @@
path("admin/", effect_test_admin.urls),
path("admin/", effect_ae_admin.urls),
path("admin/", effect_prn_admin.urls),
path("admin/", edc_reference_admin.urls),
path("admin/", edc_locator_admin.urls),
path("admin/", effect_consent_admin.urls),
path("admin/", effect_subject_admin.urls),
Expand All @@ -51,7 +49,6 @@
path("edc_locator/", include("edc_locator.urls")),
path("edc_pharmacy_dashboard/", include("edc_pharmacy_dashboard.urls")),
path("edc_protocol/", include("edc_protocol.urls")),
path("edc_reference/", include("edc_reference.urls")),
path("edc_subject_dashboard/", include("edc_subject_dashboard.urls")),
path("edc_visit_schedule/", include("edc_visit_schedule.urls")),
path("subject/", include("effect_dashboard.urls")),
Expand Down
1 change: 0 additions & 1 deletion effect_edc/settings/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@
"edc_protocol_incident.apps.AppConfig",
"edc_prn.apps.AppConfig",
"edc_randomization.apps.AppConfig",
"edc_reference.apps.AppConfig",
"edc_registration.apps.AppConfig",
"edc_pdf_reports.apps.AppConfig",
"edc_review_dashboard.apps.AppConfig",
Expand Down
1 change: 0 additions & 1 deletion effect_edc/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def trigger_error(request):
*paths_for_urlpatterns("edc_protocol"),
*paths_for_urlpatterns("edc_protocol_incident"),
*paths_for_urlpatterns("edc_randomization"),
*paths_for_urlpatterns("edc_reference"),
*paths_for_urlpatterns("edc_refusal"),
*paths_for_urlpatterns("edc_registration"),
# *paths_for_urlpatterns("edc_review_dashboard"),
Expand Down
4 changes: 1 addition & 3 deletions effect_subject/metadata_rules/predicates.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from django.apps import apps as django_apps
from django.core.exceptions import ObjectDoesNotExist
from edc_constants.constants import IN_PERSON, YES
from edc_metadata.metadata_rules import PredicateCollection
from edc_visit_schedule.constants import DAY01
from edc_visit_schedule.utils import is_baseline

Expand All @@ -18,9 +17,8 @@ def screening_lp_performed(subject_identifier: str):
return True


class Predicates(PredicateCollection):
class Predicates:
app_label = "effect_subject"
visit_model = "effect_subject.subjectvisit"

def lpcsf_crf_required(self, visit, **kwargs) -> bool:
"""Require at baseline if screening form indicates a screening LP was
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Generated by Django 4.2.5 on 2023-10-31 00:51

from django.db import migrations
import edc_model_fields.fields.other_charfield


class Migration(migrations.Migration):
dependencies = [
("effect_subject", "0109_alter_adherence_options_alter_arvhistory_options_and_more"),
]

operations = [
migrations.AlterField(
model_name="historicalsubjectvisit",
name="assessment_type_other",
field=edc_model_fields.fields.other_charfield.OtherCharField(
blank=True,
max_length=35,
null=True,
verbose_name="If other, please specify ...",
),
),
migrations.AlterField(
model_name="historicalsubjectvisit",
name="assessment_who_other",
field=edc_model_fields.fields.other_charfield.OtherCharField(
blank=True,
max_length=35,
null=True,
verbose_name="If other, please specify ...",
),
),
migrations.AlterField(
model_name="subjectvisit",
name="assessment_type_other",
field=edc_model_fields.fields.other_charfield.OtherCharField(
blank=True,
max_length=35,
null=True,
verbose_name="If other, please specify ...",
),
),
migrations.AlterField(
model_name="subjectvisit",
name="assessment_who_other",
field=edc_model_fields.fields.other_charfield.OtherCharField(
blank=True,
max_length=35,
null=True,
verbose_name="If other, please specify ...",
),
),
]
7 changes: 3 additions & 4 deletions effect_subject/models/subject_requisition.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
from edc_lab.managers import RequisitionManager as Manager # noqa
from edc_lab.model_mixins import RequisitionModelMixin
from edc_model import models as edc_models
from edc_reference.model_mixins import ReferenceModelMixin
from edc_model.models import BaseUuidModel


class SubjectRequisition(RequisitionModelMixin, ReferenceModelMixin, edc_models.BaseUuidModel):
class Meta(RequisitionModelMixin.Meta, edc_models.BaseUuidModel.Meta):
class SubjectRequisition(RequisitionModelMixin, BaseUuidModel):
class Meta(RequisitionModelMixin.Meta, BaseUuidModel.Meta):
pass
15 changes: 7 additions & 8 deletions effect_subject/models/subject_visit.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
from edc_constants.choices import YES_NO, YES_NO_UNKNOWN_NA_MISSED
from edc_constants.constants import NO, NOT_APPLICABLE
from edc_metadata.model_mixins.creates import CreatesMetadataModelMixin
from edc_model import models as edc_models
from edc_model.models import BaseUuidModel, HistoricalRecords
from edc_model_fields.fields import OtherCharField
from edc_offstudy.model_mixins import OffstudyNonCrfModelMixin
from edc_reference.model_mixins import ReferenceModelMixin
from edc_sites.models import SiteModelMixin
from edc_visit_tracking.choices import ASSESSMENT_TYPES
from edc_visit_tracking.managers import VisitCurrentSiteManager
Expand All @@ -29,11 +29,10 @@ def create_missed_extras(self) -> dict:
class SubjectVisit(
SiteModelMixin,
VisitModelMixin,
ReferenceModelMixin,
CreatesMetadataModelMixin,
RequiresConsentFieldsModelMixin,
OffstudyNonCrfModelMixin,
edc_models.BaseUuidModel,
BaseUuidModel,
):

"""A model completed by the user that captures the covering
Expand Down Expand Up @@ -76,15 +75,15 @@ class SubjectVisit(
choices=ASSESSMENT_TYPES,
)

assessment_type_other = edc_models.OtherCharField()
assessment_type_other = OtherCharField()

assessment_who = models.CharField(
verbose_name="Who did you speak to?",
max_length=15,
choices=ASSESSMENT_WHO_CHOICES,
)

assessment_who_other = edc_models.OtherCharField()
assessment_who_other = OtherCharField()

# override default
info_source = models.CharField(
Expand All @@ -106,7 +105,7 @@ class SubjectVisit(

objects = VisitModelManager()

history = edc_models.HistoricalRecords()
history = HistoricalRecords()

class Meta(VisitModelMixin.Meta, edc_models.BaseUuidModel.Meta):
class Meta(VisitModelMixin.Meta, BaseUuidModel.Meta):
pass
31 changes: 0 additions & 31 deletions effect_subject/reference_model_configs.py

This file was deleted.

1 change: 0 additions & 1 deletion effect_subject/tests/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
path("edc_export/", include("edc_export.urls")),
path("edc_protocol/", include("edc_protocol.urls")),
path("edc_randomization/", include("edc_randomization.urls")),
path("edc_reference/", include("edc_reference.urls")),
path("edc_visit_schedule/", include("edc_visit_schedule.urls")),
path("ae/", include("effect_ae.urls")),
path("effect_consent/", include("effect_consent.urls")),
Expand Down
1 change: 0 additions & 1 deletion runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@
"edc_lab_dashboard.apps.AppConfig",
"edc_label.apps.AppConfig",
"edc_locator.apps.AppConfig",
"edc_reference.apps.AppConfig",
"edc_pdf_reports.apps.AppConfig",
"edc_identifier.apps.AppConfig",
"edc_metadata.apps.AppConfig",
Expand Down

0 comments on commit b5e7d9f

Please sign in to comment.