Skip to content

Commit

Permalink
Enable Patient Edit button for deceased Patient (#10882)
Browse files Browse the repository at this point in the history
  • Loading branch information
amjithtitus09 authored Mar 1, 2025
1 parent f4a8399 commit 2eca6a4
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 21 deletions.
1 change: 0 additions & 1 deletion public/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,6 @@
"date_range": "Date Range",
"dates_and_identifiers": "Dates & Identifiers",
"day": "Day",
"death_report": "Death Report",
"deceased_disclaimer": "Please provide the date and time of death for record-keeping purposes. This information is handled with utmost sensitivity and respect.",
"deceased_status": "Deceased Status",
"delete": "Delete",
Expand Down
1 change: 0 additions & 1 deletion public/locale/ml.json
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,6 @@
"date_of_return": "മടങ്ങിവരുന്ന തീയതി",
"date_of_test": "ടെസ്റ്റ് തീയതി",
"day": "ദിവസം",
"death_report": "മരണ റിപ്പോർട്ട്",
"delete": "ഇല്ലാതാക്കുക",
"delete_account": "അക്കൗണ്ട് ഇല്ലാതാക്കുക",
"delete_account_btn": "അതെ, ഈ അക്കൗണ്ട് ഇല്ലാതാക്കുക",
Expand Down
1 change: 0 additions & 1 deletion src/components/Patient/PatientDetailsTab/Demography.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ export const Demography = (props: PatientProps) => {
<Button
data-cy="edit-patient-button"
variant="outline"
disabled={!!patientData.death_datetime}
onClick={withPermissionCheck(() =>
handleEditClick(subtab.id),
)}
Expand Down
19 changes: 1 addition & 18 deletions src/components/Patient/PatientHome.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { useQuery } from "@tanstack/react-query";
import dayjs from "dayjs";
import { Link, navigate } from "raviger";
import { Link } from "raviger";
import { useTranslation } from "react-i18next";

import CareIcon from "@/CAREUI/icons/CareIcon";

import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import {
Expand Down Expand Up @@ -247,21 +245,6 @@ export const PatientHome = (props: {
</div>
</div>
</div>
<div className="py-2">
{patientData.death_datetime && (
<div>
<Button
id="death-report"
className="my-2 w-full"
name="death_report"
onClick={() => navigate(`/death_report/${id}`)}
>
<CareIcon icon="l-file-download" className="text-lg" />
{t("death_report")}
</Button>
</div>
)}
</div>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/components/Patient/PatientRegistration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ export default function PatientRegistration(
geo_organization: (
patientQuery.data.geo_organization as unknown as Organization
)?.id,
death_datetime: patientQuery.data.death_datetime || undefined,
} as unknown as z.infer<typeof formSchema>);
}
}, [patientQuery.data]);
Expand Down

0 comments on commit 2eca6a4

Please sign in to comment.