From e8f898ec77be4a35aa936c0d681c884953199324 Mon Sep 17 00:00:00 2001 From: Hitish Rao P <140695309+HitishRaoP@users.noreply.github.com> Date: Tue, 15 Oct 2024 15:38:00 +0530 Subject: [PATCH] Death report is missing patient age (#8702) Co-authored-by: Mohammed Nihal <57055998+nihal467@users.noreply.github.com> Co-authored-by: Khavin Shankar Co-authored-by: Rithvik Nishad --- src/Components/DeathReport/DeathReport.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Components/DeathReport/DeathReport.tsx b/src/Components/DeathReport/DeathReport.tsx index 9f48e34840..2424d46f60 100644 --- a/src/Components/DeathReport/DeathReport.tsx +++ b/src/Components/DeathReport/DeathReport.tsx @@ -1,6 +1,4 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ -import { useEffect, useState } from "react"; -import { statusType, useAbortableEffect } from "../../Common/utils"; +import { useState } from "react"; import { GENDER_TYPES } from "../../Common/constants"; import TextFormField from "../Form/FormFields/TextFormField"; import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; @@ -8,8 +6,8 @@ import DateFormField from "../Form/FormFields/DateFormField"; import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; import { formatDateTime, + formatPatientAge, humanizeStrings, - patientAgeInYears, } from "../../Utils/utils"; import Page from "../Common/components/Page"; import Form from "../Form/Form"; @@ -111,7 +109,7 @@ export default function PrintDeathReport(props: { id: string }) { const patientComorbidities = getPatientComorbidities(res.data); const data = { ...res.data, - age: patientAgeInYears(res.data!), + age: formatPatientAge(res.data!, true), gender: patientGender, address: patientAddress, comorbidities: patientComorbidities, @@ -372,7 +370,7 @@ export default function PrintDeathReport(props: { id: string }) {