From 4394bc56a7b9a9c0dfa71ae4a5da57b71358899d Mon Sep 17 00:00:00 2001 From: Salah-BOUYAHIA Date: Tue, 24 Sep 2024 16:26:00 +0200 Subject: [PATCH] fix: age probleme when 130 into demographic and encounter form --- src/utils/age.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/age.ts b/src/utils/age.ts index b15e8bc4f..8f2b22045 100644 --- a/src/utils/age.ts +++ b/src/utils/age.ts @@ -101,7 +101,7 @@ export const convertStringToDuration = (age: string | null | undefined): Duratio export const convertDurationToString = (ageDate: DurationType): string | null => { if (ageDate.year === null && ageDate.month === null && ageDate.day === null) return null - if ((ageDate.year === 130 || ageDate.year === 0) && !ageDate.month && !ageDate.day) return null + if (ageDate.year === 0 && !ageDate.month && !ageDate.day) return null return `${ageDate.day || 0}/${ageDate.month || 0}/${ageDate.year || 0}` }