From 71c6b73e216657d6e2b065d6d89b78b274352223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jordi=20Puiggen=C3=A9?= Date: Fri, 10 Nov 2023 12:11:24 +0100 Subject: [PATCH 1/2] Fix birth date is not displayed in patients listing --- src/senaite/patient/browser/patientfolder.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/senaite/patient/browser/patientfolder.py b/src/senaite/patient/browser/patientfolder.py index 225e0b4a..85d71f68 100644 --- a/src/senaite/patient/browser/patientfolder.py +++ b/src/senaite/patient/browser/patientfolder.py @@ -26,6 +26,7 @@ from bika.lims.utils import get_image from bika.lims.utils import get_link from senaite.app.listing.view import ListingView +from senaite.core.api import dtime from senaite.patient import messageFactory as _sp from senaite.patient.api import to_identifier_type_name from senaite.patient.api import tuplify_identifiers @@ -193,8 +194,9 @@ def folderitem(self, obj, item, index): # Birthdate birthdate = obj.getBirthdate() - if birthdate: - item["birthdate"] = self.ulocalized_time(birthdate, long_format=0) + # birthdate is a datetime.date object + birthdate = dtime.to_DT(birthdate) + item["birthdate"] = dtime.to_localized_time(birthdate) # Folder parent = api.get_parent(obj) From 6da94f02249abe2ae82933b5986358fb3396462c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jordi=20Puiggen=C3=A9?= Date: Fri, 10 Nov 2023 12:14:53 +0100 Subject: [PATCH 2/2] Changelog --- docs/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index e6468ac3..168db555 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -5,6 +5,7 @@ Changelog 1.4.0 (unreleased) ------------------ +- #97 Fix birth date is not displayed in patients listing - #93 Layered listing searchable text adapter - #92 Allow searches by patient in samples listing - #91 Allow only 1 Patient per Report