12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/hismainweb/css/hismain.css" ?>
- <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
- <xhtml:head>
- <xhtml:title>메세지</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <properties>
- <screenloc>
- </screenloc>
- <clonenode>
- <scn>
- <sid/>
- <leftpos/>
- <toppos/>
- <status/>
- <mon/>
- </scn>
- </clonenode>
- <actscreen/>
- <menugroupinfo/>
- <configclone>
- <item>
- <cfgname/>
- <cfgvalue/>
- </item>
- </configclone>
- <popupmenu>
- <items>
- <name>소스보기</name>
- <func>fViewSource</func>
- </items>
- <items>
- <name>인스턴스</name>
- <func>fViewInstance</func>
- </items>
- <items>
- <name>로그보기</name>
- <func>fViewLog</func>
- </items>
- <items>
- <name>-</name>
- <func/>
- </items>
- <items>
- <name>화면출력</name>
- <func>fScreenPrint</func>
- </items>
- <items>
- <name>-</name>
- <func/>
- </items>
- <items>
- <name>버전정보</name>
- <func>fViewerAbout</func>
- </items>
- </popupmenu>
- </properties>
- <send>
- <screenloc>
- </screenloc>
- <prcpdd/>
- <instcd/>
- <awtyn/>
- <securitydata>
- <menugrupcd/>
- <menuitemcd/>
- <scrncd/>
- </securitydata>
- <awtgrpcd/>
- <awtstnsyn/>
- <chngdept>
- <userid/>
- <sessionstr/>
- <dutplcecd/>
- <dutplceinstcd/>
- </chngdept>
- </send>
- <main>
- <msg/>
- <userinfo>
- <deptnm/>
- <usernm/>
- <logindt/>
- <wsnm/>
- </userinfo>
- </main>
- <hidden>
- <zbccode/>
- <jobkindlist/>
- </hidden>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- // Viewer가 완전히 로딩되기 이전에 model.property 를 사용하면 Viewer 다운현상
- // 메뉴Submit과 ready submit 동시 발생으로 인한 IE 다운현상
- // 메뉴가 로딩된후 관련 값을을 model.property에 설정하도록 viewer 내에서 타이머로 처리
- gMenuTimerID = window.setInterval("fMenuReady()",200);
-
- if(getUserInfo("dutplceinstcd")== "032") {
- caption1.attribute("background-color") = "#fdc87e";
- } else {
- caption1.attribute("background-color") = "#99ccff";
- }
-
- ]]>
- </script>
- <submission id="TRZUM00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/properties/screenloc"/>
- <submission id="TRZUM00302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/properties/orderbasicinfo"/>
- <submission id="TXZUM00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/screenloc" resultref="/root/hidden/screenloc"/>
- <submission id="TXZUM00302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/properties/screenloc"/>
- <submission id="TXZUM00303" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send"/>
- <submission id="TXZUM00304" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send"/>
- <submission id="TXZUM00305" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/securitydata"/>
- <submission id="TXZUM00306" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send"/>
- <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
- <submission id="TRZBC00105" mediatype="application/x-www-form-urlencoded" method="post"/>
- <submission id="TRZUM20001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/lastpwdchgdt"/>
- <submission id="TRZHM00500" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/hidden/temp/logcheck" resultref="/root/temp"/>
- <submission id="TXZUM01901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/chngdept" resultref="/root/hidden">// XP에서 부서변경시 TF쪽 처리를 위해 추가</submission>
- <submission id="TXZUM01902" mediatype="application/x-www-form-urlencoded" method="post"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC006.js"/>
- <script type="javascript" src="../../../com/noticeinfoweb/js/noticepopup.js"/>
- <script type="javascript">
- <![CDATA[
- var screenLocSave = null; // 화면좌표 저장여부
- var msgsvrIPKeyStr = null; // msg server connect IP
- var msgsvrPortKeyStr = null; // msg server connect Port
- var msgsvrRetyrKeyStr = null; // msg server connect retry time
- var isConnected = false; // msg server 연결 여부
- var gPingTimerID = ""; // msg server 재접속 타이머 아이디
- var msg = ""; // 보낼 메시지
- var startTime = "";
- var endTime = "";
-
- var HISSystem = ""; //HIS여부
- var basicCodeList = "";
-
- // var gScreenTimerID = ""; // 화면 좌표 정보 loading용 타이머
- var gMenuTimerID = ""; // 최초 메뉴그룹 정보 저장용 타이머
- var gActivateWindowTimerID = ""; // 열린화면에서 선택한 화면을 activate() 하기위한 타이머
- //
- var gMouseCountFlag = false; // 화면 마우스 클릭수 집계 여부
- // function fLoadScreenInfo() {
- // alert("fLoadScreenInfo:"+htmlwindow.menuLoaded);
- // if (htmlwindow.menuLoaded) {
- // submit("TRZUM00301");
- // if (gScreenTimerID != "") {
- // window.clearInterval(gScreenTimerID);
- // gScreenTimerID = "";
- // }
- // }
- // }
- //
- function fInitialize(){
- /* fInitializeOnLoading() 함수로 이동*/
- //전체 공통 세션용 변수 reset
- model.resetProperty();
- //fDelGlobalVariable();
-
- //팝업 메뉴를 보이게 할지 여부 (true: 보인다. false: 숨긴다)
- // 반드시 Boolean type 을 사용한다. - 김기호 2008.02.19
- app.showPopupMenu(new Boolean(htmlwindow.DEVSystem));
-
- //로그 파일을 삭제한다. (해당 폴더까지 삭제함)
- //app.deleteLog();
- //1개월 로그만 남기고, 로그 파일을 삭제한다. (해당 폴더까지 삭제함) added by CBJ 2012.03.23
- app.deleteLog(1);
- //메인화면 상태 저장
- setGlobalVariable("mainclose", "N");
- //스크립트 버전정보 저장
- model.makeValue("/root/properties/jsversion",ScriptEngineMajorVersion()+"."+ScriptEngineMinorVersion()+"."+ScriptEngineBuildVersion());
-
- //사용중인 뷰어의 버전
- model.makeValue("/root/properties/tfviewerversion",app.appVersion );
-
-
- // 서버시간과 차이값을 저장해 놓는다.
- if (htmlwindow == null) {
- setGlobalVariable("timediff", "0");
- } else {
- setGlobalVariable("timediff", htmlwindow.diffTime);
- setGlobalVariable("currenttimemillis", htmlwindow.currentTimeMillis);
- }
-
- // 시간 동기화 120920 손병은
- var newDate = getNewDate();
- //window.exec("c:\\Program Files\\himed\\components\\KNUH\\kdate.bat",newDate.getDateFormat("YYYY/MM/DD hh:mm:ss"));
-
-
- // 세션 타임아웃 값을 저장해 놓는다.
- // XP에서는 세션타임아웃 체크 중복 되므로 예외처리 (by 김지훈)
- if (htmlwindow != null) {
- setGlobalVariable("session_timeout", -1); // session_timeout이 0 이하이면 암호 묻지 않음
- // setGlobalVariable("session_timeout", htmlwindow.sessionTimeout);
- // setGlobalVariable("last_submit", (new Date()).getTime());
- //// setGlobalVariable("last_submit", newDate);
- }
-
- setGlobalVariable("xp", htmlwindow.sessionTimeout);
-
- //사용자 정보 저장
- fSetUserInfo();
- fSetStatusUserInfo();
- initTitle();
- fSetMonitorInfo();
- fSetUrls();
- if (htmlwindow != null) {
- screenLocSave = new String(htmlwindow.screenLocSave);
- HISSystem = new String(htmlwindow.HISSystem);
- basicCodeList = new String(htmlwindow.basicCode);
- } else {
- screenLocSave = "false";
- HISSystem = "true";
- basicCodeList = "";
- }
-
- if(getUserInfo("dutplceinstcd")== "032") {
- caption1.attribute("background-color") = "#fdc87e";
- }
- if (screenLocSave == "true") {
- // TFMenu와 동시 submit 될때 오류가 발생하므로 menu가 로드된 후에만 실행되도록 타이머로 처리
- //gScreenTimerID = window.setInterval("fLoadScreenInfo()",500);
- setErrorOff();
- submit("TRZUM00301");
- }
-
- if (basicCodeList != "") {
- var basicCode = basicCodeList.split("|");
- setErrorOff();
- zbcfGetCodeListCache(null,basicCode);
- }
- // 마정민 대리 요청으로 의사이외의 직종에서도 처방기본정보 조회 가능하도록 수정 - 2008.10.09 김기호
- // && getUserInfo("jobkindcd") == "0330"
- fInitializsOrderBasicInfo();
-
- /* 주석처리 (XP)
- // 비밀번호 공지사항 띄우기. 손병은.
- if(submit("TRZUM20001")){
- var lastpwdchgdt = model.getValue("/root/hidden/lastpwdchgdt/lastpwdchgdt/lastpwdchgdt").substring(0,8);
- var logindt = getUserInfo("logindt").substring(0,8);
- var difmon;
-
- if(lastpwdchgdt == ""){
- //fOpenPwdNotice();
- fOpenPwdNotice2();
- }
- }
-
- //사용자별 바로가기 메뉴 호출
- window.htmlwindow.getShortcutMenuItem();
- */
- //메뉴그룹 저장 및 기본화면 호출
- fSetMenuGroupInfo();
-
- // PC의 세션타임아웃 값 설정
- // XP에서는 세션타임아웃 체크 중복 되므로 주석처리 (by 김지훈)
- //fSetSessionTimeout();
-
- /* 주석처리 (XP)
- // 사용자 설정에 따라서 메시지 팝업창을 띄워준다.
- var popupyn = fGetUserConfig("msgpopupflag");
- if (popupyn != "") {
- fOpenMsgPopup();
- }
- */
- // 전자인증서 유효여부 체크(갱신)
- if (getSystemCd().substring(3, 6).toLowerCase() == "his" && (new Boolean(htmlwindow.DEVSystem) != true)) {
- fCheckSign();
- }
-
-
- /*
- // 비밀번호 주기적 변경토록 강제. 손병은.
- if(submit("TRZUM20001")){
- var lastpwdchgdt = model.getValue("/root/hidden/lastpwdchgdt/lastpwdchgdt").substring(0,8);
- var logindt = getUserInfo("logindt").substring(0,8);
- var difmon;
-
- if(lastpwdchgdt == ""){
- modal("SPZUM20000", "", null, null, null, "/root/hidden/lastpwdchgdt", "/root/hidden/lastpwdchgdt", "sysmenu:hidden;width:500px;height:310px");
- }else{
- difmon = getDifMonths(lastpwdchgdt, logindt);
- if(difmon >=6 )
- modal("SPZUM20000", "", null, null, null, "/root/hidden/lastpwdchgdt", "/root/hidden/lastpwdchgdt", "width:500px;height:310px");
- }
- }
- */
-
- /* XP 주석처리(TF 팝업 공지사항 제거 by 김지훈)
- // 조국 임시 공지사항 띄우기
- var jobkindcd = getUserInfo("jobkindcd");
- var userInstcd = getUserInfo("dutplceinstcd");
-
- if((getSystemCd().substring(0,3).toLowerCase() == "his") && (jobkindcd=="0330" || jobkindcd=="1140")) {
- fOpenNoticePopup();
- }
- if((getSystemCd().substring(0,3).toLowerCase() == "mis")) {
- fOpenNoticePopup();
- }
- */
-
- /*
- if(userInstcd== "032") {
- caption1.attribute("background-color") = "#fdc87e";
- } else {
- caption1.attribute("class") = "message";
- }
- */
-
- // IRM메시지 있는지 체크(나중에 구현. 손병은)
- //checkIrm();
-
- // 화면 마우스 클릭 집계 여부 구하기 위한 조회(by 김지훈)
- // if(getSystemCd().substring(0,3).toLowerCase() == "his"){ // mis는 미적용
- // model.setValue("/root/send/search/userid", getUserId());
- //
- // htmlwindow.setTimeout(function(){
- // if(submit("TRZHM00402")){
- //
- // var chkCount = getNodesetCount("/root/main/clickmemberinfo/clickmemberlist");
- // if( chkCount > 0 ){
- // gMouseCountFlag = true;
- // }
- // }
- // }, 1000);
- // }
-
- }
- // start, end format: yyyymmdd
- function getDifDays(start, end)
- {
- var dateStart = new Date(start.substring(0, 4), start.substring(4, 6) - 1, start.substring(6, 8));
- var dateEnd = new Date(end.substring(0, 4), end.substring(4, 6) - 1, end.substring(6, 8));
- var difDays = (dateEnd.getTime() - dateStart.getTime()) / (24 * 60 * 60 * 1000);
-
- // because view this function
- //window.alert("- run getDifDays()\n- " + start + " ~ " + end + " => " + Math.ceil(difDays));
-
- return Math.ceil(difDays);
- }
- // start, end format: yyyymmdd
- function getDifMonths(start, end)
- {
- var startYear = start.substring(0, 4);
- var endYear = end.substring(0, 4);
- var startMonth = start.substring(4, 6) - 1;
- var endMonth = end.substring(4, 6) - 1;
- var startDay = start.substring(6, 8);
- var endDay = end.substring(6, 8);
-
- // 연도 차이가 나는 경우
- if (eval(startYear) < eval(endYear)) {
- // 종료일 월이 시작일 월보다 수치로 빠른 경우
- if (eval(startMonth) > eval(endMonth)) {
- var newEnd = startYear + "1231";
- var newStart = endYear + "0101";
-
- return (eval(getDifMonths(start, newEnd)) + eval(getDifMonths(newStart, end))).toFixed(2);
- // 종료일 월이 시작일 월보다 수치로 같거나 늦은 경우
- } else {
- var formMonth = eval(startMonth) + 1;
- if (eval(formMonth) < 10) formMonth = "0" + formMonth;
-
- var newStart = endYear + "" + formMonth + "" + startDay;
- var addMonths = (eval(endYear) - eval(startYear)) * 12;
-
- return (eval(addMonths) + eval(getDifMonths(newStart, end))).toFixed(2);
- }
- } else {
- // 월별 일수차 (30일 기준 차이 일수)
- var difDaysOnMonth = new Array(1, -2, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1);
- var difDaysTotal = getDifDays(start, end);
-
- for (i = startMonth; i < endMonth; i++) {
- if (i == 1 && isLeapYear(startYear)) difDaysTotal -= (difDaysOnMonth[i] + 1);
- else difDaysTotal -= difDaysOnMonth[i];
- }
-
- // because view this function
- //window.alert("- run getDifMonths()\n- " + start + " ~ " + end + " => " + (difDaysTotal / 30).toFixed(2));
-
- return (difDaysTotal / 30).toFixed(2);
- }
- }
- /**
- * @group :
- * @ver : 2009.06.29
- * @by : 차현철
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 개인별환경설정 및 처방환경설정에 세팅된 정보를 가져온다
- * @return :
- * @---------------------------------------------------
- */
- function fInitializsOrderBasicInfo () {
- if (HISSystem == "true") {
- model.setValue("/root/send/prcpdd", getCurrentDate());
- model.setValue("/root/send/instcd", getUserInfo("dutplceinstcd"));
- // 처방기본정보 조회
- setErrorOff();
- submit("TRZUM00302");
- }
- }
-
- function fInitializeOnLoading() {
- //전체 공통 세션용 변수 reset
- model.resetProperty();
- //fDelGlobalVariable();
-
- //팝업 메뉴를 보이게 할지 여부 (true: 보인다. false: 숨긴다)
- // 반드시 Boolean type 을 사용한다. - 김기호 2008.02.19
- app.showPopupMenu(new Boolean(htmlwindow.DEVSystem));
-
- //로그 파일을 삭제한다. (해당 폴더까지 삭제함)
- //app.deleteLog();
-
- //메인화면 상태 저장
- setGlobalVariable("mainclose", "N");
- //스크립트 버전정보 저장
- model.makeValue("/root/properties/jsversion",ScriptEngineMajorVersion()+"."+ScriptEngineMinorVersion()+"."+ScriptEngineBuildVersion());
-
- //사용중인 뷰어의 버전
- model.makeValue("/root/properties/tfviewerversion",app.appVersion );
-
- // 서버시간과 차이값을 저장해 놓는다.
- if (htmlwindow == null) {
- setGlobalVariable("timediff", "0");
- } else {
- setGlobalVariable("timediff", htmlwindow.diffTime);
- }
- // 세션 타임아웃 값을 저장해 놓는다.
- // XP에서는 세션타임아웃 체크 중복 되므로 주석처리 (by 김지훈)
- // if (htmlwindow != null) {
- // setGlobalVariable("session_timeout", htmlwindow.sessionTimeout);
- // setGlobalVariable("last_submit", (new Date()).getTime());
- // }
- //사용자 정보 저장
- fSetUserInfo();
- fSetStatusUserInfo();
- // initTitle();
-
- fSetMonitorInfo();
- fSetUrls();
- /* 특정 클라이언트에서 과도한 Ping 메시지 발생으로 인하여 아래의 로직은 finitialize 에서 한번만 수행함
-
- if (htmlwindow != null) {
- msgsvrIPKeyStr = new String(htmlwindow.msgsvrIP); // msg server connect IP
- msgsvrPortKeyStr = new String(htmlwindow.msgsvrPort); // msg server connect Port
- msgsvrRetryKeyStr = new String(htmlwindow.msgsvrRetyr) + "000"; // msg server retry time
- var retrymillis = parseInt(msgsvrRetryKeyStr);
- if (isNaN(retrymillis)) {
- retrymillis = 60000;
- }
- // msg server 접속 사용 여부 처리
- var msgsvrConnectKeyStr = new String(htmlwindow.msgsvrConnect);
- if (msgsvrConnectKeyStr == "true") {
- fConnectMsgsvr(); // msg server 접속시도
- gPingTimerID = window.setInterval("fMsgsvrPing()",retrymillis); // 타이머 기동
- }
- }
- */
-
- if (htmlwindow != null) {
- screenLocSave = new String(htmlwindow.screenLocSave);
- HISSystem = new String(htmlwindow.HISSystem);
- basicCodeList = new String(htmlwindow.basicCode);
- } else {
- screenLocSave = "false";
- HISSystem = "true";
- basicCodeList = "";
- }
-
- }
-
- function fMenuReady() {
- // menu가 로딩되지 않아 이중 submit 관련 처리를 해야 하는 경우
- //fInitializeOnLoading();
- if (htmlwindow.menuLoaded) {
- if (gMenuTimerID != "") { // 타이머 클리어
- window.clearInterval(gMenuTimerID);
- gMenuTimerID = "";
- }
- fInitialize();
- }
-
- }
-
- //메뉴그룹에 해당하는 정보믈 설정한다.
- function fSetMenuGroupInfo(){
- if (htmlwindow != null ) {
- var menuGrpInfo = new String(htmlwindow.menuGroupInfo);
- var menuGrpInfoArr = menuGrpInfo.split("^");
-
- //메뉴그룹 저장
- setGlobalVariable("menugroupcd", menuGrpInfoArr[0]);
- //사용부서 저장
- setGlobalVariable("prestdeptcd", menuGrpInfoArr[2]);
-
- // //기본화면
- // if( menuGrpInfoArr[1] != "" ){
- // fOpenMenuItem(menuGrpInfoArr[1]);
- // }else{
- // fOpenMenuItem("SMZUM00200|M|||");
- // }
- }
- }
-
- //메뉴에서 선택한 화면을 연다.
- function fOpenMenuItem(idx){
- var main = getViewer("bizMain");
-
- if(! isNull(idx)){
- var itemID = idx.split("|");
- var xrw = "../../../com/hismainweb/xrw/"+itemID[0]+".xrw";//xrw url
- var isMain = itemID[1];// M or P (or D 추가)
-
- //화면권한 생성
- setGlobalVariable("scrnauth", itemID[2]);
-
- //메뉴아이템 저장
- setGlobalVariable("menuitemcd", itemID[3]);
-
- //메뉴파라미터 저장
- setGlobalVariable("menuparam", itemID[4]);
-
- // 화면접근권한이 없는 경우 : scrnauth = 00000000 / r:0 x:0 p:0
- if (itemID[2] == "00000000") {
- var denyXrw = "../../../com/commonweb/xrw/SPZZZ00500_권한제한안내.xrw";
- //openUrl(xrw);
- modal("SPZZZ00500", null, null, null,"SPZZZ00500", null, null, "width:588;height:354");
- return;
- }
-
- // 보안 로깅 기능 추가. 손병은 130911
- model.setValue("/root/send/securitydata/menugrupcd",new String(htmlwindow.menuGroupInfo).split("^")[0].split("|")[0]);
- model.setValue("/root/send/securitydata/menuitemcd",itemID[3]);
- model.setValue("/root/send/securitydata/scrncd",itemID[0]);
-
- submit("TXZUM00305",false);
-
- //업무화면 호출
- if( isMain == "P" || isMain == "F"){//Modeless로 띄울 경우
- // 메뉴에서 설정한 권한 값을 가져온다.
- setScreenAuth();
- // 메뉴에서 설정한 사용부서 값을 가져온다.
- setScreenPrestDeptCd();
- // 메뉴Parameter정보를 설정한다.
- setScreenMenuParameter();
-
- //openUrl(xrw, "", "", "", itemID[3]+"_"+itemID[0]);//화면명이 id인 popup창을 띄운다.
- //openUrl(xrw);
-
- //메뉴에서 클릭한 경우에도 이전에 뜬 좌표 정보를 조회해서 화면을 띄워준다.
- //2010-03-10 오지훈
- var xyPos = getScreenLocation(itemID[0]);
- if(xyPos != ""){
- loc = xyPos.split("|");
- open(itemID[0], loc[0], loc[1], loc[2]);
- }else{
- open(itemID[0]);
- }
-
- //바로가기로 오픈 하는 창에 포커스를 준다.
- screenKey = fGetWindowKey(itemID[0]);
- if(screenKey != null){
- model.setValue("/root/properties/actscreen", screenKey);
- fActivateOpenWindowTimer();
- }
-
- }else{
- if (main.window.javascript.closeChildWindow != undefined) {
- main.window.javascript.closeChildWindow();
- }
- main.window.load(xrw);
- main.activate();
- }
-
-
- }
- }
-
- // 에러가 발생해도 에러 메시지를 보이면 안된다. 에러나면 무조건 return 처리
- function fCheckSign() {
- body.createChild("xforms:object", "id:KMClientAX; clsid:{d3c608b5-b664-4962-91b7-289da892953a}; visibility:hidden; left:0px; top:0px; width:0px; height:0px; ");
-
- var kmiip = getUserInfo("kmiip");
- var kmiport = getUserInfo("kmiport");
- var userid = getUserId();
- var dn = "";
-
- try {
- if (!KMClientAX.kmsConnect(kmiip, kmiport)) {
- // KMI 연결실패
- model.addLog("KMClientAC.kmsConnect() Fail [" + userid + "] time [" + getCurrentDateTime() + "]");
- return;
- }
- if (KMClientAX.kmsInit() == "") {
- // KMI 모듈초기화 실패
- KMClientAX.kmsDisconnect();
- model.addLog("KMClientAC.kmsInit() Fail [" + userid + "] time [" + getCurrentDateTime() + "]");
- return;
- }
- if ((dn = KMClientAX.GetKeyAndCert(userid)) == "") {
- // 인증서 획득시 오류
- KMClientAX.kmsDisconnect();
- model.addLog("KMClientAC.GetKeyAndCert() Fail [" + userid + "] time [" + getCurrentDateTime() + "]");
- return;
- }
- switch (KMClientAX.IsCertNew(userid, dn)) {
- case 2 : // 인증서 갱신실패
- messageBox("전자 서명을 위한 인증서 갱신에", "E009", getKMIErrMsg());
- break;
- case 3 : // 인증서 만료
- messageBox("전자 서명을 위한 인증서가 만료되어 사용", "E001", "인증서를 재발급 받으시기 바랍니다.");
- break;
- default :
- model.addLog("KMClientAX.IsCertNew() execute [" + userid + "] time [" + getCurrentDateTime() + "]");
- }
-
- KMClientAX.LocalDelKeyAndCert(userid, "");
- KMClientAX.kmsDisconnect();
- } catch (e) {
- // 예외 발생시에도 return;
-
- model.addLog("fCheckSign() Fail [" + userid + "] time [" + getCurrentDateTime() + "]");
- return;
- }
- }
-
- /*
- //전체 공통 팝업 메뉴
- //원본소스 보기
- function fViewSource(){
- window.viewSource();
- }
-
- //인스턴스 보기
- function fViewInstance(){
- window.viewInstance();
- }
-
- //로그보기
- function fViewLog(){
- window.viewLog();
- }
-
- //화면출력
- function fScreenPrint(){
- window.print();
- }
-
- //버전정보
- function fViewerAbout(){
- window.about();
- }
- */
-
- //경북대 - 손병은 추가
- //임시 공지사항 팝업 함수화. 2011-04-06
- function fOpenPopup(popupUrl, popupWid, w, h){
- var leftPosition = (htmlwindow.screen.availWidth) ? (htmlwindow.screen.availWidth-w)/2 : 0;
- var topPosition = (htmlwindow.screen.availHeight) ? (htmlwindow.screen.availHeight-h)/2 : 0;
- var prop = 'height='+h+',width='+w+',top='+topPosition+',left='+leftPosition;
- openHtml(getDomain() + popupUrl, popupWid, prop);
- }
-
- // 손병은 추가
- // 비밀번호 변경 공지사항 팝업
- function fOpenPwdNotice(){
-
- var userInstcd = getUserInfo("dutplceinstcd");
- var popupWid = "pwdpopup";
- var h = 300;
- var w = 400;
-
- var leftPosition = (htmlwindow.screen.availWidth) ? (htmlwindow.screen.availWidth-w)/2 : 0;
- var topPosition = (htmlwindow.screen.availHeight) ? (htmlwindow.screen.availHeight-h)/2 : 0;
- var prop = 'height='+h+',width='+w+',top='+topPosition+',left='+leftPosition;
- var popupUrl = "/himed/webapps/com/hismainweb/html/passwd.html";
-
- openHtml(getDomain() + popupUrl, popupWid, prop);
-
- }
-
- // 손병은 추가
- // 비밀번호 변경 공지사항 팝업2
- function fOpenPwdNotice2(){
-
- modal("SPZUM20000");
- }
-
-
-
- // //경북대 - 조국 추가
- // //공지사항 팝업메뉴 이동 : hismainweb => noticeinfoweb (2013/09/13_손성훈)
- // //임시 공지사항 팝업 호출
- // function fOpenNoticePopup() {
- //
- // var userInstcd = getUserInfo("dutplceinstcd");
- // var jobkindcd = getUserInfo("jobkindcd");
- //
- // if((getSystemCd().substring(0,3).toLowerCase() == "his") && (userInstcd == "031")) {
- // /* 본원. 의사& 간호사 공통 공지 ----------------------------------------------------- */
- // var popupUrl = "/himed/webapps/com/hismainweb/html/tempnotice.html";
- // var popupWid = "noticepopup";
- //
- // var w = 550;
- // var h = 450;
- // /*------------------------------------------------------------------------------------- */
- //
- // // /* 본원. 의사& 간호사 개별 공지 -----------------------------------------------------
- // // var jobkindcd = getUserInfo("jobkindcd");
- // // var userInstcd = getUserInfo("dutplceinstcd");
- //
- // // var popupUrl;
- // // var w;
- // // var h;
- // // if(jobkindcd=="0330"){
- // // popupUrl = "/himed/webapps/com/hismainweb/html/tempnotice.html";
- // // w = 550;
- // // h = 300;
- // // }else if(jobkindcd=="1140") {
- // // popupUrl = "/himed/webapps/com/hismainweb/html/tempnotice_nurse.html";
- // // w = 500;
- // // h = 400;
- // // }
- //
- // var popupWid = "noticepopup";
- // //------------------------------------------------------------------------------------- */
- //
- // } else if((getSystemCd().substring(0,3).toLowerCase() == "his") && (userInstcd == "032")) {
- // var jobkindcd = getUserInfo("jobkindcd");
- // var userInstcd = getUserInfo("dutplceinstcd");
- //
- // var popupUrl;
- // var w;
- // var h;
- // if(jobkindcd=="0330"){
- // popupUrl = "/himed/webapps/com/hismainweb/html/tempnotice032.html";
- // w = 550;
- // h = 450;
- // }else if(jobkindcd=="1140") {
- // popupUrl = "/himed/webapps/com/hismainweb/html/tempnotice032_nurse.html";
- // w = 500;
- // h = 450;
- // }
- //
- // var popupWid = "noticepopup";
- //
- // } else if((getSystemCd().substring(0,3).toLowerCase() == "mis") && (userInstcd == "032")) {
- // var popupUrl = "/himed/webapps/com/hismainweb/html/tempnotice_mis032.html";
- // var popupWid = "noticepopup";
- // var w = 550;
- // var h = 450;
- // }else if((getSystemCd().substring(0,3).toLowerCase() == "mis") && (userInstcd == "031")) {
- // var popupUrl = "/himed/webapps/com/hismainweb/html/tempnotice_mis031.html";
- // var popupWid = "noticepopup";
- // var w = 550;
- // var h = 450;
- // }
- //
- // var leftPosition = (htmlwindow.screen.availWidth) ? (htmlwindow.screen.availWidth-w)/2 : 0;
- // var topPosition = (htmlwindow.screen.availHeight) ? (htmlwindow.screen.availHeight-h)/2 : 0;
- // var prop = 'height='+h+',width='+w+',top='+topPosition+',left='+leftPosition;
- //
- // // 공지사항 올림 내림 설정.
- // if((getSystemCd().substring(0,3).toLowerCase() == "mis") && ((userInstcd == "031") || (userInstcd == "032"))) {
- // if(userInstcd == "031" || userInstcd == "032"){
- // //openHtml(getDomain() + popupUrl, popupWid, prop);
- // }
- //
- //
- // }else if((getSystemCd().substring(0,3).toLowerCase() == "his") && ((userInstcd == "031") || (userInstcd == "032"))){
- // if( userInstcd == "031" || userInstcd == "032"){
- // //openHtml(getDomain() + popupUrl, popupWid, prop);
- // }
- // }
- // /* */
- // }
- //
- // 개인별 화면 좌표 관리 기능 구현을 위한 스크립트
- //
-
- var gvScreenRootPath="/root/properties/screenloc";
- var gvScreenLocPath = "/root/properties/screenloc/scn";
- var gvScreenClonePath="/root/properties/clonenode/scn";
- var gvScreenIDNode = "sid";
- var gvScreenLeftPosNode = "leftpos";
- var gvScreenTopPosNode = "toppos";
- var gvScreenMonitorNoNode = "mon";
- var gvScreenStatusNode ="status";
-
- // 모니터 정보를 저장해 놓기 위한 변수
- var gvMons = 1;
- var gvStartXY = null;
- var gvWidthHeight = null;
- var gvMonInit = null;
-
- // 열린화면 윈도우 객체 저장을 위한 Dictionary 객체
- var gvDic = new ActiveXObject("Scripting.Dictionary");
-
- // 개인별 AWT 사용여부 변수
- var gvUserAwtYN ;
- var gvUserAwtGrpCd;
- var gvUserAwtStnsYN ;
-
- // 개인별 AWT 세팅
- function fSetUserAwtYN(flag){
-
- gvUserAwtYN = flag;
-
- if(getUserInfo("dutplceinstcd")== "031"){
- if(gvUserAwtYN == "Y"){
- imgawt.src = "../../../com/hismainweb/images/awt_on_031.gif";
- }else{
- imgawt.src = "../../../com/hismainweb/images/awt_off_031.gif";
- }
-
- }else if(getUserInfo("dutplceinstcd")== "032"){
-
- if(gvUserAwtYN == "Y"){
- imgawt.src = "../../../com/hismainweb/images/awt_on_032.gif";
- }else{
- imgawt.src = "../../../com/hismainweb/images/awt_off_032.gif";
- }
- }
-
- model.setValue("/root/send/awtyn", flag);
- submit("TXZUM00303",false);
- }
-
- // 개인별 AWT 사용여부 가져옴.
- function fGetUserAwtYN(){
- return gvUserAwtYN ;
- }
-
- // 개인별 AWT 그룹코드 세팅 2013.08.23 손병은
- function fSetUserAwtGrpCd(grpcd){
- gvUserAwtGrpCd = grpcd;
-
- model.setValue("/root/send/awtgrpcd",grpcd);
-
- submit("TXZUM00304",false);
- }
-
- // 개인별 AWT 그룹코드 가져옴 2013.08.23 손병은
- function fGetUserAwtGrpCd(){
- return gvUserAwtGrpCd;
- }
-
- // 개인별 AWT 구문 세팅
- function fSetUserAwtStnsYN(flag){
-
- gvUserAwtStnsYN = flag;
-
- if(getUserInfo("dutplceinstcd")== "031"){
- if(gvUserAwtStnsYN == "Y"){
- imgawtstns.src = "../../../com/hismainweb/images/awtstns_on_031.gif";
- }else{
- imgawtstns.src = "../../../com/hismainweb/images/awtstns_off_031.gif";
- }
-
- }else if(getUserInfo("dutplceinstcd")== "032"){
-
- if(gvUserAwtStnsYN == "Y"){
- imgawtstns.src = "../../../com/hismainweb/images/awtstns_on_032.gif";
- }else{
- imgawtstns.src = "../../../com/hismainweb/images/awtstns_off_032.gif";
- }
- }
-
- model.setValue("/root/send/awtstnsyn", flag);
- submit("TXZUM00306",false);
- }
-
- // 개인별 AWT 구문 세팅 가져옴 2013.12.26 손병은
- function fGetUserAwtStnsYN(){
- return gvUserAwtStnsYN;
- }
-
- function fGetUpdatedScreenLocations() {
- var nodes = instance1.selectnodes(gvScreenLocPath+"[status="I"]");
- var sendNode = instance1.selectsinglenode("/root/send/screenloc");
- var node = null;
- for(var i=0;i<nodes.length;i++) {
- node = nodes.item(i).clonenode(true);
- sendNode.appendchild(node);
- }
- model.refresh();
- }
-
- /**********************************************************/
- /* common.js 에서 호출하는 메소드들이므로 수정하지 않는다. */
- /**********************************************************/
- function fSetStatusUserInfo() {
- deptNm.value = getUserInfo("dutplcenm");
- userNm.value = getUserName();
- loginDt.value = getTitleLoginDate();
- wsNm.value = htmlwindow.wasname;
-
- if(getUserInfo("systemcd") == "HIS031" || getUserInfo("systemcd") == "HIS032" ){
- imgawtstns.visible = true;
- imgawt.visible = true;
- fSetUserAwtYN(getUserInfo("awtyn"));
- fSetUserAwtStnsYN(getUserInfo("awtstnsyn"));
- }
-
- gvUserAwtGrpCd = getUserInfo("awtgrpcd");
-
- model.refresh();
- }
- function fSetStatusMessage(msg) {
- model.setValue("/root/main/msg",msg);
-
- htmlwindow.xxf_xpSetStatusMessage(msg);
-
- model.refresh();
- }
- // Dictionary에 열린화면 윈도우 객체를 저장한다
- function fAddOpenWindow(key, winObj) {
- gvDic.item(key) = winObj;
- }
- // Dictionary에서 주어진 key에 해당되는 윈도우 객체를 제거한다.
- function fRemoveOpenWindow(key) {
- if (gvDic.exists(key)) {
- gvDic.remove(key);
- }
- }
- // 현재 Dictionary 객체에 열린화면으로 등록되어 있는 목록을 배열로 반환한다.
- function fGetOpenWindowList() {
- var keys = (new VBArray(gvDic.keys())).toArray();
- htmlwindow.xxf_xpSetOpendWindows(keys); // XP에도 전달(추가 by 김지훈)
-
- return keys;
- }
-
- // 열린화면에서 선택한 화면을 activate() 하면 다시 뒤로 숨어버리는 문제가 있어
- // 이를 타이머를 사용하여 일정 시간 후에 activate() 되도록 변경함
- function fActivateOpenWindowTimer() {
- if (gActivateWindowTimerID != "") { // 타이머 클리어
- window.clearInterval(gActivateWindowTimerID);
- gActivateWindowTimerID = "";
- }
-
- var actScnId = model.getValue("/root/properties/actscreen");
- if (actScnId != null && actScnId !="") {
- if (actScnId == "main") { // main window activate
- htmlwindow.setFocus();
- } else {
- fActivateOpenWindow(actScnId);
- }
- }
- }
-
- // 주어진 key에 해당되는 윈도우 객체를 활성화한다.
- function fActivateOpenWindow(key) {
-
- if (gvDic.exists(key)) {
- var winObj = gvDic.item(key);
- if(winObj != null) {
- winObj.restore();
- winObj.activate();
- }
- }
- }
-
- // 열려있는 화면들 중에서 화면 ID를 사용하여 윈도우 객체를 찾아서 반환한다.
- function fGetOpenWindow(sid) {
- var wlist = fGetOpenWindowList();
- var wkey = null;
-
- wkey = fGetWindowKey(sid)
-
- if (wkey != null) {
- if (gvDic.exists(wkey)) {
- return gvDic.item(wkey);
- }
- }
-
- return null;
- }
-
- // 열려있는 팝업 화면들을 모두 닫는다.
- function fCloseAllWindow(key) {
- var wlist = null;
- var key = null;
-
- wlist = fGetOpenWindowList();
-
- var i = 0;
- // for(i=0;i<wlist.length;i++) {
- for(i=wlist.length-1; i>=0 ;i--) {
- //while (wlist.length > 0) {
- key = wlist[i];
- //alert(key+","+wlist.length);
- if (gvDic.exists(key)) {
- var winObj = gvDic.item(key);
- if(winObj != null && winObj.children.length == 0 && winObj.type != "main") {
- winObj.close();
- }
- }
- wlist = fGetOpenWindowList(); // 갱신된 윈도우 목록을 다시 가져온다.
- }
- }
-
- function fOpenScreenList(popupX, popupY) {
- //var popupX = event.ScreenX-224;
- //var popupY = event.ScreenY;
- model.resetInstanceNode("/root/properties/actscreen");
-
- window.load("SPZUM01200_열린화면.xrw", "modal", "SMZUM01200", "top:"+popupY+"px; left:"+popupX+"px; width:224px; height:301px; caption:hidden; ");
-
- var actScnId = model.getValue("/root/properties/actscreen");
- if (actScnId != null && actScnId !="") {
- gActivateWindowTimerID = window.setInterval("fActivateOpenWindowTimer()",100); // 타이머 기동으로 해결됨
- }
-
- /*
- var actScnId = model.getValue("/root/properties/actscreen");
- if (actScnId != null && actScnId !="") {
- if (actScnId == "main") { // main window activate
- htmlwindow.setFocus();
- } else {
- fActivateOpenWindow(actScnId);
- }
- } */
- }
- // UID로 주어진 화면보다 나중에 생성된 화면들 중에서 바로 다음에 생성된 Modal 화면의 정보를 반환한다.
- // 반환되는 모달 화면 정보는 "화면ID|UID|modal|화면명" 형태의 문자열이다.
- // 해당 Modal 화면이 없으면 "" 을 반환한다.
- function fGetLastModal(uid) {
- var wlist = fGetOpenWindowList();
- var modal_name = "";
- var split_temp = null;
- var uid_pattern = "|"+uid+"|";
- for(var i=wlist.length-1;i>=0;i--) {
- // find modal
- if ( wlist[i].indexOf(uid_pattern) >= 0) break;
-
- // modal 여부 확인
- split_temp = wlist[i].split("|");
- if (split_temp.length > 3 && split_temp[2] == "modal") {
- modal_name = wlist[i];
- }
- }
- return modal_name;
- }
-
- function fDecode64(inp) {
- inp = new String(inp);
- var ttb = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
- var ret = new Array(inp.length*3/4);
- var c1, c2, c3;
- var e1, e2, e3, e4;
- var i = 0;
- var j = 0;
- do {
- e1 = ttb.indexOf(inp.charAt(i++));
- e2 = ttb.indexOf(inp.charAt(i++));
- e3 = ttb.indexOf(inp.charAt(i++));
- e4 = ttb.indexOf(inp.charAt(i++));
-
- c1 = (e1<<2)|(e2>>4);
- c2 = ((e2&15)<<4)|(e3>>2);
- c3 = ((e3&3)<<6)|e4;
-
- ret[j++] = c1;
- if (e3 != 64) {
- ret[j++] = c2;
- }
- if (e4 != 64) {
- ret[j++] = c3;
- }
- } while (i < inp.length);
-
- return ret;
- }
-
- function fDecodeUTF8(barr) {
- var str="";
- for(i=0; i<barr.length; i++) {
- if((barr[i] & 240) == 224) {
- c = ((barr[i]&15)<<12) | ((barr[i+1]&63)<<6) | (barr[i+2]&63) ;
- str += String.fromCharCode(c);
- i +=2;
- } else {
- str += String.fromCharCode(barr[i]);
- }
- }
- return str;
- }
-
- function fReadCookie(name) {
- var nameEQ = name + "=";
- var ca = htmldocument.cookie.split(';');
- for(var i=0;i < ca.length;i++) {
- var c = ca[i];
- while (c.charAt(0)==' ') c = c.substring(1,c.length);
- if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
- }
- return null;
- }
-
- function fSetUserInfo() {
- var userInfoStr = fDecodeUTF8(fDecode64(fReadCookie(htmlwindow.sessionCookie)));
-
- var userInfoArr = userInfoStr.split("|");
- var userInfoKeyStr = new String(htmlwindow.sessionFormat);
- var userInfoKeyArr = userInfoKeyStr.split("|");
- var len = userInfoArr.length;
-
- for(i=0;i<len;i++) {
- setGlobalVariable(userInfoKeyArr[i], userInfoArr[i]);
- }
- setGlobalVariable("userinfos", userInfoStr);
-
- setGlobalVariable("domain", htmlwindow.domainName);
- setGlobalVariable("domainSSL", htmlwindow.domainNameSSL);
-
-
- setGlobalVariable("macaddr", fGetMacAddress());
-
- // 서버시간 차이 구하기
- var logintime = getGlobalVariable("logindt"); // yyyymmddhhmmssSSS
- }
-
- // 타시스템 연결 URL 정보를 프로퍼티에 담아놓는다.
- function fSetUrls() {
- var urls = new String(htmlwindow.systemUrls);
- var urlSplit = urls.split("|");
- var len = urlSplit.length;
- var i = 0;
- var sysCode = null;
- var sysName = null;
- var sysUrl = null;
- while(i<len-1) {
- sysCode = urlSplit[i++];
- sysName = urlSplit[i++];
- sysUrl = urlSplit[i++];
- //alert(sysCode+","+sysName+","+sysUrl);
- setGlobalVariable("sysname"+sysCode, sysName);
- setGlobalVariable("sysurl"+sysCode, "http://"+sysUrl);
- }
- }
-
- // 화면 좌표 정보 데이터를 모두 삭제한다.(DB도 함께)
- function fClearAllScreenLocation() {
- submit("TXZUM00302");
- }
-
- // sid와 절대좌표를 넘기면 sid를 key로 화면의 모니터번호와 상대좌표정보를 인스턴스에 저장한다.
- function fSetScreenLocation(sid, leftpos, toppos) {
- var coord = fGetRelativeCoordinate(leftpos,toppos);
- var mon = coord[0];
- var offsetx = coord[1];
- var offsety = coord[2];
- var sidnode = instance1.selectsinglenode(gvScreenLocPath+"[sid=""+sid+""]");
- if ( sidnode == null ) {
- // screen location is not found, add a new screen location
- model.setValue(gvScreenClonePath+"/"+gvScreenIDNode,sid);
- model.setValue(gvScreenClonePath+"/"+gvScreenLeftPosNode,offsetx);
- model.setValue(gvScreenClonePath+"/"+gvScreenTopPosNode,offsety);
- model.setValue(gvScreenClonePath+"/"+gvScreenMonitorNoNode,mon);
- model.setValue(gvScreenClonePath+"/"+gvScreenStatusNode,"I");
- var scnnode = instance1.selectsinglenode(gvScreenClonePath).clonenode(true);
- var parentnode = instance1.selectsinglenode(gvScreenRootPath);
- parentnode.appendchild(scnnode);
- } else {
- // screen location is found
- sidnode.selectsinglenode(gvScreenLeftPosNode).text=offsetx;
- sidnode.selectsinglenode(gvScreenTopPosNode).text=offsety;
- sidnode.selectsinglenode(gvScreenMonitorNoNode).text=mon;
- sidnode.selectsinglenode(gvScreenStatusNode).text="I";
- }
- }
- // sid를 key로 해당 화면의 절대좌표정보를 "x|y" 형태의 문자열로 반환한다. 좌표정보가 없으면 ""를 반환한다.
- function fGetScreenLocation(sid) {
- var sidnode = instance1.selectsinglenode(gvScreenLocPath+"[sid=""+sid+""]");
- if ( sidnode == null ) {
- return "";
- } else {
- var offsetx = parseInt(sidnode.selectsinglenode(gvScreenLeftPosNode).text);
- var offsety = parseInt(sidnode.selectsinglenode(gvScreenTopPosNode).text);
- var mon = parseInt(sidnode.selectsinglenode(gvScreenMonitorNoNode).text);
- if (mon >= gvMons) {
- mon = 0;
- }
- // 화면을 벗어나지 안도록 범위 체크한다.
- if (offsetx >= 0 && offsetx < gvWidthHeight[mon][0]) {
- offsetx = offsetx + gvStartXY[mon][0];
- } else {
- offsetx = gvStartXY[mon][0];
- }
- if (offsety >= 0 && offsety < gvWidthHeight[mon][1]) {
- offsety = offsety + gvStartXY[mon][1];
- } else {
- offsety = gvStartXY[mon][1];
- }
-
- return offsetx+ "|" + offsety;
- }
- }
- // 모니터 개수, 시작좌표, 화면 크기 정보를 담아놓는다.
- function fSetMonitorInfo() {
- if (gvMonInit != null) {
- return;
- }
- gvMonInit = true;
-
- var coord = app.monitorcoordinates;
- var resol = app.monitorresolution;
- gvMons = app.monitornumber;
- model.makeValue("/root/properties/monitor/mons",gvMons);
- model.makeValue("/root/properties/monitor/coord",coord);
- model.makeValue("/root/properties/monitor/resol",resol);
-
- gvStartXY = new Array(gvMons);
- gvWidthHeight = new Array(gvMons);
-
- var coord = coord.split("|");
- var resol = resol.split("|");
-
- // 판독실 모니터 3, 4개로 인한 오류사항. 디버깅 이전까지 오류를 없애기 위해 설정.
- if (gvMons > 2) {
- gvMons = 2;
- }
-
- // 모니터 시작 좌표와 끝좌표를 계산해 놓는다.
- for(var i=0;i<gvMons;i++) {
- gvStartXY[i] = coord[i].split(",");
- gvWidthHeight[i] = resol[i].split(",");
- gvStartXY[i][0] = parseInt(gvStartXY[i][0]);
- gvStartXY[i][1] = parseInt(gvStartXY[i][1]);
- gvWidthHeight[i][0] = parseInt(gvWidthHeight[i][0]);
- gvWidthHeight[i][1] = parseInt(gvWidthHeight[i][1]);
- }
- }
-
- // 모니터 개수를 리턴한다.
- function fGetMonitorNumbers() {
- return gvMons;
- }
-
- // 모니터의 시작 좌표를 리턴한다.
- function fGetMonitorStartXY(monno) {
- if (monno >= gvMons || monno < 0) {
- monno = 0;
- }
- return gvStartXY[monno];
- }
-
- // 모니터의 크기를 리턴한다.
- function fGetMonitorSize(monno) {
- if (monno >= gvMons || monno < 0) {
- monno = 0;
- }
- return gvWidthHeight[monno];
- }
-
- // 주어진 모니터번호와 상대좌표를 사용하여 절대 좌표를 계산하여 배열로 리턴한다.
- function fGetAbsoluteCoordinate(monno,leftpos,toppos) {
- if (gvMonInit == null) {
- fSetMonitorInfo();
- }
-
- if (monno >= gvMons || monno < 0) {
- monno = 0;
- }
- var absleftpos = gvStartXY[monno][0] + parseInt(leftpos);
- var abstoppos = gvStartXY[monno][1] + parseInt(toppos);
- var retpos = new Array(2);
- retpos[0] = absleftpos;
- retpos[1] = abstoppos;
- return retpos;
- }
-
- // 주어진 화면 좌표를 모니터 번호와 모니터 기준의 상대좌표로 변환해서 리턴한다.
- function fGetRelativeCoordinate(leftpos, toppos) {
- if (gvMonInit == null) {
- fSetMonitorInfo();
- }
-
- var targetmon = 0;
- var targetx = 0;
- var targety = 0;
-
- var offsetx = 0;
- var offsety = 0;
- for(i=0;i<gvMons;i++) {
- offsetx = leftpos-gvStartXY[i][0];
- offsety = toppos-gvStartXY[i][1];
- // 범위에 들어가는 모니터를 찾아서 모니터 번호와 상대좌표를 계산한다.
- if ( offsetx >= 0 && offsetx < gvWidthHeight[i][0] && offsety >= 0 && offsety < gvWidthHeight[i][1]) {
- targetmon = i;
- targetx = offsetx;
- targety = offsety;
- break;
- }
- }
- var relativeCoord = new Array(3);
- relativeCoord[0] = targetmon;
- relativeCoord[1] = targetx;
- relativeCoord[2] = targety;
- return relativeCoord;
- }
-
- // 로그아웃 처리 기능이다.
- function fLogout(type) {
- // 메시지 Ping 타이머 클리어
- if (gPingTimerID != "") {
- window.clearInterval(gPingTimerID);
- }
-
- // 소켓 닫기
- if (isConnected) {
- fSetStatusMessage("메시지 서버와의 연결을 종료합니다.");
- socket.close();
- isConnected = false;
- }
-
- // 열린 팝업화면들을 모두 닫는다.
- fSetStatusMessage("열려있는 창을 모두 닫습니다.");
- fCloseAllWindow();
-
- // 화면 좌표 정보 저장
- if (screenLocSave == "true") {
- fSetStatusMessage("화면 좌표 정보를 서버에 저장합니다.");
- fGetUpdatedScreenLocations();
- setForceOn();
- if (submit("TXZUM00301")) {
- model.removeNodeset("/root/send/screenloc/scn");
- }
- }
-
- //전체 공통 세션용 변수 reset
- model.resetProperty();
- //fDelGlobalVariable();
-
- if (type == "session") {
- htmlwindow.logout();
- }
- }
-
- //세션변수 clear
- // 2008-02-28 사용안함 : 김기호
- // model.resetProperty() 사용
- function fDelGlobalVariable(){
- var propertyStr = model.propertyNames("*");
- var propertyArr = propertyStr.split("*");
- for(var i = 0; i < propertyArr.length; i++ ) {
- if(propertyArr[i].split("_")[0] == getSystemCd()){
- model.property(propertyArr[i]) = "";
- }
- }
- }
-
- // Macaddress 주소를 반환한다.
- function fGetMacAddress() {
- var maclist = app.macaddress;
- // 여러개인 경우 ^ 로 구분되므로 이중에서 하나를 선택한다.
- // VMware 설치시 생성되는 macaddress는 005056XXYYZZ 형태이므로 이를 제외시킨다.
- var macarr = maclist.split("^");
- var macaddr = "";
- for(var i=0;i<macarr.length;i++) {
- macaddr = macarr[i];
- if ( macaddr.indexOf("005056",0) != 0 ) {
- break;
- }
- }
-
- return macaddr;
- }
-
- // PC의 세션타임아웃 값 설정 함수
- // XP에서는 세션타임아웃 체크 중복 되므로 주석처리 (by 김지훈)
- // function fSetSessionTimeout() {
- // var stmnode = instance1.selectsinglenode("/root/properties/session/timeout");
- // var stmvalue = "";
- // if (stmnode != null) {
- // stmvalue = stmnode.selectsinglenode("sessntm").text;
- // if (isNaN(parseInt(stmvalue)) == false) {
- // setGlobalVariable("session_timeout", stmvalue);
- // }
- // }
- // }
-
- //
- // 사용자 설정 정보 관련 함수들
- //
-
- var gvUserConfigRootPath="/root/properties/config";
- var gvUserConfigItemPath = gvUserConfigRootPath+"/item";
- var gvUserConfigClonePath="/root/properties/configclone/item";
-
- function fGetUserConfig(cfgname) {
- var cfgnode = instance1.selectsinglenode(gvUserConfigItemPath+"[cfgname=""+cfgname+""]");
- var cfgvalue = "";
- if ( cfgnode != null ) {
- // configuration is found
- cfgvalue = cfgnode.selectsinglenode("cfgvalue").text;
- }
- //alert(cfgname+","+cfgvalue);
- return cfgvalue;
- }
-
- function fSetUserConfig(cfgname, cfgvalue) {
- var cfgnode = instance1.selectsinglenode(gvUserConfigItemPath+"[cfgname=""+cfgname+""]");
- if ( cfgnode == null ) {
- // config is not found, add a new config
- model.setValue(gvUserConfigClonePath+"/cfgname",cfgname);
- model.setValue(gvUserConfigClonePath+"/cfgvalue",cfgvalue);
- var clonenode = instance1.selectsinglenode(gvUserConfigClonePath).clonenode(true);
- var parentnode = instance1.selectsinglenode(gvUserConfigRootPath);
- parentnode.appendchild(clonenode);
- } else {
- // screen location is found
- cfgnode.selectsinglenode("cfgvalue").text=cfgvalue;
- }
- }
- //
- // 국민건강보험 연계용 함수들
- //
- var gvNhicUrl = null;
- var gvNhicObject = null;
-
- // NHIC Active-X 객체를 반환한다. 최초 호출시에는 객체를 생성한 후 반환한다.
- // 객체가 생성되지 않는 경우에는 null을 리턴한다.
- function fGetNhicObject() {
- if (gvNhicObject != null) {
- return gvNhicObject;
- }
-
- try {
- body.createChild("xforms:object",
- "id:nhicAX; clsid:{1669D75E-B1C3-46DF-A410-7FF60B39B762}; visibility:hidden; left:0px; top:0px; width:0px; height:0px; ");
- gvNhicObject = nhicAX;
- } catch (e) {
- gvNhicObject = null;
- }
-
- return gvNhicObject;
- }
-
- // NHIC 연계 호출을 위한 공단 URL 문자열을 반환한다.
- function fGetNhicURL() {
- if (gvNhicUrl != null) {
- return gvNhicUrl;
- }
-
- // 연계 URL 설정
- if (htmlwindow != null) {
- gvNhicUrl = new String(htmlwindow.nhicUrl);
- } else {
- gvNhicUrl = "http://nhic.codns.com:1443/services/nhic?WSDL"; // 개발용 URL
- }
-
- return gvNhicUrl;
- }
-
-
- //
- // 전자인증 연계용 함수들
- //
- var _CERT_YEAR_ = 1970;
- var _CERT_MONTH_ = 1;
- var _CERT_DATE_ = 1;
- var _CERT_UID_ = "";
- var SKCommObject = null;
-
- // SKCommAX 객체를 반환한다. 최초 호출시에는 객체를 생성한 후 반환한다.
- // 객체가 생성되지 않는 경우에는 null을 리턴한다.
- function fGetSKCommObject() {
- if (SKCommObject != null) {
- return SKCommObject;
- }
-
- try {
- //body.createChild("xforms:object", "id:CertManX; clsid:{ec5d5118-9fde-4a3e-84f3-c2b711740e70}; visibility:hidden; left:0px; top:0px; width:0px; height:0px; ");
- SKCommObject = CertManX;
- } catch (e) {
- SKCommObject = null;
- }
-
- return SKCommObject;
- }
- // 열려있는 화면들 중에서 화면 ID를 사용하여 화면Key를 반환한다.
- function fGetWindowKey(sid) {
- var wlist = fGetOpenWindowList();
- var wkey = null;
- for(var i = 0 ; i < wlist.length ; i++) {
- if ( wlist[i].indexOf(sid) == 0 ) {
- wkey = wlist[i];
- }
- }
- return wkey;
- }
-
- //
- // 공통코드 Cache 함수는 ZBC006.js 에 들어 있음
- //
-
- function fOpenPhoneInfoPopup(){
- //modal("SPZUM01800", "", "1022", "151", "SPZUM01800", "", "","","","","notaskbar");
- var posX = window.event.screenX-224;
- var posY = window.event.screenY;
- window.load("SPZUM01800_전화번호안내.xrw", "modal", "SPZUM01800", "top:"+posY+"px; left:"+posX+"px; width:245px; height:340px; caption:hidden; ");
- }
-
- function fOpenDeptInfoPopup(){
- //modal("SPZUM01800", "", "1022", "151", "SPZUM01800", "", "","","","","notaskbar");
- var posX = window.event.screenX-224;
- var posY = window.event.screenY;
-
- //setParameter("SPZUM01900_PARM_deptlist",htmlwindow.deptList);
-
- window.load("SPZUM01900_부서선택.xrw", "modal", "SPZUM01900", "top:"+posY+"px; left:"+posX+"px; width:245px; height:50px; caption:hidden; ");
-
- if(getParameter("SPZUM01900_RETN_selected") == "true"){
- // 열린 팝업화면들을 모두 닫는다.
- fSetStatusMessage("열려있는 창을 모두 닫습니다.");
- fCloseAllWindow();
-
- //htmlwindow.changeSession(getParameter("SPZUM01900_RETN_newsessionstr"));
- fChangeDept(getParameter("SPZUM01900_RETN_newsessionstr"),getParameter("SPZUM01900_RETN_menugroupstr"));
-
-
- }
- }
-
- function fChangeDept(sessionstr, menugroupstr){
-
- fSetUserInfo();
- fSetStatusUserInfo();
- initTitle();
-
- htmlwindow.changeMenu(menugroupstr);
- //사용자별 바로가기 메뉴 호출
- htmlwindow.getShortcutMenuItem();
-
- // 처방기본정보 가져오기
- fInitializsOrderBasicInfo();
-
- //메뉴그룹 저장 및 기본화면 호출
- fSetMenuGroupInfo();
-
- delPatientInfos();
-
- // 진료대상자리스트 열 때 진료과 디폴트 셋팅이 로그인한 진료과로 설정 되도록 수정
- setGlobalVariable("ordtab", "");
-
- if(getUserInfo("dutplceinstcd")== "032") {
- caption1.attribute("background-color") = "#fdc87e";
- } else {
- caption1.attribute("background-color") = "#99ccff";
- }
-
- // 이미지변환
- htmlwindow.changeImage(getUserInfo("dutplceinstcd"));
-
-
- }
-
- /********************************************
- * 화면 클릭 저장 이벤트 (by 김지훈)
- *********************************************/
- var sClickCount = 0;
- // 의사 화면 클릭 카운트
- function fClickCount(screenid){
-
- // TsetTest(); // 1만건 저장 테스트
- if(getSystemCd().substring(0,3).toLowerCase() == "his"){ // mis는 미적용
- sClickCount++;
-
- model.makeValue("/root/send/mouseclick[" + sClickCount + "]/screenid", screenid);
- model.makeValue("/root/send/mouseclick[" + sClickCount + "]/seqno", sClickCount);
- model.makeValue("/root/send/mouseclick[" + sClickCount + "]/clickdate", getCurrentDate());
- model.makeValue("/root/send/mouseclick[" + sClickCount + "]/clicktime", getCurrentTime());
- }
- }
-
- // 화면 클릭 리스트 저장(로그아웃 or 익스플로러 닫기 버튼)
- htmlwindow.onbeforeunload = function (){ fSaveMouseClick() };
-
- function fSaveMouseClick() {
- if(gMouseCountFlag == false){
- return;
- }
-
- if(sClickCount == 0) {
- return;
- }
-
- if( submit("TXZHM00401") ) {
- model.resetInstanceNode("/root/send/mouseclick");
- sClickCount = 0;
- }
- }
-
- function xxf_xpCall(fnStr){
- htmlwindow.xxf_xpCall(fnStr);
- }
-
- var callFuncKey = "";
- var callFuncVal = "";
- var callFuncBiz = "";
-
- function xxf_tfSetParameter(){
- setParameter(callFuncKey, callFuncVal);
-
- callFuncKey = "";
- callFuncVal = "";
- }
-
- function xxf_tfSetGlobalVariable() {
- setGlobalVariable(callFuncKey, callFuncVal, callFuncBiz);
-
- callFuncKey = "";
- callFuncVal = "";
- callFuncBiz = "";
- }
-
- function xxf_tfSetModelProperty(){
- model.property(callFuncKey) = callFuncVal;
-
- callFuncKey = "";
- callFuncVal = "";
- }
-
- function xxf_tfSetModelAttribute(){
- model.setAttribute(callFuncKey, callFuncVal);
-
- callFuncKey = "";
- callFuncVal = "";
- }
-
- function xxf_tfCall(fnStr,callbackFn){
- eval(fnStr);
- }
- function xxf_tfModal(id,monNo,xPos,yPos,wid,refcsv,resultref,resultid,userProp,prevPos, authCode, resizeType){
- var ref = "/root/hidden/dataset";
-
- model.removenode(ref);
- model.makeNode(ref);
- if(!isNull(resultid))
- setCSVToNode(ref, refcsv, resultid);
- modal(id,monNo,xPos,yPos,wid,ref,resultref,userProp,prevPos, authCode, resizeType);
- }
-
- function xxf_tfOpen(id,monNo,xPos,yPos,wid,refcsv,resultref,resultid,userProp,prevPos, authCode, resizeType){
- var ref = "/root/hidden/dataset";
-
- model.removenode(ref);
- model.makeNode(ref);
- if(!isNull(resultid))
- setCSVToNode(ref, refcsv, resultid);
- open(id,monNo,xPos,yPos,wid,ref,resultref,userProp,prevPos, authCode, resizeType);
- }
-
- //선택한 화면 열기
- function xxf_tfOpenMenuItem(idx){
- fOpenMenuItem(idx);
- }
-
- function xxf_tfChangeDept(dutplceinstcd, dutplcecd) {
- model.setValue("/root/send/chngdept/userid", getUserId());
- model.setValue("/root/send/chngdept/sessionstr", getGlobalVariable("userinfos"));
- model.setValue("/root/send/chngdept/dutplceinstcd", dutplceinstcd);
- model.setValue("/root/send/chngdept/dutplcecd", dutplcecd);
-
- submit("TXZUM01901",false);
-
- var submitID = "TXZUM01902";
- var sid = document.all(submitID);
- sid.attribute("action") = getDomain()+"/himed/chngsess.live?sessstr="+model.getValue("/root/hidden/retlist/newsessionstr");
- model.send(submitID,false,false,true);
-
- model.refresh();
-
-
- fSetUserInfo();
- fSetStatusUserInfo();
- initTitle();
-
- //htmlwindow.changeMenu(menugroupstr);
- //사용자별 바로가기 메뉴 호출
- //htmlwindow.getShortcutMenuItem();
-
- // 처방기본정보 가져오기
- fInitializsOrderBasicInfo();
-
- //메뉴그룹 저장 및 기본화면 호출
- fSetMenuGroupInfo();
-
- delPatientInfos();
-
- // 진료대상자리스트 열 때 진료과 디폴트 셋팅이 로그인한 진료과로 설정 되도록 수정
- setGlobalVariable("ordtab", "");
-
- if(getUserInfo("dutplceinstcd")== "032") {
- caption1.attribute("background-color") = "#fdc87e";
- } else {
- caption1.attribute("background-color") = "#99ccff";
- }
-
- // 이미지변환
- //htmlwindow.changeImage(getUserInfo("dutplceinstcd"));
- }
- /*
- opener.invoke = function(
- window.TOBEHTML.FireUserNotify = function(userdata) {
- var parent = window.TOBEWEBBROWSER;
-
- if (parent) {
- parent.$fire_onusernotify(parent, userdata);
- } else {
- window.document.title = userdata;
- }
- }
- */
-
- // ----------------- 속도 체크를 위한 변수 및 함수 추가 (2015.07.29 smkim)--------------------
- var arryStartLogTime;
- var modalCallCnt = 0;
- function startLogCheck(logickind) {
- if(arryStartLogTime == null) arryStartLogTime = new Array();
-
- if(arryStartLogTime[logickind] != null && arryStartLogTime[logickind] != undefined)
- delete arryStartLogTime[logickind];
-
- arryStartLogTime[logickind] = new Date().getTime();
- }
- function endLogCheck(logickind, logdata) {
- if(arryStartLogTime == null || arryStartLogTime[logickind] == null || arryStartLogTime[logickind] == undefined)
- return;
-
- var elapsedTime = new Date().getTime() - arryStartLogTime[logickind];
-
- model.makeValue("/root/hidden/temp/logcheck/logickind", logickind);
- model.makeValue("/root/hidden/temp/logcheck/elapsedTime", elapsedTime);
-
- if(logdata != null && logdata != undefined) {
- var rowdata = logdata.split('|');
-
- for(var i = 0; i < rowdata.length; i++) {
- model.makeValue("/root/hidden/temp/logcheck/data" + i, rowdata[i]);
- }
- }
-
- // <submission id="TRZHM00500" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/hidden/temp/logcheck" resultref="/root/temp"/>
- submit ("TRZHM00500", false); // submission 선언은 상태메시지 창에 있음
-
- model.removeNodeset("/root/hidden/temp/logcheck");
- delete arryStartLogTime[logickind];
- }
- function startLogTempCheck(logickind) {
- if(arryStartLogTime == null) arryStartLogTime = new Array();
-
- if(arryStartLogTime[logickind] != null && arryStartLogTime[logickind] != undefined)
- delete arryStartLogTime[logickind];
-
- arryStartLogTime[logickind] = new Date().getTime();
- }
- function endLogTempCheck(logickind) {
- if(arryStartLogTime == null || arryStartLogTime[logickind] == null || arryStartLogTime[logickind] == undefined)
- return 0;
-
- var elapsedTime = new Date().getTime() - arryStartLogTime[logickind];
- delete arryStartLogTime[logickind];
-
- return elapsedTime;
- }
-
- function beforeTimeCheck() {
- if(arryStartLogTime == null) {
- arryStartLogTime = 0;
- return;
- }
-
- modalCallCnt++;
-
- if(modalCallCnt == 1)
- return new Date().getTime();
- else
- return 0;
- }
- function exceptPopupTime(beforeTime) {
- if(arryStartLogTime == null) {
- arryStartLogTime = 0;
- return;
- }
-
- modalCallCnt--;
-
- if(modalCallCnt != 0) return;
-
- var currentTime = new Date().getTime();
- for(var i in arryStartLogTime) {
- var elapseTime = (currentTime - beforeTime);
- arryStartLogTime[i] += elapseTime;
- }
- }
-
- function fSetInitPatientInfo(param) {
- htmlwindow.xxf_xpSetInitPatientInfo(param);
- }
-
- function fPatientInfoLoadingToXP(isStart) {
- if(isStart) {
- modal("SPZUM03000", null, null, null,null, null, null, "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
- } else {
- var mainObj = getMainViewer();
- var curLoadingObj = mainObj.javascript.getOpenWindow("SPZUM03000");
- if(curLoadingObj != null)
- curLoadingObj.javascript.fClose();
- }
- }
- // ------------------------------------------------------------------------
-
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body guideline="1,566;">
- <object id="CertManX" clsid="{ec5d5118-9fde-4a3e-84f3-c2b711740e70}" visibility="hidden" style="left:0px; top:0px; width:0px; height:0px; "/>
- <object id="socket" clsid="{81e9de7e-90be-4958-bbda-ac731c05aba8}" visibility="hidden" style="left:0px; top:0px; width:0px; height:0px; ">
- <!-- 소켓 받은 메시지 이벤트 -->
- <script type="javascript" ev:event="OnReceive(nDataLength, szID)">
- <![CDATA[
- var msg = socket.recvString(); // 받은 메시지
- fSetMessage(msg);
-
- if (msg == "z") {
- var tTime = new Date();
- endTime = getDateTime( tTime ,'S');
- }
- ]]>
- </script>
- <!-- 소켓 에러 이벤트 -->
- <script type="javascript" ev:event="OnError(lError, szMsg)">
- <![CDATA[
- fSetStatusMessage("메시지 서버 연결에 실패했습니다. ");
- socket.close(); // 소켓 닫기
- isConnected = false; // 접속 여부 false
- htmlwindow.changeMsgIcon("N"); // 메인 화면에 연결 끊김 표시
- ]]>
- </script>
- <!-- 소켓 연결 이벤트 -->
- <script type="javascript" ev:event="OnConnect(szID)">
- <![CDATA[
- isConnected = true; // 접속 여부 false
- fSetStatusMessage("메시지 서버에 연결되었습니다.");
- msg = fMakeLoginMessage(getUserId()); // 로그인 메시지를 생성한다.
- socket.sendString(msg); // 로그인 메시지를 전송한다.
-
- htmlwindow.changeMsgIcon("E"); // 연결 확인
- ]]>
- </script>
- <!-- 소켓 close 이벤트 -->
- <script type="javascript" ev:event="OnClose(szID)">
- <![CDATA[
- isConnected = false; // 접속 여부 false
- htmlwindow.changeMsgIcon("N");
- ]]>
- </script>
- </object>
- <caption id="caption1" visibility="hidden" style="left:0px; top:0px; width:1203px; height:23px; vertical-align:middle; background-color:#99ccff; "/>
- <output id="msg" ref="/root/main/msg" class="output_message_b" visibility="hidden" style="left:10px; top:3px; width:445px; height:19px; "/>
- <output id="deptNm" ref="/root/main/userinfo/deptnm" class="output_userinfo" visibility="hidden" style="left:460px; top:3px; width:200px; height:19px; text-align:right; "/>
- <output id="userNm" ref="/root/main/userinfo/usernm" class="output_userinfo" visibility="hidden" style="left:665px; top:3px; width:125px; height:19px; "/>
- <caption id="caption2" class="output_userinfo" visibility="hidden" style="left:795px; top:3px; width:82px; height:19px; ">최초접속시간:</caption>
- <output id="loginDt" ref="/root/main/userinfo/logindt" class="output_userinfo" visibility="hidden" style="left:877px; top:3px; width:168px; height:19px; "/>
- <script type="javascript" ev:event="onmousedown">
- <![CDATA[
- //setPopupMenu("body", false, gvPopupMenuPath+"/items", "name", "func");
- ]]>
- </script>
- <script type="javascript" ev:event="DOMFocusOut">
- <![CDATA[
- //initPopupMenu();
- ]]>
- </script>
- <output id="wsNm" ref="/root/main/userinfo/wsnm" class="output_userinfo" visibility="hidden" style="left:1050px; top:3px; width:55px; height:19px; "/>
- <img id="imgawt" visibility="hidden" style="left:1155px; top:6px; width:38px; height:11px; background-stretch:stretch; ">
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var flag = fGetUserAwtYN();
-
- if(flag == "Y"){
- fSetUserAwtYN("N");
- }else{
- fSetUserAwtYN("Y");
- }
- model.refresh();
- ]]>
- </script>
- </img>
- <img id="imgawtstns" visibility="hidden" style="left:1110px; top:6px; width:38px; height:11px; background-stretch:stretch; ">
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var flag = fGetUserAwtStnsYN();
-
- if(flag == "Y"){
- fSetUserAwtStnsYN("N");
- }else{
- fSetUserAwtStnsYN("Y");
- }
- model.refresh();
- ]]>
- </script>
- </img>
- </xhtml:body>
- </xhtml:html>
|