Currently there is no protection against two different users mistakenly updating the same Fee Sheet at the same time. This is an attempt to fix that by detecting when it has changed in between displaying and saving. Commit is here:
Code review ticket is here:
It would be especially good to get Kevin's input as some complex code of his is affected. :)
What testing have you done so far?
Kevin - testing has been pretty basic so far, like opening the FS in one browser session, changing a quantity in another, then trying to add a CPT code in the first. I didn't look at what can or should be done with the Review stuff nor creating/updating issues.
Wouldn't it be better to implement some sort of locking mechanism that can be reused in other places as well? Similar to billing (perhaps more serious) it is an issue with encounters and patient data.
Note this is not a locking mechanism, rather a way to error out before causing damage due to concurrent access (which would indicate a problem with work flow management). But yes, generalizing this to other areas such as patient demographics update would be nice; Brady also brought that up in his commit comments.
Will be important to test the Review stuff to ensure it doesn't break anything. Otherwise seems good to me.
One suggestion is to break the function visitChecksum() into a separate library script called something like checksum_library.php or something that makes it clear to hopefully get others to build more for of these; for example user information to be in used in scripts when modifying these things; or a generic one that can do any layout.
Thanks Brady. I've often thought it would be a huge improvement to have object models to represent encounters, patients and many other "things" in OpenEMR. In that case the checksum algorithm would surely best exist a method of each such model (class) and not in a separate checksum library.
While the concept in visitChecksum() is easily used for other things, as I think about it more it's my judgment that the code itself is not easily reusable. We could do something like making an abstract class for it but that kind of misses the point about what we really need object models for.
My hope is that someone will take an interest in sponsoring this kind of infrastructure work, and in the meantime it may be best to not muddy the waters. Other opinions are welcomed!
this if statement is throwing a false positive for a user running 4.1.3 dev on firefox mac edition
the mysql syntax is over my head in the function visitChecksum
For debugging, would be very useful to throw the $_POST['form_checksum'] and $current_checksum into the alert() statement there or the php error log and see if anything weird is going on(for example, maybe a special character is messing things up or maybe $_POST['form_checksum'] is blank and the isset() isn't doing what it is supposed to ).
Stephen, what action is the user doing when the message occurs?
Agree that some debugging code is likely needed.
Thanks for the tips. I had to do some tele-debugging since I don't have access to chrome/firefox on mac/apple products currently.
From what I understand from a user, she adds a cpt to a new fee sheet and is then unable to add another cpt or icd9 without first saving the sheet.
When the user goes back in to the fee sheet and adds an additional cpt or icd9 the alert msg is displayed with no value in the form_checksum, while the current_checksum displays a value.
Do you have this fix from 2014-04-04? It may be relevant to the problem.
Next step, determine for sure if it's browser-specific. See if you can repro the problem with a Windows or Linux PC on one of the demo sites and document the steps. If I can make it happen here then I can fix it.
I haven't been able to replicate on debian chrome/firefox or windows chrome/firefox/ie.
Pretty sure it's mac related but when I had one mac user switch to chrome the problem disappeared. Not so lucky with the other who only uses chrome.
ps I tried the weekly dev demo on an ipad but everything was ok on safari and chrome, I'm going to ask the user to see if updating chrome helps.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.