Skip to content

Commit

Permalink
Merge pull request #97 from senaite/fix-birthdate-not-show-patients
Browse files Browse the repository at this point in the history
Fix birth date is not displayed in patients listing
  • Loading branch information
ramonski authored Nov 10, 2023
2 parents f9bacb5 + 6da94f0 commit dadb52a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions src/senaite/patient/browser/patientfolder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit dadb52a

Please sign in to comment.