Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Detecting concurrent updating of the same Fee Sheet

Developers
Rod Roark
2013-12-11
2014-11-20
  • Kevin Yeh
    Kevin Yeh
    2013-12-11

    What testing have you done so far?

     
  • Rod Roark
    Rod Roark
    2013-12-11

    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.

    Rod
    http://www.sunsetsystems.com/

     
  • MD Support
    MD Support
    2013-12-11

    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.

     
  • Rod Roark
    Rod Roark
    2013-12-11

    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.

    Rod
    http://www.sunsetsystems.com/

     
  • Brady Miller
    Brady Miller
    2013-12-17

    Hi,

    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.

    -brady
    OpenEMR

     
  • Rod Roark
    Rod Roark
    2013-12-17

    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!

     
  • Stephen Waite
    Stephen Waite
    2014-11-18

    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

     
  • Brady Miller
    Brady Miller
    2014-11-19

    Hi,
    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 ).
    -brady
    OpenEMR

     
    Last edit: Brady Miller 2014-11-19
  • Rod Roark
    Rod Roark
    2014-11-19

    Stephen, what action is the user doing when the message occurs?

    Agree that some debugging code is likely needed.

    Rod
    http://www.sunsetsystems.com/

     
  • Stephen Waite
    Stephen Waite
    2014-11-19

    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.

     
  • Rod Roark
    Rod Roark
    2014-11-20

    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.

    Rod
    http://www.sunsetsystems.com/

     
  • Stephen Waite
    Stephen Waite
    2014-11-20

    Thanks Rod.

    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.

     
    Last edit: Stephen Waite 2014-11-20