Beispiel #1
0
 def discharge_summary(self, request, *args, **kwargs):
     patient = self.get_object()
     email = request.data.get("email", "")
     try:
         validate_email(email)
     except Exception:
         email = request.user.email
     generate_discharge_report.delay(patient.id, email)
     return Response(status=status.HTTP_200_OK)
Beispiel #2
0
 def discharge_summary(self, request, *args, **kwargs):
     email = request.data.get("email", "")
     try:
         validate_email(email)
     except:
         return Response({"email": "Invalid Email Provided"},
                         status=status.HTTP_400_BAD_REQUEST)
     patient = self.get_object()
     generate_discharge_report.delay(patient.id, email)
     return Response(status=status.HTTP_200_OK)