Issue:
- 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.
Cause: 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.
Analysis:
- 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