123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232 |
- /* ---------------------------------------------------------------------
-
- 대기안내 환자진행현황 (오전/오후별 산부인과 소대기 대기안내 - JScript )
-
- - Version :
- 1) : Ver.1.00.01
- : Create By Sonjy
- : 2010.06.10
- ----------------------------------------------------------------------*/
- var submitIntervalTime = 5 * 1000 ; // 5초
- var showGrdTime = 4 * 1000 ; // 7초
- var showMsgTime = 10 * 1000 ; // 10초
- var clockID ; // 하단줄의 시간 interval
- var grdintervalID ; // 그리드 조회 interval
- var grdintervalIDTop ; // 그리드 상단 올리기 interval
- var grdintervalIDDelay ; // 지연
- var msgintervalID ; // msg 조회 interval
- var msgintervalIDTop ; // msg 상단 올리기 interval
- var msgintervalIDDelay ; // 지연
- var chngflag = "-" ; //한장치 다중과 사용 구분 ( N:단일사용, E: 2개과 공유시 )
- var chngindx = 1 ; //한장치 다중과 사용시 multi사용으로 다시 check해야 할때 다음 check index
- /**
- * @group :
- * @ver :
- * @by :
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 대기안내 환자조회화면초기화
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize(reinityn){
- model.setValue("/root/main/cond/bizdd", getCurrentDate());
-
-
- model.setValue("/root/hidden/wgopeninfo/wgopeninfolist/ordroomnm", model.getValue("/root/hidden/wgopeninfo/wgopeninfolist/ordroomnm").replace('\n',''));
- model.setValue("/root/main/ordroominfo/ordroominfolist/deptnm", model.getValue("/root/hidden/wgopeninfo/wgopeninfolist/orddeptnm") + " (" + model.getValue("/root/hidden/wgopeninfo/wgopeninfolist/ordroomnm") + ")");
- if(model.getValue("/root/hidden/wgopeninfo/wgopeninfolist/centcd") == "-" ) {
- model.setValue("/root/main/ordroominfo/ordroominfolist/deptnm", model.getValue("/root/hidden/wgopeninfo/wgopeninfolist/orddeptnm") + " (" + model.getValue("/root/hidden/wgopeninfo/wgopeninfolist/ordroomnm") + ")");
- } else if(model.getValue("/root/hidden/wgopeninfo/wgopeninfolist/centcd") != "-" && model.getValue("/root/hidden/wgopeninfo/wgopeninfolist/orddeptcd") == "-") {
- model.setValue("/root/main/ordroominfo/ordroominfolist/deptnm", model.getValue("/root/hidden/wgopeninfo/wgopeninfolist/centnm") + " (" + model.getValue("/root/hidden/wgopeninfo/wgopeninfolist/ordroomnm") + ")");
- } else {
- model.setValue("/root/main/ordroominfo/ordroominfolist/deptnm", model.getValue("/root/hidden/wgopeninfo/wgopeninfolist/orddeptnm") + " (" + model.getValue("/root/hidden/wgopeninfo/wgopeninfolist/ordroomnm") + ")");
- }
-
- model.refresh();
- if( reinityn != "N" ){
- fSetGrdTimer();
- }
- }
- /**
- * @group :
- * @ver :
- * @by :
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 지정된 시간간격마다 그리드데이터 조회(화면 호출시 처음만 호출된다)
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetGrdTimer(){
- clockID = window.setInterval("clock();" , 1000); //1초
- grdintervalID = window.setInterval("fGetOpdOrdRoomInfo2();", submitIntervalTime); //5초
- }
- /* --------------------------------------------------*/
- /* type : function */
- /* access : public */
- /* desc : 산부인과외래 진료실 진행현황 조회 */
- /* --------------------------------------------------*/
-
- function fGetOpdOrdRoomInfo2(){
- /*
- * @ sonjy 2010.06.08
- * 한 진료실을 다른 부서에서 나눠서 사용할 경우 ( 한장비, 한진료실... )
- */
- //처음 로딩했거나 장치공유가 다중인경우 더 첵크해야 할 경우가 있을때
- if( chngflag != "N" && chngflag != "E" ) {
- var nodelist = model.instance1.selectNodes("/root/hidden/wgopeninfo/wgopendetlinfolist") ;
- if( nodelist != null && nodelist.length > 0 ) {
- var curTm = getCurrentTime();
- var chngtm = "";
- var i = chngindx ;
- for( i = chngindx ; i <= nodelist.length ; i++ ){
- alert( chngindx + "/" + model.getValue("/root/hidden/wgopeninfo/wgopendetlinfolist[" + i + "]/chng_ordflag" ) );
- chngtm = model.getValue("/root/hidden/wgopeninfo/wgopendetlinfolist[" + i + "]/chng_ordflag" ) ;
- if( !isNull(chngtm) && chngtm != "-" && ( parseInt(curTm) >= parseInt(chngtm )) ){
- chngindx = i;
- //공유장치
- model.makeValue("/root/hidden/wgopeninfo/wgopeninfolist/centcd" , model.getValue("/root/hidden/wgopeninfo/wgopendetlinfolist[" + chngindx + "]/chng_centcd"));
- model.makeValue("/root/hidden/wgopeninfo/wgopeninfolist/centnm" , model.getValue("/root/hidden/wgopeninfo/wgopendetlinfolist[" + chngindx + "]/chng_centnm"));
- model.makeValue("/root/hidden/wgopeninfo/wgopeninfolist/orddeptcd" , model.getValue("/root/hidden/wgopeninfo/wgopendetlinfolist[" + chngindx + "]/chng_orddeptcd"));
- model.makeValue("/root/hidden/wgopeninfo/wgopeninfolist/orddeptnm" , model.getValue("/root/hidden/wgopeninfo/wgopendetlinfolist[" + chngindx + "]/chng_orddeptnm"));
- model.makeValue("/root/hidden/wgopeninfo/wgopeninfolist/subdeptcd" , model.getValue("/root/hidden/wgopeninfo/wgopendetlinfolist[" + chngindx + "]/chng_subdeptcd"));
- model.makeValue("/root/hidden/wgopeninfo/wgopeninfolist/subdeptnm" , model.getValue("/root/hidden/wgopeninfo/wgopendetlinfolist[" + chngindx + "]/chng_subdeptnm"));
- chngflag = "E";
- fInitialize("Y"); //진료과명 초기화
- break;
- }
- }
-
- } else {
- chngflag = "N" ; //단일사용
- }
- }
-
- var sPath = "/root/main/opdinfo";
-
- model.removenode("/root/send");
- model.makeValue("/root/send/bizdd", model.getValue("/root/main/cond/bizdd"));
- model.makeValue("/root/send/centcd", model.getValue("/root/hidden/wgopeninfo/wgopeninfolist/centcd"));
- model.makeValue("/root/send/orddeptcd", model.getValue("/root/hidden/wgopeninfo/wgopeninfolist/orddeptcd"));
- model.makeValue("/root/send/subdeptcd", model.getValue("/root/hidden/wgopeninfo/wgopeninfolist/subdeptcd"));
- model.makeValue("/root/send/ordroomcd", model.getValue("/root/hidden/wgopeninfo/wgopeninfolist/ordroomcd"));
- model.makeValue("/root/send/orddrid", model.getValue("/root/main/ordroominfo/ordroominfolist/orddrid"));
- model.makeValue("/root/send/autoflag", model.getValue("/root/main/ordroominfo/ordroominfolist/autoflag"));
-
-
-
- setErrorOff();
-
- if (submit("TRMNV09001",false)) {
- model.setValue("/root/main/cond/bizdd", getCurrentDate());
- if(model.getValue("/root/main/ordroominfo/ordroominfolist/deptnm") == "-") {
- model.setValue("/root/main/ordroominfo/ordroominfolist/deptnm", model.getValue("/root/hidden/wgopeninfo/wgopeninfolist/orddeptnm") + " (" + model.getValue("/root/hidden/wgopeninfo/wgopeninfolist/ordroomnm") + ")");
- }
- model.setValue("/root/main/ordroominfo/ordroominfolist/deptnm", model.getValue("/root/main/ordroominfo/ordroominfolist/deptnm").replace('\n',''));
- model.refresh();
-
- } else {
- model.setValue("/root/init/grdStatus","grd:장애");
- model.removeNodeset(sPath);
- model.refresh();
- }
- }
- /**
- * @group :
- * @ver :
- * @by :
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : DataTime 조회.
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function clock() {
- var tdate = getCurrentDateTime().substring(0, 4) + "년 "
- + getCurrentDateTime().substring(4, 6) + "월 "
- + getCurrentDateTime().substring(6, 8) + "일 "
- + getCurrentDate().toDate().getDayOfWeek("K") + "요일 ";
-
- var ttime = getCurrentDateTime().substring(8, 11) + ":"
- + getCurrentDateTime().substring(11, 13);
-
- model.setValue("/root/hidden/date", tdate) ;
- model.setValue("/root/hidden/time", ttime) ;
- model.refresh();
- }
- /**
- * @group :
- * @ver :
- * @by :
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 'ESC' or 'Q' 키를 누르면 타이머 해제 및 윈도우 닫기
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fClearTimer(){
- var keyPressed = event.keyCode ;
- if(keyPressed == 27 || keyPressed == 81) // 'ESC' or 'Q' 키가 눌려진 경우
- {
- var answer = messageBox("진행현황 안내 프로그램 종료합니다.", "I") ;
- if(answer == 1) {
- fCloseBoard();
- }
- }
- }
- function fCloseBoard(){
- if (clockID != "") window.clearInterval(clockID);
- if (msgintervalID != "") window.clearInterval(msgintervalID);
- if (grdintervalID != "") window.clearInterval(grdintervalID);
-
- if (msgintervalIDTop != "") window.clearInterval(msgintervalIDTop);
- if (grdintervalIDTop != "") window.clearInterval(grdintervalIDTop);
- model.close() ;
- }
-
-
|