this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Show error if doctor is not linked to the consultation facility (#2309)

* Show error if doctor is not linked to the consultation facility

* Don't allow save if home facility is not set

* Update care/facility/api/serializers/patient_consultation.py

Co-authored-by: Aakash Singh <mail@singhaakash.dev>

* Fix linting

---------

Co-authored-by: Aakash Singh <mail@singhaakash.dev>
Co-authored-by: Vignesh Hari <14056798+vigneshhari@users.noreply.github.com>
Co-authored-by: vigneshhari <vichuhari100@gmail.com>

authored by

Shivank Kacker
Aakash Singh
Vignesh Hari
vigneshhari
and committed by
GitHub
44e1618a 2bcb20ad

+6
+6
care/facility/api/serializers/patient_consultation.py
··· 630 630 and self.instance.facility 631 631 or validated["patient"].facility 632 632 ) 633 + # Check if the Doctor is associated with the Facility (.facilities) 634 + if not treating_physician.facilities.filter(id=facility.id).exists(): 635 + raise ValidationError( 636 + "The treating doctor is no longer linked to this facility. Please update the respective field in the form before proceeding." 637 + ) 638 + 633 639 if ( 634 640 treating_physician.home_facility 635 641 and treating_physician.home_facility != facility