diff --git a/care/facility/migrations/0395_alter_patientconsultation_route_to_facility.py b/care/facility/migrations/0395_alter_patientconsultation_route_to_facility.py index 261d232d13..1d65685adb 100644 --- a/care/facility/migrations/0395_alter_patientconsultation_route_to_facility.py +++ b/care/facility/migrations/0395_alter_patientconsultation_route_to_facility.py @@ -60,11 +60,13 @@ def migrate_route_to_facility(apps, schema_editor): # Unknown -> None qs.filter(route_to_facility=0).update(route_to_facility=None) # Brought Dead/Outpatient -> Outpatient/Emergency Room - qs.filter(route_to_facility=1).update(route_to_facility=10) - qs.filter(route_to_facility=5).update(route_to_facility=10) + qs.filter(models.Q(route_to_facility=1) | models.Q(route_to_facility=5)).update( + route_to_facility=10 + ) # Transferred from Ward/ICU -> Internal Transfer within facility - qs.filter(route_to_facility=2).update(route_to_facility=30) - qs.filter(route_to_facility=3).update(route_to_facility=30) + qs.filter(models.Q(route_to_facility=2) | models.Q(route_to_facility=3)).update( + route_to_facility=30 + ) # Referred from other hospital -> Referred from another facility qs.filter(route_to_facility=4).update(route_to_facility=20) diff --git a/care/facility/models/patient_base.py b/care/facility/models/patient_base.py index 200d34014c..0fd2d40eab 100644 --- a/care/facility/models/patient_base.py +++ b/care/facility/models/patient_base.py @@ -113,7 +113,6 @@ class RouteToFacility(IntegerChoices): OUTPATIENT = 10, _("Outpatient/Emergency Room") INTER_FACILITY_TRANSFER = 20, _("Referred from another facility") INTRA_FACILITY_TRANSFER = 30, _("Internal Transfer within the facility") - __empty__ = _("(Unknown)")