From 709cc8ce2de371bd84ef566989a507c4d5a8576c Mon Sep 17 00:00:00 2001 From: Shivank Kacker Date: Mon, 24 Jun 2024 23:19:52 +0530 Subject: [PATCH] minor fix --- src/Components/Patient/PatientInfoCard.tsx | 30 ++++++---------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/src/Components/Patient/PatientInfoCard.tsx b/src/Components/Patient/PatientInfoCard.tsx index 31bd19413b1..23760039a99 100644 --- a/src/Components/Patient/PatientInfoCard.tsx +++ b/src/Components/Patient/PatientInfoCard.tsx @@ -140,15 +140,6 @@ export default function PatientInfoCard(props: { }, prefetch: !!consultation?.treating_physician_object?.username, }); - const { data: consentRecords, loading: consentRecordsLoading } = useQuery( - routes.listConsents, - { - pathParams: { - consultationId: consultation?.id ?? "", - }, - prefetch: !!consultation?.id, - }, - ); return ( <> @@ -364,20 +355,15 @@ export default function PatientInfoCard(props: { )} - {!consentRecordsLoading && - !consentRecords?.results.filter( - (c) => - !c.archived && - c.files?.filter((f) => !f.is_archived).length, - ).length && ( -
-
- - Consent Records Missing - -
+ {consultation?.has_consents || ( +
+
+ + Consent Records Missing +
- )} +
+ )} {consultation?.suggestion === "DC" && (