From aa6d33ffec16dd9187f50f313ea358a16f74f6d2 Mon Sep 17 00:00:00 2001 From: Khavin Shankar Date: Fri, 17 May 2024 20:32:50 +0530 Subject: [PATCH] Abdm m3 improvements (#7845) --- src/Components/ABDM/ABDMRecordsTab.tsx | 11 +++++++++++ src/Components/Facility/ConsultationDetails/index.tsx | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/src/Components/ABDM/ABDMRecordsTab.tsx b/src/Components/ABDM/ABDMRecordsTab.tsx index 7fe38011796..9100f368216 100644 --- a/src/Components/ABDM/ABDMRecordsTab.tsx +++ b/src/Components/ABDM/ABDMRecordsTab.tsx @@ -170,6 +170,17 @@ export default function ABDMRecordsTab({ patientId }: IProps) { ; } + if (!data?.results.length) { + return ( +
+

No Records found

+

+ Raise a consent request to fetch patient records over ABDM +

+
+ ); + } + return (
{data?.results.map((record) => { diff --git a/src/Components/Facility/ConsultationDetails/index.tsx b/src/Components/Facility/ConsultationDetails/index.tsx index ffcd9166f23..4d393752888 100644 --- a/src/Components/Facility/ConsultationDetails/index.tsx +++ b/src/Components/Facility/ConsultationDetails/index.tsx @@ -431,6 +431,11 @@ export const ConsultationDetails = (props: any) => { ) return null; // Hide feed tab } + + if (p.text === "ABDM" && !patientData.abha_number) { + return null; + } + return (