123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
- /*
-
- 인공신장실 내환자세팅 (SMMND03300.xrw - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- /**
- * @group :
- * @ver : 2009.01.07
- * @by : dhkim
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면 초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInit(){
-
- var instcd = getUserInfo("dutplceinstcd");
-
- ipt_fromdt.value = getCurrentDate();
- ipt_todt.value = getCurrentDate();
-
- grd_mypatlist.fixedcellcheckbox(0, 0) = true;
-
- grd_mypatlist.mergeCol(0) = false;
- grd_mypatlist.mergeCol(2) = false;
- grd_mypatlist.mergeCol(3) = false;
- grd_mypatlist.mergeCol(4) = false;
- grd_mypatlist.mergeCol(5) = false;
- grd_mypatlist.mergeCol(6) = false;
- grd_mypatlist.mergeCol(7) = false;
- grd_mypatlist.mergeCol(8) = false;
- grd_mypatlist.mergeCol(9) = false;
- grd_mypatlist.mergeCol(10) = false;
-
- model.removeNodeset("/root/main/mypatinfo/mypatlist");
-
- var pFlag = '-';
-
- model.setValue("root/main/cond/userid", getUserId());
- model.setValue("root/main/cond/usernm", getUserName());
- model.setValue("root/main/cond/wardcd", getUserInfo("dutplcecd"));
- model.setValue("root/main/cond/shiftflag", pFlag);
-
- model.refresh();
-
- fGetPatList(pFlag);
-
- setRowStyle("grd_mypatlist", "0", "true", "mysetting", "equal");
-
- }
- // 환자리스트 조회
- function fGetPatList(pFlag){
- var today = getCurrentDate();
- grd_mypatlist.attribute("height") = "609";
- tar_settinginfo.visible = false;
- grd_mypatlist.rebuildStyle();
- model.removenode("/root/send");
- model.makeValue("/root/send/wardcd" , model.getValue("/root/main/cond/wardcd"));
- model.makeValue("/root/send/srchflag" , pFlag);
- model.makeValue("/root/send/rsrvfromdd", today);
- model.makeValue("/root/send/rsrvtodd" , today);
- model.makeValue("/root/send/shiftflag" , model.getValue("/root/main/cond/shiftflag"));
-
- //20130520 혈액투석적정서평가를 위한 파라메터 추가
- model.makeValue("/root/send/hdsaqnflag" , model.getValue("/root/main/cond/hdsaqnflag"));
-
- submit("TRMND05101");
- grd_mypatlist.rebuildStyle(0, 0, grd_mypatlist.rows-1, grd_mypatlist.cols-1);
- setRowStyle("grd_mypatlist", "0", "true", "mysetting", "equal");
- }
- //그리드 온클릭이벤트
- function fOnclick(){
-
- if( grd_mypatlist.col != 0 && isDataCell()) {
- if (grd_mypatlist.mergeCol(grd_mypatlist.col) == true) {
- var arrRows = grd_mypatlist.mergeArea(grd_mypatlist.row, grd_mypatlist.col).split(",");
- var currentMysetting = model.getValue("/root/main/mypatinfo/mypatlist["+arrRows[0]+"]/mysetting")
-
- if(currentMysetting == "true" ) {
- currentMysetting = "false";
- } else {
- currentMysetting = "true";
- }
-
- for (var i=parseInt(arrRows[0]); i<=parseInt(arrRows[2]); i++) {
- model.setValue("/root/main/mypatinfo/mypatlist["+i+"]/mysetting", currentMysetting);
- }
- } else {
- var currentMysetting = model.getValue("/root/main/mypatinfo/mypatlist["+grd_mypatlist.selectedRow(0)+"]/mysetting")
- if (currentMysetting == "true") {
- model.setValue("/root/main/mypatinfo/mypatlist["+grd_mypatlist.selectedRow(0)+"]/mysetting","false");
- } else {
- model.setValue("/root/main/mypatinfo/mypatlist["+grd_mypatlist.selectedRow(0)+"]/mysetting","true");
- }
- }
- }
-
- grd_mypatlist.rebuildStyle(0, 0, grd_mypatlist.rows-1, grd_mypatlist.cols-1);
- setRowStyle("grd_mypatlist", "0", "true", "mysetting", "equal");
- }
- //내환자저장
- function fSave(){
- model.removenode("/root/send");
-
- //20130523 kya 유효일자 세팅
- var fromdt = ipt_fromdt.value + '000000';
- var todt = ipt_todt.value + '235959';
-
- for(var i = 0; i<grd_mypatlist.rows ; i++) {
- var currentMysetting = model.getValue("/root/main/mypatinfo/mypatlist["+i+"]/mysetting");
- //alert("todt =====" + currentMysetting);
- if( currentMysetting == "t" ) {
- model.SetValue("/root/main/mypatinfo/mypatlist[" + i +"]/fromdt", fromdt);
- model.SetValue("/root/main/mypatinfo/mypatlist[" + i +"]/todt", todt);
- }
- }
-
- //20130520 혈액투석적정서평가를 위한 파라메터 추가
- model.makeValue("/root/send/mypatlist", grd_mypatlist.getUpdateDataAll("u"));
- if(grd_mypatlist.rows > 1){
- if (submit("TXMND05101") ) {
- grd_mypatlist.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
- fGetPatList("setting"); // 환자리스트 조회
- model.setValue("/root/main/saveinfo/message", " " + model.getValue("/root/main/settinginfo/settingtime") + "\n ["+ getUserName() + "]간호사의 \n 내환자가 Setting 되었습니다.");
- grd_mypatlist.attribute("height") = "405";
- tar_settinginfo.visible = true;
- tar_settinginfo.refresh();
- }
- } else {
- messageBox("저장할 내역이 ", "I004")
- }
- }
- //병동선택변경시
- function fWardcdChanged(){
- model.removenode("/root/send");
- model.makeValue("/root/send/wardcd", model.getValue("root/main/cond/wardcd"));
- submit("TRMND03302");
- grd_mypatlist.rebuildStyle(0, 0, grd_mypatlist.rows-1, grd_mypatlist.cols-1);
- setRowStyle("grd_mypatlist", "0", "true", "mysetting", "equal");
- }
|