Skip to content

Commit 7a35194

Browse files
committed
Changing from using encounter to encounterType uuid
1 parent 03dfb99 commit 7a35194

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

packages/esm-patient-queues-app/src/components/actions/death/death-notification-actions-button.component.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,26 @@ import React, { useCallback } from 'react';
33
import { useTranslation } from 'react-i18next';
44
import styles from './death-notification-actions.scss';
55
import { DeathNotificationEncounterType_UUID, DeathNotificationForm_UUID } from '../../../constants';
6+
import { mutate } from 'swr';
67

7-
const DeathNotificationActionsButton: React.FC = () => {
8+
interface DeathNotificationProps {
9+
patientUuid: string;
10+
}
11+
12+
const DeathNotificationActionsButton: React.FC<DeathNotificationProps> = ({ patientUuid }) => {
813
const { t } = useTranslation();
914

1015
const handleLaunchWorkspace = useCallback(() => {
1116
launchWorkspace('patient-form-entry-workspace', {
1217
formInfo: {
13-
encounterUuid: DeathNotificationEncounterType_UUID,
18+
encounterTypeUuid: DeathNotificationEncounterType_UUID,
1419
formUuid: DeathNotificationForm_UUID,
20+
patientUuid,
1521
},
1622
workspaceTitle: 'Notification and Certification of Death',
23+
mutateForm: mutate,
1724
});
18-
}, []);
25+
}, [patientUuid]);
1926

2027
return (
2128
<li className="cds--overflow-menu-options__option">

0 commit comments

Comments
 (0)