// ================================================================================================= // »çÈÄ½É»ç °øÅë Java Script (±è»óÁø) // @ver : 2008.06.03 // @by : ±è»óÁø // @desc : »çÈÄ½É»ç °øÅë°ü·Ã ÇÔ¼ö (¸í¸í±ÔÄ¢ : ÇÔ¼ö¸í ¾Õ¿¡ "pidf"¸¦ ºÙÀδÙ.) // ================================================================================================= /* * @--------------------------------------------------- * @ver : 2008.08.23 * @by : ±è»óÁø * @type : function * @access : public * @desc : û±¸Â÷¼ö : ÀÌÀü¿ù ´ÙÀ½¿ù °è»ê * @param : * @return : * @--------------------------------------------------- */ function pidfCalMonth(idc, av_ym){ var lv_date = av_ym.toDate("YYYYMM" + "01"); lv_date = lv_date.getAddDate(idc, "M") return lv_date.getDateFormat("YYYYMM"); } /* * @--------------------------------------------------- * @ver : 2008.08.23 * @by : ±è»óÁø * @type : function * @access : public * @desc : û±¸Â÷¼öÁ¶È¸ * @param : * @return : * @--------------------------------------------------- */ function pidfGetClamdg() { model.removeNodeset("/root/init/clamdg"); model.makeNode("/root/init/clamdg"); submit("TRPID20407"); cmb_clamdg.select(0); model.refreshpart("/root/init/clamdg"); //model.setValue("/root/send/clamdg", 0); } /** * @--------------------------------------------------- * @ver : 2008.06.08 * @by : ±è»óÁø * @type : function * @access : public * @desc : ¼±ÅÃó¹æÁ¶È¸ * @param : * @return : * @--------------------------------------------------- */ function pidfGetSpcOrdList() { var row = grd_clodhist.findRow("¼±", 1, grd_clodhist.colRef("payflag"), false, false); if (row < 1) { messageBox("Á¶È¸µÈ ¼±ÅÃó¹æÀÌ", "I004"); ///Á¶È¸µÈ ¼±ÅÃó¹æÀÌ ¾ø½À´Ï´Ù. //chk_choiordtotamt.dispatch("xforms-deselect"); chk_choiordtotamt.value = ""; return; } var insukind = model.getValue("/root/main/Item1/clbs/insukindcd"); insukind = insukind.substr(1,1); for (var i = grd_clodhist.fixedRows; i < grd_clodhist.rows; i++) { grd_clodhist.rowHidden(i) = false; var payflag = model.getValue("/root/main/list2/clod["+ i +"]/payflag"); if (insukind == "3" || insukind == "4") { if (payflag != "8") { grd_clodhist.rowHidden(i) = true; } } else { if (payflag != "9") { grd_clodhist.rowHidden(i) = true; } } } } /* @--------------------------------------------------- * @ver : 2008.06.08 * @by : ±è»óÁø * @type : function * @access : public * @desc : ¼±ÅÃó¹æÇØÁ¦ * @param : * @return : * @--------------------------------------------------- */ function pidfSetSpcOrdListBack() { for (var i = grd_clodhist.fixedRows; i < grd_clodhist.rows; i++) { if (grd_clodhist.rowHidden(i)) { grd_clodhist.rowHidden(i) = false; } } } // padding function fPaddingData(sData,sflag,sPad,iLeng){ if ( sData == "" || sflag == "" || sPad == "" || iLeng == "" ) { return; } if ( sData.length >= iLeng ) { return; } if ( iLeng <= 0 ) { return; } if ( sflag == "L" ) { sData = sData.getLeftPad(iLeng, sPad); } else if ( sflag == "R" ) { sData = sData.getRightPad(iLeng, sPad); } else { // } return sData; } //----------------------------------- //¸í¼¼¼­ ÇÕö //----------------------------------- function pidfDocuMerge() { var irow = grd_clbsmast.row; var clamkey = model.getValue("/root/main/list1/clbs[" + irow + "]/clamkey"); if (clamkey) { model.setValue("/root/hidden/smpid20600/cond/makeflag", "1"); // 1:¸í¼¼¼­ ÇÕö model.setValue("/root/hidden/smpid20600/cond/copyflag", ""); // ¸í¼¼¼­º¹»çÀÎ °æ¿ì¸¸ ÇØ´ç model.setValue("/root/hidden/smpid20600/cond/ioflag", model.getValue("/root/send/item1/ioflag")); model.setValue("/root/hidden/smpid20600/cond/clamym", model.getValue("/root/main/list1/clbs[" + irow + "]/clamym")); model.setValue("/root/hidden/smpid20600/cond/clamdg", model.getValue("/root/main/list1/clbs[" + irow + "]/clamdg")); model.setValue("/root/hidden/smpid20600/cond/pid", model.getValue("/root/main/list1/clbs[" + irow + "]/pid")); model.setValue("/root/hidden/smpid20600/cond/pidsn", model.getValue("/root/main/list1/clbs[" + irow + "]/pidsn")); modal("SMPID22300", "1", "50", "100", "SMPID22300", "/root/hidden/smpid20600/cond", "/root/init/item1", "", ""); // SMPID22300_¸í¼¼¼­ÇÕö.xrw } } //----------------------------------- //¸í¼¼¼­ º¹»ç //----------------------------------- function pidfDocuCopy() { var irow = grd_clbsmast.row; var clamkey = model.getValue("/root/main/list1/clbs[" + irow + "]/clamkey"); if (clamkey) { model.setValue("/root/hidden/smpid20600/cond/makeflag", "2"); // 2:¸í¼¼¼­ º¹»ç model.setValue("/root/hidden/smpid20600/cond/copyflag", "1"); // ¸í¼¼¼­º¹»çÀÎ °æ¿ì¸¸ ÇØ´ç(1.±âº»¸¸»ý¼º) model.setValue("/root/hidden/smpid20600/cond/ioflag", model.getValue("/root/send/item1/ioflag")); model.setValue("/root/hidden/smpid20600/cond/clamym", model.getValue("/root/main/list1/clbs[" + irow + "]/clamym")); model.setValue("/root/hidden/smpid20600/cond/clamdg", model.getValue("/root/main/list1/clbs[" + irow + "]/clamdg")); model.setValue("/root/hidden/smpid20600/cond/pid", model.getValue("/root/main/list1/clbs[" + irow + "]/pid")); model.setValue("/root/hidden/smpid20600/cond/pidsn", model.getValue("/root/main/list1/clbs[" + irow + "]/pidsn")); model.setValue("/root/hidden/smpid20600/cond/t_clamym", model.getValue("/root/main/list1/clbs[" + irow + "]/clamym")); //»ý¼ºÃ»±¸³â¿ù model.setValue("/root/hidden/smpid20600/cond/t_clamdg", model.getValue("/root/main/list1/clbs[" + irow + "]/clamdg")); //»ý¼ºÃ»±¸Â÷¼ö model.setValue("/root/hidden/smpid20600/cond/t_clamflagcd", "0"); //»ýûû±¸±¸ºÐ modal("SMPID22400", "1", "50", "100", "SMPID22400", "/root/hidden/smpid20600/cond", "/root/init/item1", "", ""); // SMPID22400_¸í¼¼¼­º¹»ç.xrw } } //----------------------------------- //¸í¼¼¼­ À̵¿ //----------------------------------- function pidfDocuMove() { var irow = grd_clbsmast.row; var clamkey = model.getValue("/root/main/list1/clbs[" + irow + "]/clamkey"); if (clamkey) { model.setValue("/root/hidden/smpid20600/cond/makeflag", "3"); // 3:¸í¼¼¼­ À̵¿ model.setValue("/root/hidden/smpid20600/cond/copyflag", ""); // ¸í¼¼¼­º¹»çÀÎ °æ¿ì¸¸ ÇØ´ç model.setValue("/root/hidden/smpid20600/cond/ioflag", model.getValue("/root/send/item1/ioflag")); model.setValue("/root/hidden/smpid20600/cond/clamym", model.getValue("/root/main/list1/clbs[" + irow + "]/clamym")); model.setValue("/root/hidden/smpid20600/cond/clamdg", model.getValue("/root/main/list1/clbs[" + irow + "]/clamdg")); model.setValue("/root/hidden/smpid20600/cond/pid", model.getValue("/root/main/list1/clbs[" + irow + "]/pid")); model.setValue("/root/hidden/smpid20600/cond/pidsn", model.getValue("/root/main/list1/clbs[" + irow + "]/pidsn")); model.setValue("/root/hidden/smpid20600/cond/t_clamym", model.getValue("/root/main/list1/clbs[" + irow + "]/clamym")); //»ý¼ºÃ»±¸³â¿ù model.setValue("/root/hidden/smpid20600/cond/t_clamdg", model.getValue("/root/main/list1/clbs[" + irow + "]/clamdg")); //»ý¼ºÃ»±¸Â÷¼ö model.setValue("/root/hidden/smpid20600/cond/t_clamflagcd", "0"); //»ýûû±¸±¸ºÐ modal("SMPID22500", "1", "50", "100", "SMPID22500", "/root/hidden/smpid20600/cond", "/root/init/item1", "", ""); // SMPID22500_¸í¼¼¼­À̵¿.xrw } } //----------------------------------- //¸í¼¼¼­ ó¹æÀ̵¿ //----------------------------------- function pidfDocuOrderMove() { var irow = grd_clbsmast.row; var clamkey = model.getValue("/root/main/list1/clbs[" + irow + "]/clamkey"); if (clamkey) { model.setValue("/root/hidden/smpid20600/cond/makeflag", "6"); // 6:¸í¼¼¼­ ó¹æÀ̵¿ model.setValue("/root/hidden/smpid20600/cond/copyflag", ""); // ¸í¼¼¼­º¹»çÀÎ °æ¿ì¸¸ ÇØ´ç model.setValue("/root/hidden/smpid20600/cond/ioflag", model.getValue("/root/send/item1/ioflag")); model.setValue("/root/hidden/smpid20600/cond/clamym", model.getValue("/root/main/list1/clbs[" + irow + "]/clamym")); model.setValue("/root/hidden/smpid20600/cond/clamdg", model.getValue("/root/main/list1/clbs[" + irow + "]/clamdg")); model.setValue("/root/hidden/smpid20600/cond/pid", model.getValue("/root/main/list1/clbs[" + irow + "]/pid")); model.setValue("/root/hidden/smpid20600/cond/pidsn", model.getValue("/root/main/list1/clbs[" + irow + "]/pidsn")); modal("SMPID23200", "1", "50", "100", "SMPID23200", "/root/hidden/smpid20600/cond", "/root/init/item1", "", ""); // SMPID23200_¸í¼¼¼­Ã³¹æÀ̵¿.xrw } } //----------------------------------- //Ãß°¡Ã»±¸ //----------------------------------- function pidfDocuAddClam() { var irow = grd_clbsmast.row; var clamkey = model.getValue("/root/main/list1/clbs[" + irow + "]/clamkey"); if (clamkey) { model.setValue("/root/hidden/smpid20600/cond/makeflag", "4"); // 4:Ãß°¡Ã»±¸»ý¼º model.setValue("/root/hidden/smpid20600/cond/copyflag", ""); // ¸í¼¼¼­º¹»çÀÎ °æ¿ì¸¸ ÇØ´ç model.setValue("/root/hidden/smpid20600/cond/ioflag", model.getValue("/root/send/item1/ioflag")); model.setValue("/root/hidden/smpid20600/cond/clamym", model.getValue("/root/main/list1/clbs[" + irow + "]/clamym")); model.setValue("/root/hidden/smpid20600/cond/clamdg", model.getValue("/root/main/list1/clbs[" + irow + "]/clamdg")); model.setValue("/root/hidden/smpid20600/cond/pid", model.getValue("/root/main/list1/clbs[" + irow + "]/pid")); model.setValue("/root/hidden/smpid20600/cond/pidsn", model.getValue("/root/main/list1/clbs[" + irow + "]/pidsn")); model.setValue("/root/hidden/smpid20600/cond/t_clamym", model.getValue("/root/main/list1/clbs[" + irow + "]/clamym")); //»ý¼ºÃ»±¸³â¿ù model.setValue("/root/hidden/smpid20600/cond/t_clamdg", model.getValue("/root/main/list1/clbs[" + irow + "]/clamdg")); //»ý¼ºÃ»±¸Â÷¼ö model.setValue("/root/hidden/smpid20600/cond/t_clamflagcd", "2"); //»ýûû±¸±¸ºÐ modal("SMPID22600", "1", "50", "100", "SMPID22600", "/root/hidden/smpid20600/cond", "/root/init/item1", "", ""); // SMPID22600_¸í¼¼¼­Ãß°¡Ã»±¸»ý¼º.xrw } } //----------------------------------- //ÀڰݼöÁ¤ //----------------------------------- function pidfDocuChange() { var irow = grd_clbsmast.row; var clamkey = model.getValue("/root/main/list1/clbs[" + irow + "]/clamkey"); var clamflagcd = model.getValue("root/main/list1/clbs[" + irow + "]/clamflagcd"); if (clamflagcd == "1") { messageBox("º¸¿Ïû±¸ÀÇ °æ¿ì¿¡´Â ÀÚ°Ý º¯°æÀ» ¹æÁöÇϱâ À§ÇØ ¸í¼¼¼­ ÀڰݼöÁ¤À»", "E001"); } else { if (clamkey) { model.setValue("/root/hidden/smpid20600/cond/makeflag", "5"); // 5:ÀڰݼöÁ¤ model.setValue("/root/hidden/smpid20600/cond/copyflag", ""); // ¸í¼¼¼­º¹»çÀÎ °æ¿ì¸¸ ÇØ´ç model.setValue("/root/hidden/smpid20600/cond/ioflag", model.getValue("/root/send/item1/ioflag")); model.setValue("/root/hidden/smpid20600/cond/clamym", model.getValue("/root/main/list1/clbs[" + irow + "]/clamym")); model.setValue("/root/hidden/smpid20600/cond/clamdg", model.getValue("/root/main/list1/clbs[" + irow + "]/clamdg")); model.setValue("/root/hidden/smpid20600/cond/pid", model.getValue("/root/main/list1/clbs[" + irow + "]/pid")); model.setValue("/root/hidden/smpid20600/cond/pidsn", model.getValue("/root/main/list1/clbs[" + irow + "]/pidsn")); modal("SMPID22700", "1", "50", "100", "SMPID22700", "/root/hidden/smpid20600/cond", "/root/init/item1", "", ""); // SMPID22700_¸í¼¼¼­ÀڰݼöÁ¤.xrw } } } //----------------------------------- //°ø¿©ÀÚ¸í¼¼¼­»ý¼º //----------------------------------- function pidfDocuDonor() { var irow = grd_clbsmast.row; var clamkey = model.getValue("/root/main/list1/clbs[" + irow + "]/clamkey"); if (clamkey) { model.setValue("/root/hidden/smpid22200/cond/ioflag", model.getValue("/root/send/item1/ioflag")); model.setValue("/root/hidden/smpid22200/cond/clamym", model.getValue("/root/main/list1/clbs[" + irow + "]/clamym")); model.setValue("/root/hidden/smpid22200/cond/clamdg", model.getValue("/root/main/list1/clbs[" + irow + "]/clamdg")); model.setValue("/root/hidden/smpid22200/cond/pid", model.getValue("/root/main/list1/clbs[" + irow + "]/pid")); model.setValue("/root/hidden/smpid22200/cond/pidsn", model.getValue("/root/main/list1/clbs[" + irow + "]/pidsn")); modal("SMPID22200", "1", "250", "220", "SMPID22200", "/root/hidden/smpid22200/cond", "/root/init/item1", "", ""); // SMPID22200_°ø¿©ÀÚ¸í¼¼¼­»ý¼º.xrw } } //----------------------------------- //¸í¼¼¼­Ã³¹æ À̵¿/º¹»ç //----------------------------------- function pidfDocuCopyMove() { var irow = grd_clbsmast.row; var clamkey = model.getValue("/root/main/list1/clbs[" + irow + "]/clamkey"); if (clamkey) { model.setValue("/root/hidden/smpid23200/cond/ioflag", model.getValue("/root/send/item1/ioflag")); model.setValue("/root/hidden/smpid23200/cond/clamym", model.getValue("/root/main/list1/clbs[" + irow + "]/clamym")); model.setValue("/root/hidden/smpid23200/cond/clamdg", model.getValue("/root/main/list1/clbs[" + irow + "]/clamdg")); model.setValue("/root/hidden/smpid23200/cond/pid", model.getValue("/root/main/list1/clbs[" + irow + "]/pid")); model.setValue("/root/hidden/smpid23200/cond/pidsn", model.getValue("/root/main/list1/clbs[" + irow + "]/pidsn")); model.setValue("/root/hidden/smpid23200/cond/patnm", model.getValue("/root/main/list1/clbs[" + irow + "]/patnm")); model.setValue("/root/hidden/smpid23200/cond/insukind", model.getValue("/root/main/list1/clbs[" + irow + "]/insukindcd")); model.setValue("/root/hidden/smpid23200/cond/suppkind", model.getValue("/root/main/list1/clbs[" + irow + "]/suppkindcd")); model.setValue("/root/hidden/smpid23200/cond/orddeptcd", model.getValue("/root/main/list1/clbs[" + irow + "]/orddeptcd")); modal("SMPID23200", "1", "50", "100", "SMPID23200", "/root/hidden/smpid23200/cond", "/root/init/item1", "", ""); // SMPID23200_¸í¼¼¼­Ã³¹æº¹»ç.xrw } } //----------------------------------- //½É»çÀÚº¯°æ //----------------------------------- function pidfJudgridChange() { var irow = grd_clbsmast.row; var clamkey = model.getValue("/root/main/list1/clbs[" + irow + "]/clamkey"); if (clamkey) { model.setValue("/root/hidden/smpid23000/cond/ioflag", model.getValue("/root/send/item1/ioflag")); model.setValue("/root/hidden/smpid23000/cond/clamym", model.getValue("/root/main/list1/clbs[" + irow + "]/clamym")); model.setValue("/root/hidden/smpid23000/cond/clamdg", model.getValue("/root/main/list1/clbs[" + irow + "]/clamdg")); model.setValue("/root/hidden/smpid23000/cond/pid", model.getValue("/root/main/list1/clbs[" + irow + "]/pid")); model.setValue("/root/hidden/smpid23000/cond/pidsn", model.getValue("/root/main/list1/clbs[" + irow + "]/pidsn")); modal("SMPID23000", "1", "50", "100", "SMPID23000", "/root/hidden/smpid23000/cond", "/root/init/item1", "", ""); // SMPID23000_½É»çÀÚº¯°æ.xrw } } //------------------------------------------------------------------- // 1. Àçû±¸ »èÁ¦ÀÏ °æ¿ì : (1). ¹Ý¼ÛºÎÁ¦±â»çÀ¯ üũ // (2). ¹Ý¼ÛºÎÁ¦±â»çÀ¯ UPDATE //------------------------------------------------------------------- function pidfChkAbdResncd() { var abdresncd = model.getValue("/root/main/item1/clbs/abdresncd"); if (abdresncd == "") { messageBox("¹Ý¼ÛºÎÁ¦±â»çÀ¯´Â","I003"); //I003=ÇʼöÀÔ·ÂÀÔ´Ï´Ù. model.setFocus("cmb_abdresncd"); return false; } else { return true; } } //------------------------------------------------------------------- // 2. ¸í¼¼¼­»èÁ¦ÀÏ °æ¿ì : (1). ¸í¼¼¼­»èÁ¦»çÀ¯ üũ // (2). ±âŸÀϰæ¿ì ½É»çÀڸ޸𿡠±âŸ»çÀ¯ Ãß°¡ //------------------------------------------------------------------- function pidfChkDocuDelResncd() { var docudelresncd = model.getValue("/root/main/item1/clbs/docudelresncd"); if (docudelresncd == "") { messageBox("¸í¼¼¼­»èÁ¦»çÀ¯´Â","I003"); //I003=ÇʼöÀÔ·ÂÀÔ´Ï´Ù. model.setFocus("cmb_docudelresncd"); return false; } else { var docudelresncd = model.getValue("/root/main/item1/clbs/docudelresncd"); if (docudelresncd == "Z") { // ¸í¼¼¼­»èÁ¦»çÀ¯°¡ "±âŸ"Àΰæ¿ì ½É»çÀڸ޸𿡠±âŸ»çÀ¯ ³Ö´Â´Ù. var judgmemo = model.getValue("/root/main/item1/memo/judgmemo"); judgmemo = "[¸í¼¼¼­ »èÁ¦: ±âŸ]" || " " || judgmemo model.setValue("/root/main/item1/memo/judgmemo", judgmemo); } return true; } } //----------------------------------- // »óº´º° û±¸È¯ÀÚÁ¶È¸ //----------------------------------- function pidfOpenSMPIS00400(ioflag) { if (ioflag == "I") { var irow = grd_clbsmast.row; } else { var srchmode = model.getValue("/root/hidden/clbs/srchmode"); if (srchmode == "specclbs") { // ¼±º°½É»ç ¸ðµåÀÎ °æ¿ì var irow = grd_specclbs.row; } else { var irow = grd_clbsmast.row; } } var clamkey = model.getValue("/root/main/list1/clbs[" + irow + "]/clamkey"); if (clamkey) { model.setValue("/root/hidden/smpis00400/cond/pid", model.getValue("/root/main/list1/clbs[" + irow + "]/pid")); model.setValue("/root/hidden/smpis00400/cond/clamymfrom", model.getValue("/root/main/list1/clbs[" + irow + "]/clamym")); model.setValue("/root/hidden/smpis00400/cond/clamymto", model.getValue("/root/main/list1/clbs[" + irow + "]/clamym")); model.setValue("/root/hidden/smpis00400/cond/ioflag", model.getValue("/root/send/item1/ioflag")); model.setValue("/root/hidden/smpis00400/cond/insukind", model.getValue("/root/main/list1/clbs[" + irow + "]/insukindcd")); var i = 1; var nodeList = instance1.selectNodes("/root/init/orddeptcd/orddeptcdlist"); var orddeptcd = model.getValue("/root/main/list1/clbs[" + irow + "]/orddeptcd"); for ( i = 1; i < nodeList.length; i++) { if ( orddeptcd == model.getValue("/root/init/orddeptcd/orddeptcdlist[" + i + "]/deptengabbr")) { orddeptcd = model.getValue("/root/init/orddeptcd/orddeptcdlist[" + i + "]/cd"); break; } } model.setValue("/root/hidden/smpis00400/cond/orddeptcd", orddeptcd); model.setValue("/root/hidden/smpis00400/cond/diagcond", "M"); // »óº´Á¶°Ç : M:ÁÖ»óº´, S:ºÎ»óº´ model.setValue("/root/hidden/smpis00400/cond/diagcdfr", ""); // ½ÃÀÛ»óº´ model.setValue("/root/hidden/smpis00400/cond/diagcdto", ""); // Á¾·á»óº´ } modal("SMPIS00400", "1", "10", "10", "SMPIS00400", "/root/hidden/smpis00400/cond", "/root/send/item1", "", ""); // SMPIS00400_»óº´º°Ã»±¸È¯ÀÚÁ¶È¸.xrw } //----------------------------------- // ó¹æº° ȯÀÚÁ¶È¸(°è»ê) //----------------------------------- function pidfOpenSMPIS00500(ioflag, calltype, codetype) { model.resetInstanceNode("/root/hidden/smpis00500/cond"); // calltype : M:»çÈÄ´ë»óÀÚÁ¶È¸ È£Ãâ(ȯÀÚº°°Ë»ö), D:»çÈĸÞÀο¡¼­ È£Ãâ(Äڵ庰°Ë»ö) if (calltype == "M") { if (ioflag == "I") { var irow = grd_clbsmast.row; } else { var srchmode = model.getValue("/root/hidden/clbs/srchmode"); if (srchmode == "specclbs") { // ¼±º°½É»ç ¸ðµåÀÎ °æ¿ì var irow = grd_specclbs.row; } else { var irow = grd_clbsmast.row; } } var pid = model.getValue("/root/main/list1/clbs[" + irow + "]/pid"); if (pid) { model.makeValue("/root/hidden/smpis00500/cond/patunitsrch", model.getValue("/root/main/list1/clbs[" + irow + "]/pid")); model.makeValue("/root/hidden/smpis00500/cond/fromdd", model.getValue("/root/main/list1/clbs[" + irow + "]/ordfromdd")); model.makeValue("/root/hidden/smpis00500/cond/todd", model.getValue("/root/main/list1/clbs[" + irow + "]/ordtodd")); if (ioflag == "O") { model.makeValue("/root/hidden/smpis00500/cond/ioflag", "A"); model.makeValue("/root/hidden/smpis00500/cond/orddrid", ""); } else { model.makeValue("/root/hidden/smpis00500/cond/ioflag", model.getValue("/root/send/item1/ioflag")); model.makeValue("/root/hidden/smpis00500/cond/orddrid", model.getValue("/root/main/list1/clbs[" + irow + "]/orddrid")); } model.makeValue("/root/hidden/smpis00500/cond/orddeptcd", model.getValue("/root/main/list1/clbs[" + irow + "]/orddeptcd")); model.makeValue("/root/hidden/smpis00500/cond/codecond", "calc"); // calc:Äڵ庰, cancer:Ç×¾ÏÁ¦, kind:ºÐ·ùº° model.makeValue("/root/hidden/smpis00500/cond/code", ""); // °Ë»öÇÒ ¼ö°¡ÄÚµå } } else { var irow = grd_clodhist.row; var pid = model.getValue("/root/main/item1/clbs/pid"); if (pid) { model.makeValue("/root/hidden/smpis00500/cond/patunitsrch", model.getValue("/root/main/item1/clbs/pid")); if (ioflag == "O") { model.makeValue("/root/hidden/smpis00500/cond/fromdd", model.getValue("/root/main/item1/clbs/indd")); model.makeValue("/root/hidden/smpis00500/cond/todd", model.getValue("/root/main/item1/clbs/dschdd")); model.makeValue("/root/hidden/smpis00500/cond/orddrid", ""); if (model.getValue("/root/main/item1/clbs/stsioflag") == "-") model.makeValue("/root/hidden/smpis00500/cond/ioflag", "O"); else model.makeValue("/root/hidden/smpis00500/cond/ioflag", "I"); } else { model.makeValue("/root/hidden/smpis00500/cond/fromdd", model.getValue("/root/main/item1/clbs/ordfromdd")); model.makeValue("/root/hidden/smpis00500/cond/todd", model.getValue("/root/main/item1/clbs/ordtodd")); model.makeValue("/root/hidden/smpis00500/cond/orddrid", model.getValue("/root/main/item1/clbs/orddrid")); model.makeValue("/root/hidden/smpis00500/cond/ioflag", model.getValue("/root/main/item1/clbs/ioflag")); } //model.makeValue("/root/hidden/smpis00500/cond/orddeptcd", model.getValue("/root/main/list1/clbs[" + irow + "]/orddeptcd")); //model.makeValue("/root/hidden/smpis00500/cond/orddeptcd", " "); // 20100322 ±è¿ë¹Î ¼öÁ¤ model.makeValue("/root/hidden/smpis00500/cond/orddeptcd", ""); model.makeValue("/root/hidden/smpis00500/cond/orddrid", ""); model.makeValue("/root/hidden/smpis00500/cond/codecond", "calc"); // calc:Äڵ庰, cancer:Ç×¾ÏÁ¦, kind:ºÐ·ùº° if (codetype == "SnglCD") model.makeValue("/root/hidden/smpis00500/cond/code", model.getValue("/root/main/list2/clod["+ irow +"]/snglcalcscorcd")); // °Ë»öÇÒ ¼ö°¡ÄÚµå else model.makeValue("/root/hidden/smpis00500/cond/edicd", model.getValue("/root/main/list2/clod["+ irow +"]/edicd")); // °Ë»öÇÒ EDIÄÚµå } } modal("SMPIS00500", "1", "10", "10", "SMPIS00500", "/root/hidden/smpis00500/cond", "/root/send", "", ""); // SMPIS00500_°è»ê󹿽ÃÇàÁ¶È¸.xrw } //----------------------------------- // ó¹æº° ȯÀÚÁ¶È¸(û±¸/»è°¨) //----------------------------------- function pidfOpenSMPIS00600(ioflag, calltype) { // calltype : M:»çÈÄ´ë»óÀÚÁ¶È¸ È£Ãâ(ȯÀÚº°°Ë»ö), D:»çÈĸÞÀο¡¼­ È£Ãâ(Äڵ庰°Ë»ö) if (calltype == "M") { if (ioflag == "I") { var irow = grd_clbsmast.row; } else { var srchmode = model.getValue("/root/hidden/clbs/srchmode"); if (srchmode == "specclbs") { // ¼±º°½É»ç ¸ðµåÀÎ °æ¿ì var irow = grd_specclbs.row; } else { var irow = grd_clbsmast.row; } } var pid = model.getValue("/root/main/list1/clbs[" + irow + "]/pid"); if (pid) { model.makeValue("/root/hidden/smpis00600/cond/patunitsrch", model.getValue("/root/main/list1/clbs[" + irow + "]/pid")); model.makeValue("/root/hidden/smpis00600/cond/clamym", ""); model.makeValue("/root/hidden/smpis00600/cond/clamymfrom", model.getValue("/root/main/list1/clbs[" + irow + "]/clamym")); //model.makeValue("/root/hidden/smpis00600/cond/clamdgfrom", model.getValue("/root/main/list1/clbs[" + irow + "]/clamdg")); model.makeValue("/root/hidden/smpis00600/cond/clamymto", model.getValue("/root/main/list1/clbs[" + irow + "]/clamym")); //model.makeValue("/root/hidden/smpis00600/cond/clamdgto", model.getValue("/root/main/list1/clbs[" + irow + "]/clamdg")); model.makeValue("/root/hidden/smpis00600/cond/clamflag", model.getValue("/root/main/list1/clbs[" + irow + "]/clamflagcd")); model.makeValue("/root/hidden/smpis00600/cond/ioflag", model.getValue("/root/send/item1/ioflag")); model.makeValue("/root/hidden/smpis00600/cond/insukind", model.getValue("/root/main/list1/clbs[" + irow + "]/insukindcd")); //model.makeValue("/root/hidden/smpis00600/cond/orddeptcd", model.getValue("/root/main/list1/clbs[" + irow + "]/orddeptcd")); //model.makeValue("/root/hidden/smpis00600/cond/orddrid", model.getValue("/root/main/list1/clbs[" + irow + "]/orddrid")); model.makeValue("/root/hidden/smpis00600/cond/cutonly", "false"); // »è°¨Ã³¹æ¸¸Á¶È¸:true, û±¸Ã³¹æÁ¶È¸:false model.makeValue("/root/hidden/smpis00600/cond/code", ""); // ¼ö°¡ÄÚµå // 20100322 ±è¿ë¹Î ±âº»°ª Ãß°¡ model.makeValue("/root/hidden/smpis00600/cond/codecond", "calc"); // calc:Äڵ庰, cancer:Ç×¾ÏÁ¦, kind:ºÐ·ùº° model.makeValue("/root/hidden/smpis00600/cond/trustinstcd", "N"); // model.makeValue("/root/hidden/smpis00600/cond/clamdgfrom", ""); model.makeValue("/root/hidden/smpis00600/cond/clamdgto", ""); model.makeValue("/root/hidden/smpis00600/cond/orddeptcd", ""); model.makeValue("/root/hidden/smpis00600/cond/orddrid", ""); } else { model.makeValue("/root/hidden/smpis00600/cond/patunitsrch", ""); model.makeValue("/root/hidden/smpis00600/cond/clamym", ""); model.makeValue("/root/hidden/smpis00600/cond/clamymfrom", ""); model.makeValue("/root/hidden/smpis00600/cond/clamymto", ""); model.makeValue("/root/hidden/smpis00600/cond/clamflag", ""); model.makeValue("/root/hidden/smpis00600/cond/ioflag", model.getValue("/root/send/item1/ioflag")); model.makeValue("/root/hidden/smpis00600/cond/insukind", ""); model.makeValue("/root/hidden/smpis00600/cond/cutonly", "false"); // »è°¨Ã³¹æ¸¸Á¶È¸:true, û±¸Ã³¹æÁ¶È¸:false model.makeValue("/root/hidden/smpis00600/cond/code", ""); // ¼ö°¡ÄÚµå // 20100322 ±è¿ë¹Î ±âº»°ª Ãß°¡ model.makeValue("/root/hidden/smpis00600/cond/codecond", "calc"); // calc:Äڵ庰, cancer:Ç×¾ÏÁ¦, kind:ºÐ·ùº° model.makeValue("/root/hidden/smpis00600/cond/trustinstcd", "N"); // model.makeValue("/root/hidden/smpis00600/cond/clamdgfrom", ""); model.makeValue("/root/hidden/smpis00600/cond/clamdgto", ""); model.makeValue("/root/hidden/smpis00600/cond/orddeptcd", ""); model.makeValue("/root/hidden/smpis00600/cond/orddrid", ""); } } else { var irow = grd_clodhist.row; var pid = model.getValue("/root/main/item1/clbs/pid"); if (pid) { model.makeValue("/root/hidden/smpis00600/cond/patunitsrch", model.getValue("/root/main/item1/clbs/pid")); model.makeValue("/root/hidden/smpis00600/cond/clamym", ""); model.makeValue("/root/hidden/smpis00600/cond/clamymfrom", model.getValue("/root/main/item1/clbs/clamym")); //model.makeValue("/root/hidden/smpis00600/cond/clamdgfrom", model.getValue("/root/main/item1/clbs/clamdg")); model.makeValue("/root/hidden/smpis00600/cond/clamymto", model.getValue("/root/main/item1/clbs/clamym")); //model.makeValue("/root/hidden/smpis00600/cond/clamdgto", model.getValue("/root/main/item1/clbs/clamdg")); model.makeValue("/root/hidden/smpis00600/cond/clamflag", model.getValue("/root/main/item1/clbs/clamflagcd")); model.makeValue("/root/hidden/smpis00600/cond/ioflag", model.getValue("/root/main/item1/clbs/ioflag")); model.makeValue("/root/hidden/smpis00600/cond/insukind", model.getValue("/root/main/item1/clbs/insukindcd")); //model.makeValue("/root/hidden/smpis00600/cond/orddeptcd", model.getValue("/root/main/item1/clbs/orddeptcd")); //model.makeValue("/root/hidden/smpis00600/cond/orddrid", model.getValue("/root/main/item1/clbs/orddrid")); model.makeValue("/root/hidden/smpis00600/cond/cutonly", "false"); // »è°¨Ã³¹æ¸¸Á¶È¸:true, û±¸Ã³¹æÁ¶È¸:false model.makeValue("/root/hidden/smpis00600/cond/code", model.getValue("/root/main/list2/clod["+ irow +"]/snglcalcscorcd")); // ¼ö°¡ÄÚµå // 20100322 ±è¿ë¹Î ±âº»°ª Ãß°¡ model.makeValue("/root/hidden/smpis00600/cond/codecond", "calc"); // calc:Äڵ庰, cancer:Ç×¾ÏÁ¦, kind:ºÐ·ùº° model.makeValue("/root/hidden/smpis00600/cond/trustinstcd", "N"); // model.makeValue("/root/hidden/smpis00600/cond/clamdgfrom", ""); model.makeValue("/root/hidden/smpis00600/cond/clamdgto", ""); model.makeValue("/root/hidden/smpis00600/cond/orddeptcd", ""); model.makeValue("/root/hidden/smpis00600/cond/orddrid", ""); var curFrom = getCurrentDate().toDate().getAddDate(-6,"M").getDateFormat("YYYYMM"); var curTo = getCurrentDate().toDate().getDateFormat("YYYYMM"); model.makeValue("/root/hidden/smpis00600/cond/clamymfrom", curFrom); model.makeValue("/root/hidden/smpis00600/cond/clamymto", curTo); } } modal("SMPIS00600", "1", "10", "10", "SMPIS00600", "/root/hidden/smpis00600/cond", "/root/send", "", ""); // SMPIS00600_û±¸»è°¨Á¶È¸.xrw } //------------------------------------ // ±Þ¿©±¸ºÐº° »çÈÄó¹æÁ¶È¸ //------------------------------------ function pidfGetOrderWithPayflag() { var pid = model.getValue("/root/send/item1/clbs/pid"); if (pid) { var payflag = model.getValue("/root/hidden/list2/clodsrch/selectedRdoPay"); model.makeValue("/root/send/item1/clbs/payflag", payflag); if (submit("TRPID20310")) { grd_selectclod.attribute("left") = "0"; grd_selectclod.attribute("top") = "286"; grd_selectclod.visible = true; grd_clodhist.visible = false; } } } //------------------------------------------------------------------- // »ý¼º»èÁ¦(ÀÔ¿ø,¿Ü·¡»çÈÄ½É»ç ´ë»óÀÚÁ¶È¸¿¡¼­ "»ý¼º»èÁ¦"¹öư ´­·¶À» ¶§ //------------------------------------------------------------------- function pidfDelClamData(ioflag, deptcd) { /* if (grd_clbsmast.visible == true) { var iSel_Row = grd_clbsmast.selectedrow(0); var clamkey = model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/clamkey"); var pid = model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/pid"); var pidsn = model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/pidsn"); var patnm = model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/patnm"); var clamendyn = model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/clamendyn"); var lockyn = model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/lockyn"); if (clamkey != "" && clamkey != '-') { //if (clamendyn == "A" ) { if (lockyn != "Y" ) { var ans = messageBox("[ ȯÀÚ¸í:" + patnm + ", µî·Ï¹øÈ£:" + pid + ", ¼ø¹ø:" + pidsn + " ] »ý¼º»èÁ¦", "S001"); ///ÇϽ÷Á¸é ¿¹(Yes)\n¾Æ´Ï¸é ¾Æ´Ï¿À(No) if (ans == 6) { // 6: yes, 7:no, 2:cancel model.setValue("/root/send/item4/clbs/clamym", model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/clamym")); model.setValue("/root/send/item4/clbs/clamdg", model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/clamdg")); model.setValue("/root/send/item4/clbs/pid", model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/pid")); model.setValue("/root/send/item4/clbs/pidsn", model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/pidsn")); model.setValue("/root/send/item4/clbs/clamkey", model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/clamkey")); model.setValue("/root/send/item4/clbs/ioflag", "I"); model.setValue("/root/send/item4/clbs/instcd", getUserInfo("posinstcd")); if (submit("TXPID20303")) { model.removeNode("/root/main/list1/clbs["+iSel_Row+"]"); grd_clbsmast.refresh(); grd_clbsmast.row = iSel_Row; } } } else { messageBox("Àá±Ý¼³Á¤»óÅÂÀÔ´Ï´Ù. »èÁ¦", "E001"); ///ÇÒ ¼ö ¾ø½À´Ï´Ù. } } } else { messageBox("¼±º°½É»ç¸ðµå¿¡¼­´Â »ý¼º»èÁ¦", "E001"); ///¼±º°½É»ç¸ðµå¿¡¼­´Â »ý¼º»èÁ¦ ÇÒ ¼ö ¾ø½À´Ï´Ù. } */ // û±¸»ý¼º »èÁ¦·ÎÁ÷À¸·Î º¯°æÇÔ. if (grd_clbsmast.visible == true) { var iSel_Row = grd_clbsmast.selectedrow(0); var clamkey = model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/clamkey"); var lockyn = model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/lockyn"); if (clamkey != "" && clamkey != '-') { if (lockyn != "Y" ) { var pid = model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/pid"); var patnm = model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/patnm"); //var ans = messageBox("[ ȯÀÚ¸í:" + patnm + ", µî·Ï¹øÈ£:" + pid + " ] »ý¼º»èÁ¦", "S001"); ///ÇϽ÷Á¸é ¿¹(Yes)\n¾Æ´Ï¸é ¾Æ´Ï¿À(No) //var ans = messageBox("[ ȯÀÚ¸í:" + patnm + ", µî·Ï¹øÈ£:" + pid + " ] ÇØ´ç ȯÀÚÀÇ Àüüº¸ÇèÀ¯Çü, Áø·áºÐ¾ß, Áø·á°ú¸¦ »ý¼º»èÁ¦", "S001"); ///ÇϽ÷Á¸é ¿¹(Yes)\n¾Æ´Ï¸é ¾Æ´Ï¿À(No) //var message = "1. ¼±ÅÃÇÑ Áø·á°ú¸¸ »èÁ¦ÇϽ÷Á¸é : ¿¹(Y)\n\n2. Àü ü Áø·á°ú¸¦ ¸ðµÎ »èÁ¦ÇϽ÷Á¸é : ¾Æ´Ï¿À(N) ¸¦ ´©¸£¼¼¿ä" //var ans = messageBox("[ ȯÀÚ¸í:" + patnm + ", µî·Ï¹øÈ£:" + pid + ", Áø·á°ú:" + deptcd + " ]\n\n" + message, "S006"); ///ÇϽ÷Á¸é ¿¹(Yes)\n¾Æ´Ï¸é ¾Æ´Ï¿À(No) var message = "2. Àü ü Áø·á°ú¸¦ ¸ðµÎ »èÁ¦|3. Ãë ¼Ò"; var ans = messageBox("[ ȯÀÚ¸í:" + patnm + ", µî·Ï¹øÈ£:" + pid + ", Áø·á°ú:" + deptcd + " ]\n\n" + "1. ¼±ÅÃÇÑ Áø·á°ú¸¸ »èÁ¦", "S006", message); ///ÇϽ÷Á¸é ¿¹(Yes)\n¾Æ´Ï¸é ¾Æ´Ï¿À(No) if (ans == 6 || ans == 7) { // 6: yes, 7:no, 2:cancel model.setValue("/root/send/item6/clbs/clamym", model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/clamym")); // 1.û±¸³â¿ù model.setValue("/root/send/item6/clbs/clamdg", model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/clamdg")); // 2.û±¸Â÷¼ö model.setValue("/root/send/item6/clbs/clamfromdd", model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/cretfromdd")); // 3.»ý¼º½ÃÀÛÀÏ model.setValue("/root/send/item6/clbs/clamtodd", model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/crettodd")); // 4.»ý¼ºÁ¾·áÀÏ // Àüüº¸ÇèÀ¯Çü,Áø·áºÐ¾ß,Áø·á°ú »èÁ¦À̸é( 7:no ) if (ans == 7) { // 5.º¸ÇèÀ¯Çü : -.Àüü model.setValue("/root/send/item6/clbs/insutype", "-"); // 6.Áø·áºÐ¾ß : -.Àüü model.setValue("/root/send/item6/clbs/ordfildcd", "-"); // 7.Áø·á°ú model.setValue("/root/send/item6/clbs/orddeptcd", ""); } else { // 5.º¸ÇèÀ¯Çü var insukind = model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/insukindcd"); if (insukind == "11") { model.setValue("/root/send/item6/clbs/insutype", "2"); // º¸Çè } else if (insukind == "21") { model.setValue("/root/send/item6/clbs/insutype", "4"); // ±Þ¿©1Á¾ } else if (insukind == "22") { model.setValue("/root/send/item6/clbs/insutype", "5"); // ±Þ¿©2Á¾ } else if (insukind == "41") { model.setValue("/root/send/item6/clbs/insutype", "6"); // »êÀç } else if (insukind == "31") { model.setValue("/root/send/item6/clbs/insutype", "7"); // ÀÚº¸ } // 6.Áø·áºÐ¾ß model.setValue("/root/send/item6/clbs/ordfildcd", model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/ordfildcd")); // 7.Áø·á°ú model.setValue("/root/send/item6/clbs/orddeptcd", model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/orddeptcd")); } model.setValue("/root/send/item6/clbs/clamflag", '-'); // 8.û±¸±¸ºÐ : -.Åð¿ø+Áß°£, 1.Åð¿øÃ»±¸, 2.Áß°£Ã»±¸ model.setValue("/root/send/item6/clbs/predata", "4"); // 9.ÀÌÀüÀÚ·á : 4.»èÁ¦ model.setValue("/root/send/item6/clbs/ownb100", "N"); // 10.Àü¾×º»ÀÎ : N.»ý¼º¾ÈÇÔ model.setValue("/root/send/item6/clbs/datacretflag", "-"); // 11.»ý¼º¿©ºÎ : -.Àüü model.setValue("/root/send/item6/clbs/pid", model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/pid")); // 12.µî·Ï¹øÈ£ model.setValue("/root/send/item6/clbs/name", model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/name")); // 13.ȯÀÚ¸í model.setValue("/root/send/item6/clbs/chk", "true"); // 14.¼±Åÿ©ºÎ // 15.Áý°è±¸ºÐ if (ioflag == "I") { model.setValue("/root/send/item6/clbs/weekflag", "T"); model.setValue("/root/send/item6/clbs/ioflag", ioflag); } else { model.setValue("/root/send/item6/clbs/weekflag", "S"); // S:Áý°è ¿ù´ÜÀ§ û±¸ model.setValue("/root/send/item6/clbs/ioflag", ioflag); } // 16. »ý¼º»èÁ¦ if (submit("TXPID10102")) { //model.removeNode("/root/main/list1/clbs["+iSel_Row+"]"); //grd_clbsmast.refresh(); //grd_clbsmast.row = iSel_Row; } // 17. »ý¼º»èÁ¦·Î±× ÀÚµ¿È£Ãâ btn_logview.dispatch("DOMActivate"); messageBox("»ý¼º»èÁ¦µÇ¾ú´ÂÁö ¹Ýµå½Ã ·Î±×¸¦ È®ÀÎÇϽñ⠹ٶø´Ï´Ù. »ý¼º»èÁ¦ È£Ãâ", "I001"); //I001=󸮵Ǿú½À´Ï´Ù. } } else { messageBox("Àá±Ý¼³Á¤»óÅÂÀÔ´Ï´Ù. »èÁ¦", "E001"); ///ÇÒ ¼ö ¾ø½À´Ï´Ù. } } } else { messageBox("¼±º°½É»ç¸ðµå¿¡¼­´Â »ý¼º»èÁ¦", "E001"); ///¼±º°½É»ç¸ðµå¿¡¼­´Â »ý¼º»èÁ¦ ÇÒ ¼ö ¾ø½À´Ï´Ù. } } //------------------------------------------------------------------- // 2011.11.08 syjung // ¸í¼¼¼­»èÁ¦(ÀÔ¿ø,¿Ü·¡»çÈÄ½É»ç ´ë»óÀÚÁ¶È¸¿¡¼­ "¸í¼¼¼­»èÁ¦"¹öư ´­·¶À» ¶§ //------------------------------------------------------------------- function pidfDelClbsData(ioflag, deptcd) { if (grd_clbsmast.visible == true) { var iSel_Row = grd_clbsmast.selectedrow(0); var clamkey = model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/clamkey"); var pid = model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/pid"); var pidsn = model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/pidsn"); var patnm = model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/patnm"); var clamendyn = model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/clamendyn"); var lockyn = model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/lockyn"); if (clamkey != "" && clamkey != '-') { //if (clamendyn == "A" ) { if (lockyn != "Y" ) { var ans = messageBox("[ ȯÀÚ¸í:" + patnm + ", µî·Ï¹øÈ£:" + pid + ", ¼ø¹ø:" + pidsn + " ] ¸í¼¼¼­¸¦ »èÁ¦ÇÕ´Ï´Ù. »èÁ¦µÈ ¸í¼¼¼­´Â º¹±¸ÇÒ ¼ö ¾ø½À´Ï´Ù. °è¼Ó ", "S001"); ///ÇϽ÷Á¸é ¿¹(Yes)\n¾Æ´Ï¸é ¾Æ´Ï¿À(No) if (ans == 6) { // 6: yes, 7:no, 2:cancel model.setValue("/root/send/item4/clbs/clamym", model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/clamym")); model.setValue("/root/send/item4/clbs/clamdg", model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/clamdg")); model.setValue("/root/send/item4/clbs/pid", model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/pid")); model.setValue("/root/send/item4/clbs/pidsn", model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/pidsn")); model.setValue("/root/send/item4/clbs/clamkey", model.getValue("/root/main/list1/clbs[" + iSel_Row + "]/clamkey")); model.setValue("/root/send/item4/clbs/ioflag", ioflag); model.setValue("/root/send/item4/clbs/instcd", getUserInfo("posinstcd")); if (submit("TXPID20303")) { model.removeNode("/root/main/list1/clbs["+iSel_Row+"]"); grd_clbsmast.refresh(); grd_clbsmast.row = iSel_Row; } } } else { messageBox("Àá±Ý¼³Á¤»óÅÂÀÔ´Ï´Ù. »èÁ¦", "E001"); ///ÇÒ ¼ö ¾ø½À´Ï´Ù. } } } else { messageBox("¼±º°½É»ç¸ðµå¿¡¼­´Â »ý¼º»èÁ¦", "E001"); ///¼±º°½É»ç¸ðµå¿¡¼­´Â »ý¼º»èÁ¦ ÇÒ ¼ö ¾ø½À´Ï´Ù. } } //----------------------------------------------------------------------------------- // °á°úÁ¶È¸ : SMAER00800_°á°úÁ¶È¸ (¿Ü·¡, ÀÔ¿ø»çÈÄ´ë»óÀÚÁ¶È¸¿¡¼­ ¸¶¿ì½º ÆË¾÷À¸·Î Á¶È¸) //------------------------------------------------------------- function pidfOrderRsltSrch() { var row = grd_clbsmast.row; var pid = model.getValue("/root/main/list1/clbs[" + row + "]/pid"); if (pid) { // Á¶È¸µÈ ½É»ç´ë»óÀÚ°¡ ÀÖÀ¸¸é // ast/examcureweb/xrw/SMAER00800_°á°úÁ¶È¸.xrw model.makeValue("/root/hidden/smaer00800/cond/srchdate1", model.getValue("/root/main/list1/clbs[" + row + "]/indd")); model.makeValue("/root/hidden/smaer00800/cond/srchdate2", getCurrentDate()); // (dateHelper.js) ÇöÀ糯¥ ¹Ýȯ model.makeValue("/root/hidden/smaer00800/cond/srchpid", model.getValue("/root/main/list1/clbs[" + row + "]/pid")); model.makeValue("/root/hidden/smaer00800/cond/wardcd", ""); //model.getValue("/root/main/item1/iteminfo/wardcd")); model.makeValue("/root/hidden/smaer00800/cond/roomcd", ""); //model.getValue("/root/main/item1/iteminfo/roomcd")); model.makeValue("/root/hidden/smaer00800/cond/listflag", "P"); model.makeValue("/root/hidden/smaer00800/cond/deptcd", model.getValue("/root/main/list1/clbs[" + row + "]/orddeptcd")); model.makeNode("/root/hidden/smaer00800/cond/drid"); model.makeNode("/root/hidden/smaer00800/cond/chkcheck"); model.makeValue("/root/hidden/smaer00800/cond/chkcheck1", "A"); model.makeValue("/root/hidden/smaer00800/cond/chkcheck2", "B"); model.makeValue("/root/hidden/smaer00800/cond/chkcheck3", "C"); model.makeValue("/root/hidden/smaer00800/cond/chkcheck4", "D"); model.makeValue("/root/hidden/smaer00800/cond/chkcheck5", "E"); model.makeValue("/root/hidden/smaer00800/cond/chkcheck6", "F"); model.makeValue("/root/hidden/smaer00800/cond/chkcheck7", "G"); model.makeNode("/root/hidden/smaer00800/cond/chkcheck8"); model.makeNode("/root/hidden/smaer00800/cond/tabflag"); model.makeNode("/root/hidden/smaer00800/cond/mdlcd"); model.makeNode("/root/hidden/smaer00800/cond/examgubun"); model.makevalue("/root/hidden/smaer00800/cond/srchflag", "B"); model.makevalue("/root/hidden/smaer00800/cond/hlaflag", "N"); model.makevalue("/root/hidden/smaer00800/cond/prntfrmflag", ""); //modal("SMAER00800", "1", "10", "10", "SMAER00800", "/root/hidden/smaer00800/cond", "/root/send/data/singdata", "", ""); // SMAER00800_°á°úÁ¶È¸ open("SMAER00800", "1", "10", "10", "SMAER00800", "/root/hidden/smaer00800/cond", "/root/send/data/singdata", "", ""); // SMAER00800_°á°úÁ¶È¸ } } //----------------------------------------------------------------------------------- // °á°úÁ¶È¸ : SMAER00800_°á°úÁ¶È¸ (¿Ü·¡»çÈÄ´ë»óÀÚÁ¶È¸ ¼±º°Á¶È¸ ¿¡¼­ ¸¶¿ì½º ÆË¾÷À¸·Î Á¶È¸) //------------------------------------------------------------- function pidfOrderRsltSrch2() { var row = grd_specclbs.row; var pid = model.getValue("/root/main/list1/clbs[" + row + "]/pid"); if (pid) { // Á¶È¸µÈ ½É»ç´ë»óÀÚ°¡ ÀÖÀ¸¸é // ast/examcureweb/xrw/SMAER00800_°á°úÁ¶È¸.xrw model.makeValue("/root/hidden/smaer00800/cond/srchdate1", model.getValue("/root/main/list1/clbs[" + row + "]/indd")); model.makeValue("/root/hidden/smaer00800/cond/srchdate2", getCurrentDate()); // (dateHelper.js) ÇöÀ糯¥ ¹Ýȯ model.makeValue("/root/hidden/smaer00800/cond/srchpid", model.getValue("/root/main/list1/clbs[" + row + "]/pid")); model.makeValue("/root/hidden/smaer00800/cond/wardcd", ""); //model.getValue("/root/main/item1/iteminfo/wardcd")); model.makeValue("/root/hidden/smaer00800/cond/roomcd", ""); //model.getValue("/root/main/item1/iteminfo/roomcd")); model.makeValue("/root/hidden/smaer00800/cond/listflag", "P"); model.makeValue("/root/hidden/smaer00800/cond/deptcd", model.getValue("/root/main/list1/clbs[" + row + "]/orddeptcd")); model.makeNode("/root/hidden/smaer00800/cond/drid"); model.makeNode("/root/hidden/smaer00800/cond/chkcheck"); model.makeValue("/root/hidden/smaer00800/cond/chkcheck1", "A"); model.makeValue("/root/hidden/smaer00800/cond/chkcheck2", "B"); model.makeValue("/root/hidden/smaer00800/cond/chkcheck3", "C"); model.makeValue("/root/hidden/smaer00800/cond/chkcheck4", "D"); model.makeValue("/root/hidden/smaer00800/cond/chkcheck5", "E"); model.makeValue("/root/hidden/smaer00800/cond/chkcheck6", "F"); model.makeValue("/root/hidden/smaer00800/cond/chkcheck7", "G"); model.makeNode("/root/hidden/smaer00800/cond/chkcheck8"); model.makeNode("/root/hidden/smaer00800/cond/tabflag"); model.makeNode("/root/hidden/smaer00800/cond/mdlcd"); model.makeNode("/root/hidden/smaer00800/cond/examgubun"); model.makevalue("/root/hidden/smaer00800/cond/srchflag", "B"); model.makevalue("/root/hidden/smaer00800/cond/hlaflag", "N"); model.makevalue("/root/hidden/smaer00800/cond/prntfrmflag", ""); //modal("SMAER00800", "1", "10", "10", "SMAER00800", "/root/hidden/smaer00800/cond", "/root/send/data/singdata", "", ""); // SMAER00800_°á°úÁ¶È¸ open("SMAER00800", "1", "10", "10", "SMAER00800", "/root/hidden/smaer00800/cond", "/root/send/data/singdata", "", ""); // SMAER00800_°á°úÁ¶È¸ } } //-------------------------- // KDRG 3.2 DRGºÐ·ù¹øÈ£ »ý¼º //-------------------------- function pidfGetKDRGCode() { var fso,fileObj,inputStr=''; var ForReading=1,ForWriting=2; // È­ÀÏ/Àб⠾²±â ÁöÁ¤À» ½±°ÔÇϱâ À§ÇÑ º¯¼ö // var gExecfilePath ='c:\\kdrg32batch\\kdrg30.exe'; // var gWritefilePath ='c:\\kdrg32batch\\kdrg30.in'; // var gReadfilePath ='c:\\kdrg32batch\\kdrg30.out'; var gExecfilePath ='c:\\kdrg33\\kdrg33.exe'; var gWritefilePath ='c:\\kdrg33\\kdrg33.in'; var gReadfilePath ='c:\\kdrg33\\kdrg33.out'; fso=new ActiveXObject('Scripting.FileSystemObject'); // KDRG 3.2 ¹èÄ¡ ÇÁ·Î±×·¥ÀÌ ¼³Ä¡µÇ¾î ÀÖ°í DRGºÐ·ù¹øÈ£°¡ '-'ÀÎ °æ¿ì ½ÇÇà if (fso.FileExists(gExecfilePath) && model.getValue("/root/main/item1/clbs/drgcd") == '-') { var cnt01=0, cnt02=0, cnt03=0, cnt04=0, cnt05=0; // °¢ Äڵ庰 °´¼ö var code01Arr = Array(); var code02Arr = Array(); var code03Arr = Array(); var code04Arr = Array(); var code05Arr = Array(); var i=1, k=0; var rowstaus; var diagcd = ""; var unit = ""; var codetype = ""; var payflag = ""; var basecd = ""; var makeStr = ""; var cldinodeList = instance1.selectNodes("/root/main/list1/cldi"); var clodnodeList = instance1.selectNodes("/root/main/list2/clod"); // »óº´ ¹× 󹿰¹¼ö°¡ 0°³¸¸ ¾Æ´Ñ °æ¿ì¸¸ ½ÇÇà if (cldinodeList.length > 0 && clodnodeList.length > 0) { // 1. KDRG - ȯÀڱ⺻Á¶È¸(¿ä¾ç±â°ü¹øÈ£,ÁֹιøÈ£, ¿ä¾ß°³½ÃÀÏ, ÀÔ¿øÀϼö, Áø·á°á°ú, ÀÔ¿ø½ÃüÁßµî..) makeStr += model.getValue("/root/main/item1/clbs/proccorpcd"); // (1).¿ä¾ç±â°ü±âÈ£ : 1 8 makeStr += model.getValue("/root/main/item1/clbs/patrrgstno"); // (2).ÁֹιøÈ£ : 9 13 makeStr += model.getValue("/root/main/item1/clbs/ordfromdd"); // (3).¿ä¾ç°³½ÃÀÏ : 22 8 makeStr += model.getValue("/root/main/item1/clbs/chosindayno").getLeftPad(3, "0"); // (4).ÀÔ¿øÀϼö : 30 3 makeStr += model.getValue("/root/main/item1/clbs/ordrsltcd"); // (5).Áø·á°á°ú : 33 1 // 2. KDRG - Áø´ÜÄÚµåÁ¶È¸ for( i=1; i <= cldinodeList.length; i++) { rowstaus = model.getValue("/root/main/list1/cldi[" + i + "]/rowstat"); if ( rowstaus != "D") { // »èÁ¦¾Æ´Ñ°Í¸¸... diagcd = model.getValue("/root/main/list1/cldi[" + i + "]/diagcd"); //diagcd = diagcd.getLeftPad(5, " "); diagcd = diagcd.getRightPad(5, " "); // 20100201 ¼öÁ¤ makeStr += diagcd if (i == 10) break; } } // 20100201 Ãß°¡ for( k=i; k <= 10; k++) { makeStr += " "; } // 3. KDRG - Àû¿ë¼ö°¡ÄÚµå(½Ã¼ú, °Ë»ç, ¹æ»ç¼±, ÁÖ»ç¹×Ç÷¾×Á¦Á¦, ¸¶Ãë¹×È£ÈíÄ¡·á) for( i=1; i <= clodnodeList.length; i++) { payflag = model.getValue("/root/main/list2/clod[" + i + "]/payflag"); rowstaus = model.getValue("/root/main/list2/clod[" + i + "]/rowstat"); //if (payflag == "0" || payflag == "9" || grd_clodhist.rowHidden(i) == false) { if ( payflag == "0" && rowstaus != "D" ) { unit = model.getValue("/root/main/list2/clod[" + i + "]/unit"); basecd = model.getValue("/root/main/list2/clod[" + i + "]/basecd"); basecd = basecd.substr(0, 5); if (unit >= "ÀÚ1" && unit <= "ÀÚ810") codetype = "01"; // 01. ½Ã¼úÄÚµå else if (unit >= "Àú21" && unit <= "Àú891") codetype = "01"; else if (unit >= "Â÷1" && unit <= "Â÷113") codetype = "01"; else if (unit >= "ó1" && unit <= "ó102") codetype = "01"; else if (unit >= "³ª610" && unit <= "³ª624") codetype = "02"; // 02. °Ë»çÄÚµå else if (unit >= "³ª720" && unit <= "³ª729") codetype = "02"; else if (unit >= "³Ê681" && unit <= "³Ê705") codetype = "02"; else if (unit >= "³Ê871" && unit <= "³Ê874") codetype = "02"; else if (unit >= "³ª750" && unit <= "³ª862") codetype = "02"; else if (unit == "³Ê961") codetype = "02"; else if (unit >= "´Ù201" && unit <= "´Ù276") codetype = "03"; // 03. ¹æ»ç¼±ÄÚµå else if (unit >= "´Ù401" && unit <= "´Ù412-1") codetype = "03"; else if (unit >= "´õ401" && unit <= "´õ402") codetype = "03"; else if (unit >= "¸¶1" && unit <= "¸¶16" ) codetype = "04"; // 04. ÁÖ»ç¹×Ç÷¾×Á¦Á¦ÄÚµå else if (unit == "¸Ó1") codetype = "04"; else if (unit >= "¸¶102" && unit <= "¸¶107") codetype = "04"; else if (unit >= "ÆÄ1" && unit <= "ÆÄ2" ) codetype = "04"; else if (unit >= "¹Ù21" && unit <= "¹Ù26") codetype = "05"; // 05. ¸¶Ãë¹×È£ÈíÄ¡·áÄÚµå else if (unit == "¹ö51") codetype = "05"; else if (unit >= "¹Ù31" && unit <= "¹Ù35") codetype = "05"; else if (unit == "¹ö71") codetype = "05"; else if (unit >= "»ç30" && unit <= "»ç41") codetype = "05"; else if (unit >= "¼­31" && unit <= "¼­36") codetype = "05"; else codetype = "-"; if (codetype == "01" ) { if (cnt01 == 10) continue; code01Arr[cnt01] = basecd.getRightPad(5, " "); cnt01++; } else if (codetype == "02") { if (cnt02 == 5) continue; code02Arr[cnt02] = basecd.getRightPad(5, " "); cnt02++; } else if (codetype == "03" && cnt01 != 5) { if (cnt03 == 5) continue; code03Arr[cnt03] = basecd.getRightPad(5, " "); cnt03++; } else if (codetype == "04" && cnt01 != 5) { if (cnt04 == 5) continue; code04Arr[cnt04] = basecd.getRightPad(5, " "); cnt04++; } else if (codetype == "05" && cnt01 != 5) { if (cnt05 == 5) continue; code05Arr[cnt05] = basecd.getRightPad(5, " "); cnt05++; } } } // (7). ½Ã¼úÄÚµå1-10 (½ÃÀÛÀ§Ä¡:84, ±æÀÌ:50) for (k = 0; k < code01Arr.length; k++) { makeStr += code01Arr[k]; } if (cnt01 != 10) { for ( i = 1; i <= (10 - cnt01); i++) {; makeStr += " "; } } // (8). °Ë»çÄÚµå1-5 (½ÃÀÛÀ§Ä¡:134, ±æÀÌ:25) for (k = 0; k < code02Arr.length; k++) { makeStr += code02Arr[k]; } if (cnt02 != 5) { for ( i = 1; i <= (5 - cnt02); i++) { makeStr += " "; } } // (9). ¹æ»ç¼±ÄÚµå1-5 (½ÃÀÛÀ§Ä¡:159, ±æÀÌ:25) for (k = 0; k < code03Arr.length; k++) { makeStr += code03Arr[k]; } if (cnt03 != 5) { for ( i = 1; i <= (5 - cnt03); i++) { makeStr += " "; } } // (10). ÁÖ»ç¹×Ç÷¾×Á¦Á¦ÄÚµå1-5 (½ÃÀÛÀ§Ä¡:184, ±æÀÌ:25) for (k = 0; k < code04Arr.length; k++) { makeStr += code04Arr[k]; } if (cnt04 != 5) { for ( i = 1; i <= (5 - cnt04); i++) { makeStr += " "; } } // (11). ¸¶Ãë¹×È£ÈíÄ¡·áÄÚµå1-5 (½ÃÀÛÀ§Ä¡:209, ±æÀÌ:25) for (k = 0; k < code05Arr.length; k++) { makeStr += code05Arr[k]; } if (cnt05 != 5) { for ( i = 1; i <= (5 - cnt05); i++) { makeStr += " "; } } // (12). ¾ËÄݹ׾๰Áßµ¶ÀçȰġ·áÄÚµå (½ÃÀÛÀ§Ä¡:234, ±æÀÌ:5) makeStr += " "; // (13). ºÎ°¡ÄÚµå1-5 (½ÃÀÛÀ§Ä¡:239, ±æÀÌ:25) for ( i = 1;i <= 5; i++) { makeStr += " "; } // (14). ÀÔ¿ø½ÃüÁß(g) : ¸¸1¼¼¹Ì¸¸ ±âÀç (½ÃÀÛÀ§Ä¡:264, ±æÀÌ:5) makeStr += "00000"; // (15). ÀΰøÈ£Èí½Ã°£(hour) : ¸¸1¼¼¹Ì¸¸ ±âÀç (½ÃÀÛÀ§Ä¡:269, ±æÀÌ:5) ==> ÇöÀç EMRÆÀ ¹Ì°³¹ß(2008-10-16)"); makeStr += "00000"; // (16). MDC (½ÃÀÛÀ§Ä¡:274, ±æÀÌ:3) makeStr += "000"; // (17). ADRG (½ÃÀÛÀ§Ä¡:277, ±æÀÌ:4) makeStr += "0000"; // (18). PCCL (½ÃÀÛÀ§Ä¡:281, ±æÀÌ:1) makeStr += "0"; // (19). DRG (½ÃÀÛÀ§Ä¡:282, ±æÀÌ:6) makeStr += "000000"; // (20). version (½ÃÀÛÀ§Ä¡:288, ±æÀÌ:8) makeStr += "00000000"; //////////////////////////////////////////////////////////////////////////////////////////////////////////// // 1.±âÁ¸ÆÄÀÏ »èÁ¦ ==> 2.ÆÄÀÏ ¾²±â ==> 3.KDRG½ÇÇà ==> 4. Timer ==> 5.ÆÄÀÏ Àбâ //////////////////////////////////////////////////////////////////////////////////////////////////////////// // 1.±âÁ¸ÆÄÀÏ »èÁ¦ if (fso.FileExists(gWritefilePath)) { fso.DeleteFile(gWritefilePath); // kdrg30.in »èÁ¦ } if (fso.FileExists(gReadfilePath)) { fso.DeleteFile(gReadfilePath); // kdrg30.out »èÁ¦ } // 2. ÆÄÀÏ ¾²±â(kdrg30.in) fileObj=fso.CreateTextFile(gWritefilePath, true); // ¾²±â À§ÇÑ È­ÀÏÀ» º¯¼ö¿¡ °³Ã¼¸¦ ÇÒ´çÇÑ´Ù. fileObj.WriteLine(makeStr); fileObj.Close(); // È­ÀÏÀ» ´Ý´Â´Ù. // kdrg30.in ÆÄÀÏÀÌ ÀÖ´Â °æ¿ì¸¸ ½ÇÇà if (fso.FileExists(gWritefilePath)) { // 3. KDRG ½ÇÇà //window.exec("cmd.exe", "/c cd c:\\KDRG32batch\\ && kdrg30.exe"); window.exec("c:\\kdrg33\\kdrg33.exe","","c:\\kdrg33"); // 4. kdrg30.outÆÄÀÏÀÌ »ý¼ºµÉ¶§±îÁö timer //fTimer(); // 5. ÆÄÀÏ Àбâ(kdrg30.out) var fileChk = true; var iCnt = 0, jCnt=0; while (fileChk) { // kdrg30.out ÆÄÀÏÀÌ ÀÖ´Â °æ¿ì¸¸ ½ÇÇà if (fso.FileExists(gReadfilePath)) { fileObj = fso.OpenTextFile(gReadfilePath, ForReading); // Àбâ À§ÇÑ È­ÀÏÀ» º¯¼ö¿¡ °³Ã¼¸¦ ÇÒ´çÇÑ´Ù. while (!fileObj.AtEndOfStream){ if (!fileObj.AtEndOfLine){ inputStr += fileObj.ReadLine(); } } fileObj.Close(); if (inputStr != "") { //alert(inputStr); //alert(inputStr.substr(273, 3)); // (16). MDC (½ÃÀÛÀ§Ä¡:274, ±æÀÌ:3) //alert(inputStr.substr(276, 4)); // (17). ADRG (½ÃÀÛÀ§Ä¡:277, ±æÀÌ:4) //alert(inputStr.substr(280, 1)); // (18). PCCL (½ÃÀÛÀ§Ä¡:281, ±æÀÌ:1) //alert(inputStr.substr(281, 6)); // (19). DRG (½ÃÀÛÀ§Ä¡:282, ±æÀÌ:6) // 6. KDRGÄÚµå ¼ÂÆÃ (½ÃÀÛÀ§Ä¡:282, ±æÀÌ:6) model.setValue("/root/main/item1/clbs/drgcd", inputStr.substr(281, 6)); opt_drgcd.refresh(); fileChk = false; } } else { fileChk = true; } } } } } } //------------------------------ // KDRG ¹øÈ£ »ý¼º (ÀÔ¿ø»çÈĸÞÀÎ) //------------------------------ function fSetKDRGpid() { var fso,fileObj = ""; var ForReading=1,ForWriting=2; // È­ÀÏ/Àб⠾²±â ÁöÁ¤À» ½±°ÔÇϱâ À§ÇÑ º¯¼ö var gJobPath = "c:\\kdrg33"; var gExecfilePath = "c:\\kdrg33\\kdrg33.exe"; var gWritefilePath = "c:\\kdrg33\\kdrg33.in"; var gReadfilePath = "c:\\kdrg33\\kdrg33.out"; var makeStr,inputStr,kdrgNo = ""; // ½ÇÇàÈ­ÀÏ À¯¹« üũ fso = new ActiveXObject("Scripting.FileSystemObject"); if ( !fso.FileExists(gExecfilePath) ) { messageBox( "½ÇÇàÈ­ÀÏÀÌ PC¿¡ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù.\n\n" + "KDRG 3.3 ver À» ¼³Ä¡Çϼ¼¿ä.\n\n" + gExecfilePath + " ÀÇ Á¸Àç¿©ºÎ¸¦ È®ÀÎÇϼ¼¿ä" ,""); return; } // ÃÖÁ¾ »ç¿ëÀÚ È®ÀÎ var message = messageBox("´ë»óÀÚÀÇ DRG Á¤º¸¸¦ »ý¼ºÇÕ´Ï´Ù.\n\n" +"°è¼Ó ÁøÇà" ,"S001"); if ( message != 6 ) { return; } model.resetInstanceNode("/root/send/item4/clbs"); // °ø¹éÀ¸·Î »èÁ¦ model.resetInstanceNode("/root/hidden/item6/kdrginfo"); // °ø¹éÀ¸·Î »èÁ¦ model.setValue("/root/send/item4/clbs/clamym", model.getValue("/root/main/item1/clbs/clamym")); model.setValue("/root/send/item4/clbs/clamdg", model.getValue("/root/main/item1/clbs/clamdg")); model.setValue("/root/send/item4/clbs/pid", model.getValue("/root/main/item1/clbs/pid")); model.setValue("/root/send/item4/clbs/pidsn", model.getValue("/root/main/item1/clbs/pidsn")); //model.setValue("/root/send/item4/clbs/instcd", getUserInfo("posinstcd")); model.setValue("/root/send/item4/clbs/instcd", model.getValue("/root/main/item1/clbs/instcd")); // ¿¡·¯½Ã ¹Ù·Î Á¾·á if ( !submit("TXPID20305") ) { return; } // »óº´,ó¹æ ¾øÀ¸¸é ´ÙÀ½ ´ë»óÀÚ·Î.. if ( model.getValue("/root/hidden/item6/kdrginfo/ordyn") != "Y" ) { return; } // string »ý¼º makeStr = ""; makeStr += model.getValue("/root/hidden/item6/kdrginfo/proccorpcd"); // (1) ¿ä¾ç±â°ü±âÈ£ makeStr += model.getValue("/root/hidden/item6/kdrginfo/resno"); // (2) ÁֹιøÈ£ makeStr += model.getValue("/root/hidden/item6/kdrginfo/ordfromdd"); // (3) ¿ä¾ç°³½ÃÀÏ makeStr += model.getValue("/root/hidden/item6/kdrginfo/chosindayno"); // (4) ÀÔ¿øÀϼö makeStr += model.getValue("/root/hidden/item6/kdrginfo/ordrsltcd"); // (5) Áø·á°á°ú makeStr += model.getValue("/root/hidden/item6/kdrginfo/diag").getRightPad(50," "); // (6) Áø´ÜÄÚµå makeStr += model.getValue("/root/hidden/item6/kdrginfo/optr").getRightPad(50," "); // (7) ½Ã¼úÄÚµå makeStr += model.getValue("/root/hidden/item6/kdrginfo/exam").getRightPad(25," "); // (8) °Ë»çÄÚµå makeStr += model.getValue("/root/hidden/item6/kdrginfo/xray").getRightPad(25," "); // (9) ¹æ»ç¼±ÄÚµå makeStr += model.getValue("/root/hidden/item6/kdrginfo/ijbd").getRightPad(25," "); // (10) ÁÖ»ç¹×Ç÷¾× makeStr += model.getValue("/root/hidden/item6/kdrginfo/anst").getRightPad(25," "); // (11) ¸¶Ãë¹×È£ÈíÄ¡·á makeStr += " ".getRightPad(5," "); // (12) ¾ËÄݹ׾๰Áßµ¶ÀçȰġ·áÄÚµå makeStr += " ".getRightPad(25," "); // (13) ºÎ°¡ÄÚµå1-5 makeStr += model.getValue("/root/hidden/item6/kdrginfo/mt027"); // (14) ÀÔ¿ø½ÃüÁß makeStr += model.getValue("/root/hidden/item6/kdrginfo/mt026"); // (15) ÀΰøÈ£Èí½Ã°£ makeStr += " ".getRightPad(3," "); // (16) MDC makeStr += " ".getRightPad(4," "); // (17) ADRG makeStr += " "; // (18) PCCL makeStr += " ".getRightPad(6," "); // (19) DRGºÐ·ù¹øÈ£ makeStr += " ".getRightPad(8," "); // (20) version //////////////////////////////////////////////////////////////////////////////////////////////////////////// // 1.±âÁ¸ÆÄÀÏ »èÁ¦ ==> 2.ÆÄÀÏ ¾²±â ==> 3.KDRG½ÇÇà ==> 4.ÆÄÀÏ Àбâ //////////////////////////////////////////////////////////////////////////////////////////////////////////// // 1.±âÁ¸ÆÄÀÏ »èÁ¦ if (fso.FileExists(gWritefilePath)) { fso.DeleteFile(gWritefilePath); // kdrg30.in »èÁ¦ } if (fso.FileExists(gReadfilePath)) { fso.DeleteFile(gReadfilePath); // kdrg30.out »èÁ¦ } // 2. ÆÄÀÏ ¾²±â(kdrg30.in) fileObj=fso.CreateTextFile(gWritefilePath, true); // ¾²±â À§ÇÑ È­ÀÏÀ» º¯¼ö¿¡ °³Ã¼¸¦ ÇÒ´çÇÑ´Ù. fileObj.WriteLine(makeStr); fileObj.Close(); // È­ÀÏÀ» ´Ý´Â´Ù. // kdrg33.in ÆÄÀÏÀÌ ¾øÀ¸¸é ´ÙÀ½ ´ë»óÀÚ·Î.. if ( !fso.FileExists(gWritefilePath) ) { return; } // 3. KDRG ½ÇÇà window.exec(gExecfilePath,"",gJobPath); // 4. ÆÄÀÏÀбâ var fileChk = true; while (fileChk) { // kdrg33.out ÆÄÀÏÀÌ ÀÖ´Â °æ¿ì¸¸ ½ÇÇà if (fso.FileExists(gReadfilePath)) { fileObj = fso.OpenTextFile(gReadfilePath, ForReading); // Àбâ À§ÇÑ È­ÀÏÀ» º¯¼ö¿¡ °³Ã¼¸¦ ÇÒ´çÇÑ´Ù. inputStr = ""; // ÃʱâÈ­ while (!fileObj.AtEndOfStream){ if (!fileObj.AtEndOfLine){ inputStr += fileObj.ReadLine(); } } fileObj.Close(); if ( inputStr != "" ) { kdrgNo = inputStr.substr(281, 6).getTrim(); fileChk = false; } } } // °ªÀÌ ¾øÀ¸¸é ´ÙÀ½ ´ë»óÀÚ·Î if ( kdrgNo == "" ) { return; } // KDRG¹øÈ£ ÀúÀå model.resetInstanceNode("/root/hidden/item7/kdrgval"); // °ø¹éÀ¸·Î »èÁ¦ model.setValue("/root/send/item4/clbs/kdrgno",kdrgNo); if ( !submit("TXPID20306") ) { return; } // ±×¸®µå¿¡ Ç¥½Ã model.setValue("/root/main/item1/clbs/drgcd" ,kdrgNo); model.setValue("/root/main/item1/clbs/kstage",model.getValue("/root/hidden/item7/kdrgval/kstage")); model.setValue("/root/main/item1/clbs/kmdc" ,model.getValue("/root/hidden/item7/kdrgval/kmdc")); model.setValue("/root/main/item1/clbs/kdrgnm",model.getValue("/root/hidden/item7/kdrgval/kdrgnm")); opt_drgcd.refresh(); opt_kstage.refresh(); opt_kdrgnm.refresh(); // ´ë»óÀÚÁ¶È¸ È­¸é¿¡µµ Ç¥½Ã var trgtManWindow = getChildWindow("SMPID20200"); // SMPID20200_ÀÔ¿ø»çÈĽɻç´ë»óÀÚÁ¶È¸.xrw if (trgtManWindow != null) { var selectedRow = model.getValue("/root/hidden/smpid20200/rslt/selectedRow"); if (selectedRow) { var trgtmanlist = trgtManWindow.instance1.selectSingleNode("/root/main/list1/clbs"); if (trgtmanlist != null) { var srchmode = trgtManWindow.model.getValue("/root/hidden/clbs/srchmode"); if (srchmode != "specclbs") { // ¼±º°½É»ç ¸ðµå ¾Æ´Ñ°æ¿ì if ( trgtManWindow.model.getValue("/root/main/list1/clbs["+ selectedRow +"]/clamym") == model.getValue("/root/main/item1/clbs/clamym") && trgtManWindow.model.getValue("/root/main/list1/clbs["+ selectedRow +"]/clamdg") == model.getValue("/root/main/item1/clbs/clamdg") && trgtManWindow.model.getValue("/root/main/list1/clbs["+ selectedRow +"]/pid") == model.getValue("/root/main/item1/clbs/pid") && trgtManWindow.model.getValue("/root/main/list1/clbs["+ selectedRow +"]/pidsn") == model.getValue("/root/main/item1/clbs/pidsn") ) { trgtManWindow.model.setValue("/root/main/list1/clbs["+ selectedRow +"]/drgcd", kdrgNo); trgtManWindow.model.setValue("/root/main/list1/clbs["+ selectedRow +"]/kstage", model.getValue("/root/hidden/item7/kdrgval/kstage")); trgtManWindow.model.setValue("/root/main/list1/clbs["+ selectedRow +"]/kmdc" , model.getValue("/root/hidden/item7/kdrgval/kmdc")); trgtManWindow.model.setValue("/root/main/list1/clbs["+ selectedRow +"]/kdrgnm", model.getValue("/root/hidden/item7/kdrgval/kdrgnm")); } } } } } } //------------------------------------------------------------ // KDRG ó¹æÁ¤º¸ »ý¼º _ ´ë»óÀÚ Á¶È¸ È­¸é (pam.pidhkdrg) - 20100709 //------------------------------------------------------------ function fSetKDRGclodlist() { var fso,fileObj = ""; var ForReading=1,ForWriting=2; // È­ÀÏ/Àб⠾²±â ÁöÁ¤À» ½±°ÔÇϱâ À§ÇÑ º¯¼ö var gJobPath = "c:\\kdrg33"; var gExecfilePath = "c:\\kdrg33\\kdrg33.exe"; var gWritefilePath = "c:\\kdrg33\\kdrg33.in"; var gReadfilePath = "c:\\kdrg33\\kdrg33.out"; var summit_error = false; var makeStr,inputStr,kdrgNo = ""; // ½ÇÇàÈ­ÀÏ À¯¹« üũ fso = new ActiveXObject("Scripting.FileSystemObject"); if ( !fso.FileExists(gExecfilePath) ) { messageBox( "½ÇÇàÈ­ÀÏÀÌ PC¿¡ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù.\n\n" + "KDRG 3.3 ver À» ¼³Ä¡Çϼ¼¿ä.\n\n" + gExecfilePath + " ÀÇ Á¸Àç¿©ºÎ¸¦ È®ÀÎÇϼ¼¿ä" ,""); return; } // ´ë»óÀÚ ¼±Åÿ©ºÎ È®ÀÎ if ( grd_clbsmast.selectedRows == 0 || grd_clbsmast.rows <= 1 ) { messageBox("DRG Á¤º¸¸¦ »ý¼ºÇÒ ´ë»óÀÚ¸¦", "C002"); // DRG Á¤º¸¸¦ »ý¼ºÇÒ ´ë»óÀÚ¸¦ ¼±ÅÃÇϽʽÿÀ. return; } // ÃÖÁ¾ »ç¿ëÀÚ È®ÀÎ var message = messageBox("¼±ÅÃµÈ ´ë»óÀÚÀÇ DRG Á¤º¸¸¦ »ý¼ºÇÕ´Ï´Ù.\n\n" +"(±âÁ¸¿¡ »ý¼ºµÈ Á¤º¸´Â »èÁ¦ÈÄ ´Ù½Ã »ý¼ºµË´Ï´Ù.)\n\n" +"°è¼Ó ÁøÇà" ,"S001"); if ( message != 6 ) { return; } // ·Îµùâ¿­±â var sWindowMsg = "DRG Á¤º¸ »ý¼ºÁßÀÔ´Ï´Ù...."; callLoadingWindow(sWindowMsg); // ¼±ÅÃµÈ ¸ðµç ´ë»óÀÚÀÇ DRG Àû¿ë ó¹æÁ¤º¸¸¦ »ý¼ºÇÑ´Ù. for (var i = 0; i < grd_clbsmast.selectedRows; i++) { model.resetInstanceNode("/root/send/item4/clbs"); // °ø¹éÀ¸·Î »èÁ¦ model.resetInstanceNode("/root/hidden/item6/kdrginfo"); // °ø¹éÀ¸·Î »èÁ¦ var row = grd_clbsmast.selectedrow(i); model.setValue("/root/send/item4/clbs/clamym", model.getValue("/root/main/list1/clbs[" + row + "]/clamym")); model.setValue("/root/send/item4/clbs/clamdg", model.getValue("/root/main/list1/clbs[" + row + "]/clamdg")); model.setValue("/root/send/item4/clbs/pid", model.getValue("/root/main/list1/clbs[" + row + "]/pid")); model.setValue("/root/send/item4/clbs/pidsn", model.getValue("/root/main/list1/clbs[" + row + "]/pidsn")); model.setValue("/root/send/item4/clbs/instcd", getUserInfo("posinstcd")); // ¿¡·¯½Ã ¹Ù·Î Á¾·á if ( !submit("TXPID20305") ) { summit_error = true; break; } // »óº´,ó¹æ ¾øÀ¸¸é ´ÙÀ½ ´ë»óÀÚ·Î.. if ( model.getValue("/root/hidden/item6/kdrginfo/ordyn") != "Y" ) { continue; } // string »ý¼º makeStr = ""; makeStr += model.getValue("/root/hidden/item6/kdrginfo/proccorpcd"); // (1) ¿ä¾ç±â°ü±âÈ£ makeStr += model.getValue("/root/hidden/item6/kdrginfo/resno"); // (2) ÁֹιøÈ£ makeStr += model.getValue("/root/hidden/item6/kdrginfo/ordfromdd"); // (3) ¿ä¾ç°³½ÃÀÏ makeStr += model.getValue("/root/hidden/item6/kdrginfo/chosindayno"); // (4) ÀÔ¿øÀϼö makeStr += model.getValue("/root/hidden/item6/kdrginfo/ordrsltcd"); // (5) Áø·á°á°ú makeStr += model.getValue("/root/hidden/item6/kdrginfo/diag").getRightPad(50," "); // (6) Áø´ÜÄÚµå makeStr += model.getValue("/root/hidden/item6/kdrginfo/optr").getRightPad(50," "); // (7) ½Ã¼úÄÚµå makeStr += model.getValue("/root/hidden/item6/kdrginfo/exam").getRightPad(25," "); // (8) °Ë»çÄÚµå makeStr += model.getValue("/root/hidden/item6/kdrginfo/xray").getRightPad(25," "); // (9) ¹æ»ç¼±ÄÚµå makeStr += model.getValue("/root/hidden/item6/kdrginfo/ijbd").getRightPad(25," "); // (10) ÁÖ»ç¹×Ç÷¾× makeStr += model.getValue("/root/hidden/item6/kdrginfo/anst").getRightPad(25," "); // (11) ¸¶Ãë¹×È£ÈíÄ¡·á makeStr += " ".getRightPad(5," "); // (12) ¾ËÄݹ׾๰Áßµ¶ÀçȰġ·áÄÚµå makeStr += " ".getRightPad(25," "); // (13) ºÎ°¡ÄÚµå1-5 makeStr += model.getValue("/root/hidden/item6/kdrginfo/mt027"); // (14) ÀÔ¿ø½ÃüÁß makeStr += model.getValue("/root/hidden/item6/kdrginfo/mt026"); // (15) ÀΰøÈ£Èí½Ã°£ makeStr += " ".getRightPad(3," "); // (16) MDC makeStr += " ".getRightPad(4," "); // (17) ADRG makeStr += " "; // (18) PCCL makeStr += " ".getRightPad(6," "); // (19) DRGºÐ·ù¹øÈ£ makeStr += " ".getRightPad(8," "); // (20) version //////////////////////////////////////////////////////////////////////////////////////////////////////////// // 1.±âÁ¸ÆÄÀÏ »èÁ¦ ==> 2.ÆÄÀÏ ¾²±â ==> 3.KDRG½ÇÇà ==> 4.ÆÄÀÏ Àбâ //////////////////////////////////////////////////////////////////////////////////////////////////////////// // 1.±âÁ¸ÆÄÀÏ »èÁ¦ if (fso.FileExists(gWritefilePath)) { fso.DeleteFile(gWritefilePath); // kdrg30.in »èÁ¦ } if (fso.FileExists(gReadfilePath)) { fso.DeleteFile(gReadfilePath); // kdrg30.out »èÁ¦ } // 2. ÆÄÀÏ ¾²±â(kdrg30.in) fileObj=fso.CreateTextFile(gWritefilePath, true); // ¾²±â À§ÇÑ È­ÀÏÀ» º¯¼ö¿¡ °³Ã¼¸¦ ÇÒ´çÇÑ´Ù. fileObj.WriteLine(makeStr); fileObj.Close(); // È­ÀÏÀ» ´Ý´Â´Ù. // kdrg33.in ÆÄÀÏÀÌ ¾øÀ¸¸é ´ÙÀ½ ´ë»óÀÚ·Î.. if ( !fso.FileExists(gWritefilePath) ) { continue; } // 3. KDRG ½ÇÇà window.exec(gExecfilePath,"",gJobPath); //window.exec("cmd.exe -b"," /c cd c:\\kdrg33\\ && kdrg33.exe"); // 4. ÆÄÀÏÀбâ var fileChk = true; while (fileChk) { // kdrg33.out ÆÄÀÏÀÌ ÀÖ´Â °æ¿ì¸¸ ½ÇÇà if (fso.FileExists(gReadfilePath)) { fileObj = fso.OpenTextFile(gReadfilePath, ForReading); // Àбâ À§ÇÑ È­ÀÏÀ» º¯¼ö¿¡ °³Ã¼¸¦ ÇÒ´çÇÑ´Ù. inputStr = ""; // ÃʱâÈ­ while (!fileObj.AtEndOfStream){ if (!fileObj.AtEndOfLine){ inputStr += fileObj.ReadLine(); } } fileObj.Close(); if ( inputStr != "" ) { kdrgNo = inputStr.substr(281, 6).getTrim(); fileChk = false; } } } // °ªÀÌ ¾øÀ¸¸é ´ÙÀ½ ´ë»óÀÚ·Î if ( kdrgNo == "" ) { continue; } // KDRG¹øÈ£ ÀúÀå model.resetInstanceNode("/root/hidden/item7/kdrgval"); // °ø¹éÀ¸·Î »èÁ¦ model.setValue("/root/send/item4/clbs/kdrgno",kdrgNo); if ( !submit("TXPID20306") ) { summit_error = true; break; } // ±×¸®µå¿¡ Ç¥½Ã model.setValue("/root/main/list1/clbs[" + row + "]/drgcd" ,kdrgNo); model.setValue("/root/main/list1/clbs[" + row + "]/kstage",model.getValue("/root/hidden/item7/kdrgval/kstage")); model.setValue("/root/main/list1/clbs[" + row + "]/kmdc" ,model.getValue("/root/hidden/item7/kdrgval/kmdc")); model.setValue("/root/main/list1/clbs[" + row + "]/kdrgnm",model.getValue("/root/hidden/item7/kdrgval/kdrgnm")); } // ·Îµùâ´Ý±â removeLoadingWindow(); if ( summit_error ) { messageBox("DRG Á¤º¸ »ý¼ºÁß ¿À·ù¹ß»ý",""); } else { messageBox("DRG Á¤º¸ »ý¼º ¿Ï·á",""); } } //----------------------------------- //¸í¼¼¼­ KDRG »ó¼¼Á¤º¸ Á¶È¸ (´ë»óÀÚÁ¶È¸) //----------------------------------- function fDocuKdrgViewList() { var irow = grd_clbsmast.row; var clamkey = model.getValue("/root/main/list1/clbs[" + irow + "]/clamkey"); if (clamkey) { model.setValue("/root/hidden/smpid23300/cond/clamym", model.getValue("/root/main/list1/clbs[" + irow + "]/clamym")); model.setValue("/root/hidden/smpid23300/cond/clamdg", model.getValue("/root/main/list1/clbs[" + irow + "]/clamdg")); model.setValue("/root/hidden/smpid23300/cond/pid", model.getValue("/root/main/list1/clbs[" + irow + "]/pid")); model.setValue("/root/hidden/smpid23300/cond/pidsn", model.getValue("/root/main/list1/clbs[" + irow + "]/pidsn")); model.setValue("/root/hidden/smpid23300/cond/patnm", model.getValue("/root/main/list1/clbs[" + irow + "]/patnm")); model.setValue("/root/hidden/smpid23300/cond/insukind", model.getValue("/root/main/list1/clbs[" + irow + "]/insukindcd")); model.setValue("/root/hidden/smpid23300/cond/suppkind", model.getValue("/root/main/list1/clbs[" + irow + "]/suppkindcd")); model.setValue("/root/hidden/smpid23300/cond/orddeptcd", model.getValue("/root/main/list1/clbs[" + irow + "]/orddeptcd")); model.setValue("/root/hidden/smpid23300/cond/indd", model.getValue("/root/main/list1/clbs[" + irow + "]/indd")); modal("SMPID23300", "1", "50", "100", "SMPID23300", "/root/hidden/smpid23300/cond", "/root/init/item1", "", ""); // SMPID23300_KDRG»ó¼¼Á¤º¸.xrw } } //----------------------------------- //¸í¼¼¼­ KDRG »ó¼¼Á¤º¸ Á¶È¸ (½É»ç¸ÞÀÎ) //----------------------------------- function fDocuKdrgViewPid() { var pid = model.getValue("/root/main/item1/clbs/pid"); if (pid) { model.setValue("/root/hidden/smpid23300/cond/clamym", model.getValue("/root/main/item1/clbs/clamym")); model.setValue("/root/hidden/smpid23300/cond/clamdg", model.getValue("/root/main/item1/clbs/clamdg")); model.setValue("/root/hidden/smpid23300/cond/pid", model.getValue("/root/main/item1/clbs/pid")); model.setValue("/root/hidden/smpid23300/cond/pidsn", model.getValue("/root/main/item1/clbs/pidsn")); model.setValue("/root/hidden/smpid23300/cond/patnm", model.getValue("/root/main/item1/clbs/patnm")); model.setValue("/root/hidden/smpid23300/cond/insukind", model.getValue("/root/main/item1/clbs/insukindcd")); model.setValue("/root/hidden/smpid23300/cond/suppkind", model.getValue("/root/main/item1/clbs/suppkindcd")); model.setValue("/root/hidden/smpid23300/cond/orddeptcd", model.getValue("/root/main/item1/clbs/orddeptcd")); model.setValue("/root/hidden/smpid23300/cond/indd", model.getValue("/root/main/item1/clbs/indd")); modal("SMPID23300", "1", "50", "100", "SMPID23300", "/root/hidden/smpid23300/cond", "/root/init/item1", "", ""); // SMPID23300_KDRG»ó¼¼Á¤º¸.xrw } }