diff --git a/src/patient-chart/laboratory-active-test-order/laboratory-active-test-order-results.component.tsx b/src/patient-chart/laboratory-active-test-order/laboratory-active-test-order-results.component.tsx index cddf9123..1145ed24 100644 --- a/src/patient-chart/laboratory-active-test-order/laboratory-active-test-order-results.component.tsx +++ b/src/patient-chart/laboratory-active-test-order/laboratory-active-test-order-results.component.tsx @@ -77,12 +77,8 @@ const LaboratoryActiveTestOrderResults: React.FC< > = ({ patientUuid }) => { const { t } = useTranslation(); - const { - enableSendingLabTestsByEmail, - laboratoryEncounterTypeUuid, - artCardEncounterTypeUuid, - laboratoryOrderTypeUuid, - } = useConfig(); + const { enableSendingLabTestsByEmail, laboratoryEncounterTypeUuid } = + useConfig(); const displayText = t( "activelLaboratoryTestsDisplayTextTitle", diff --git a/src/patient-chart/laboratory-order-referals/laboratory-order-referals.component.tsx b/src/patient-chart/laboratory-order-referals/laboratory-order-referals.component.tsx index 1d9bb7d6..d61d0980 100644 --- a/src/patient-chart/laboratory-order-referals/laboratory-order-referals.component.tsx +++ b/src/patient-chart/laboratory-order-referals/laboratory-order-referals.component.tsx @@ -11,7 +11,6 @@ import { formatDate, parseDate, ErrorState, - showModal, useConfig, } from "@openmrs/esm-framework"; @@ -41,7 +40,6 @@ import { import { Printer, - MailAll, Checkmark, SendAlt, NotSent, @@ -81,12 +79,8 @@ const LaboratoryOrderReferalResults: React.FC< > = ({ patientUuid }) => { const { t } = useTranslation(); - const { - enableSendingLabTestsByEmail, - laboratoryEncounterTypeUuid, - artCardEncounterTypeUuid, - laboratoryOrderTypeUuid, - } = useConfig(); + const { enableSendingLabTestsByEmail, laboratoryEncounterTypeUuid } = + useConfig(); const displayText = t( "referralLaboratoryTestsDisplayTextTitle", @@ -113,17 +107,11 @@ const LaboratoryOrderReferalResults: React.FC< const sortedLabRequests = useMemo(() => { return [...items] ?.filter((item) => { - const { encounterType, orders } = item || {}; - const { uuid: encounterTypeUuid } = encounterType || {}; - - // Check if the encounterType UUID matches either of the specified UUIDs - - // Filter orders to only include those with the matching orderType UUID + const { orders } = item || {}; const matchingOrders = orders?.filter( (order) => order?.instructions === REFERINSTRUCTIONS ); - // Return the item only if it has matching encounterType and at least one matching order return matchingOrders?.length > 0; }) ?.sort((a, b) => { @@ -159,23 +147,6 @@ const LaboratoryOrderReferalResults: React.FC< setInitialTests(sortedLabRequests); }, [sortedLabRequests]); - const EmailButtonAction: React.FC = () => { - const launchSendEmailModal = useCallback(() => { - const dispose = showModal("send-email-dialog", { - closeModal: () => dispose(), - }); - }, []); - - return ( -