From ee5f07768cd5c4404bb9e9f6d150683669288604 Mon Sep 17 00:00:00 2001 From: BharathKShetty Date: Fri, 13 Dec 2024 18:58:38 +0530 Subject: [PATCH 01/10] O3-4274: Refactor useVisitFormCallbacks to use useRef instead of useState --- .../visit/visit-form/visit-form.component.tsx | 132 ++++++++---------- .../visit/visit-form/visit-form.resource.ts | 14 +- .../src/visit/visit-form/visit-form.test.tsx | 11 +- 3 files changed, 74 insertions(+), 83 deletions(-) diff --git a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx index 34b6d25a7d..bbd47cb8fd 100644 --- a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx +++ b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx @@ -14,6 +14,7 @@ import { } from '@carbon/react'; import { zodResolver } from '@hookform/resolvers/zod'; import { + type AssignedExtension, Extension, ExtensionSlot, formatDatetime, @@ -60,10 +61,10 @@ import VisitDateTimeField from './visit-date-time.component'; import { createVisitAttribute, deleteVisitAttribute, - type OnVisitCreatedOrUpdatedCallback, updateVisitAttribute, useConditionalVisitTypes, - useOnVisitCreatedOrUpdatedCallbacks, + useVisitFormCallbacks, + type VisitFormCallbacks, type VisitFormData, } from './visit-form.resource'; import styles from './visit-form.scss'; @@ -106,7 +107,6 @@ const StartVisitForm: React.FC = ({ const { emrConfiguration } = useEmrConfiguration(isEmrApiModuleInstalled); const { patientUuid, patient } = usePatient(initialPatientUuid); const [contentSwitcherIndex, setContentSwitcherIndex] = useState(config.showRecommendedVisitTypeTab ? 0 : 1); - const [isSubmitting, setIsSubmitting] = useState(false); const visitHeaderSlotState = useMemo(() => ({ patientUuid }), [patientUuid]); const { activePatientEnrollment, isLoading } = useActivePatientEnrollment(patientUuid); const { mutate: mutateCurrentVisit } = useVisit(patientUuid); @@ -120,7 +120,8 @@ const StartVisitForm: React.FC = ({ const { visitAttributeTypes } = useVisitAttributeTypes(); const [extraVisitInfo, setExtraVisitInfo] = useState(null); - const [OnVisitCreatedOrUpdatedCallbacks, setOnVisitCreatedOrUpdatedCallbacks] = useOnVisitCreatedOrUpdatedCallbacks(); + const visitFormCallbacksRef = useVisitFormCallbacks(); + // const [visitFormCallbacks, setVisitFormCallbacks] = useVisitFormCallbacks(); const displayVisitStopDateTimeFields = useMemo( () => Boolean(visitToEdit?.uuid || showVisitEndDateTimeFields), [visitToEdit?.uuid, showVisitEndDateTimeFields], @@ -238,12 +239,11 @@ const StartVisitForm: React.FC = ({ handleSubmit, control, getValues, - formState: { errors, isDirty }, + formState: { errors, isDirty, isSubmitting }, setError, reset, } = methods; - // default values are cached so form needs to be reset when they change (e.g. when default visit location finishes loading) useEffect(() => { reset(defaultValues); }, [defaultValues, reset]); @@ -475,7 +475,6 @@ const StartVisitForm: React.FC = ({ handleCreateExtraVisitInfo && handleCreateExtraVisitInfo(); } - setIsSubmitting(true); if (isOnline) { const visitRequest = visitToEdit?.uuid ? updateVisit(visitToEdit?.uuid, payload, abortController) @@ -532,11 +531,11 @@ const StartVisitForm: React.FC = ({ }, ); - const OnVisitCreatedOrUpdatedRequests = [...OnVisitCreatedOrUpdatedCallbacks.values()].map( - (OnVisitCreatedOrUpdated) => OnVisitCreatedOrUpdated(visit, patientUuid), + const onVisitCreatedOrUpdatedRequests = [...visitFormCallbacksRef.current.values()].map((callbacks) => + callbacks.onVisitCreatedOrUpdated(visit), ); - return Promise.all([visitAttributesRequest, ...OnVisitCreatedOrUpdatedRequests]); + return Promise.all([visitAttributesRequest, ...onVisitCreatedOrUpdatedRequests]); }) .then(() => { closeWorkspace({ ignoreChanges: true }); @@ -545,7 +544,6 @@ const StartVisitForm: React.FC = ({ // do nothing, this catches any reject promises used for short-circuiting }) .finally(() => { - setIsSubmitting(false); mutateCurrentVisit(); mutateVisits(); mutateInfiniteVisits(); @@ -556,36 +554,33 @@ const StartVisitForm: React.FC = ({ visitLocation.uuid, config.offlineVisitTypeUuid, payload.startDatetime, - ) - .then( - () => { - mutateCurrentVisit(); - closeWorkspace({ ignoreChanges: true }); - showSnackbar({ - isLowContrast: true, - kind: 'success', - subtitle: t('visitStartedSuccessfully', '{{visit}} started successfully', { - visit: t('offlineVisit', 'Offline Visit'), - }), - title: t('visitStarted', 'Visit started'), - }); - }, - (error: Error) => { - showSnackbar({ - title: t('startVisitError', 'Error starting visit'), - kind: 'error', - isLowContrast: false, - subtitle: error?.message, - }); - }, - ) - .finally(() => { - setIsSubmitting(false); - }); + ).then( + () => { + mutateCurrentVisit(); + closeWorkspace({ ignoreChanges: true }); + showSnackbar({ + isLowContrast: true, + kind: 'success', + subtitle: t('visitStartedSuccessfully', '{{visit}} started successfully', { + visit: t('offlineVisit', 'Offline Visit'), + }), + title: t('visitStarted', 'Visit started'), + }); + }, + (error: Error) => { + showSnackbar({ + title: t('startVisitError', 'Error starting visit'), + kind: 'error', + isLowContrast: false, + subtitle: error?.message, + }); + }, + ); return; } }, + // eslint-disable-next-line react-hooks/exhaustive-deps [ closeWorkspace, config.offlineVisitTypeUuid, @@ -597,7 +592,6 @@ const StartVisitForm: React.FC = ({ mutateCurrentVisit, mutateVisits, mutateInfiniteVisits, - OnVisitCreatedOrUpdatedCallbacks, patientUuid, t, validateVisitStartStopDatetime, @@ -666,10 +660,10 @@ const StartVisitForm: React.FC = ({
@@ -780,7 +774,7 @@ const StartVisitForm: React.FC = ({ name="visit-form-bottom-slot" patientUuid={patientUuid} visitFormOpenedFrom={openedFrom} - setOnVisitCreatedOrUpdatedCallbacks={setOnVisitCreatedOrUpdatedCallbacks} + visitFormCallbacksRef={visitFormCallbacksRef} /> @@ -824,52 +818,46 @@ interface VisitFormExtensionSlotProps { name: string; patientUuid: string; visitFormOpenedFrom: string; - setOnVisitCreatedOrUpdatedCallbacks: React.Dispatch< - React.SetStateAction> - >; + visitFormCallbacksRef: React.MutableRefObject>; // Replaced `setVisitFormCallbacks` with `visitFormCallbacksRef` } type VisitFormExtensionState = { patientUuid: string; /** - * This function allows an extension to register a callback to run after a visit has been created. - * This callback can be used to make further requests. The callback should handle its own UI notification + * This function allows an extension to register callbacks for visit form submission. + * This callbacks can be used to make further requests. The callbacks should handle its own UI notification * on success / failure, and its returned Promise MUST resolve on success and MUST reject on failure. * @param callback * @returns */ - setOnVisitCreatedOrUpdated: (callback: OnVisitCreatedOrUpdatedCallback) => void; + setVisitFormCallbacks(callbacks: VisitFormCallbacks); visitFormOpenedFrom: string; patientChartConfig: ChartConfig; }; -const VisitFormExtensionSlot: React.FC = ({ - name, - patientUuid, - visitFormOpenedFrom, - setOnVisitCreatedOrUpdatedCallbacks, -}) => { - const config = useConfig(); +const VisitFormExtensionSlot: React.FC = React.memo( + ({ name, patientUuid, visitFormOpenedFrom, visitFormCallbacksRef }) => { + const config = useConfig(); + + return ( + + {(extension: AssignedExtension) => { + const state = { + patientUuid, + setVisitFormCallbacks: (callbacks: VisitFormCallbacks) => { + visitFormCallbacksRef.current.set(extension.id, callbacks); + }, + visitFormOpenedFrom, + patientChartConfig: config, + }; - return ( - - {(extension) => { - const state: VisitFormExtensionState = { - patientUuid, - setOnVisitCreatedOrUpdated: (callback) => { - setOnVisitCreatedOrUpdatedCallbacks((old) => { - return new Map(old).set(extension.id, callback); - }); - }, - visitFormOpenedFrom, - patientChartConfig: config, - }; - return ; - }} - - ); -}; + return ; + }} + + ); + }, +); export default StartVisitForm; diff --git a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.resource.ts b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.resource.ts index bb22db8f14..b952c0b002 100644 --- a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.resource.ts +++ b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.resource.ts @@ -1,7 +1,7 @@ import { openmrsFetch, restBaseUrl, useConnectivity, useVisitTypes, type Visit } from '@openmrs/esm-framework'; import { type amPm } from '@openmrs/esm-patient-common-lib'; import { useOfflineVisitType } from '../hooks/useOfflineVisitType'; -import { useState } from 'react'; +import { useRef } from 'react'; export type VisitFormData = { visitStartDate: Date; @@ -28,11 +28,15 @@ export function useConditionalVisitTypes() { return visitTypesHook(); } +export interface VisitFormCallbacks { + onVisitCreatedOrUpdated: (visit: Visit) => Promise; +} -export type OnVisitCreatedOrUpdatedCallback = (visit: Visit, patientUuid: string) => Promise; - -export function useOnVisitCreatedOrUpdatedCallbacks() { - return useState>(new Map()); +// export function useVisitFormCallbacks() { +// return useState>(new Map()); +// } +export function useVisitFormCallbacks() { + return useRef>(new Map()); } export function createVisitAttribute(visitUuid: string, attributeType: string, value: string) { diff --git a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.test.tsx b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.test.tsx index da56aa39dc..b4f5188f99 100644 --- a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.test.tsx +++ b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.test.tsx @@ -24,7 +24,7 @@ import { createVisitAttribute, deleteVisitAttribute, updateVisitAttribute, - useOnVisitCreatedOrUpdatedCallbacks, + useVisitFormCallbacks, } from './visit-form.resource'; const visitUuid = 'test_visit_uuid'; @@ -76,10 +76,9 @@ const mockUseEmrConfiguration = jest.mocked(useEmrConfiguration); // from ./visit-form.resource const mockOnVisitCreatedOrUpdatedCallback = jest.fn(); -jest.mocked(useOnVisitCreatedOrUpdatedCallbacks).mockReturnValue([ - new Map([['test-extension-id', mockOnVisitCreatedOrUpdatedCallback]]), // OnVisitCreatedOrUpdatedCallbacks - jest.fn(), // setOnVisitCreatedOrUpdatedCallbacks -]); +jest.mocked(useVisitFormCallbacks).mockReturnValue({ + current: new Map([['test-extension-id', { onVisitCreatedOrUpdated: mockOnVisitCreatedOrUpdatedCallback }]]), +}); const mockCreateVisitAttribute = jest.mocked(createVisitAttribute).mockResolvedValue({} as unknown as FetchResponse); const mockUpdateVisitAttribute = jest.mocked(updateVisitAttribute).mockResolvedValue({} as unknown as FetchResponse); const mockDeleteVisitAttribute = jest.mocked(deleteVisitAttribute).mockResolvedValue({} as unknown as FetchResponse); @@ -164,7 +163,7 @@ jest.mock('./visit-form.resource', () => { const requireActual = jest.requireActual('./visit-form.resource'); return { ...requireActual, - useOnVisitCreatedOrUpdatedCallbacks: jest.fn(), + useVisitFormCallbacks: jest.fn(), createVisitAttribute: jest.fn(), updateVisitAttribute: jest.fn(), deleteVisitAttribute: jest.fn(), From 6905952f9af16fc9ed233bd35cf1f6489d553785 Mon Sep 17 00:00:00 2001 From: BharathKShetty Date: Mon, 16 Dec 2024 16:29:17 +0530 Subject: [PATCH 02/10] Update packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx Co-authored-by: Brandon Istenes --- .../src/visit/visit-form/visit-form.component.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx index 8ea16d6d4c..cb817b4f2b 100644 --- a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx +++ b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx @@ -120,10 +120,7 @@ const StartVisitForm: React.FC = ({ const { visitAttributeTypes } = useVisitAttributeTypes(); const [extraVisitInfo, setExtraVisitInfo] = useState(null); - const visitFormCallbacksRef = useVisitFormCallbacks(); - - const displayVisitStopDateTimeFields = useMemo( () => Boolean(visitToEdit?.uuid || showVisitEndDateTimeFields), [visitToEdit?.uuid, showVisitEndDateTimeFields], From 5db6c90c3e14f31cba7a2e730878bc9ab07a5b4c Mon Sep 17 00:00:00 2001 From: BharathKShetty Date: Mon, 16 Dec 2024 16:29:28 +0530 Subject: [PATCH 03/10] Update packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx Co-authored-by: Brandon Istenes --- .../src/visit/visit-form/visit-form.component.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx index cb817b4f2b..2b9bab122e 100644 --- a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx +++ b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx @@ -530,9 +530,7 @@ const StartVisitForm: React.FC = ({ }, ); - const onVisitCreatedOrUpdatedRequests = [...visitFormCallbacksRef.current.values()].map((callbacks) => - callbacks.onVisitCreatedOrUpdated(visit), ); From 7945ebddefeb8286a65ccfd19814cf5aabc290f5 Mon Sep 17 00:00:00 2001 From: BharathKShetty Date: Fri, 13 Dec 2024 18:58:38 +0530 Subject: [PATCH 04/10] O3-4274: Refactor useVisitFormCallbacks to use useRef instead of useState --- .../visit/visit-form/visit-form.component.tsx | 25 ++++++++----------- .../visit/visit-form/visit-form.resource.ts | 7 ++++-- .../src/visit/visit-form/visit-form.test.tsx | 7 +++--- 3 files changed, 19 insertions(+), 20 deletions(-) diff --git a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx index a8e4876bf0..a6edbe6e9d 100644 --- a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx +++ b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx @@ -120,7 +120,7 @@ const StartVisitForm: React.FC = ({ const { visitAttributeTypes } = useVisitAttributeTypes(); const [extraVisitInfo, setExtraVisitInfo] = useState(null); - const [visitFormCallbacks, setVisitFormCallbacks] = useVisitFormCallbacks(); + const visitFormCallbacksRef = useVisitFormCallbacks(); const displayVisitStopDateTimeFields = useMemo( () => Boolean(visitToEdit?.uuid || showVisitEndDateTimeFields), [visitToEdit?.uuid, showVisitEndDateTimeFields], @@ -243,7 +243,6 @@ const StartVisitForm: React.FC = ({ reset, } = methods; - // default values are cached so form needs to be reset when they change (e.g. when default visit location finishes loading) useEffect(() => { reset(defaultValues); }, [defaultValues, reset]); @@ -531,7 +530,7 @@ const StartVisitForm: React.FC = ({ }, ); - const onVisitCreatedOrUpdatedRequests = [...visitFormCallbacks.values()].map((callbacks) => + const onVisitCreatedOrUpdatedRequests = [...visitFormCallbacksRef.current.values()].map((callbacks) => callbacks.onVisitCreatedOrUpdated(visit), ); @@ -580,6 +579,7 @@ const StartVisitForm: React.FC = ({ return; } }, + // eslint-disable-next-line react-hooks/exhaustive-deps [ closeWorkspace, config.offlineVisitTypeUuid, @@ -591,7 +591,6 @@ const StartVisitForm: React.FC = ({ mutateCurrentVisit, mutateVisits, mutateInfiniteVisits, - visitFormCallbacks, patientUuid, t, validateVisitStartStopDatetime, @@ -660,10 +659,10 @@ const StartVisitForm: React.FC = ({
@@ -774,7 +773,7 @@ const StartVisitForm: React.FC = ({ name="visit-form-bottom-slot" patientUuid={patientUuid} visitFormOpenedFrom={openedFrom} - setVisitFormCallbacks={setVisitFormCallbacks} + visitFormCallbacksRef={visitFormCallbacksRef} /> @@ -818,7 +817,7 @@ interface VisitFormExtensionSlotProps { name: string; patientUuid: string; visitFormOpenedFrom: string; - setVisitFormCallbacks: React.Dispatch>>; + visitFormCallbacksRef: React.MutableRefObject>; // Replaced `setVisitFormCallbacks` with `visitFormCallbacksRef` } type VisitFormExtensionState = { @@ -838,18 +837,16 @@ type VisitFormExtensionState = { }; const VisitFormExtensionSlot: React.FC = React.memo( - ({ name, patientUuid, visitFormOpenedFrom, setVisitFormCallbacks }) => { + ({ name, patientUuid, visitFormOpenedFrom, visitFormCallbacksRef }) => { const config = useConfig(); return ( {(extension: AssignedExtension) => { - const state: VisitFormExtensionState = { + const state = { patientUuid, - setVisitFormCallbacks: (callbacks) => { - setVisitFormCallbacks((old) => { - return new Map(old).set(extension.id, callbacks); - }); + setVisitFormCallbacks: (callbacks: VisitFormCallbacks) => { + visitFormCallbacksRef.current.set(extension.id, callbacks); }, visitFormOpenedFrom, patientChartConfig: config, diff --git a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.resource.ts b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.resource.ts index 832c9b550f..b952c0b002 100644 --- a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.resource.ts +++ b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.resource.ts @@ -1,7 +1,7 @@ import { openmrsFetch, restBaseUrl, useConnectivity, useVisitTypes, type Visit } from '@openmrs/esm-framework'; import { type amPm } from '@openmrs/esm-patient-common-lib'; import { useOfflineVisitType } from '../hooks/useOfflineVisitType'; -import { useState } from 'react'; +import { useRef } from 'react'; export type VisitFormData = { visitStartDate: Date; @@ -32,8 +32,11 @@ export interface VisitFormCallbacks { onVisitCreatedOrUpdated: (visit: Visit) => Promise; } +// export function useVisitFormCallbacks() { +// return useState>(new Map()); +// } export function useVisitFormCallbacks() { - return useState>(new Map()); + return useRef>(new Map()); } export function createVisitAttribute(visitUuid: string, attributeType: string, value: string) { diff --git a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.test.tsx b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.test.tsx index 915fbe0add..b4f5188f99 100644 --- a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.test.tsx +++ b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.test.tsx @@ -76,10 +76,9 @@ const mockUseEmrConfiguration = jest.mocked(useEmrConfiguration); // from ./visit-form.resource const mockOnVisitCreatedOrUpdatedCallback = jest.fn(); -jest.mocked(useVisitFormCallbacks).mockReturnValue([ - new Map([['test-extension-id', { onVisitCreatedOrUpdated: mockOnVisitCreatedOrUpdatedCallback }]]), // visitFormCallbacks - jest.fn(), // setVisitFormCallbacks -]); +jest.mocked(useVisitFormCallbacks).mockReturnValue({ + current: new Map([['test-extension-id', { onVisitCreatedOrUpdated: mockOnVisitCreatedOrUpdatedCallback }]]), +}); const mockCreateVisitAttribute = jest.mocked(createVisitAttribute).mockResolvedValue({} as unknown as FetchResponse); const mockUpdateVisitAttribute = jest.mocked(updateVisitAttribute).mockResolvedValue({} as unknown as FetchResponse); const mockDeleteVisitAttribute = jest.mocked(deleteVisitAttribute).mockResolvedValue({} as unknown as FetchResponse); From 45785468373572901e0f6d9babf2b72c30de9a45 Mon Sep 17 00:00:00 2001 From: BharathKShetty Date: Tue, 17 Dec 2024 18:54:27 +0530 Subject: [PATCH 05/10] Removed white spaces and unwanted comments --- .../visit/visit-form/visit-form.component.tsx | 16 +++------------- .../src/visit/visit-form/visit-form.resource.ts | 4 ++-- .../esm-patient-orders-app/translations/en.json | 2 +- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx index 2b9bab122e..2d1ddf8d97 100644 --- a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx +++ b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx @@ -663,9 +663,7 @@ const StartVisitForm: React.FC = ({ name="visit-form-bottom-slot" patientUuid={patientUuid} visitFormOpenedFrom={openedFrom} - - visitFormCallbacksRef={visitFormCallbacksRef} // Pass the ref instead - + visitFormCallbacksRef={visitFormCallbacksRef} /> @@ -734,7 +732,6 @@ const StartVisitForm: React.FC = ({ {contentSwitcherIndex === 1 && } ) : ( - // Defaults to showing all possible visit types if recommended visits are not enabled )} @@ -776,9 +773,7 @@ const StartVisitForm: React.FC = ({ name="visit-form-bottom-slot" patientUuid={patientUuid} visitFormOpenedFrom={openedFrom} - visitFormCallbacksRef={visitFormCallbacksRef} - /> @@ -817,14 +812,13 @@ const StartVisitForm: React.FC = ({ ); }; - interface VisitFormExtensionSlotProps { name: string; patientUuid: string; visitFormOpenedFrom: string; - visitFormCallbacksRef: React.MutableRefObject>; // Replaced `setVisitFormCallbacks` with `visitFormCallbacksRef` - + visitFormCallbacksRef: React.MutableRefObject>; +} type VisitFormExtensionState = { patientUuid: string; @@ -843,20 +837,16 @@ type VisitFormExtensionState = { }; const VisitFormExtensionSlot: React.FC = React.memo( - ({ name, patientUuid, visitFormOpenedFrom, visitFormCallbacksRef }) => { - const config = useConfig(); return ( {(extension: AssignedExtension) => { - const state = { patientUuid, setVisitFormCallbacks: (callbacks: VisitFormCallbacks) => { visitFormCallbacksRef.current.set(extension.id, callbacks); - }, visitFormOpenedFrom, patientChartConfig: config, diff --git a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.resource.ts b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.resource.ts index deeadf3922..c62ac2c948 100644 --- a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.resource.ts +++ b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.resource.ts @@ -28,14 +28,14 @@ export function useConditionalVisitTypes() { return visitTypesHook(); } + export interface VisitFormCallbacks { onVisitCreatedOrUpdated: (visit: Visit) => Promise; } - export function useVisitFormCallbacks() { return useRef>(new Map()); - +} export function createVisitAttribute(visitUuid: string, attributeType: string, value: string) { return openmrsFetch(`${restBaseUrl}/visit/${visitUuid}/attribute`, { diff --git a/packages/esm-patient-orders-app/translations/en.json b/packages/esm-patient-orders-app/translations/en.json index 136a4c3b14..9878c76994 100644 --- a/packages/esm-patient-orders-app/translations/en.json +++ b/packages/esm-patient-orders-app/translations/en.json @@ -30,9 +30,9 @@ "errorSavingLabResults": "Error saving lab results", "goToDrugOrderForm": "Order form", "indication": "Indication", - "labResultError": "Error loading lab results", "inStock": "In stock", "instructions": "Instructions", + "labResultError": "Error loading lab results", "launchOrderBasket": "Launch order basket", "loading": "Loading", "loadingInitialValues": "Loading initial values", From 7c86fa4f29ca0cd5d71425b4ea5752168f0eccd7 Mon Sep 17 00:00:00 2001 From: BharathKShetty Date: Sat, 11 Jan 2025 14:24:21 +0530 Subject: [PATCH 06/10] Revert "Merge branch 'main' of https://github.com/Bharath-K-Shetty/openmrs-esm-patient-chart into fix/O3-4274" This reverts commit e1bba057f5fd12cb0187fdced112d2d5c1520c5b, reversing changes made to 224ce5762c3a45d1bd68786983131702c6e15513. --- packages/esm-patient-chart-app/src/index.ts | 8 ++++---- packages/esm-patient-chart-app/src/routes.json | 16 ++++++++++------ ...rm.workspace.tsx => visit-form.component.tsx} | 0 .../src/visit/visit-form/visit-form.test.tsx | 6 +++--- .../esm-patient-chart-app/translations/am.json | 1 - .../esm-patient-chart-app/translations/ar.json | 1 - .../esm-patient-chart-app/translations/bn.json | 1 - .../esm-patient-chart-app/translations/de.json | 1 - .../esm-patient-chart-app/translations/en.json | 1 - .../esm-patient-chart-app/translations/es.json | 1 - .../esm-patient-chart-app/translations/fr.json | 1 - .../esm-patient-chart-app/translations/he.json | 1 - .../esm-patient-chart-app/translations/hi.json | 1 - .../translations/hi_IN.json | 1 - .../esm-patient-chart-app/translations/id.json | 1 - .../esm-patient-chart-app/translations/it.json | 1 - .../esm-patient-chart-app/translations/km.json | 1 - .../esm-patient-chart-app/translations/lg.json | 1 - .../esm-patient-chart-app/translations/ne.json | 1 - .../esm-patient-chart-app/translations/pt.json | 1 - .../translations/pt_BR.json | 1 - .../esm-patient-chart-app/translations/qu.json | 1 - .../translations/ru_RU.json | 1 - .../esm-patient-chart-app/translations/si.json | 1 - .../esm-patient-chart-app/translations/sw.json | 1 - .../translations/sw_KE.json | 1 - .../esm-patient-chart-app/translations/tr.json | 1 - .../translations/tr_TR.json | 1 - .../esm-patient-chart-app/translations/uk.json | 1 - .../esm-patient-chart-app/translations/uz.json | 1 - .../esm-patient-chart-app/translations/vi.json | 1 - .../esm-patient-chart-app/translations/zh.json | 1 - .../translations/zh_CN.json | 1 - 33 files changed, 17 insertions(+), 42 deletions(-) rename packages/esm-patient-chart-app/src/visit/visit-form/{visit-form.workspace.tsx => visit-form.component.tsx} (100%) diff --git a/packages/esm-patient-chart-app/src/index.ts b/packages/esm-patient-chart-app/src/index.ts index 8424a07477..d46d643695 100644 --- a/packages/esm-patient-chart-app/src/index.ts +++ b/packages/esm-patient-chart-app/src/index.ts @@ -11,8 +11,8 @@ import { esmPatientChartSchema } from './config-schema'; import genericDashboardComponent, { genericDashboardConfigSchema } from './side-nav/generic-dashboard.component'; import genericNavGroupComponent, { genericNavGroupConfigSchema } from './side-nav/generic-nav-group.component'; import { moduleName } from './constants'; -import { setupCacheableRoutes, setupOfflineVisitsSync } from './offline'; -import { encountersDashboardMeta, summaryDashboardMeta } from './dashboard.meta'; +import { setupOfflineVisitsSync, setupCacheableRoutes } from './offline'; +import { summaryDashboardMeta, encountersDashboardMeta } from './dashboard.meta'; import addPastVisitActionButtonComponent from './actions-buttons/add-past-visit.component'; import cancelVisitActionButtonComponent from './actions-buttons/cancel-visit.component'; import currentVisitSummaryComponent from './visit/visits-widget/current-visit-summary.component'; @@ -24,6 +24,7 @@ import patientChartPageComponent from './root.component'; import patientDetailsTileComponent from './patient-details-tile/patient-details-tile.component'; import startVisitActionButtonComponent from './actions-buttons/start-visit.component'; import startVisitActionButtonOnPatientSearch from './visit/start-visit-button.component'; +import startVisitFormComponent from './visit/visit-form/visit-form.component'; import stopVisitActionButtonComponent from './actions-buttons/stop-visit.component'; import visitAttributeTagsComponent from './patient-banner-tags/visit-attribute-tags.component'; @@ -158,8 +159,7 @@ export const genericDashboard = getSyncLifecycle(genericDashboardComponent, { moduleName, }); -// t('startVisitWorkspaceTitle', 'Start a visit') -export const startVisitWorkspace = getAsyncLifecycle(() => import('./visit/visit-form/visit-form.workspace'), { +export const startVisitForm = getSyncLifecycle(startVisitFormComponent, { featureName: 'start-visit-form', moduleName, }); diff --git a/packages/esm-patient-chart-app/src/routes.json b/packages/esm-patient-chart-app/src/routes.json index f8c5c44ce5..4fa53595e5 100644 --- a/packages/esm-patient-chart-app/src/routes.json +++ b/packages/esm-patient-chart-app/src/routes.json @@ -126,6 +126,16 @@ "view": "visits" } }, + { + "name": "start-visit-workspace-form", + "slot": "start-visit-workspace-form-slot", + "component": "startVisitForm", + "meta": { + "title": "Start a visit" + }, + "online": true, + "offline": true + }, { "name": "patient-details-tile", "slot": "visit-form-header-slot", @@ -238,12 +248,6 @@ "component": "markPatientDeceasedForm", "title": "Mark patient deceased", "type": "form" - }, - { - "name": "start-visit-workspace-form", - "component": "startVisitWorkspace", - "title": "startVisitWorkspaceTitle", - "type": "start-visit" } ] } diff --git a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.workspace.tsx b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx similarity index 100% rename from packages/esm-patient-chart-app/src/visit/visit-form/visit-form.workspace.tsx rename to packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx diff --git a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.test.tsx b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.test.tsx index 7794d939c9..4f3fbd9724 100644 --- a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.test.tsx +++ b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.test.tsx @@ -1,5 +1,4 @@ import { - type FetchResponse, getDefaultsFromConfigSchema, saveVisit, showSnackbar, @@ -8,6 +7,7 @@ import { useLocations, usePatient, useVisitTypes, + type FetchResponse, type Visit, } from '@openmrs/esm-framework'; import { render, screen } from '@testing-library/react'; @@ -16,10 +16,10 @@ import { mockLocations, mockVisitTypes, mockVisitWithAttributes } from '__mocks_ import dayjs from 'dayjs'; import React from 'react'; import { mockPatient } from 'tools'; -import { type ChartConfig, esmPatientChartSchema } from '../../config-schema'; +import { esmPatientChartSchema, type ChartConfig } from '../../config-schema'; import { useEmrConfiguration } from '../hooks/useEmrConfiguration'; import { useVisitAttributeType } from '../hooks/useVisitAttributeType'; -import StartVisitForm from './visit-form.workspace'; +import StartVisitForm from './visit-form.component'; import { createVisitAttribute, deleteVisitAttribute, diff --git a/packages/esm-patient-chart-app/translations/am.json b/packages/esm-patient-chart-app/translations/am.json index a1a80c4917..b237fabc0f 100644 --- a/packages/esm-patient-chart-app/translations/am.json +++ b/packages/esm-patient-chart-app/translations/am.json @@ -146,7 +146,6 @@ "startNewVisit": "Start new visit", "startVisit": "Start visit", "startVisitError": "Error starting visit", - "startVisitWorkspaceTitle": "Start a visit", "tests": "Tests", "time": "Time", "timeFormat ": "Time Format", diff --git a/packages/esm-patient-chart-app/translations/ar.json b/packages/esm-patient-chart-app/translations/ar.json index c59a92209f..325ee05e17 100644 --- a/packages/esm-patient-chart-app/translations/ar.json +++ b/packages/esm-patient-chart-app/translations/ar.json @@ -146,7 +146,6 @@ "startNewVisit": "بدء زيارة جديدة", "startVisit": "بدء الزيارة", "startVisitError": "خطأ في بدء الزيارة", - "startVisitWorkspaceTitle": "Start a visit", "tests": "اختبارات", "time": "الوقت", "timeFormat ": "تنسيق الوقت", diff --git a/packages/esm-patient-chart-app/translations/bn.json b/packages/esm-patient-chart-app/translations/bn.json index cddea9fccc..f1ac5d0800 100644 --- a/packages/esm-patient-chart-app/translations/bn.json +++ b/packages/esm-patient-chart-app/translations/bn.json @@ -146,7 +146,6 @@ "startNewVisit": "Start new visit", "startVisit": "Start visit", "startVisitError": "Error starting visit", - "startVisitWorkspaceTitle": "Start a visit", "tests": "Tests", "time": "Time", "timeFormat ": "Time Format", diff --git a/packages/esm-patient-chart-app/translations/de.json b/packages/esm-patient-chart-app/translations/de.json index cddea9fccc..f1ac5d0800 100644 --- a/packages/esm-patient-chart-app/translations/de.json +++ b/packages/esm-patient-chart-app/translations/de.json @@ -146,7 +146,6 @@ "startNewVisit": "Start new visit", "startVisit": "Start visit", "startVisitError": "Error starting visit", - "startVisitWorkspaceTitle": "Start a visit", "tests": "Tests", "time": "Time", "timeFormat ": "Time Format", diff --git a/packages/esm-patient-chart-app/translations/en.json b/packages/esm-patient-chart-app/translations/en.json index cddea9fccc..f1ac5d0800 100644 --- a/packages/esm-patient-chart-app/translations/en.json +++ b/packages/esm-patient-chart-app/translations/en.json @@ -146,7 +146,6 @@ "startNewVisit": "Start new visit", "startVisit": "Start visit", "startVisitError": "Error starting visit", - "startVisitWorkspaceTitle": "Start a visit", "tests": "Tests", "time": "Time", "timeFormat ": "Time Format", diff --git a/packages/esm-patient-chart-app/translations/es.json b/packages/esm-patient-chart-app/translations/es.json index faf4853daa..7101efd2f9 100644 --- a/packages/esm-patient-chart-app/translations/es.json +++ b/packages/esm-patient-chart-app/translations/es.json @@ -146,7 +146,6 @@ "startNewVisit": "Iniciar nueva consulta", "startVisit": "Iniciar consulta", "startVisitError": "Error al iniciar la consulta", - "startVisitWorkspaceTitle": "Start a visit", "tests": "Pruebas", "time": "Hora", "timeFormat ": "Formato de Hora", diff --git a/packages/esm-patient-chart-app/translations/fr.json b/packages/esm-patient-chart-app/translations/fr.json index bc9ce4e4a2..02d685add7 100644 --- a/packages/esm-patient-chart-app/translations/fr.json +++ b/packages/esm-patient-chart-app/translations/fr.json @@ -146,7 +146,6 @@ "startNewVisit": "Commencer une nouvelle visite", "startVisit": "Commencer la visite", "startVisitError": "Erreur en démarrant la visite actuelle", - "startVisitWorkspaceTitle": "Start a visit", "tests": "Tests", "time": "Heure", "timeFormat ": "Format de temps", diff --git a/packages/esm-patient-chart-app/translations/he.json b/packages/esm-patient-chart-app/translations/he.json index 40a5a35469..01d25e2654 100644 --- a/packages/esm-patient-chart-app/translations/he.json +++ b/packages/esm-patient-chart-app/translations/he.json @@ -146,7 +146,6 @@ "startNewVisit": "התחל ביקור חדש", "startVisit": "Start visit", "startVisitError": "שגיאה בהתחלת ביקור נוכחי", - "startVisitWorkspaceTitle": "Start a visit", "tests": "בדיקות", "time": "זמן", "timeFormat ": "תבנית זמן", diff --git a/packages/esm-patient-chart-app/translations/hi.json b/packages/esm-patient-chart-app/translations/hi.json index cddea9fccc..f1ac5d0800 100644 --- a/packages/esm-patient-chart-app/translations/hi.json +++ b/packages/esm-patient-chart-app/translations/hi.json @@ -146,7 +146,6 @@ "startNewVisit": "Start new visit", "startVisit": "Start visit", "startVisitError": "Error starting visit", - "startVisitWorkspaceTitle": "Start a visit", "tests": "Tests", "time": "Time", "timeFormat ": "Time Format", diff --git a/packages/esm-patient-chart-app/translations/hi_IN.json b/packages/esm-patient-chart-app/translations/hi_IN.json index cddea9fccc..f1ac5d0800 100644 --- a/packages/esm-patient-chart-app/translations/hi_IN.json +++ b/packages/esm-patient-chart-app/translations/hi_IN.json @@ -146,7 +146,6 @@ "startNewVisit": "Start new visit", "startVisit": "Start visit", "startVisitError": "Error starting visit", - "startVisitWorkspaceTitle": "Start a visit", "tests": "Tests", "time": "Time", "timeFormat ": "Time Format", diff --git a/packages/esm-patient-chart-app/translations/id.json b/packages/esm-patient-chart-app/translations/id.json index cddea9fccc..f1ac5d0800 100644 --- a/packages/esm-patient-chart-app/translations/id.json +++ b/packages/esm-patient-chart-app/translations/id.json @@ -146,7 +146,6 @@ "startNewVisit": "Start new visit", "startVisit": "Start visit", "startVisitError": "Error starting visit", - "startVisitWorkspaceTitle": "Start a visit", "tests": "Tests", "time": "Time", "timeFormat ": "Time Format", diff --git a/packages/esm-patient-chart-app/translations/it.json b/packages/esm-patient-chart-app/translations/it.json index cddea9fccc..f1ac5d0800 100644 --- a/packages/esm-patient-chart-app/translations/it.json +++ b/packages/esm-patient-chart-app/translations/it.json @@ -146,7 +146,6 @@ "startNewVisit": "Start new visit", "startVisit": "Start visit", "startVisitError": "Error starting visit", - "startVisitWorkspaceTitle": "Start a visit", "tests": "Tests", "time": "Time", "timeFormat ": "Time Format", diff --git a/packages/esm-patient-chart-app/translations/km.json b/packages/esm-patient-chart-app/translations/km.json index 4fe75708ae..09549d00db 100644 --- a/packages/esm-patient-chart-app/translations/km.json +++ b/packages/esm-patient-chart-app/translations/km.json @@ -146,7 +146,6 @@ "startNewVisit": "ចាប់ផ្តើមការមកពិនិត្យជំងឺថ្មី", "startVisit": "Start visit", "startVisitError": "កំហុសក្នុងការចាប់ផ្តើមការមកពិនិត្យជំងឺបច្ចុប្បន្ន", - "startVisitWorkspaceTitle": "Start a visit", "tests": "ការធ្វើតេស្ត", "time": "ពេលវេលា", "timeFormat ": "ទម្រង់ពេលវេលា", diff --git a/packages/esm-patient-chart-app/translations/lg.json b/packages/esm-patient-chart-app/translations/lg.json index cddea9fccc..f1ac5d0800 100644 --- a/packages/esm-patient-chart-app/translations/lg.json +++ b/packages/esm-patient-chart-app/translations/lg.json @@ -146,7 +146,6 @@ "startNewVisit": "Start new visit", "startVisit": "Start visit", "startVisitError": "Error starting visit", - "startVisitWorkspaceTitle": "Start a visit", "tests": "Tests", "time": "Time", "timeFormat ": "Time Format", diff --git a/packages/esm-patient-chart-app/translations/ne.json b/packages/esm-patient-chart-app/translations/ne.json index cddea9fccc..f1ac5d0800 100644 --- a/packages/esm-patient-chart-app/translations/ne.json +++ b/packages/esm-patient-chart-app/translations/ne.json @@ -146,7 +146,6 @@ "startNewVisit": "Start new visit", "startVisit": "Start visit", "startVisitError": "Error starting visit", - "startVisitWorkspaceTitle": "Start a visit", "tests": "Tests", "time": "Time", "timeFormat ": "Time Format", diff --git a/packages/esm-patient-chart-app/translations/pt.json b/packages/esm-patient-chart-app/translations/pt.json index 79b71ed07d..dc5725dbdb 100644 --- a/packages/esm-patient-chart-app/translations/pt.json +++ b/packages/esm-patient-chart-app/translations/pt.json @@ -146,7 +146,6 @@ "startNewVisit": "Iniciar nova visita", "startVisit": "Iniciar visita", "startVisitError": "Erro ao iniciar visita", - "startVisitWorkspaceTitle": "Start a visit", "tests": "Testes", "time": "Tempo", "timeFormat ": "Formato de hora", diff --git a/packages/esm-patient-chart-app/translations/pt_BR.json b/packages/esm-patient-chart-app/translations/pt_BR.json index 2506f1b483..00bec629bd 100644 --- a/packages/esm-patient-chart-app/translations/pt_BR.json +++ b/packages/esm-patient-chart-app/translations/pt_BR.json @@ -146,7 +146,6 @@ "startNewVisit": "Iniciar nova visita", "startVisit": "Visita inicial", "startVisitError": "Erro ao iniciar a visita", - "startVisitWorkspaceTitle": "Start a visit", "tests": "Testes", "time": "Tempo", "timeFormat ": "Formato de tempo", diff --git a/packages/esm-patient-chart-app/translations/qu.json b/packages/esm-patient-chart-app/translations/qu.json index cddea9fccc..f1ac5d0800 100644 --- a/packages/esm-patient-chart-app/translations/qu.json +++ b/packages/esm-patient-chart-app/translations/qu.json @@ -146,7 +146,6 @@ "startNewVisit": "Start new visit", "startVisit": "Start visit", "startVisitError": "Error starting visit", - "startVisitWorkspaceTitle": "Start a visit", "tests": "Tests", "time": "Time", "timeFormat ": "Time Format", diff --git a/packages/esm-patient-chart-app/translations/ru_RU.json b/packages/esm-patient-chart-app/translations/ru_RU.json index cddea9fccc..f1ac5d0800 100644 --- a/packages/esm-patient-chart-app/translations/ru_RU.json +++ b/packages/esm-patient-chart-app/translations/ru_RU.json @@ -146,7 +146,6 @@ "startNewVisit": "Start new visit", "startVisit": "Start visit", "startVisitError": "Error starting visit", - "startVisitWorkspaceTitle": "Start a visit", "tests": "Tests", "time": "Time", "timeFormat ": "Time Format", diff --git a/packages/esm-patient-chart-app/translations/si.json b/packages/esm-patient-chart-app/translations/si.json index cddea9fccc..f1ac5d0800 100644 --- a/packages/esm-patient-chart-app/translations/si.json +++ b/packages/esm-patient-chart-app/translations/si.json @@ -146,7 +146,6 @@ "startNewVisit": "Start new visit", "startVisit": "Start visit", "startVisitError": "Error starting visit", - "startVisitWorkspaceTitle": "Start a visit", "tests": "Tests", "time": "Time", "timeFormat ": "Time Format", diff --git a/packages/esm-patient-chart-app/translations/sw.json b/packages/esm-patient-chart-app/translations/sw.json index cddea9fccc..f1ac5d0800 100644 --- a/packages/esm-patient-chart-app/translations/sw.json +++ b/packages/esm-patient-chart-app/translations/sw.json @@ -146,7 +146,6 @@ "startNewVisit": "Start new visit", "startVisit": "Start visit", "startVisitError": "Error starting visit", - "startVisitWorkspaceTitle": "Start a visit", "tests": "Tests", "time": "Time", "timeFormat ": "Time Format", diff --git a/packages/esm-patient-chart-app/translations/sw_KE.json b/packages/esm-patient-chart-app/translations/sw_KE.json index cddea9fccc..f1ac5d0800 100644 --- a/packages/esm-patient-chart-app/translations/sw_KE.json +++ b/packages/esm-patient-chart-app/translations/sw_KE.json @@ -146,7 +146,6 @@ "startNewVisit": "Start new visit", "startVisit": "Start visit", "startVisitError": "Error starting visit", - "startVisitWorkspaceTitle": "Start a visit", "tests": "Tests", "time": "Time", "timeFormat ": "Time Format", diff --git a/packages/esm-patient-chart-app/translations/tr.json b/packages/esm-patient-chart-app/translations/tr.json index cddea9fccc..f1ac5d0800 100644 --- a/packages/esm-patient-chart-app/translations/tr.json +++ b/packages/esm-patient-chart-app/translations/tr.json @@ -146,7 +146,6 @@ "startNewVisit": "Start new visit", "startVisit": "Start visit", "startVisitError": "Error starting visit", - "startVisitWorkspaceTitle": "Start a visit", "tests": "Tests", "time": "Time", "timeFormat ": "Time Format", diff --git a/packages/esm-patient-chart-app/translations/tr_TR.json b/packages/esm-patient-chart-app/translations/tr_TR.json index cddea9fccc..f1ac5d0800 100644 --- a/packages/esm-patient-chart-app/translations/tr_TR.json +++ b/packages/esm-patient-chart-app/translations/tr_TR.json @@ -146,7 +146,6 @@ "startNewVisit": "Start new visit", "startVisit": "Start visit", "startVisitError": "Error starting visit", - "startVisitWorkspaceTitle": "Start a visit", "tests": "Tests", "time": "Time", "timeFormat ": "Time Format", diff --git a/packages/esm-patient-chart-app/translations/uk.json b/packages/esm-patient-chart-app/translations/uk.json index cddea9fccc..f1ac5d0800 100644 --- a/packages/esm-patient-chart-app/translations/uk.json +++ b/packages/esm-patient-chart-app/translations/uk.json @@ -146,7 +146,6 @@ "startNewVisit": "Start new visit", "startVisit": "Start visit", "startVisitError": "Error starting visit", - "startVisitWorkspaceTitle": "Start a visit", "tests": "Tests", "time": "Time", "timeFormat ": "Time Format", diff --git a/packages/esm-patient-chart-app/translations/uz.json b/packages/esm-patient-chart-app/translations/uz.json index cddea9fccc..f1ac5d0800 100644 --- a/packages/esm-patient-chart-app/translations/uz.json +++ b/packages/esm-patient-chart-app/translations/uz.json @@ -146,7 +146,6 @@ "startNewVisit": "Start new visit", "startVisit": "Start visit", "startVisitError": "Error starting visit", - "startVisitWorkspaceTitle": "Start a visit", "tests": "Tests", "time": "Time", "timeFormat ": "Time Format", diff --git a/packages/esm-patient-chart-app/translations/vi.json b/packages/esm-patient-chart-app/translations/vi.json index 005a484e76..6401e4ae73 100644 --- a/packages/esm-patient-chart-app/translations/vi.json +++ b/packages/esm-patient-chart-app/translations/vi.json @@ -146,7 +146,6 @@ "startNewVisit": "Bắt đầu lượt khám mới", "startVisit": "Bắt đầu lượt khám", "startVisitError": "Lỗi khi bắt đầu lượt khám", - "startVisitWorkspaceTitle": "Start a visit", "tests": "Kiểm tra", "time": "Thời gian", "timeFormat ": "Định dạng thời gian", diff --git a/packages/esm-patient-chart-app/translations/zh.json b/packages/esm-patient-chart-app/translations/zh.json index 38e7cd979f..d64df68a32 100644 --- a/packages/esm-patient-chart-app/translations/zh.json +++ b/packages/esm-patient-chart-app/translations/zh.json @@ -146,7 +146,6 @@ "startNewVisit": "开始新的就诊", "startVisit": "开始就诊", "startVisitError": "开始就诊时出现错误", - "startVisitWorkspaceTitle": "Start a visit", "tests": "检验", "time": "时间", "timeFormat ": "时间格式", diff --git a/packages/esm-patient-chart-app/translations/zh_CN.json b/packages/esm-patient-chart-app/translations/zh_CN.json index 1739450f29..43353c5fee 100644 --- a/packages/esm-patient-chart-app/translations/zh_CN.json +++ b/packages/esm-patient-chart-app/translations/zh_CN.json @@ -146,7 +146,6 @@ "startNewVisit": "开始新的就诊", "startVisit": "开始就诊", "startVisitError": "开始就诊时出现错误", - "startVisitWorkspaceTitle": "Start a visit", "tests": "检验", "time": "时间", "timeFormat ": "时间格式", From a407b503d56e67ec43542bdb7aa5dcc92fc4c55d Mon Sep 17 00:00:00 2001 From: BharathKShetty Date: Sat, 11 Jan 2025 15:16:10 +0530 Subject: [PATCH 07/10] Restore use of visit-form-top-slot after resolving 404 error --- .../visit/visit-form/visit-form.component.tsx | 2 +- yarn.lock | 218 +++++++++--------- 2 files changed, 110 insertions(+), 110 deletions(-) diff --git a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx index 718b4c2070..ff029734ab 100644 --- a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx +++ b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx @@ -660,7 +660,7 @@ const StartVisitForm: React.FC = ({
Date: Sat, 11 Jan 2025 15:23:55 +0530 Subject: [PATCH 08/10] Revert "Restore use of visit-form-top-slot after resolving 404 error" This reverts commit a407b503d56e67ec43542bdb7aa5dcc92fc4c55d. --- .../visit/visit-form/visit-form.component.tsx | 2 +- yarn.lock | 218 +++++++++--------- 2 files changed, 110 insertions(+), 110 deletions(-) diff --git a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx index ff029734ab..718b4c2070 100644 --- a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx +++ b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx @@ -660,7 +660,7 @@ const StartVisitForm: React.FC = ({
Date: Sat, 11 Jan 2025 15:27:46 +0530 Subject: [PATCH 09/10] Reapply "Restore use of visit-form-top-slot after resolving 404 error" This reverts commit c185f8a9335abc0d6bd42dc749190a164b7da612. --- .../visit/visit-form/visit-form.component.tsx | 2 +- yarn.lock | 218 +++++++++--------- 2 files changed, 110 insertions(+), 110 deletions(-) diff --git a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx index 718b4c2070..ff029734ab 100644 --- a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx +++ b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx @@ -660,7 +660,7 @@ const StartVisitForm: React.FC = ({
Date: Sat, 11 Jan 2025 15:29:53 +0530 Subject: [PATCH 10/10] Restore use of visit-form-top-slot after resolving 404 error --- .../src/visit/visit-form/visit-form.component.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx index ff029734ab..5798985d6f 100644 --- a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx +++ b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx @@ -771,7 +771,7 @@ const StartVisitForm: React.FC = ({