/* ¿Ü·¡È¯ÀÚ ¼³¸í, ¾È³»¹®Ãâ·Â (SMMNO02900.xfm - JScript ) - Version : 1) : Ver.1.00.01 */ var xOutRsrvPatListPath = "/root/main/outrsrvpatlist"; var xOutRsrvPatCodeListPath = "/root/main/outrsrvpatcodelist"; var uijeongbuinstcd="", sunggainstcd="", vincentinstcd=""; // ÀÇÁ¤ºÎ¼º¸ð,ºÎõ¼º°¡, ¼ººó¼¾Æ®º´¿ø±â°üÄÚµå_20090606 var tdayAcptYN = "N"; // ¿Ü·¡Áø·á¿¹¾à ½Ã ´çÀÏÁ¢¼öȯÀÚÆ÷ÇÔ Á¶È¸ º´¿ø (2009.06.23 JJE) /** * @group : * @ver : 2009.07.30 * @by : ¼º¹Ì¿¬ * @--------------------------------------------------- * @type : function * @access : public * @desc : È­¸é ÃʱâÈ­ * @param : * @return : * @--------------------------------------------------- */ function fInitialize(){ grd_OutRsrvPatList.fixedcellcheckbox(0, grd_OutRsrvPatList.colRef("chk")) = true; model.removenode("/root/main/outrsrvpatlist"); model.refresh(); var instcd = getUserInfo("dutplceinstcd"); var standard_yn = "rcptuseyn"; var ord_deptflag = 'X'; var rslt_ref = "/root/init/orddept"; var sort_field = "depthngnm"; var sort_method = "asc"; var dt = getCurrentDate(); //¿À´Ã ³¯Â¥·Î ÃʱâÈ­ ÇÏ´Â ºÎºÐ.(Áø·áÀÏÀÚ¸¦ default·Î ¿À´Ã ³¯Â¥·Î ¼±ÅÃÇÔ) model.setValue("/root/main/cond/orddd", dt); // °£È£¿Ü·¡Áø·áºÎ¼­ÄÞº¸ (ƯÁ¤ÇÏÀ§ºÎ¼­¸¦ Æ÷ÇÔ- ºÐ¸¸½Ç, À°¾Æ»ó´ã½Ç, Àΰø½ÅÀå½Ç) zsdfGetCareOutOrderDepartmentList(instcd, rslt_ref, dt); addComboInstance("/root/init/orddept", "deptcd^depthngnm", "0000000000^ÀüüÁø·á°ú", "dept"); //Áø·áºÎ¼­ ÄÞº¸ ÀüüÃß°¡ model.resetInstanceNode("/root/main/cond/orddept"); // °øÅëÄÚµå ½ºÅ©¸³Æ® È£Ãâ zbcfGetCodeList( new Array("Z0008"), new Array("/root/init/comcd")); var dutplcecd = getUserInfo("dutplcecd"); // ±Ù¹«ÁöºÎ¼­ÄÚµå var suporddeptcd = getUserInfo("ordsupdeptcd"); if (dutplcecd != "") { model.setValue("/root/main/cond/orddeptcd", dutplcecd); // ±Ù¹«ÁöºÎ¼­ÄÚµå fDeptDoctSearch(); // Àǻ縮½ºÆ®Á¶È¸ } /* // °£È£ ȯ°æ¼³Á¤Å×À̺í Á¶È¸ var pCode = "'065', '077', '107'"; // Á¶È¸ÇÒ CdGrupID ÄÚµåÁ¤º¸ var pDate = getCurrentDate(); //Á¶È¸±âÁØÀÏÀÚ fGetNursHardCdInfo(pCode, pDate); for(var i=1; i<=getNodesetCount("/root/code/codeinfo/codelist"); i++){ switch (model.getValue("/root/code/codeinfo/codelist["+i+"]/cdgrupid")){ case "065": // ³»°ú MDdeptcd = model.getValue("/root/code/codeinfo/codelist["+i+"]/cdid"); break; case "077": // ÀÇÁ¤ºÎ¼º¸ðº´¿ø±â°üÄÚµå_20090606 switch(model.getValue("/root/code/codeinfo/codelist["+i+"]/supcdid")){ case "02": // (01:¼­¿ï¼º¸ð,02:ÀÇÁ¤ºÎ¼º¸ð,03:ºÎõ¼º°¡, 04:¼ººó¼¾Æ®) uijeongbuinstcd = model.getValue("/root/code/codeinfo/codelist["+i+"]/cdid"); break; case "03": // (01:¼­¿ï¼º¸ð,02:ÀÇÁ¤ºÎ¼º¸ð,03:ºÎõ¼º°¡, 04:¼ººó¼¾Æ®) sunggainstcd = model.getValue("/root/code/codeinfo/codelist["+i+"]/cdid"); break; case "04": // (01:¼­¿ï¼º¸ð,02:ÀÇÁ¤ºÎ¼º¸ð,03:ºÎõ¼º°¡, 04:¼ººó¼¾Æ®) vincentinstcd = model.getValue("/root/code/codeinfo/codelist["+i+"]/cdid"); break; } case "107": // ¿Ü·¡Áø·á¿¹¾à ½Ã ´çÀÏÁ¢¼öȯÀÚÆ÷ÇÔ Á¶È¸ º´¿ø (2009.06.23 JJE) if( model.getValue("/root/code/codeinfo/codelist["+i+"]/cdid") == getUserInfo("dutplceinstcd") ) tdayAcptYN = "Y"; break; } } */ /* // ¼º°¡, ÀÇÁ¤ºÎ, ¼ººó¼¾Æ®º´¿ø ¿äû: Ãâ·Â¿ëµµ¿¡ [´çÀÏÁ¢¼öÆ÷ÇÔ] ¼±ÅÃ, ´çÀÏÁ¢¼öÆ÷ÇÔ ¼±ÅÃÈÄ Ãâ·Â¿ëµµ ¼±Åýÿ¡´Â ´çÀÏÁ¢¼öȯÀÚ Æ÷ÇÔÇÏ¿© °Ô½ÃÆÇ¿ë,¾÷¹«¿ëÀÇ ¸í´ÜÀÌ Ãâ·ÂµÇµµ·Ï ÇØ¾ß ÇÔ (2009.06.23 JJE) model.setValue("/root/main/cond/gettdayacptyn", tdayAcptYN); if(tdayAcptYN == "Y" ){ bol_tdayacptyn.visible = true; cap_tdayacptyn.visible = true; }else{ bol_tdayacptyn.visible = false; cap_tdayacptyn.visible = false; } */ model.refresh(); } /** * @group : * @ver : 2007.09.17 * @by : ¹®Ã¢°ï * @--------------------------------------------------- * @type : function * @access : public * @desc : Áø·á°úÀÇ ÀÇ»ç Á¶È¸ * @param : * @return : * @--------------------------------------------------- */ function fDeptDoctSearch(typegubn){ cmb_orddr.disabled = false; model.removenode("/root/main/outrsrvpatlist"); model.refresh(); if(model.getValue("/root/main/cond/orddeptcd") == "0000000000" && model.getValue("/root/main/cond/pid") == "") { //messageBox("ÀüüÁø·á°ú´Â ÇöÀç Á¶È¸ÇÒ ¼ö ¾ø½À´Ï´Ù", "E"); //return; } model.makeValue("/root/send/reqdata/orddd", model.getValue("/root/main/cond/orddd")); model.makeValue("/root/send/reqdata/orddeptcd", model.getValue("/root/main/cond/orddeptcd")); var sordclsdeptflag = model.getValue("/root/init/orddept/dept[deptcd = '"+model.getValue("/root/main/cond/orddeptcd")+"']/ordclsdeptflag"); // ¼¾ÅÍ/´ëÇ¥/ºÐ°ú/¼­ºê ±¸ºÐ var ssupdeptcd = model.getValue("/root/init/orddept/dept[deptcd = '"+model.getValue("/root/main/cond/orddeptcd")+"']/supdeptcd"); // »óÀ§ºÎ¼­ÄÚµå var sorddeptkind = model.getValue("/root/init/orddept/dept[deptcd = '"+model.getValue("/root/main/cond/orddeptcd")+"']/orddeptkind"); // ¼¾ÅÍ/´ëÇ¥ ±¸ºÐ var sorddeptflag = ""; if (sorddeptkind == "C") { // ¼¾ÅÍÀ̸é sorddeptflag = "C"; //} else if (sorddeptkind != "C" && sordclsdeptflag == "A") { // ¼¾ÅͰ¡ ¾Æ´Ï¸é¼­ ºÐ°úÀ̸é // sorddeptflag = "A"; } else { // ±×¿Ü¿¡ ±âŸ°ú sorddeptflag = "etc"; } model.setValue("/root/main/cond/ordclsdeptflag",sorddeptflag); model.setValue("/root/main/cond/supdeptcd",ssupdeptcd); model.makeValue("/root/send/reqdata/ordclsdeptflag", model.getValue("/root/main/cond/ordclsdeptflag")); model.makeValue("/root/send/reqdata/supdeptcd", model.getValue("/root/main/cond/supdeptcd")); submit("TRMNO00104"); if(getNodesetCount("/root/init/orddr/orddr") > 0){ for(var i = 0; i < grd_OutRsrvPatList.cols;i++) { grd_OutRsrvPatList.colsort(i) = "asc"; } //addComboInstance("/root/init/orddr", "userid^usernm", "00000000^ÀüüÀÇ»ç", "orddr"); //Áø·áÀÇÄÞº¸ ÀüüÃß°¡ addComboInstance("/root/init/orddr", "userid^userdepthngnm", "00000000^ÀüüÀÇ»ç", "orddr"); //Áø·áÀÇÄÞº¸ ÀüüÃß°¡ model.resetInstanceNode("/root/main/cond/orddr"); } else { model.makenode("/root/init/orddr"); model.makenode("/root/init/orddr/orddr"); model.makenode("/root/init/orddr/orddr/userid"); model.makenode("/root/init/orddr/orddr/usernm"); //addComboInstance("/root/init/orddr", "userid^usernm", "00000000^ÀüüÀÇ»ç", "orddr"); //Áø·áÀÇÄÞº¸ ÀüüÃß°¡ addComboInstance("/root/init/orddr", "userid^userdepthngnm", "00000000^ÀüüÀÇ»ç", "orddr"); //Áø·áÀÇÄÞº¸ ÀüüÃß°¡ cmb_orddr.select(0); } model.setValue("/root/main/cond/orddeptnm", cmb_orddept.label); cmb_orddr.refresh(); } /** * @group : * @ver : 2009.07.30 * @by : ¼º¹Ì¿¬ * @--------------------------------------------------- * @type : function * @access : public * @desc : ȯÀÚ¼³¸í, ¾È³»¹®Ãâ·Â ȯÀÚ¸®½ºÆ® Á¶È¸ * @param : * @return : * @--------------------------------------------------- */ function fBtnRefClicked(){ model.removenode("/root/main/outrsrvpatlist"); model.refresh(); var sorddept = model.getValue("/root/main/cond/orddeptcd"); var sorddr = model.getValue("/root/main/cond/orddr"); var rsrvflag7 = model.getValue("/root/main/cond/rsrvflag7"); // ±âŸÆ÷ÇÔ var sOrdDD = model.getValue("/root/main/cond/orddd"); if(cmb_orddept.value == "") { messageBox("Áø·á°ú¸¦ ¼±ÅÃÇÏÁö ","E007"); return; } //Áø·áÀÇ È®ÀÎÃß°¡(Áø·áÀǼ±ÅÃÇÏÁö¾Ê¾Æµµ ÀüüÀÇ»çÁ¶È¸µÊ)-20090910-kys if(cmb_orddr.value == "") { messageBox("Áø·áÀǸ¦ ¼±ÅÃÇÏÁö ","E007"); return; } model.makenode("/root/send/req"); model.copynode("/root/send/req", "/root/main/cond"); model.makeValue("/root/send/req/ordfromdd", sOrdDD); model.makeValue("/root/send/req/ordtodd", sOrdDD); if(submit("TRMNO01801")){ model.setValue("/root/main/cond/cnt", grd_OutRsrvPatList.rows-1); opt_cnt.refresh(); grd_OutRsrvPatList.fixedcellischeck(0, grd_OutRsrvPatList.colRef("chk")) = true; for(var i = 1; i <= getNodesetCount("/root/main/outrsrvpatlist/outrsrvpatinfo"); i++){ //È­¸é ·ÎµùÈÄ ¹Ù·Î Ãâ·Â¹öư Ŭ¸¯½Ã ¼±Åõȳ»¿ªÀÌ ¾ø´Ù´Â âÀÌ ¶ß´Â ¿À·ù·Î ¼öÁ¤ÇÔ-20090928-kys(true->Y) model.setValue("/root/main/outrsrvpatlist/outrsrvpatinfo[" + i + "]/chk", "Y"); } } model.setValue("/root/main/cond/orddrnm", cmb_orddr.label); grd_OutRsrvPatList.refresh(); model.refresh(); } /** * @group : * @ver : 2009.07.30 * @by : ¼º¹Ì¿¬ * @--------------------------------------------------- * @type : function * @access : public * @desc : ¿Ü·¡È¯ÀÚ¼³¸í, ¾È³»¹® Ãâ·Â * @param : * @param : * @return : * @--------------------------------------------------- */ function fClickPrint(){ if (grd_OutRsrvPatList.findRow("Y", 1, grd_OutRsrvPatList.colRef("chk")) == "-1"){ messageBox("¼±ÅÃµÈ ³»¿ªÀÌ ¾ø½À´Ï´Ù.", "I"); return; } //var printYN = "N"; for(var i = 0; i < grd_OutRsrvPatList.rows;i++) { var chk = model.getValue("/root/main/outrsrvpatlist/outrsrvpatinfo[" + i + "]/chk"); var pid = model.getValue("/root/main/outrsrvpatlist/outrsrvpatinfo[" + i + "]/pid"); var orddeptcd = model.getValue("/root/main/outrsrvpatlist/outrsrvpatinfo[" + i + "]/orddeptcd"); var SRow = grd_OutRsrvPatList.findRow(pid, 1, grd_OutRsrvPatList.colRef("pid")); var SChk = model.getValue("/root/main/outrsrvpatlist/outrsrvpatinfo[" + SRow + "]/chk"); var SOrddeptcd = model.getValue("/root/main/outrsrvpatlist/outrsrvpatinfo[" + SRow + "]/orddeptcd"); if(chk == "Y"){ if(SChk == "Y" && orddeptcd == SOrddeptcd && SRow != "-1" && SRow < i){ //´Ù¸¥À¯ÇüÀ¸·Î Á¢¼öµÆÀ» °æ¿ì Çѹø¸¸ Ãâ·ÂµÇµµ·Ï ÇÔ continue; }else{ model.removenode("/root/temp/printdata"); //send À籸¼º model.makeValue("/root/temp/printdata",""); model.copyNode("/root/temp/printdata", "/root/main/outrsrvpatlist/outrsrvpatinfo[" + i + "]"); exeReportPreview("RPMNO02900", "XMLSTR", "", "", "true", "", "", "", "", "true"); //¹Ì¸®º¸±â ¶ßÁö ¾ÊÀ½ //exeReportPreview("RPMNO02900", "XMLSTR", "", "", "", "", "", "", "", "true"); } } /* if(chk == "Y"){ for(var k = 0; k < grd_OutRsrvPatList.rows;k++) { var SPid = model.getValue("/root/main/outrsrvpatlist/outrsrvpatinfo[" + k + "]/pid"); var SChk = model.getValue("/root/main/outrsrvpatlist/outrsrvpatinfo[" + k + "]/chk"); var SOrddeptcd = model.getValue("/root/main/outrsrvpatlist/outrsrvpatinfo[" + k + "]/orddeptcd"); if(pid == SPid && SChk == "Y" && orddeptcd == SOrddeptcd && i > k){ printYN = "N"; }else{ printYN = "Y"; } } if(printYN == "Y"){ model.removenode("/root/temp/printdata"); //send À籸¼º model.makeValue("/root/temp/printdata",""); model.copyNode("/root/temp/printdata", "/root/main/outrsrvpatlist/outrsrvpatinfo[" + i + "]"); //exeReportPreview("RPMNO02900", "XMLSTR", "", "", "true", "", "", "", "", "true"); //¹Ì¸®º¸±â ¶ßÁö ¾ÊÀ½ exeReportPreview("RPMNO02900", "XMLSTR", "", "", "", "", "", "", "", "true"); } } */ } grd_OutRsrvPatList.fixedcellischeck(0, grd_OutRsrvPatList.colRef("chk")) = false; grd_OutRsrvPatList.refresh(); } /** * @desc : ÄÞº¸¹Ú½º¿¡ ¿øÇÏ´Â instance node¿Í value¸¦ ¼³Á¤ * @ * @param : * @event : * @return : * @--------------------------------------------------- */ function addComboInstance(combopath, nodename, nodeval, parentnode){ nodename = nodename.split("^"); nodeval = nodeval.split("^"); if(nodename.length != nodeval.length){ return; } var label = model.instances(0).createElement(nodename[0]); var val = model.instances(0).createElement(nodename[1]); var combo = model.instances(0).createElement(parentnode); label.value = "" + nodeval[0] + ""; val.value = "" + nodeval[1] + ""; combo.appendChild(label); combo.appendChild(val); chkNode = model.instances(0).selectSingleNode(combopath); if(chkNode == null){ model.makeNode(combopath); srcNode = model.instances(0).selectSingleNode(combopath); }else{ srcNode = model.instances(0).selectSingleNode(combopath); } desNode = model.instances(0).selectSingleNode(combopath + "/" + parentnode); srcNode.insertBefore(combo, desNode); model.refresh(); } /** * @group : * @ver : 2009.11.16 * @by : ±è¾ç¼ö * @--------------------------------------------------- * @type : function * @access : public * @desc : ȯÀÚ¸Þ¸ð * @param : * @param : * @return : * @--------------------------------------------------- */ function fPatMemo() { var pid = grd_OutRsrvPatList.valueMatrix(grd_OutRsrvPatList.row,grd_OutRsrvPatList.colRef("pid")); var hngnm = grd_OutRsrvPatList.valueMatrix(grd_OutRsrvPatList.row,grd_OutRsrvPatList.colRef("patnm")); var orddeptcd = grd_OutRsrvPatList.valueMatrix(grd_OutRsrvPatList.row,grd_OutRsrvPatList.colRef("orddeptcd")); setParameter("SPMNO02300_PARM", pid + "¢Ë" + hngnm + "¢Ë" + orddeptcd); modal("../../../emr/outcareweb/xrw/SPMNO02300", "","", "", "SPMNO02300", "", ""); }