From bebb693d0a8489701059a59272e2bef32723bbe8 Mon Sep 17 00:00:00 2001
From: Ashesh <3626859+Ashesh3@users.noreply.github.com>
Date: Wed, 27 Sep 2023 22:02:38 +0530
Subject: [PATCH] Remove phone duplication check on patient update (#6359)
* Delay patient phone duplicate check
* Revert "Delay patient phone duplicate check"
This reverts commit 1fc93a73e719df2d88d56ce019c72806de593653.
* Remove phone duplication check on patient update
---
src/Components/ExternalResult/FacilitiesSelectDialogue.tsx | 2 +-
src/Components/Patient/PatientRegister.tsx | 4 +---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/Components/ExternalResult/FacilitiesSelectDialogue.tsx b/src/Components/ExternalResult/FacilitiesSelectDialogue.tsx
index 763d92f2d1f..7239e0b912d 100644
--- a/src/Components/ExternalResult/FacilitiesSelectDialogue.tsx
+++ b/src/Components/ExternalResult/FacilitiesSelectDialogue.tsx
@@ -34,7 +34,7 @@ const FacilitiesSelectDialog = (props: Props) => {
diff --git a/src/Components/Patient/PatientRegister.tsx b/src/Components/Patient/PatientRegister.tsx
index 41f36bffd35..c515e7584c1 100644
--- a/src/Components/Patient/PatientRegister.tsx
+++ b/src/Components/Patient/PatientRegister.tsx
@@ -72,8 +72,6 @@ import { FormContextValue } from "../Form/FormContext.js";
const Loading = lazy(() => import("../Common/Loading"));
const PageTitle = lazy(() => import("../Common/PageTitle"));
-// const debounce = require("lodash.debounce");
-
interface PatientRegisterProps extends PatientModel {
facilityId: string;
}
@@ -1260,7 +1258,7 @@ export const PatientRegister = (props: PatientRegisterProps) => {
required
label="Phone Number"
onChange={(event) => {
- duplicateCheck(event.value);
+ if (!id) duplicateCheck(event.value);
field("phone_number").onChange(event);
}}
types={["mobile", "landline"]}