/** * @desc : Ãʱâ Á¤º¸ ¼ÂÆÃ * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fInit(){ //20111007 //ÇϵåÄÚµå Å×À̺í üũ fGetHardCDList("N", 5560, 0 , "/root/init/hardcditem"); //20111007 mmbfGetHardCodeInfo("/root/send/reqdata", "/root/init/resnable", 5992); gResnablecnt = getNodeSetCnt("/root/init/resnable/hardcd[hardcd = 'Y']"); //»çÀ¯ÀԷ»ç¿ë¿©ºÎ model.setValue("/root/main/term/termfromdd", getCurrentDate()); model.setValue("/root/main/term/termtodd", getCurrentDate()); model.removeNodeset("/root/temp/deptinfo/dept"); model.removeNodeset("/root/temp/wardinfo/dept"); //fGetDeptlist("root/send/reqdata", "/root/main/dept/orddept", "total", getUserInfo("dutplceinstcd")); zsdfGetInOutOrdDeptList(getUserInfo("dutplceinstcd"), "/root/temp/deptinfo", "depthngnm", "asc"); copyNodeset("/root/hidden/dept/orddept", "/root/temp/deptinfo/dept"); copyNodeset("/root/hidden/dept/rtndept", "/root/hidden/dept/orddept"); addComboItem("cmb_rtndept", "Àüü", "-", "above"); addComboItem("cmb_orddept", "Àüü", "-", "above"); //fGetWardlist("root/send/reqdata", "/root/main/dept/ward", ""); zbcfGetDeptCodeList(getUserInfo("dutplceinstcd"), "orduseyn", "W", "/root/temp/wardinfo", "depthngnm", "asc"); copyNodeset("/root/hidden/dept/ward", "/root/temp/wardinfo/dept"); addComboItem("cmb_wardlist", "Àüü", "-", "above"); copyNodeset("/root/hidden/dept/rtndept", "/root/main/hidden/ward", "append"); if(checkOpener()){ sParamMsg = opener.javascript.getParameter("SMRF02600_Param"); if(sParamMsg != ""){ model.setValue("/root/main/pid", getArrayData(sParamMsg,1,0)); model.setValue("/root/main/term/termfromdd", getArrayData(sParamMsg,1,1)); model.setValue("/root/main/term/termtodd", getArrayData(sParamMsg,1,1)); } else { fGetPatInfo(); } } else { fGetPatInfo(); } fGetFormlist("root/send/reqdata", "/root/main/forminfo", "OCR,OCR(CODE),OCR(PROG)", getUserInfo("dutplceinstcd")); //fGetFormlist("root/send/reqdata", "/root/gridData/row", "OCR,OCR(CODE),OCR(PROG)", getUserInfo("dutplceinstcd")); fSetIOFlag(); //grd_ocrprntlist.frozenCols = grd_ocrprntlist.colRef("statcd"); grd_ocrprntlist.frozenCols = grd_ocrprntlist.colRef("formnm"); model.setValue("/root/main/rtncnfm", "-"); chk_state2.disabled = true; chk_state3.disabled = true; chk_state4.disabled = true; chk_state5.disabled = true; model.setValue("/root/main/scanyn", ""); model.setValue("/root/main/dept/ward", "-"); // 2010.03.10. ÀÌÀº¿µ // OCR ¹Ý³³È­¸é ½ºÄËÀÚ·á Ãâ·Â °¡´É ºÎ¼­ - ÇϵåÄÚµå(9932) model.makeValue("/root/send/ocrprnthrdcd", "9932"); model.makeNode("/root/init/ocrprnthrdcd"); mmbfGetHardCodeInfo("/root/send/ocrprnthrdcd", "/root/init/ocrprnthrdcd", 9932); var dutplcecd = getUserInfo("dutplcecd"); model.makeValue("/root/hidden/dutplcecd", dutplcecd); var OcrPrntCnt = getNodesetCnt(model, "/root/init/ocrprnthrdcd/hardcd[hardcd = '" + dutplcecd + "']"); if (OcrPrntCnt > 0) { btn_ocrrecview.disabled = false; } // KNUH_20101207_¹Ú¼ºÈ£_start_Àǹ«±â·Ï ºÎ¼­ÄÚµå °¡Á®¿À±â mmbfGetHardCodeInfo("/root/send/reqdata", "/root/temp/dutplcecd", 5501); //if((getUserInfo("dutplcecd") == "3230000000") || (getUserInfo("dutplcecd") == "3230600000") || (getUserInfo("dutplcecd") == "3230700000")){ if(model.getValue("/root/temp/dutplcecd/hardcd[hardcd='" + dutplcecd + "']/hardcd") != ""){ // KNUH_20101207_¹Ú¼ºÈ£_end // 2008-07-15 Á¤¿µ¼® ¿äû // °£È£¿¡¼­ ¹ÙÄÚµå ¹Ý³³ ¹× À̷º¸±â¸¦ ¶ç¿ï ¼ö ÀÖµµ·Ï ¿äûÇÔ //btn_barcode.disabled = false; //btn_histview.disabled = false; btn_rtn.disabled = false; btn_rntcancel.disabled = false; btn_rtncnfm.disabled = false; btn_cnfmcancel.disabled = false; btn_prntcancel.disabled = false; btn_delcancel.disabled = false; btn_excel.disabled = false; btn_ocrrecview.disabled = false; } //2010-03-18 ¿ÀÀü 10:27:07 ÀÌȯ¼® //º´µ¿°£È£, ÀÀ±Þ°£È£ µî ÀÔ¿ø°£È£ ¸Þ´º±×·ìÀÇ µ¿ÀǼ­ ¹× ±âŸÃâ·Â ¼­½Ä ¹Ý³³ È­¸é¿¡¼­ //±¸ºÐ Ãʱ⼳Á¤À» ¸Þ´º paramter°ª¿¡ µû¶ó ´Þ¸® ÇÑ´Ù.(parameter°ª ¾øÀ» °æ¿ì default) var menuparam = getScreenMenuParameter(); //¹Ù·Î°¡±â·Î OCR¹Ý³³ È­¸éÀ» µé¾î°¬À» °æ¿ì nullÀÌ ¹®ÀÚ·Î µé¾î°¨. if(menuparam == "null") { model.setValue("/root/main/flag", "ORD"); } else if(menuparam != "") { model.setValue("/root/main/flag", menuparam); } //2013/02/21 Start model.setValue("/root/main/eocryn", "-"); model.setValue("/root/main/scanyn", "-"); //2013/02/21 End model.refresh(); } /** * @desc : µ¿ÀǼ­ ¹× ±âŸ Ãâ·Â¼­½Ä ¹Ý³³ Á¶È¸ * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fSearch(){ //20111010 model.makeValue("/root/send/reqdata/termfromdd", model.getValue("/root/main/term/termfromdd")); model.makeValue("/root/send/reqdata/termtodd", model.getValue("/root/main/term/termtodd")); submit("TRMRF02699"); if(model.getValue("/root/cond/check")> 31){ if(model.getValue("/root/main/pid")=="" && model.getValue("/root/inputSearchData")==""){ alert("Á¶È¸±â°£ÀÌ 31ÀÏ ÀÌ»óÀÌ¸é µî·Ï¹øÈ£ ¶Ç´Â ¼­½Ä¸í ¼±ÅÃÀÌ ÇʼöÀÔ´Ï´Ù!"); return; } } //20111010 fSetDeptValue(); //2010.02.18, hkjoo var sendPath = "/root/send/reqdata/ocrprnt"; var statcd = model.getValue("/root/main/rtncnfm"); statcd = statcd.split(" ").join("|"); model.makeValue(sendPath + "/dateflag", model.getValue("/root/main/flag")); model.makeValue(sendPath + "/termfromdd", model.getValue("/root/main/term/termfromdd")); model.makeValue(sendPath + "/termtodd", model.getValue("/root/main/term/termtodd")); model.makeValue(sendPath + "/prntdeptcd", model.getValue("/root/main/dept/prntdept")); model.makeValue(sendPath + "/rtndeptcd", model.getValue("/root/main/dept/rtndept")); model.makeValue(sendPath + "/orddeptcd", model.getValue("/root/main/dept/orddept")); model.makeValue(sendPath + "/wardcd", model.getValue("/root/main/dept/ward")); model.makeValue(sendPath + "/ioflag", model.getValue("/root/main/ioflag")); model.makeValue(sendPath + "/rtncnfm", statcd); model.makeValue(sendPath + "/scanyn", model.getValue("/root/main/scanyn")); model.makeValue(sendPath + "/eocryn", model.getValue("/root/main/eocryn")); model.makeValue(sendPath + "/exdsc", model.getValue("/root/main/exdsc")); model.makeValue(sendPath + "/lstupdtdeptnm", model.getValue("/root/main/lstupdtdeptnm")); model.makeValue(sendPath + "/lstupdtusernm", model.getValue("/root/main/lstupdtusernm")); model.makeValue(sendPath + "/verflag", "A"); model.makeValue(sendPath + "/inputflag", "A"); if(model.getValue("/root/inputSearchData")==""){ model.makeValue(sendPath + "/formcd", ""); model.makeValue(sendPath + "/formfromdt", ""); }else{ model.makeValue(sendPath + "/formcd", model.getValue("/root/inputSelectValue")); model.makeValue(sendPath + "/formfromdt", model.getValue("/root/inputSelectValue2")); } //2012/05/22 End model.makeValue(sendPath + "/pid", model.getValue("/root/main/pid")); submit("TRMRF02604"); //grd_ocrprntlist.clearStatus(); grd_ocrprntlist.rebuildStyle(); //grd_ocrprntlist.cellStyle("background-image", grd_ocrprntlist.row, 1) = "../../../com/commonweb/images/icon_n.gif"; model.removeNodeset("/root/send/reqdata"); model.refresh(); } /** * @desc : ºÎ¼­¸®½ºÆ® Á¶È¸ * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fGetDeptlist(ref, rsltRef, queryflag, dutplceinstcd){ if(queryflag != null) model.makeValue(ref + "/queryflag", queryflag); if(dutplceinstcd != null) model.makeValue(ref + "/dutplceinstcd", dutplceinstcd); submit("TRMRF02601", true, ref, rsltRef); } /** * @desc : º´µ¿¸®½ºÆ® Á¶È¸ * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fGetWardlist(ref, rsltRef, queryflag){ if(queryflag != null) model.makeValue(ref + "/queryflag", queryflag); submit("TRMRF02602", true, ref, rsltRef); } /** * @desc : Æû¸®½ºÆ® Á¶È¸ * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fGetFormlist(ref, rsltRef, queryflag, dutplceinstcd){ if(queryflag != null) model.makeValue(ref + "/queryflag", queryflag); if(dutplceinstcd != null) model.makeValue(ref + "/dutplceinstcd", dutplceinstcd); submit("TRMRF02603", true, ref, rsltRef); } /** * @desc : Ãâ·ÂºÎ¼­¸®½ºÆ® Á¶È¸ * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fGetPrntDeptlist(ioflag){ model.removeNodeset("/root/temp/deptinfo/dept"); switch(ioflag){ case "A": zsdfGetInOutOrdDeptList(getUserInfo("dutplceinstcd"), "/root/temp/deptinfo", "depthngnm", "asc"); copyNodeset("/root/hidden/dept/orddept", "/root/temp/deptinfo/dept"); copyNodeset("/root/hidden/dept/rtndept", "/root/hidden/dept/orddept"); copyNodeset("/root/hidden/dept/rtndept", "/root/hidden/dept/ward", "append"); addComboItem("cmb_rtndept", "Àüü", "-", "above"); addComboItem("cmb_orddept", "Àüü", "-", "above"); copyNodeset("/root/hidden/dept/prntdept", "/root/hidden/dept/rtndept"); break; case "O": zsdfGetOutOrdDeptList(getUserInfo("dutplceinstcd"), "/root/temp/deptinfo", "depthngnm", "asc"); copyNodeset("/root/hidden/dept/orddept", "/root/temp/deptinfo/dept"); copyNodeset("/root/hidden/dept/prntdept", "/root/hidden/dept/orddept", "replace"); addComboItem("cmb_orddept", "Àüü", "-", "above"); addComboItem("cmb_prntdept", "Àüü", "-", "above"); model.removeNodeset("/root/temp/deptinfo/dept"); zsdfGetInOutOrdDeptList(getUserInfo("dutplceinstcd"), "/root/temp/deptinfo", "depthngnm", "asc"); copyNodeset("/root/hidden/dept/rtndept", "/root/temp/deptinfo/dept"); addComboItem("cmb_rtndept", "Àüü", "-", "above"); break; case "I": zsdfGetInOrdDeptList(getUserInfo("dutplceinstcd"), "/root/temp/deptinfo", "depthngnm", "asc"); copyNodeset("/root/hidden/dept/orddept", "/root/temp/deptinfo/dept"); copyNodeset("/root/hidden/dept/prntdept", "/root/hidden/dept/orddept", "replace"); copyNodeset("/root/hidden/dept/prntdept", "/root/main/hidden/ward", "append"); addComboItem("cmb_orddept", "Àüü", "-", "above"); addComboItem("cmb_prntdept", "Àüü", "-", "above"); copyNodeset("/root/hidden/dept/rtndept", "/root/hidden/dept/prntdept", "replace"); break; case "E": zsdfGetInOrdDeptList(getUserInfo("dutplceinstcd"), "/root/temp/deptinfo", "depthngnm", "asc"); copyNodeset("/root/hidden/dept/orddept", "/root/temp/deptinfo/dept"); copyNodeset("/root/hidden/dept/prntdept", "/root/hidden/dept/orddept", "replace"); copyNodeset("/root/hidden/dept/prntdept", "/root/main/hidden/ward", "append"); addComboItem("cmb_orddept", "Àüü", "-", "above"); addComboItem("cmb_prntdept", "Àüü", "-", "above"); copyNodeset("/root/hidden/dept/rtndept", "/root/hidden/dept/prntdept", "replace"); break; } } /** * @desc : ÀÔ¿ø/¿Ü·¡ ±¸ºÐÁ¤º¸ ¼ÂÆÃ * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fSetIOFlag(){ if((rdo_ioflag.value == "I") || (rdo_ioflag.value == "E") || (rdo_ioflag.value == "A")){ cmb_wardlist.disabled = false; if(rdo_ioflag.value == "I"){ fGetPrntDeptlist("I"); }else if(rdo_ioflag.value == "E"){ fGetPrntDeptlist("E"); }else if(rdo_ioflag.value == "A"){ fGetPrntDeptlist("A"); } } else { cmb_wardlist.disabled = true; if(rdo_ioflag.value == "O"){ fGetPrntDeptlist("O"); } } model.refresh(); } /** * @desc : ¹Ý³³ºÎ¼­¸®½ºÆ® Á¶È¸ * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fGetRtnDeptlist(){ zbcfGetCodeList( new Array("A0146"), new Array("/root/init/baseinfo/tmplcdflag"), false ); submit("TRZBC00101"); } /** * @desc : Á¤º¸ÀúÀå * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fSetData(){ var rowcount = grd_ocrprntlist.rows - grd_ocrprntlist.fixedrows; var listPath = "/root/main/prntstat/list"; var targetPath="/root/maintemp/prntstat/list"; model.removeNodeset("/root/send/reqdata"); for(var irow = 1; irow <= rowcount; irow++){ if(model.getValue(targetPath + "[" + irow + "]/choice") == "true"){ //copyNodeset("/root/send/reqdata", listPath+"["+irow+"]", "append"); copyNodeset("/root/send/reqdata", targetPath+"["+irow+"]", "append"); } } if(submit("TXMRF02605")){ messageBox("", "I001"); } else { messageBox("", "E009"); } model.removeNodeset("/root/send/reqdata"); model.removeNodeset("/root/maintemp/prntstat/list"); } /** * @desc : »ç¿ëÀںμ­ ¹× ¹Ý³³¼¼ÆÃ * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fSetRtn(){ var rowcount = grd_ocrprntlist.rows - grd_ocrprntlist.fixedrows; var listPath = "/root/main/prntstat/list"; var targetPath="/root/maintemp/prntstat/list"; var currDT = getCurrentDate()+getCurrentTime(); model.resetInstanceNode("/root/main/userpopupinfo"); model.setValue("/root/main/userpopupinfo/param", "_OneS_DD"); model.makeValue("/root/main/userpopupinfo/searchitem", getUserInfo("userid")); model.makeValue("/root/main/userpopupinfo/flag", "userid"); modal("../../userdeptinfoweb/xrw/SPZSU10103_»ç¿ëÀںμ­¼±ÅÃÁ¶È¸", "", "200", "200", "SPZSU10103","/root/main/userpopupinfo","/root/main/temp"); var selusr = getParameter("SPZSU10103_"); setCSVToNode("/root/temp/userinfo", selusr); clearParameter("SPZSU10103_»ç¿ëÀںμ­¼±ÅÃÁ¶È¸"); for(var irow = 1; irow <= rowcount; irow++){ if(model.getValue(listPath + "[" + irow + "]/choice") == "true"){ //20111007 var chkform = instance1.selectNodes("/root/init/hardcditem/hardcd"); for(var i=1; i<=parseInt(chkform.length); i++){ if(model.getValue("/root/main/prntstat/list["+irow+"]/formcd")==model.getValue("/root/init/hardcditem/hardcd["+ i + "]/hardcd")){ alert(model.getValue("/root/init/hardcditem/hardcd["+ i + "]/hardcdnm") + "ÀÇ ¹Ý³³Àº ¼±ÅÃÁø·á ½Åû°ü¸® È­¸é¿¡¼­¸¸ °¡´ÉÇÕ´Ï´Ù."); return; } } //20111007 if(!((model.getValue(listPath + "[" + irow + "]/statcd") == "P") || (model.getValue(listPath + "[" + irow + "]/statcd") == "CR") || (model.getValue(listPath + "[" + irow + "]/statcd") == "CD"))){ messageBox("Ãâ·Â»óŰ¡ ¾Æ´Ñ µ¥ÀÌÅͰ¡","E005"); return; } var cnt = model.getXPathValue("count("+targetPath+")"); cnt = parseInt(cnt) + 1; model.makeNode(targetPath+"["+cnt+"]"); model.copyNode(targetPath+"["+cnt+"]", listPath + "[" + irow + "]"); model.setValue( targetPath+"["+cnt+"]/rtndt", currDT); model.setValue( targetPath+"["+cnt+"]/rtndeptcd", model.getValue("/root/temp/userinfo/list/dutplcecd")); model.setValue( targetPath+"["+cnt+"]/rtnuserid", model.getValue("/root/temp/userinfo/list/userid")); model.setValue( targetPath+"["+cnt+"]/rtndeptnm", model.getValue("/root/temp/userinfo/list/dutplcenm")); model.setValue( targetPath+"["+cnt+"]/rtnusernm", model.getValue("/root/temp/userinfo/list/usernm")); model.setValue( targetPath+"["+cnt+"]/statcd", "R"); model.setValue( targetPath+"["+cnt+"]/lstupdtdt", currDT); model.setValue( targetPath+"["+cnt+"]/lstupdtdeptcd", model.getValue("/root/temp/userinfo/list/dutplcecd")); model.setValue( targetPath+"["+cnt+"]/lstupdtuserid", model.getValue("/root/temp/userinfo/list/userid")); model.setValue( targetPath+"["+cnt+"]/lstupdtdeptnm", model.getValue("/root/temp/userinfo/list/dutplcenm")); model.setValue( targetPath+"["+cnt+"]/lstupdtusernm", model.getValue("/root/temp/userinfo/list/usernm")); /* model.setValue(listPath + "[" + irow + "]/rtndt", currDT); model.setValue(listPath + "[" + irow + "]/rtndeptcd", model.getValue("/root/temp/userinfo/list/dutplcecd")); model.setValue(listPath + "[" + irow + "]/rtnuserid", model.getValue("/root/temp/userinfo/list/userid")); model.setValue(listPath + "[" + irow + "]/rtndeptnm", model.getValue("/root/temp/userinfo/list/dutplcenm")); model.setValue(listPath + "[" + irow + "]/rtnusernm", model.getValue("/root/temp/userinfo/list/usernm")); model.setValue(listPath + "[" + irow + "]/statcd", "R"); model.setValue(listPath + "[" + irow + "]/lstupdtdt", currDT); model.setValue(listPath + "[" + irow + "]/lstupdtdeptcd", model.getValue("/root/temp/userinfo/list/dutplcecd")); model.setValue(listPath + "[" + irow + "]/lstupdtuserid", model.getValue("/root/temp/userinfo/list/userid")); model.setValue(listPath + "[" + irow + "]/lstupdtdeptnm", model.getValue("/root/temp/userinfo/list/dutplcenm")); model.setValue(listPath + "[" + irow + "]/lstupdtusernm", model.getValue("/root/temp/userinfo/list/usernm"));*/ if(model.getValue(listPath + "[" + irow + "]/formcd") == "0000001778"){ fGetNewBabyInfo(listPath, irow); } } } model.refresh(); fSetData(); } /** * @desc : ¹Ý³³È®ÀÎÁ¤º¸ ¼ÂÆÃ * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fSetRtnCnfm(){ var rowcount = grd_ocrprntlist.rows - grd_ocrprntlist.fixedrows; var listPath = "/root/main/prntstat/list"; var targetPath="/root/maintemp/prntstat/list"; var currDT = getCurrentDate()+getCurrentTime(); for(var irow = 1; irow <= rowcount; irow++){ if(model.getValue(listPath + "[" + irow + "]/choice") == "true"){ if(!((model.getValue(listPath + "[" + irow + "]/statcd") == "R") || (model.getValue(listPath + "[" + irow + "]/statcd") == "CC"))){ messageBox("¹Ý³³»óŰ¡ ¾Æ´Ñ µ¥ÀÌÅͰ¡","E005"); return; } var cnt = model.getXPathValue("count("+targetPath+")"); cnt = parseInt(cnt) + 1; model.makeNode(targetPath+"["+cnt+"]"); model.copyNode(targetPath+"["+cnt+"]", listPath + "[" + irow + "]"); model.setValue( targetPath+"["+cnt+"]/rtncnfmdt", currDT); model.setValue( targetPath+"["+cnt+"]/rtncnfmdeptcd", getUserInfo("dutplcecd")); model.setValue( targetPath+"["+cnt+"]/rtncnfmuserid", getUserInfo("userid")); model.setValue( targetPath+"["+cnt+"]/rtncnfmdeptnm", getUserInfo("dutplcenm")); model.setValue( targetPath+"["+cnt+"]/rtncnfmusernm", getUserInfo("usernm")); model.setValue( targetPath+"["+cnt+"]/statcd", "C"); model.setValue( targetPath+"["+cnt+"]/rtncnfm", "Y"); model.setValue( targetPath+"["+cnt+"]/lstupdtdt", currDT); model.setValue( targetPath+"["+cnt+"]/lstupdtdeptcd", getUserInfo("dutplcecd")); model.setValue( targetPath+"["+cnt+"]/lstupdtuserid", getUserInfo("userid")); model.setValue( targetPath+"["+cnt+"]/lstupdtdeptnm", getUserInfo("dutplcenm")); model.setValue( targetPath+"["+cnt+"]/lstupdtusernm", getUserInfo("usernm")); /* model.setValue(listPath + "[" + irow + "]/rtncnfmdt", currDT); model.setValue(listPath + "[" + irow + "]/rtncnfmdeptcd", getUserInfo("dutplcecd")); model.setValue(listPath + "[" + irow + "]/rtncnfmuserid", getUserInfo("userid")); model.setValue(listPath + "[" + irow + "]/rtncnfmdeptnm", getUserInfo("dutplcenm")); model.setValue(listPath + "[" + irow + "]/rtncnfmusernm", getUserInfo("usernm")); model.setValue(listPath + "[" + irow + "]/statcd", "C"); model.setValue(listPath + "[" + irow + "]/rtncnfm", "Y"); model.setValue(listPath + "[" + irow + "]/lstupdtdt", currDT); model.setValue(listPath + "[" + irow + "]/lstupdtdeptcd", getUserInfo("dutplcecd")); model.setValue(listPath + "[" + irow + "]/lstupdtuserid", getUserInfo("userid")); model.setValue(listPath + "[" + irow + "]/lstupdtdeptnm", getUserInfo("dutplcenm")); model.setValue(listPath + "[" + irow + "]/lstupdtusernm", getUserInfo("usernm")); */ } } model.refresh(); fSetData(); } /** * @desc : ¹Ý³³Ãë¼Ò ¼ÂÆÃ * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fSetRtnCancel(){ var rowcount = grd_ocrprntlist.rows - grd_ocrprntlist.fixedrows; var listPath = "/root/main/prntstat/list"; var targetPath="/root/maintemp/prntstat/list"; var currDT = getCurrentDate()+getCurrentTime(); var updtresncnts = model.getValue("/root/tmp/resn"); //Àǹ«±â·Ï ºÎ¼­ var cnt = getNodeSetCnt("/root/temp/dutplcecd/hardcd[hardcd = '" + getUserInfo("dutplcecd") + "']"); for(var irow = 1; irow <= rowcount; irow++){ if(model.getValue(listPath + "[" + irow + "]/choice") == "true"){ //20111007 var chkform = instance1.selectNodes("/root/init/hardcditem/hardcd"); for(var i=1; i<=parseInt(chkform.length); i++){ if(model.getValue("/root/main/prntstat/list["+irow+"]/formcd")==model.getValue("/root/init/hardcditem/hardcd["+ i + "]/hardcd")){ alert(model.getValue("/root/init/hardcditem/hardcd["+ i + "]/hardcdnm") + "ÀÇ ¹Ý³³Ãë¼Ò´Â ¼±ÅÃÁø·á ½Åû°ü¸® È­¸é¿¡¼­¸¸ °¡´ÉÇÕ´Ï´Ù."); return; } } //20111007 if(model.getValue(listPath + "[" + irow + "]/scanyn") == "Y"){ messageBox("½ºÄµµÈ Data´Â ¹Ý³³Ãë¼Ò¸¦","E001"); return; } if(!((model.getValue(listPath + "[" + irow + "]/statcd") == "R") || (model.getValue(listPath + "[" + irow + "]/statcd") == "CC"))){ messageBox("¹Ý³³»óŰ¡ ¾Æ´Ñ µ¥ÀÌÅͰ¡","E005"); return; } if(cnt == 0 && model.getValue(listPath + "[" + irow + "]/prntuserid") != getUserInfo("userid")){ messageBox("Ãâ·ÂÀÚ¿Í ¹Ý³³Ãë¼ÒÀÚ°¡ µ¿ÀÏÇÏÁö ¾Ê¾Æ ÁøÇà ºÒ°¡ÇÕ´Ï´Ù","E"); return; } var cnt = model.getXPathValue("count("+targetPath+")"); cnt = parseInt(cnt) + 1; model.makeNode(targetPath+"["+cnt+"]"); model.copyNode(targetPath+"["+cnt+"]", listPath + "[" + irow + "]"); model.setValue( targetPath+"["+cnt+"]/rtndt", ""); model.setValue( targetPath+"["+cnt+"]/rtndeptcd", ""); model.setValue( targetPath+"["+cnt+"]/rtnuserid", ""); model.setValue( targetPath+"["+cnt+"]/rtndeptnm", ""); model.setValue( targetPath+"["+cnt+"]/rtnusernm", ""); model.setValue( targetPath+"["+cnt+"]/statcd", "CR"); model.setValue( targetPath+"["+cnt+"]/lstupdtdt", currDT); model.setValue( targetPath+"["+cnt+"]/lstupdtdeptcd", getUserInfo("dutplcecd")); model.setValue( targetPath+"["+cnt+"]/lstupdtuserid", getUserInfo("userid")); model.setValue( targetPath+"["+cnt+"]/lstupdtdeptnm", getUserInfo("dutplcenm")); model.setValue( targetPath+"["+cnt+"]/lstupdtusernm", getUserInfo("usernm")); model.setValue( targetPath+"["+cnt+"]/updtresncnts", updtresncnts); /* model.setValue(listPath + "[" + irow + "]/rtndt", ""); model.setValue(listPath + "[" + irow + "]/rtndeptcd", ""); model.setValue(listPath + "[" + irow + "]/rtnuserid", ""); model.setValue(listPath + "[" + irow + "]/rtndeptnm", ""); model.setValue(listPath + "[" + irow + "]/rtnusernm", ""); model.setValue(listPath + "[" + irow + "]/statcd", "CR"); model.setValue(listPath + "[" + irow + "]/lstupdtdt", currDT); model.setValue(listPath + "[" + irow + "]/lstupdtdeptcd", getUserInfo("dutplcecd")); model.setValue(listPath + "[" + irow + "]/lstupdtuserid", getUserInfo("userid")); model.setValue(listPath + "[" + irow + "]/lstupdtdeptnm", getUserInfo("dutplcenm")); model.setValue(listPath + "[" + irow + "]/lstupdtusernm", getUserInfo("usernm")); */ } } model.refresh(); fSetData(); } /** * @desc : ¹Ý³³È®ÀÎÁ¤º¸ Ãë¼Ò ¼ÂÆÃ * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fSetRtnCnfmCancel(){ var rowcount = grd_ocrprntlist.rows - grd_ocrprntlist.fixedrows; var listPath = "/root/main/prntstat/list"; var targetPath="/root/maintemp/prntstat/list"; var currDT = getCurrentDate()+getCurrentTime(); var updtresncnts = model.getValue("/root/tmp/resn"); for(var irow = 1; irow <= rowcount; irow++){ if(model.getValue(listPath + "[" + irow + "]/choice") == "true"){ if(model.getValue(listPath + "[" + irow + "]/scanyn") == "Y"){ messageBox("½ºÄµµÈ Data´Â ¹Ý³³È®ÀÎ Ãë¼Ò¸¦","E001"); return; } if(!(model.getValue(listPath + "[" + irow + "]/statcd") == "C")){ messageBox("¹Ý³³»óŰ¡ ¾Æ´Ñ µ¥ÀÌÅͰ¡","E005"); return; } var cnt = model.getXPathValue("count("+targetPath+")"); cnt = parseInt(cnt) + 1; model.makeNode(targetPath+"["+cnt+"]"); model.copyNode(targetPath+"["+cnt+"]", listPath + "[" + irow + "]"); model.setValue( targetPath+"["+cnt+"]/rtncnfmdt", ""); model.setValue( targetPath+"["+cnt+"]/rtncnfmdeptcd", ""); model.setValue( targetPath+"["+cnt+"]/rtncnfmuserid", ""); model.setValue( targetPath+"["+cnt+"]/rtncnfmdeptnm", ""); model.setValue( targetPath+"["+cnt+"]/rtncnfmusernm", ""); model.setValue( targetPath+"["+cnt+"]/statcd", "CC"); model.setValue( targetPath+"["+cnt+"]/rtncnfm", "N"); model.setValue( targetPath+"["+cnt+"]/lstupdtdt", currDT); model.setValue( targetPath+"["+cnt+"]/lstupdtdeptcd", getUserInfo("dutplcecd")); model.setValue( targetPath+"["+cnt+"]/lstupdtuserid", getUserInfo("userid")); model.setValue( targetPath+"["+cnt+"]/lstupdtdeptnm", getUserInfo("dutplcenm")); model.setValue( targetPath+"["+cnt+"]/lstupdtusernm", getUserInfo("usernm")); model.setValue( targetPath+"["+cnt+"]/updtresncnts", updtresncnts); /* model.setValue(listPath + "[" + irow + "]/rtncnfmdt", ""); model.setValue(listPath + "[" + irow + "]/rtncnfmdeptcd", ""); model.setValue(listPath + "[" + irow + "]/rtncnfmuserid", ""); model.setValue(listPath + "[" + irow + "]/rtncnfmdeptnm", ""); model.setValue(listPath + "[" + irow + "]/rtncnfmusernm", ""); model.setValue(listPath + "[" + irow + "]/statcd", "CC"); model.setValue(listPath + "[" + irow + "]/rtncnfm", "N"); model.setValue(listPath + "[" + irow + "]/lstupdtdt", currDT); model.setValue(listPath + "[" + irow + "]/lstupdtdeptcd", getUserInfo("dutplcecd")); model.setValue(listPath + "[" + irow + "]/lstupdtuserid", getUserInfo("userid")); model.setValue(listPath + "[" + irow + "]/lstupdtdeptnm", getUserInfo("dutplcenm")); model.setValue(listPath + "[" + irow + "]/lstupdtusernm", getUserInfo("usernm")); */ } } model.refresh(); fSetData(); } /** * @desc : Ãâ·Â Ãë¼Ò Á¤º¸ ¼ÂÆÃ * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fSetPrntCancel(){ var rowcount = grd_ocrprntlist.rows - grd_ocrprntlist.fixedrows; var listPath = "/root/main/prntstat/list"; var targetPath="/root/maintemp/prntstat/list"; var currDT = getCurrentDate()+getCurrentTime(); var updtresncnts = model.getValue("/root/tmp/resn"); for(var irow = 1; irow <= rowcount; irow++){ if(model.getValue(listPath + "[" + irow + "]/choice") == "true"){ //20111007 var chkform = instance1.selectNodes("/root/init/hardcditem/hardcd"); for(var i=1; i<=parseInt(chkform.length); i++){ if(model.getValue("/root/main/prntstat/list["+irow+"]/formcd")==model.getValue("/root/init/hardcditem/hardcd["+ i + "]/hardcd")){ alert(model.getValue("/root/init/hardcditem/hardcd["+ i + "]/hardcdnm") + "ÀÇ »èÁ¦´Â ¼±ÅÃÁø·á ½Åû°ü¸® È­¸é¿¡¼­¸¸ °¡´ÉÇÕ´Ï´Ù."); return; } } //20111007 //2013/03/08 Start if(model.getValue(listPath + "[" + irow + "]/statcd") == "CP" || model.getValue(listPath + "[" + irow + "]/statcd") == "D"){ messageBox("ÀÌ¹Ì »èÁ¦µÈ µ¥ÀÌÅÍÀÔ´Ï´Ù", "I", ""); return; } //2013/03/08 End //2013/02/22 Start ÀüÀÚµ¿ÀǼ­ °ü·Ã ¼öÁ¤ ½ÃÀÛ if(model.getValue(listPath + "[" + irow + "]/eocryn") == "Y"){ }else if(!((model.getValue(listPath + "[" + irow + "]/statcd") == "P") || (model.getValue(listPath + "[" + irow + "]/statcd") == "CR") || (model.getValue(listPath + "[" + irow + "]/statcd") == "CD"))){ messageBox("Ãâ·Â»óŰ¡ ¾Æ´Ñ µ¥ÀÌÅͰ¡","E005"); return; } /*if(!((model.getValue(listPath + "[" + irow + "]/statcd") == "P") || (model.getValue(listPath + "[" + irow + "]/statcd") == "CR") || (model.getValue(listPath + "[" + irow + "]/statcd") == "CD"))){ messageBox("Ãâ·Â»óŰ¡ ¾Æ´Ñ µ¥ÀÌÅͰ¡","E005"); return; }*/ //2013/02/22 End var cnt = model.getXPathValue("count("+targetPath+")"); cnt = parseInt(cnt) + 1; model.makeNode(targetPath+"["+cnt+"]"); model.copyNode(targetPath+"["+cnt+"]", listPath + "[" + irow + "]"); model.setValue( targetPath+"["+cnt+"]/prntdt", ""); model.setValue( targetPath+"["+cnt+"]/prntdeptcd", ""); model.setValue( targetPath+"["+cnt+"]/prntuserid", ""); model.setValue( targetPath+"["+cnt+"]/prntdeptnm", ""); model.setValue( targetPath+"["+cnt+"]/prntusernm", ""); model.setValue( targetPath+"["+cnt+"]/statcd", "CP"); model.setValue( targetPath+"["+cnt+"]/rtncnfm", "N"); model.setValue( targetPath+"["+cnt+"]/lstupdtdt", currDT); model.setValue( targetPath+"["+cnt+"]/lstupdtdeptcd", getUserInfo("dutplcecd")); model.setValue( targetPath+"["+cnt+"]/lstupdtuserid", getUserInfo("userid")); model.setValue( targetPath+"["+cnt+"]/lstupdtdeptnm", getUserInfo("dutplcenm")); model.setValue( targetPath+"["+cnt+"]/lstupdtusernm", getUserInfo("usernm")); model.setValue( targetPath+"["+cnt+"]/updtresncnts", updtresncnts); //2013/02/27 Start ÀüÀÚµ¿ÀǼ­ °ü·Ã Ç÷¡±× üũ if(model.getValue(listPath + "[" + irow + "]/eocryn") == "Y"){ model.makeValue( targetPath+"["+cnt+"]/eocryn", "Y"); } //2013/02/27 End /* model.setValue(listPath + "[" + irow + "]/prntdt", ""); model.setValue(listPath + "[" + irow + "]/prntdeptcd", ""); model.setValue(listPath + "[" + irow + "]/prntuserid", ""); model.setValue(listPath + "[" + irow + "]/prntdeptnm", ""); model.setValue(listPath + "[" + irow + "]/prntusernm", ""); model.setValue(listPath + "[" + irow + "]/statcd", "CP"); model.setValue(listPath + "[" + irow + "]/rtncnfm", "N"); model.setValue(listPath + "[" + irow + "]/lstupdtdt", currDT); model.setValue(listPath + "[" + irow + "]/lstupdtdeptcd", getUserInfo("dutplcecd")); model.setValue(listPath + "[" + irow + "]/lstupdtuserid", getUserInfo("userid")); model.setValue(listPath + "[" + irow + "]/lstupdtdeptnm", getUserInfo("dutplcenm")); model.setValue(listPath + "[" + irow + "]/lstupdtusernm", getUserInfo("usernm")); */ } } model.refresh(); fSetData(); } /** * @desc : Ãâ·Â Ãë¼Ò Á¤º¸ ¼ÂÆÃ * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fSetDelCancel(){ var rowcount = grd_ocrprntlist.rows - grd_ocrprntlist.fixedrows; var listPath = "/root/main/prntstat/list"; var targetPath="/root/maintemp/prntstat/list"; var currDT = getCurrentDate()+getCurrentTime(); for(var irow = 1; irow <= rowcount; irow++){ if(model.getValue(listPath + "[" + irow + "]/choice") == "true"){ if(model.getValue(listPath + "[" + irow + "]/statcd") != "CP" && model.getValue(listPath + "[" + irow + "]/statcd") != "D"){ messageBox("»èÁ¦»óŰ¡ ¾Æ´Ñ µ¥ÀÌÅͰ¡","E005"); return; } //2013/02/27 Start ¿ø¹«¿¡¼­ ¹ß»ýÇÏ´Â ¼­½ÄÀº ¿ø¹«ÂÊ È­¸éÀ¸·Î À¯µµ var chkform = instance1.selectNodes("/root/init/hardcditem/hardcd"); for(var i=1; i<=parseInt(chkform.length); i++){ if(model.getValue("/root/main/prntstat/list["+irow+"]/formcd")==model.getValue("/root/init/hardcditem/hardcd["+ i + "]/hardcd")){ alert(model.getValue("/root/init/hardcditem/hardcd["+ i + "]/hardcdnm") + "ÀÇ »èÁ¦ Ãë¼Ò´Â ¼±ÅÃÁø·á ½Åû°ü¸® È­¸é¿¡¼­¸¸ °¡´ÉÇÕ´Ï´Ù."); return; } } //2013/02/27 End var cnt = model.getXPathValue("count("+targetPath+")"); cnt = parseInt(cnt) + 1; model.makeNode(targetPath+"["+cnt+"]"); model.copyNode(targetPath+"["+cnt+"]", listPath + "[" + irow + "]"); model.setValue( targetPath+"["+cnt+"]/prntdt", currDT); model.setValue( targetPath+"["+cnt+"]/prntdeptcd", getUserInfo("dutplcecd")); model.setValue( targetPath+"["+cnt+"]/prntuserid", getUserInfo("userid")); model.setValue( targetPath+"["+cnt+"]/prntdeptnm", getUserInfo("dutplcenm")); model.setValue( targetPath+"["+cnt+"]/prntusernm", getUserInfo("usernm")); //2013/02/25 Start ÀüÀÚµ¿ÀǼ­¸¦ »èÁ¦Ãë¼Ò Çҽÿ¡´Â ¹Ý³³ »óÅ·Πµ¹¸² if(model.getValue(listPath + "[" + irow + "]/eocryn") != "Y"){ model.setValue( targetPath+"["+cnt+"]/statcd", "P"); }else{ model.setValue( targetPath+"["+cnt+"]/statcd", "C"); model.makeValue( targetPath+"["+cnt+"]/eocryn", "Y"); } //2013/02/25 End model.setValue( targetPath+"["+cnt+"]/rtncnfm", "N"); model.setValue( targetPath+"["+cnt+"]/lstupdtdt", currDT); model.setValue( targetPath+"["+cnt+"]/lstupdtdeptcd", getUserInfo("dutplcecd")); model.setValue( targetPath+"["+cnt+"]/lstupdtuserid", getUserInfo("userid")); model.setValue( targetPath+"["+cnt+"]/lstupdtdeptnm", getUserInfo("dutplcenm")); model.setValue( targetPath+"["+cnt+"]/lstupdtusernm", getUserInfo("usernm")); /* model.setValue(listPath + "[" + irow + "]/prntdt", currDT); model.setValue(listPath + "[" + irow + "]/prntdeptcd", getUserInfo("dutplcecd")); model.setValue(listPath + "[" + irow + "]/prntuserid", getUserInfo("userid")); model.setValue(listPath + "[" + irow + "]/prntdeptnm", getUserInfo("dutplcenm")); model.setValue(listPath + "[" + irow + "]/prntusernm", getUserInfo("usernm")); model.setValue(listPath + "[" + irow + "]/statcd", "P"); model.setValue(listPath + "[" + irow + "]/rtncnfm", "N"); model.setValue(listPath + "[" + irow + "]/lstupdtdt", currDT); model.setValue(listPath + "[" + irow + "]/lstupdtdeptcd", getUserInfo("dutplcecd")); model.setValue(listPath + "[" + irow + "]/lstupdtuserid", getUserInfo("userid")); model.setValue(listPath + "[" + irow + "]/lstupdtdeptnm", getUserInfo("dutplcenm")); model.setValue(listPath + "[" + irow + "]/lstupdtusernm", getUserInfo("usernm")); */ } } model.refresh(); fSetData(); } /** * @desc : ¹öư ÃʱâÈ­ * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function finitialBtn(row, checkflag){ var statcd = model.getValue("/root/main/prntstat/list["+row+"]/statcd"); // KNUH_20101207_¹Ú¼ºÈ£_start_Àǹ«±â·Ï ºÎ¼­ÄÚµå °¡Á®¿À±â //if((getUserInfo("dutplcecd") == "3230000000") || (getUserInfo("dutplcecd") == "3230600000") || (getUserInfo("dutplcecd") == "3230700000")){ var dutplcecd = getUserInfo("dutplcecd"); if(model.getValue("/root/temp/dutplcecd/hardcd[hardcd='" + dutplcecd + "']/hardcd") != ""){ // KNUH_20101207_¹Ú¼ºÈ£_end if(checkflag){ switch(statcd){ case "P": btn_rtncnfm.disabled = true; btn_rntcancel.disabled = true; btn_cnfmcancel.disabled = true; btn_delcancel.disabled = true; btn_rtn.disabled = false; btn_prntcancel.disabled = false; break; case "R": btn_rtncnfm.disabled = false; btn_rntcancel.disabled = false; btn_cnfmcancel.disabled = true; btn_delcancel.disabled = true; btn_rtn.disabled = true; btn_prntcancel.disabled = true; break; case "C": btn_rtncnfm.disabled = true; btn_rntcancel.disabled = true; btn_cnfmcancel.disabled = false; btn_delcancel.disabled = true; btn_rtn.disabled = true; btn_prntcancel.disabled = true; break; case "CP": btn_rtncnfm.disabled = true; btn_rntcancel.disabled = true; btn_cnfmcancel.disabled = true; btn_delcancel.disabled = false; btn_rtn.disabled = true; btn_prntcancel.disabled = true; break; case "CR": btn_rtncnfm.disabled = true; btn_rntcancel.disabled = true; btn_cnfmcancel.disabled = true; btn_delcancel.disabled = true; btn_rtn.disabled = false; btn_prntcancel.disabled = false; break; case "CC": btn_rtncnfm.disabled = false; btn_rntcancel.disabled = false; btn_cnfmcancel.disabled = true; btn_delcancel.disabled = true; btn_rtn.disabled = true; btn_prntcancel.disabled = true; break; } } var setflag = model.getValue("/root/main/prntstat/list["+row+"]/scanyn"); if((setflag == "Y")&&((statcd == "R")||(statcd == "CC"))){ btn_barcode.disabled = true; btn_rtn.disabled = true; btn_rntcancel.disabled = true; btn_cnfmcancel.disabled = true; btn_prntcancel.disabled = true; btn_delcancel.disabled = true; btn_rtncnfm.disabled = false; } else if((setflag == "Y")&&(statcd == "C")){ btn_barcode.disabled = true; btn_rtn.disabled = true; btn_rntcancel.disabled = true; btn_cnfmcancel.disabled = true; btn_prntcancel.disabled = true; btn_delcancel.disabled = true; btn_rtncnfm.disabled = true; } } //2013/02/22 Start ÀüÀÚµ¿ÀǼ­°ü·Ã ¼öÁ¤ /* * ÀüÀÚµ¿ÀǼ­¸¦ ¼±Åýà »èÁ¦ ¶Ç´Â »èÁ¦Ãë¼Ò¸¦ Ȱ¼ºÈ­ ½ÃÄÑÁØ´Ù. */ var eocryn = model.getValue("/root/main/prntstat/list["+row+"]/eocryn"); if(eocryn=="Y"){ btn_prntcancel.disabled = false; btn_delcancel.disabled = false; } //2013/02/22 End //»çÀ¯ÀԷ°¡´É±â°ü if (gResnablecnt > 0) { btn_rntcancel.disabled = false; } } /** * @desc : ¿¢¼¿ÆÄÀÏ·Î ÀúÀå * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fSaveExcel(){ var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*"); if (fileName != "") { grd_ocrprntlist.saveExcel(fileName, "SheetName", true, true, "", "", false); } } /** * @desc : ±â·ÏÀÌ·ÂÁ¤º¸ Á¶È¸ * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fShowHist(){ var row = grd_ocrprntlist.row; var chk_List = instance1.selectNodes("/root/main/prntstat/list[choice = 'true']"); if(chk_List.length > 1){ messageBox("µ¥ÀÌŸ°¡ µÎ °ÇÀÌ»ó", "E005"); return; } if(btn_histview.label == "À̷´ݱâ"){ group2.attribute("visibility") = "hidden"; grd_ocrprntlist.rebuildStyle(); btn_histview.attribute("text") = "À̷º¸±â" btn_histview.refresh(); return; } model.makeValue("/root/send/reqdata/ocrtag", model.getValue("/root/main/prntstat/list["+row+"]/ocrtag")); model.makeValue("/root/send/reqdata/currentdd", getCurrentDate()); submit("TRMRF02606"); group2.attribute("visibility") = "visible"; btn_histview.attribute("text") = "À̷´ݱâ" btn_histview.refresh(); model.removeNodeset("/root/send/reqdata"); } /** * @desc : ȯÀÚÁ¤º¸ Á¶È¸ * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fGetPatSearch(){ model.makeValue("/root/temp/srchcond","1"); model.makeValue("/root/temp/pid", model.getValue("/root/main/pid")); model.makeValue("/root/temp/autoflag", "Y"); // 1°ÇÀΰæ¿ì ÀÚµ¿À¸·Î´ÝÈû modal("SPPMC02500", 1, 10, 10, "SPPMC02500", "/root/temp", "/root/send"); model.setValue("/root/main/pid", model.getValue("/root/main/patinfo/patinfolist/pid")); model.refresh(); } /** * @desc : µ¥ÀÌŸ ¼±Åà * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fChoiceData(){ var row = grd_ocrprntlist.row; var sRowCnt = grd_ocrprntlist.rows- grd_ocrprntlist.fixedRows; var allSel = grd_ocrprntlist.valueMatrix(0, 1); if(grd_ocrprntlist.isCell(event.target) && grd_ocrprntlist.mouserow >= grd_ocrprntlist.fixedrows) { //±×¸®µå¿¡¼­ µ¥ÀÌŸ¿µ¿ª¸¸ ¼±Åà if(grd_ocrprntlist.col == 1){ if(model.getValue("/root/main/prntstat/list["+row+"]/choice") == "true"){ model.makeValue("/root/main/prntstat/list["+row+"]/choice", "true"); finitialBtn(row, model.getValue("/root/main/prntstat/list["+row+"]/choice")); }else if(model.getValue("/root/main/prntstat/list["+row+"]/choice") == "false"){ model.makeValue("/root/main/prntstat/list["+row+"]/choice", "false"); // KNUH_20101207_¹Ú¼ºÈ£_start_Àǹ«±â·Ï ºÎ¼­ÄÚµå °¡Á®¿À±â var dutplcecd = getUserInfo("dutplcecd"); //if((getUserInfo("dutplcecd") == "3230000000") || (getUserInfo("dutplcecd") == "3230600000") || (getUserInfo("dutplcecd") == "3230700000")){ if(model.getValue("/root/temp/dutplcecd/hardcd[hardcd='" + dutplcecd + "']/hardcd") != ""){ // KNUH_20101207_¹Ú¼ºÈ£_end btn_rtncnfm.disabled = false; btn_rntcancel.disabled = false; btn_cnfmcancel.disabled = false; btn_delcancel.disabled = false; btn_rtn.disabled = false; btn_prntcancel.disabled = false; btn_barcode.disabled = false; } } } }else if((grd_ocrprntlist.col == 1) && (grd_ocrprntlist.row == 0)) { if(allSel == "¼±ÅÃ"){ for(var iRow=1; iRow<=sRowCnt; iRow++){ model.setValue("/root/main/prntstat/list["+iRow+"]/choice","true"); grd_ocrprntlist.valueMatrix(0, 1) = "ÇØÁ¦"; } } else if(allSel == "ÇØÁ¦"){ for(var iRow=1; iRow<=sRowCnt; iRow++){ model.setValue("/root/main/prntstat/list["+iRow+"]/choice","false"); grd_ocrprntlist.valueMatrix(0, 1) = "¼±ÅÃ"; } } } } /** * @desc : ȯÀÚ Á¤º¸ Get * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fGetPatInfo(){ var node = getGlobalVariable("paminfo"); setCSVToNode("/root/main/session/paminfo", node); model.setValue("/root/main/flag", "ORD"); model.setValue("/root/main/pid", model.getValue("/root/main/session/paminfo/list/pid")); model.setValue("/root/main/dept/orddept", model.getValue("/root/main/session/paminfo/list/orddeptcd")); model.setValue("/root/main/ioflag", model.getValue("/root/main/session/paminfo/list/ordtype")); //model.setValue("/root/main/dept/prntdept", model.getValue("/root/main/session/paminfo/list/orddeptcd")); if((model.getValue("/root/main/ioflag") == "O") || (model.getValue("/root/main/ioflag") == "S")){ model.makeValue("/root/main/term/termfromdd", model.getValue("/root/main/session/paminfo/list/orddd")); model.makeValue("/root/main/term/termtodd", model.getValue("/root/main/session/paminfo/list/orddd")); } else if(model.getValue("/root/main/ioflag") == "I"){ model.makeValue("/root/main/term/termfromdd", model.getValue("/root/main/session/paminfo/list/indd")); model.makeValue("/root/main/term/termtodd", model.getValue("/root/main/session/paminfo/list/indd")); model.setValue("/root/main/dept/ward", model.getValue("/root/main/session/paminfo/list/wardcd")); } else if(model.getValue("/root/main/ioflag") == "E"){ model.makeValue("/root/main/term/termfromdd", model.getValue("/root/main/session/paminfo/list/indd")); model.makeValue("/root/main/term/termtodd", model.getValue("/root/main/session/paminfo/list/indd")); model.makeValue("/root/main/dept/ward", model.getValue("/root/main/session/paminfo/list/wardcd")); } else if(model.getValue("/root/main/ioflag") == "D"){ model.setValue("/root/main/ioflag", "I"); model.makeValue("/root/main/term/termfromdd", model.getValue("/root/main/session/paminfo/list/indd")); model.makeValue("/root/main/term/termtodd", model.getValue("/root/main/session/paminfo/list/indd")); model.makeValue("/root/main/dept/ward", model.getValue("/root/main/session/paminfo/list/wardcd")); } else { model.setValue("/root/main/ioflag", "A"); } fSearch(); } /** * @desc : ¹ÙÄÚµå ¹Ý³³ ÆË¾÷ * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fBarCodeRtnPopup() { modal("SPMRF02900", "", "200", "200", "SPMRF02900","",""); } /** * @desc : OCR ÀçÇÁ¸°Æ® * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fRePrntOCR(){ var formtypecls = ""; var ocrtagprntyn = ""; var iRow = grd_ocrprntlist.row; ivw_ocrprnt.attribute("src") = "../../../emr/formmngtweb/xrw/SSMRF03800_OCRºä¾î.xrw"; var formcd = model.getValue("/root/main/prntstat/list["+ iRow + "]/formcd"); var pid = model.getValue("/root/main/prntstat/list["+ iRow + "]/pid"); var orddd = model.getValue("/root/main/prntstat/list["+ iRow + "]/orddd"); var cretno = model.getValue("/root/main/prntstat/list["+ iRow + "]/cretno"); var ordtype = model.getValue("/root/main/prntstat/list["+ iRow + "]/ioflag"); var ocrtag = model.getValue("/root/main/prntstat/list["+ iRow + "]/ocrtag"); var scanyn = model.getValue("/root/main/prntstat/list["+ iRow + "]/scanyn"); // º¯°æ ¿äû¹øÈ£ 1851¿¡ µû¸¥ ¼öÁ¤ // 2009-07-24 nj if(scanyn == 'Y'){ messageBox("½ºÄµ¿Ï·áµÈ ¼­½ÄÀº ÀçÃâ·Â ÇÒ ¼ö", "I004"); return; } model.removeNodeset("/root/send/reqdata"); model.makeValue("/root/send/reqdata/ocrtag", ocrtag); /* var returnVal = fGetHardCDList("Y", 199, 3);dnpq //À¯ÀüÀÚ°Ë»ç µ¿ÀǼ­ ÀçÃâ·Â(2011.12.08 lyj) if ( formcd == returnVal ) */ if( fContainsHardCD("199", formcd)) { ivw_ocrprnt.window.javascript.fGenePrint(ocrtag,ordtype,formcd); return; } if(submit("TRMRF02605")){ formtypecls = model.getValue("/root/main/ocrforminfo/formtypecls"); ocrtagprntyn = model.getValue("/root/main/ocrforminfo/ocrtagprntyn"); ivw_ocrprnt.window.javascript.fGetOCRInfo(formcd, pid, orddd, cretno, ordtype, formtypecls, ocrtagprntyn, ocrtag); ivw_ocrprnt.window.javascript.fPrint("A"); } } /** * @desc : OCR ÇÁ¸°Æ® * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fOcrprnt(){ if(isDataCell()){ var state = grd_ocrprntlist.valueMatrix(grd_ocrprntlist.mouserow, grd_ocrprntlist.colRef("statcd")); //»óŰ¡ »èÁ¦ÀÎ °æ¿ì¸¸ Á¦¿ÜÇϰí ÀçÃâ·ÂÀÌ °¡´ÉÇϵµ·Ï ¼öÁ¤ if ( state != "CP" && state != "D" ) setPopupMenu("grd_ocrprntlist", false, "/root/init/mouserght", "label", "value"); } else { initPopupMenu(); } } /** * @desc : ½Å»ý¾ÆÁö¹®Ç¥ ¹Ý³³Àº ½Å»ý¾Æ Á¤º¸·Î Á¤º¸ ¼öÁ¤ÀÌ µÇ¾î¾ß ÇÔ * * @param : ocrtag * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fGetNewBabyInfo(listPath, irow){ var targetPath="/root/maintemp/prntstat/list"; var pid = model.getValue(listPath + "[" + irow + "]/pid"); var cretno = model.getValue(listPath + "[" + irow + "]/cretno"); var orddd = model.getValue(listPath + "[" + irow + "]/orddd"); model.removeNodeset("/root/send/reqdata"); model.makeValue("/root/send/reqdata/pid", pid); model.makeValue("/root/send/reqdata/cretno", cretno); model.makeValue("/root/send/reqdata/indd", orddd); if(submit("TRMRF02501")){ var nodeCnt = getNodesetCount("/root/main/newbabylist/newbabyinfo"); if(nodeCnt == 0){ messageBox("µî·ÏµÈ ½Å»ý¾Æ°¡ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù", ""); return; } else if(nodeCnt > 1){ setParameter("SPMRF02500_pid", pid); setParameter("SPMRF02500_indd", orddd); setParameter("SPMRF02500_cretno", cretno); setParameter("SPMRF02500_rtnPath", "/root/hidden/param/newbabyinfo"); modal("SPMRF02500"); /* model.setValue(listPath + "[" + irow + "]/pid", model.getValue("/root/hidden/param/newbabyinfo/babyno")); model.setValue(listPath + "[" + irow + "]/patnm", model.getValue("/root/hidden/param/newbabyinfo/babynm")); model.setValue(listPath + "[" + irow + "]/orddd", model.getValue("/root/hidden/param/newbabyinfo/babyindd")); model.setValue(listPath + "[" + irow + "]/cretno", model.getValue("/root/hidden/param/newbabyinfo/babycretno")); model.setValue(listPath + "[" + irow + "]/orddeptcd", model.getValue("/root/hidden/param/newbabyinfo/babyorddeptcd")); model.setValue(listPath + "[" + irow + "]/orddrid", model.getValue("/root/hidden/param/newbabyinfo/babyorddrid")); model.setValue(listPath + "[" + irow + "]/orddeptnm", model.getValue("/root/hidden/param/newbabyinfo/babyorddeptnm")); model.setValue(listPath + "[" + irow + "]/orddrnm", model.getValue("/root/hidden/param/newbabyinfo/babyorddrnm"));*/ model.setValue( targetPath + "/pid", model.getValue("/root/hidden/param/newbabyinfo/babyno")); model.setValue( targetPath + "/patnm", model.getValue("/root/hidden/param/newbabyinfo/babynm")); model.setValue( targetPath + "/orddd", model.getValue("/root/hidden/param/newbabyinfo/babyindd")); model.setValue( targetPath + "/cretno", model.getValue("/root/hidden/param/newbabyinfo/babycretno")); model.setValue( targetPath + "/orddeptcd", model.getValue("/root/hidden/param/newbabyinfo/babyorddeptcd")); model.setValue( targetPath + "/orddrid", model.getValue("/root/hidden/param/newbabyinfo/babyorddrid")); model.setValue( targetPath + "/orddeptnm", model.getValue("/root/hidden/param/newbabyinfo/babyorddeptnm")); model.setValue( targetPath + "/orddrnm", model.getValue("/root/hidden/param/newbabyinfo/babyorddrnm")); model.resetInstanceNode("/root/hidden/param/newbabyinfo"); } else { /* model.setValue(listPath + "[" + irow + "]/pid", model.getValue("/root/main/newbabylist/newbabyinfo/babyno")); model.setValue(listPath + "[" + irow + "]/patnm", model.getValue("/root/main/newbabylist/newbabyinfo/babynm")); model.setValue(listPath + "[" + irow + "]/orddd", model.getValue("/root/main/newbabylist/newbabyinfo/babyindd")); model.setValue(listPath + "[" + irow + "]/cretno", model.getValue("/root/main/newbabylist/newbabyinfo/babycretno")); model.setValue(listPath + "[" + irow + "]/orddeptcd", model.getValue("/root/main/newbabylist/newbabyinfo/babyorddeptcd")); model.setValue(listPath + "[" + irow + "]/orddrid", model.getValue("/root/main/newbabylist/newbabyinfo/babyorddrid")); model.setValue(listPath + "[" + irow + "]/orddeptnm", model.getValue("/root/main/newbabylist/newbabyinfo/babyorddeptnm")); model.setValue(listPath + "[" + irow + "]/orddrnm", model.getValue("/root/main/newbabylist/newbabyinfo/babyorddrm,")); */ model.setValue( targetPath + "/pid", model.getValue("/root/main/newbabylist/newbabyinfo/babyno")); model.setValue( targetPath + "/patnm", model.getValue("/root/main/newbabylist/newbabyinfo/babynm")); model.setValue( targetPath + "/orddd", model.getValue("/root/main/newbabylist/newbabyinfo/babyindd")); model.setValue( targetPath + "/cretno", model.getValue("/root/main/newbabylist/newbabyinfo/babycretno")); model.setValue( targetPath + "/orddeptcd", model.getValue("/root/main/newbabylist/newbabyinfo/babyorddeptcd")); model.setValue( targetPath + "/orddrid", model.getValue("/root/main/newbabylist/newbabyinfo/babyorddrid")); model.setValue( targetPath + "/orddeptnm", model.getValue("/root/main/newbabylist/newbabyinfo/babyorddeptnm")); model.setValue( targetPath + "/orddrnm", model.getValue("/root/main/newbabylist/newbabyinfo/babyorddrm,")); model.resetInstanceNode("/root/main/newbabylist/newbabyinfo"); } } } /** * @desc : Åð¿øÈ¯ÀÚ¿¡ ´ëÇÑ OCR¼­½ÄÀ» Á¶È¸Çϱâ À§ÇÑ °ª ¼³Á¤ * * @param : * @return : * @author : ³ªÁ¾Ãµ * @--------------------------------------------------- */ function fDschSrchSetting(){ chk_state2.disabled = false; chk_state3.disabled = false; chk_state4.disabled = false; chk_state5.disabled = false; model.setValue("/root/main/flag", "DSCH"); model.setValue("/root/main/ioflag", "I"); model.setValue("/root/main/term/termfromdd", getCurrentDate()); model.setValue("/root/main/term/termtodd", getCurrentDate()); model.setValue("/root/main/rtncnfm", "P|CD|CR"); model.refresh(); } /** * @desc : Ãâ³²ºÎ¼­ Á¶È¸ * * @param : * @return : * @author : ÁÖÈñ°æ * @--------------------------------------------------- */ function fGetDeptSearch( targetDept ){ var supdeptcolumn = ""; // "homecaresupdeptcd"; var searchcondition = "deptnm"; var searchterm = model.getValue("/root/temp/dept/"+targetDept+"/depthngnm"); var receivedeptcdpath = "/root/main/dept/"+targetDept; var receivedeptnmpath = "/root/temp/dept/"+targetDept+"/depthngnm"; var instcd = getUserInfo("dutplceinstcd"); zbcfGetDeptCodeListFromTree(searchcondition, searchterm, instcd, supdeptcolumn, receivedeptcdpath, receivedeptnmpath); } /** * @desc : Á¶È¸ ÅØ½ºÆ®°¡ ¾øÀ» ¶§ Ãâ³²ºÎ¼­ value ÃʱâÈ­ * * @param : * @return : * @author : ÁÖÈñ°æ * @--------------------------------------------------- */ function fSetDeptValue() { var prntdept = model.getValue("/root/temp/dept/prntdept/depthngnm"); var rtndept = model.getValue("/root/temp/dept/rtndept/depthngnm"); if (prntdept == "") { model.setValue("/root/main/dept/prntdept", ""); } if (rtndept == "") { model.setValue("/root/main/dept/rtndept", ""); } } /* Å×½ºÆ® OCR Ãâ·Â¿ë ÀÎÅÍÆäÀ̽º-ÀÌÀ±ÁÖ */ function fPerPrntOCR() { var formcd = "1100011224"; var pid = "93888"; var orddd = "20120227"; var cretno = "1"; var ordtype = "O"; setParameter ("formcd", formcd ); setParameter ("pid", pid); setParameter ("orddd", orddd ); setParameter ("cretno", cretno); setParameter ("ordtype", ordtype ); modal ("SSMRF03700"); }