diff --git a/src/Components/Patient/PatientInfoCard.tsx b/src/Components/Patient/PatientInfoCard.tsx index 31bd19413b..23760039a9 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" && (