123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211 |
- /* ---------------------------------------------------------------------
-
- 대기안내 환자진행현황 (대기안내 시력검사실 )
-
- - Version :
- 1) : Ver.1.00.01
- : Create By sonickth
- : 2010.07.05
- ----------------------------------------------------------------------*/
- var clockID ; // 하단줄의 시간 interval
- var grdintervalID ; // 그리드 조회 interval
- var grdToggle;
- /**
- * @group :
- * @ver : 2010.07.05
- * @by : sonickth
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 검사실 대기안내(시력검사실) 환자조회화면초기화
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize(){
- model.setValue("/root/main/cond/bizdd", getCurrentDate());
-
- /* if(model.getValue("/root/hidden/wgopeninfo/wgopeninfolist/centcd") == "-" ) {
- model.setValue("/root/main/waitroominfo/waitroomtitle/deptnm", model.getValue("/root/hidden/wgopeninfo/wgopeninfolist/orddeptnm"));
- } else {
- model.setValue("/root/main/waitroominfo/waitroomtitle/deptnm", model.getValue("/root/hidden/wgopeninfo/wgopeninfolist/centnm"));
- }
- */
- model.removenode("/root/main/waitroominfo/waitroominfolist");
- model.refresh();
-
- fSetTimer();
- }
- /**
- * @group :
- * @ver : 2010.07.05
- * @by : sonickth
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 지정된 시간간격마다 그리드데이터 조회(화면 호출시 처음만 호출된다)
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetTimer(){
- clockID = window.setInterval("clock();" , 1000); //1초
- grdintervalID = window.setInterval("fGetOpdWaitRoomInfo();", 8000);
- }
- /* --------------------------------------------------*/
- /* type : function */
- /* access : public */
- /* desc : 외래 대기실 진행현황 조회 */
- /* --------------------------------------------------*/
- var maxGroup = 30; //대대기에 표시할 검사실 최대 개수
- var perGroup = 3; //대대기 한 화면에 표시할 진료실 개수
-
- function fGetOpdWaitRoomInfo(){
- var sPath = "/root/main/opdinfo";
- model.removenode("/root/send");
- model.makeValue("/root/send/bizdd", model.getValue("/root/main/cond/bizdd"));
- model.makeValue("/root/send/subdeptcd", model.getValue("/root/hidden/wgopeninfo/wgopeninfolist/subdeptcd"));
- 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/centcd", '-');
- model.makeValue("/root/send/orddeptcd", '2120000000');
- model.makeValue("/root/send/ordroomcd", model.getValue("/root/hidden/wgopeninfo/wgopeninfolist/ordroomcd"));
- model.makeValue("/root/send/orddrid", model.getValue("/root/main/ordroominfo/ordroominfolist/orddrid"));
-
- setErrorOff();
-
- if (submit("TRMNV00202", false)) {
-
- model.setValue("/root/main/cond/bizdd", getCurrentDate());
- document.all.item("room1").visible = true;
-
- var i, z, y;
- var itemid;
- var patnm, chgpatnm;
-
-
-
- itemid = "room1";
- patnm = ""; //환자명사이에 space를 넣어서 조회되게
- chgpatnm = ""; //환자명사이에 space를 넣어서 조회되게
-
- var k = 1;
- for(j = 1; j <= getNodesetCount("/root/main/waitroominfo/waitroompatlist"); j++ ) {
- if(k <=10) { // 한그룹에 표시되는 환자수
-
- //환자명사이에 space를 넣어서 조회되게
- patnm = model.getValue("/root/main/waitroominfo/waitroompatlist[" + j + "]/patnm");
- for(y = 0; y < patnm.length; y++){
- if(y + 1 == patnm.length){
- chgpatnm = chgpatnm + patnm.substring(y , y + 1);
- }else{
- chgpatnm = chgpatnm + patnm.substring(y , y + 1) + " ";
- }
- }
-
- document.all.item(itemid+"_pat"+k).value = chgpatnm;
- patnm = "";
- chgpatnm = "";
- document.all.item(itemid+"_pid"+k).value = model.getValue("/root/main/waitroominfo/waitroompatlist[" + j + "]/pid");
-
- k = k+1;
- }
- }
-
-
- } else {
- model.setValue("/root/init/grdStatus","grd:장애");
- model.removeNodeset(sPath);
- model.refresh();
- }
- }
- /**
- * @group :
- * @ver : 2010.07.05
- * @by : sonickth
- * @---------------------------------------------------
- * @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 : 2010.07.05
- * @by : sonickth
- * @---------------------------------------------------
- * @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 (grdintervalID != "") window.clearInterval(grdintervalID);
- if (grdToggle != "") window.clearInterval(grdToggle);
-
- model.close() ;
- }
-
-
|