Skip to content

Commit

Permalink
Apply suggestions based on Code Review
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Nov 14, 2023
1 parent 5ddcbd2 commit 031e957
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 0 additions & 1 deletion care/facility/models/patient_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)")


Expand Down

0 comments on commit 031e957

Please sign in to comment.