diff --git a/packages/esm-patient-search-app/src/mpi/utils.ts b/packages/esm-patient-search-app/src/mpi/utils.ts index d65285342f..446caae676 100644 --- a/packages/esm-patient-search-app/src/mpi/utils.ts +++ b/packages/esm-patient-search-app/src/mpi/utils.ts @@ -1,5 +1,6 @@ import { capitalize } from 'lodash-es'; import { type SearchedPatient } from '../types'; +import { getCoreTranslation } from '@openmrs/esm-framework'; export function inferModeFromSearchParams(searchParams: URLSearchParams) { return searchParams.get('mode')?.toLowerCase() === 'external' ? 'external' : 'internal'; } @@ -28,11 +29,13 @@ export function mapToOpenMRSPatient(fhirPatients: Array): Array); @@ -39,11 +39,11 @@ describe('PatientSearchButton', () => { const user = userEvent.setup(); render( - + } /> - , + , ); const searchButton = screen.getByLabelText('Search Patient Button'); diff --git a/packages/esm-patient-search-app/src/patient-search-overlay/patient-search-overlay.component.tsx b/packages/esm-patient-search-app/src/patient-search-overlay/patient-search-overlay.component.tsx index 2549719404..6371334632 100644 --- a/packages/esm-patient-search-app/src/patient-search-overlay/patient-search-overlay.component.tsx +++ b/packages/esm-patient-search-app/src/patient-search-overlay/patient-search-overlay.component.tsx @@ -1,12 +1,12 @@ import React, { useCallback, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useConfig, useDebounce } from '@openmrs/esm-framework'; +import { useSearchParams } from 'react-router-dom'; import AdvancedPatientSearchComponent from '../patient-search-page/advanced-patient-search.component'; import Overlay from '../ui-components/overlay'; import PatientSearchBar from '../patient-search-bar/patient-search-bar.component'; import { type PatientSearchConfig } from '../config-schema'; import { inferModeFromSearchParams } from '../mpi/utils'; -import { useSearchParams } from 'react-router-dom'; interface PatientSearchOverlayProps { onClose: () => void; diff --git a/packages/esm-patient-search-app/src/patient-search-page/patient-search-views.component.tsx b/packages/esm-patient-search-app/src/patient-search-page/patient-search-views.component.tsx index 8033ba9eb5..32be4a3243 100644 --- a/packages/esm-patient-search-app/src/patient-search-page/patient-search-views.component.tsx +++ b/packages/esm-patient-search-app/src/patient-search-page/patient-search-views.component.tsx @@ -100,7 +100,7 @@ export const SearchResultsEmptyState: React.FC = ({ inTabletOrOverl

{t( 'trySearchFromClientRegistry', - "You can try searching using the patient's unique ID number or search the external MPI", + "Try searching using the patient's unique ID number or search the external registry", )}

@@ -108,10 +108,9 @@ export const SearchResultsEmptyState: React.FC = ({ inTabletOrOverl kind="ghost" renderIcon={'Search'} onClick={(e) => { - e.preventDefault(); doMPISearch(searchTerm); }}> - {`${t('search', 'Search')} ${'MPIs'}`} + {`${t('search', 'Search')} ${'External Registry'}`} )} diff --git a/packages/esm-patient-search-app/translations/en.json b/packages/esm-patient-search-app/translations/en.json index 05f7038342..c47bdf19c7 100644 --- a/packages/esm-patient-search-app/translations/en.json +++ b/packages/esm-patient-search-app/translations/en.json @@ -34,7 +34,7 @@ "searchResultsCount_one": "{{count}} search result", "searchResultsCount_other": "{{count}} search results", "sex": "Sex", - "trySearchFromClientRegistry": "You can try searching using the patient's unique ID number or search the external MPI", + "trySearchFromClientRegistry": "Try searching using the patient's unique ID number or search the external registry", "trySearchWithPatientUniqueID": "Try to search again using the patient's unique ID number", "unknown": "Unknown", "yearOfBirth": "Year of Birth"