Skip to content

Commit 1cee96a

Browse files
committed
Fixed patient location mismatch prompt behavior when managing groups
1 parent 4714fe6 commit 1cee96a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/add-group-modal/AddGroupModal.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ const AddGroupModal = ({
177177
});
178178
}
179179
setErrors((errors) => ({ ...errors, patientList: null }));
180+
setSelectedPatientUuid(null);
180181
}, [selectedPatientUuid, patientList, setPatientList]);
181182

182183
const updatePatientList = (patientUuid) => {
@@ -186,7 +187,7 @@ const AddGroupModal = ({
186187
useEffect(() => {
187188
if (!selectedPatientUuid || !hsuIdentifier) return;
188189

189-
if (config.patientLocationMismatchCheck && hsuIdentifier && sessionLocation.uuid != hsuIdentifier.location.uuid) {
190+
if (config.patientLocationMismatchCheck && sessionLocation.uuid != hsuIdentifier.location.uuid) {
190191
setPatientLocationMismatchModalOpen(true);
191192
} else {
192193
addSelectedPatientToList();

src/form-entry-workflow/patient-search-header/PatienMismatchedLocationModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const PatientLocationMismatchModal = ({ open, setOpen, onConfirm, onCancel, sess
1919
};
2020

2121
return (
22-
<ComposedModal open={open}>
22+
<ComposedModal open={open} onClose={handleCancel}>
2323
<ModalHeader>{t('confirmPatientSelection', 'Confirm patient selection')}</ModalHeader>
2424
<ModalBody>
2525
{t(

0 commit comments

Comments
 (0)