diff --git a/packages/esm-patient-orders-app/src/lab-results/lab-results-form.component.tsx b/packages/esm-patient-orders-app/src/lab-results/lab-results-form.component.tsx index b8284c1c0..1745cfed1 100644 --- a/packages/esm-patient-orders-app/src/lab-results/lab-results-form.component.tsx +++ b/packages/esm-patient-orders-app/src/lab-results/lab-results-form.component.tsx @@ -43,7 +43,6 @@ const LabResultsForm: React.FC = ({ const { control, formState: { errors, isDirty, isSubmitting }, - getValues, handleSubmit, } = useForm<{ testResult: Record }>({ defaultValues: {}, @@ -108,7 +107,8 @@ const LabResultsForm: React.FC = ({ setShowEmptyFormErrorNotification(true); return; } - const obsPayload = createObservationPayload(concept, order, formValues); + // Set the observation status to 'FINAL' as we're not capturing it in the form + const obsPayload = createObservationPayload(concept, order, formValues, 'FINAL'); const orderDiscontinuationPayload = { previousOrder: order.uuid, type: 'testorder', @@ -133,7 +133,6 @@ const LabResultsForm: React.FC = ({ orderDiscontinuationPayload, abortController, ); - closeWorkspaceWithSavedChanges(); mutateLabOrders(); mutateOrderData(); @@ -181,7 +180,12 @@ const LabResultsForm: React.FC = ({ -