123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194 |
- /* ---------------------------------------------------------------------
-
- 대기안내 환자진행현황 (대기안내공통 - JScript )
-
- - Version :
- 1) : Ver.1.00.01
- : Create By YeoWon Lim
- : 2015.05.02
- ----------------------------------------------------------------------*/
- var inquiryTime = 5 * 1000 ; // 5초 (재조회시간)
- var clockTime = 1000 ; // 1초 (시계)
- var clockID ;
- var inquiryID;
- /**
- * @group :
- * @ver : 2008.02.13
- * @by : 임여원
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 대기안내 환자조회화면초기화
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize(){
- fSetTimer();
- }
- /**
- * @group :
- * @ver : 2007.10.09
- * @by : 문창곤
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 지정된 시간간격마다 그리드데이터 조회(화면 호출시 처음만 호출된다)
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetTimer(){
- clockID = window.setInterval("clock();" , clockTime); //1초
- inquiryID = window.setInterval("fGetTestRoomInfo();" , inquiryTime); //5초
- }
- /* --------------------------------------------------*/
- /* type : function */
- /* access : public */
- /* desc : 외래 진료실 진행현황 조회 */
- /* --------------------------------------------------*/
-
- function fGetTestRoomInfo(){
- var sPath = "/root/main/opdinfo";
-
- model.setValue("/root/main/cond/bizdd", getCurrentDate());
- 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/ordroomcd", model.getValue("/root/hidden/wgopeninfo/wgopeninfolist/ordroomcd"));
-
- setErrorOff();
-
- if (submit("TRMNV11001",false)) {
-
- var i;
- var j = 2;
- var patstat = true;
-
- for(i = 1; i <= getNodesetCount("/root/main/ordroominfo/ordroompatlist") && j <= 6; i++ ) {
- if(model.getValue("/root/main/ordroominfo/ordroompatlist[" + i + "]/patstat") == "A") {
- document.all.item("rsrvtm1").value = model.getValue("/root/main/ordroominfo/ordroompatlist[" + i + "]/rsrvtm");
- document.all.item("patnm1").value = model.getValue("/root/main/ordroominfo/ordroompatlist[" + i + "]/patnm");
- patstat = false;
-
- } else {
- if (j < 4 ) {
- document.all.item("rsrvtm" + j).value = model.getValue("/root/main/ordroominfo/ordroompatlist[" + i + "]/rsrvtm");
- document.all.item("patnm" + j).value = model.getValue("/root/main/ordroominfo/ordroompatlist[" + i + "]/patnm");
- j++;
- } else {
- document.all.item("genpatnm" + j).value = model.getValue("/root/main/ordroominfo/ordroompatlist[" + i + "]/genpatnm");
- j++;
- }
-
- }
- }
- if(patstat) {
- document.all.item("rsrvtm1").value = "-";
- document.all.item("patnm1").value = "-";
- }
-
- for(; j <= 6; j++ ) {
- if (j < 4 ) {
- document.all.item("rsrvtm" + j).value = "-";
- document.all.item("patnm" + j).value = "-";
- } else {
- document.all.item("genpatnm" + j).value = "-";
- }
- }
-
- model.refresh();
- } else {
- model.setValue("/root/init/grdStatus","grd:장애");
- model.removeNodeset(sPath);
- model.refresh();
- }
- }
- /**
- * @group :
- * @ver : 2007.10.09
- * @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 : 2007.10.09
- * @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 (inquiryID != "") window.clearInterval(inquiryID);
- model.close();
- }
-
-
|