Menu

#3279 User able to open 2 encounter windows

RELEASE_12_1
closed-fixed
None
7
2015-10-21
2014-05-07
No

Problem Summary
When the user opens a patient's encounter screen from the demographic search, and then opens it from the appointment, 2 encounter screen instances are opened.

Expected Result
There should only ever be one encounter screen open. If another encounter link is clicked while that screen is opened, the window should focus and refresh

Actual Result
Clicking both links results in 2 windows being opened

Steps to reproduce

  • Create an appointment
  • Click the "E" link on the appointment
  • Keep the window open
  • Search for a patient
  • Click the "E" on the search result

Reproduced in: Deb 396

Additional Information:

Error traced back to the popupWithAppointmentNo on the appointmentprovideradminday jsp page. JavaScript Function calls "popupEncounter" and passes parameter "encounter" as the window name. popupEncounter implementation shows that it ignores this parameter and instead uses the window name of "Encounter"

    function popupWithApptNo(vheight,vwidth,varpage,name,apptNo) {
        if (apptNo) storeApptNo(apptNo);
        if (name=='master')
            popup(vheight,vwidth,varpage,name);
        else if (name=='encounter')
            popUpEncounter(vheight, vwidth, varpage);
        else
            popupOscarRx(vheight,vwidth,varpage);
    }

    ...


    function popUpEncounter(vheight,vwidth,varpage) {
        var page = "" + varpage;
        windowprops = "height="+vheight+",width="+vwidth+",location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,screenX=50,screenY=50,top=0,left=0";
        var popup=window.open(page, "Encounter", windowprops);
        if (popup != null) {
            if (popup.opener == null) {
                popup.opener = self;
            }
            popup.focus();
        }
    } 

most commonly used JS function for opening the encounter window is "popupEChart" that function uses "encounter" as the name.

    function popupEChart(vheight,vwidth,varpage) { 
        var page = "" + varpage;
        windowprops =                         "height="+vheight+",width="+vwidth+",location=no,scrollbars=yes,menubars=no,toolbars=no,resiz        able=yes,screenX=50,screenY=50,top=20,left=20";
        var popup=window.open(page, "encounter", windowprops);
        if (popup != null) {
        if (popup.opener == null) {
        popup.opener = self;
        }
        popup.focus();
        }
    }

also noted is that the implementation of popupEchart in the appointmentprovideradminday is incorrect, it uses the "Encounter" naming

    function popupEChart(vheight,vwidth,varpage) { //open a new popup window
        var page = "" + varpage;
        windowprops = "height="+vheight+",width="+vwidth+",location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,screenX=50,screenY=50,top=20,left=20";
        var popup=window.open(page, "Encounter", windowprops);
        if (popup != null) {
            if (popup.opener == null) {
                popup.opener = self;
            }
            popup.focus();
        }
} 

Discussion

  • SBek

    SBek - 2014-05-07

    The bug has been replicated on R12.1 (build# 396).
    It does not apply to Master.
    Changing status to open-accepted.

     
  • SBek

    SBek - 2014-05-07
    • status: open --> open-accepted
     
  • SBek

    SBek - 2014-10-06

    RELEASE_12_1_1_TRIMARA commit: https://source.oscartools.org:8080/#/c/10620/

    Could it be merged into R12.1 then we can validate and close the ticket?

     
  • SBek

    SBek - 2014-10-06
    • status: open-accepted --> open-fixed
     
  • John Wilson

    John Wilson - 2015-05-21
    • assigned_to: John Wilson
     
  • John Wilson

    John Wilson - 2015-05-21
     
  • John Wilson

    John Wilson - 2015-05-21

    Here is a fix for 12_1:
    https://source.oscartools.org:8080/#/c/12039/

    It includes a fix for the same issue in caseload as well. I am going to apply this fix for caseload to master also.

     
  • SBek

    SBek - 2015-05-22

    There are more places that allow to open 2 encounters:

    Messenger when the demographic is linked to the message (R12_1, Trunk)
    Inbox / Open Document /Select echart button (Trunk)
    Inbox/Open Lab/ Select echart button (Trunk)

     
  • SBek

    SBek - 2015-08-28

    The issue is resolved in caseload, 'E' on search result and 'E' on the appointment, 'E' when viewing in Messenger with ptt attached, E-chart in Inbox/ Documents in R12_1, Master, Beta branches.

    However, I am able to open 2 encounters when selected "E-chart" button in Inbox/ Labs in Beta/ Master.
    The issue also should be revised in CAISI view when set caisi=on in properties file in both R12_1 and Master.

     
  • John Wilson

    John Wilson - 2015-10-21
    • status: open-fixed --> closed-fixed
     
MongoDB Logo MongoDB