diff --git a/care/facility/api/viewsets/patient.py b/care/facility/api/viewsets/patient.py index 50d53a4c91..7bf050a323 100644 --- a/care/facility/api/viewsets/patient.py +++ b/care/facility/api/viewsets/patient.py @@ -393,7 +393,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() )