diff --git a/care/abdm/api/viewsets/health_facility.py b/care/abdm/api/viewsets/health_facility.py index 45b0423ade..8b1acbeab0 100644 --- a/care/abdm/api/viewsets/health_facility.py +++ b/care/abdm/api/viewsets/health_facility.py @@ -22,6 +22,9 @@ @shared_task def register_health_facility_as_service(facility_external_id): + if settings.ENABLE_ABDM: + return [False, "ABDM Services are currently disabled"] + health_facility = HealthFacility.objects.filter( facility__external_id=facility_external_id ).first() diff --git a/care/facility/api/serializers/patient_consultation.py b/care/facility/api/serializers/patient_consultation.py index c4c34bf596..3344680370 100644 --- a/care/facility/api/serializers/patient_consultation.py +++ b/care/facility/api/serializers/patient_consultation.py @@ -799,7 +799,7 @@ def update(self, instance: PatientConsultation, validated_data): ConsultationBed.objects.filter( consultation=self.instance, end_date__isnull=True ).update(end_date=now()) - if patient.abha_number: + if settings.ENABLE_ABDM and patient.abha_number: abha_number = patient.abha_number try: AbdmGateway().fetch_modes(