Skip to content

Commit

Permalink
(fix) Remove check for visit when opening PRO form (#4)
Browse files Browse the repository at this point in the history
* (fix) Remove check for visit when opening PRO form

* clean up
  • Loading branch information
reagan-meant authored Nov 19, 2024
1 parent 6ac13cb commit 46be378
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useCallback } from 'react';
import { useTranslation } from 'react-i18next';
import { usePatient, useVisit } from '@openmrs/esm-framework';
import { usePatient } from '@openmrs/esm-framework';
import { launchPatientWorkspace } from '@openmrs/esm-patient-common-lib';

interface SendSmsActionOverflowMenuItemProps {
Expand All @@ -9,14 +9,12 @@ interface SendSmsActionOverflowMenuItemProps {

const SendSmsActionOverflowMenuItem: React.FC<SendSmsActionOverflowMenuItemProps> = ({ patientUuid }) => {
const { t } = useTranslation();
const { currentVisit } = useVisit(patientUuid);
const { patient } = usePatient(patientUuid);
const handleClick = useCallback(() => launchPatientWorkspace('send-outcomes-form'), []);

const isDeceased = Boolean(patient?.deceasedDateTime);

return (
!currentVisit &&
!isDeceased && (
<li className="cds--overflow-menu-options__option">
<button
Expand Down

0 comments on commit 46be378

Please sign in to comment.