7.0.0(1): Encounter date field of encounter form not retaining the date

7.0.0(1): Encounter date field of encounter form not retaining the date. This is happening a lot (easily reproducible). The encounter form does not retain the date information and gets a date of 00/00/00 XX:XX.

This becomes obvious when selecting the encounter after creating it, and the tab has a date such as 0-/01/-3. It’s easy to repair by navigating back into the form and editing the date again (picking it from the calendar picker) and saving. It’s a hassle because it happens essentially with every new encounter.

It usually happens when my staff first creates the encounter. Sometimes it happens after that. I can go through this in detail in debugger mode if you would like me to.

OpenEMR Version
I’m using OpenEMR version 7.0.0(1)

I’m using: Chrome for macOS’s latest version.

Operating System
I’m using: macOS client. GCP Linux Server.


I had this issue once and this was how i got around it.

Approach 1:
Try and change between 24hr and 12hr clock in Globals → locale as well as Date Display format. (This did not work for me)

Approach 2:
While creating a new encounter, do not accept the time the system automatically generates. Even if it defaults to today’s date.
What you need to do is to select the date again and save. It should solve the problem. (This is a temporal workaround). I think the problem is the AM or PM associated with the timestamp.

Hope this helps!

1 Like

+1 for approach number 2!!

Would be nice if this got patched :cowboy_hat_face:

After the new patch (2), does it work for you?

I upgrade from 6.1.0 (1) to 7.0.0(2) and I have the same problem that you have.

I wonder if this has been fixed with patch 2 or it’s just me.

No, it is still the same issue when creating a new encounter.

Hi @juggernautsei and @cornutaurus , can you paste your locale setting here so can try to reproduce?

We have to set the time format to 24hr to get the date to save correctly in the fee sheet.

1 Like

Hello, I went back to version 6.1. But I can try to upgrade to 7.0 this weekend.

But I remember changing the date format to MM/DD/YYYY and YYYY/MM/DD and it still has a problem.

I haven’t tried switching to 24 Hr vs 12 HR.

I tried changing the date format because I found another thread with the same problem.

Hi @cornutaurus , it’s the 12 hr setting fixed in this commit.

1 Like

Hello. It worked. I switched to 24 Hr and it worked for both MM/DD/YYYY and YYYY/MM/DD

Thank you

1 Like

@stephen, I have applied this fix. It works on the first save of the encounter. If the encounter is opened and saved again. The time goes back to -1/-3/-000 Encounter

hi @juggernautsei , are you able to reproduce it on 1 of the demos?

not able to on OpenEMR Login

@stephenwaite, no I cannot reproduce on the demo. (

Then what other files need to be altered to make the problem go away? I added the edits from the PR. What more is there that is not in the PR?

1 Like

I forgot to mention.
I never apply the fix. All I did was switched to 24 HR and it was working.

I’ll wait for the fix on next patch.

See pic

Yeah I just was told about this and I noticed that when you went to select an encounter sometimes it would -0/-1/-11 whatever and I thought about it but basically ignored it however, it’s critical now for the cms 1500’s. I set it to 24hr (we do mostly VA) so it’s relevant and I still had to enter it twice till it was posted to the db. It is a workaround as posted earlier but it does the job for now anyway :slight_smile:

It’s rather difficult to figure out why some records will retain the date and others won’t allow you to update the encounter date regardless of how many times you refresh, etc. Using different browsers sometimes show the change while other times it dosn’t show it nor does it change.

Any plans for a patch for this because it makes billing a problem :).