Modification of create patient search popup

yehster wrote on Friday, January 20, 2012:

https://github.com/yehster/openemr/commit/d20a472afac1fb083e8d1b2e26b865c396f4c257
https://github.com/yehster/openemr/tree/new_patient_popup_prompt

I would like to make this modification to the patient search window that comes up after you hit the “create new patient” button in new/search patient.

The primary reason for this is because I am writing automated test cases (code here: https://github.com/yehster/oemrwatir and details about them later).  However, it is very difficult to dismiss the javascript confirm popup with watir when creating a new patient.

The secondary reason is that I think the interface is actually better this way as it is more consistent appearance if you just interact with the “Confirm Create Button” regardless of the “search results”, and it seems more intuitive.

Rod, I think this was all your code originally, so I’d like to hear what you think of this change.  Maybe I’m missing something as to why the extra popup window is appropriate when there aren’t any “similar patients” when creating a new patient.  Obviously the opinions of others is appreciated too.

-Kevin Yeh
kevin.y@integralemr.com

bradymiller wrote on Friday, January 20, 2012:

Hi,
Looks good to me. Agree with awaiting Rod’s input before commit.
-brady

yehster wrote on Friday, January 20, 2012:

I assure you guys that this change will be well worth it.  Watir does have the capability to handle javascript popups in general, but this is a special case as the popup/confirm window comes up before the parent window is fully rendered, so the mechanism watir uses is unable to intervene in time.

bradymiller wrote on Friday, January 20, 2012:

Hi,

Just read up a bit on Watir. Would be very nice to have an automated testing mechanism. Just as a FYI, note a previous user set something up awhile back, but has not been supported for a year or so (typical story of another developer setting it up and then moving on):
http://www.open-emr.org/wiki/index.php/Automated_Testing

I’m all for this change, especially if needed to support your automated testing stuff.

-brady

sunsetsystems wrote on Saturday, January 21, 2012:

Hey this is fine.  What I did was what the client asked for, but I’ll work something out with them.  Thanks.

Rod
www.sunsetsystems.com

yehster wrote on Sunday, January 22, 2012:

Rod,
Just curious, did they want more explicit ok/cancel as with the javascript confirm? Or did they want explicit notification that no matching results were found? both?

yehster wrote on Sunday, January 22, 2012:

I’ve committed my changes to the official repository. 

sunsetsystems wrote on Sunday, January 22, 2012:

I don’t think the JS confirm was specifically requested… just the notification.

Rod
www.sunsetsystems.com

yehster wrote on Sunday, January 22, 2012:

Cool.  I still have the notification, and can add a “cancel button” if requested.