﻿/*! Copyright (c) Epic Systems Corporation 2012 - 2017 */
var WP=WP||{};void 0===WP.TelehealthUtils&&(WP.TelehealthUtils={}),WP.TelehealthUtils.flashPopup=function(e){var t;(t=window.open("","history","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=800,height=600")).closed||!t.document.URL||0===t.document.URL.indexOf("about")?t.location=e:window.setTimeout(t.focus,1)},WP.TelehealthUtils.telemedPopup=function(e){var t;(t=window.open(e,"history","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=1280,height=720")).opener=window,t.closed||!t.document.URL||0===t.document.URL.indexOf("about")?t.location=e:window.setTimeout(t.focus,1)},WP.TelehealthUtils.telemedExecuteFDI=function(e,t,i,o){var n,l="";null!=o&&(l="&webrtccontext="+o),i?window.open(makeLink("epichttp://fdiredirect?webid="+encodeURIComponent(e)+"&ecsn="+encodeURIComponent(t)+l)):(n=WP.FdiUtils.buildFDILinkParamString(e,t,"",""),$.ajax({url:makeLink("Extensibility/Redirection/FdiData"+n),type:"POST",success:function(e){WP.FdiUtils.fdiJSONSuccess(e,n)}}))},WP.TelehealthUtils.keepAliveMessageIfInActiveVisit=function(e){$.ajax({url:makeLink("TelemedicineHome/IsPatientInActiveVideoVisit"),type:"POST",success:e,async:!1})},WP.TelehealthUtils.webRtcContextEnum={HardwareTest:0,VideoVisit:1};