- When user search appointments with patient id in appointment list view, they are not able to see the appointments. The appointments are visible in the list view before searching with a specific patient id.
- This issue is not happening with all the patients.
- This issue is not happening in all server timezones.
When the server in a timezone where day light saving is followed and the date of the birth of a patient falls exactly on the starting of the day of the day light saving we are seeing this issue.
- When the appointments are searched with the patient id, a hibernate query is generated to retrieve the patient appointments
- The hibernate query generated to fetch appointments uses some patient attributes like date of birth, gender etc.
- For a patient whose date of birth is falling on the start of day light saving, the value of date of birth field in the hibernate generated query is something like patient1_1_.birthdate=‘2009-03-27 01:00:00’ the ideal value should be patient1_1_.birthdate=‘2009-03-27 00:00:00’.
- This is happening because the patient’s date of birthday (i.e 2009-03-27) is starting day of day of light saving in the country where the server is.
Looking forward for any suggestions on a possible approach for fix.
@tarunshettygari @buvaneswariarun @binduak @sivareddy @angshuonline @gsluthra @n0man @muhima08 @thomasrod @ramuachala
ideally you should never consider time when checking on birthday. When someone mentions and records dob, usually timezones are never really associated … it does not matter if you are seeing the information from a different geography, your birthday is going to be recorded same whether you are in Australia or America! for time, its usually recorded in a different field.
So my reco would be strip of the time part while querying …
Excluding patient attributes from the hibernate generated query
In the hibernate generated query, we are including patient attributes like birthdate, deathdate, gender which ideally are not required to retrieve a patient’s appointments.
We can exclude these attributes while generating the query which will eventually solve the above issue.
agree! Although I can imagine that nobody will probably search/filter by birthday, would there be a case that someone may want to filter by gender? I am ok even if you remove all that, and we will introduce so, when need comes up.
@icrc.psousa do you have any such req in your project?