Skip to content

Commit

Permalink
Remove volunteer when patient is discharged (#959)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashesh3 authored Aug 11, 2022
1 parent f5271c3 commit a0e4ef1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion care/facility/api/viewsets/patient.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,8 @@ def discharge_patient(self, request, *args, **kwargs):
patient = self.get_object()
patient.is_active = discharged
patient.allow_transfer = not discharged
patient.save(update_fields=["allow_transfer", "is_active"])
patient.assigned_to = None
patient.save(update_fields=["allow_transfer", "is_active", "assigned_to"])
last_consultation = (
PatientConsultation.objects.filter(patient=patient).order_by("-id").first()
)
Expand Down

0 comments on commit a0e4ef1

Please sign in to comment.