/* ÀÀ±Þ½Ç CPCR ±â·ÏÁö (SMMNE03500.xfm - JScript ) - Version : 1) : Ver.1.00.01 */ var fCellCheck = ""; var fCaption = ""; var fBottomDay = ""; var fBottomTime = ""; var fBottomMinutes = ""; var fFstCaption = ""; var fScndCaption = ""; var fChartStat = "F"; /** * @group : * @ver : 2007.07.21 * @by : ¾çõ´ö * @--------------------------------------------------- * @type : function * @access : public * @desc : CPCR È­¸é ÃʱâÈ­(ȯÀÚ Á¤º¸ ¼¼ÆÃ) * @param : * @return : * @--------------------------------------------------- */ function fInitialize(){ var node = getGlobalVariable("paminfo"); setCSVToNode("/root/main/paminfo", node); btn_Schrt.visible = false; btn_Csum.visible = false; //ÃÖÃÊcaption Á¤º¸ ÀúÀå fFstCaption = grd_cpcr.caption; model.setValue("/root/main/cond/pid", model.getValue("/root/main/paminfo/list/pid") ); model.setValue("/root/main/cond/indd", model.getValue("/root/main/paminfo/list/indd") ); model.setValue("/root/main/cond/cretno", model.getValue("/root/main/paminfo/list/cretno")); model.setValue("/root/main/cond/deptcd", getUserInfo("dutplcecd") ); model.setValue("/root/main/cond/instcd", getUserInfo("dutplceinstcd")); var patinfo = "µî·Ï¹øÈ£: " + model.getValue("/root/main/paminfo/list/pid") + ", " + "ȯÀÚ¸í: " + model.getValue("/root/main/paminfo/list/hngnm") + ", " + "¼ºº°/³ªÀÌ: " + model.getValue("/root/main/paminfo/list/sex") + "/" + model.getValue("/root/main/paminfo/list/age") + ", " + "º´½Ç: " + model.getValue("/root/main/paminfo/list/roomcd"); model.setValue("/root/main/patinfo", patinfo); if(model.getValue("/root/main/cond/pid") == "" ){ fMakeChart(); messageBox("¼±ÅÃµÈ È¯ÀÚ°¡ ¾ø½À´Ï´Ù.", "E"); return; }else { fCpcrInit(); } } /** * @group : * @ver : 2007.07.21 * @by : ¾çõ´ö * @--------------------------------------------------- * @type : function * @access : public * @desc : ȯÀÚÀÇ CPCR ±â·Ï Á¶È¸ * @param : * @return : * @--------------------------------------------------- */ function fCpcrInit(){ fCpcCondNodeSet(); submit("TRMNE03501"); fMakeDate("C"); if(model.getValue("/root/main/srchinfo/srchlist") == "-" ){ submit("TRMNE03502"); } fMakeChart(); var iRow = grd_cpcr.rows; for(i=0 ; i 2 && sCol < 33 && sRow == 6 && fChartStat == "S" || event.button == 3 && sCol > 2 && sCol < 33 && sRow == 3 && fChartStat == "F" ){ if(grd_cpcr.isCell(event.target) && grd_cpcr.mouseRow >= grd_cpcr.fixedrows){ window.setPopupMenu( true, "/root/codedata/popup/item", "name", "func", true); }else{ window.setPopupMenu(false); } } } /** * @group : * @ver : 2007.07.21 * @by : ¾çõ´ö * @--------------------------------------------------- * @type : function * @access : public * @desc : CPCR ±â·Ï ÀúÀå * @param : * @return : * @--------------------------------------------------- */ function fSaveDataCpcr(flag){ model.removeNode("/root/send/cprbaseinfo"); model.removeNode("/root/send/cprrecinfo"); model.removeNode("/root/send/cprsmminfo"); var sSaveData = ""; var sSaveHeader = "pid¢Ëindd¢Ëcretno¢Ëdeptcd¢Ëinstcd¢Ëstartdd¢Ëstarttm¢Ëleaderid¢Ëairwayid¢Ëcompressionfstid¢Ëcompressionscndid¢Ëmedid¢Ërecid¢Ëdrugunit¢Ëstatus¢Ì"; var sSaveData = model.getValue("/root/main/cond/pid") + "¢Ë" + model.getValue("/root/main/cond/indd") + "¢Ë" + model.getValue("/root/main/cond/cretno") + "¢Ë" + model.getValue("/root/main/cond/deptcd") + "¢Ë" + model.getValue("/root/main/cond/instcd") + "¢Ë" + model.getValue("/root/main/recinfo/cprinfo/cpr/startdd") + "¢Ë" + model.getValue("/root/main/recinfo/cprinfo/cpr/starttm") + "¢Ë" + model.getValue("/root/main/recinfo/cprinfo/cpr/leaderid") + "¢Ë" + model.getValue("/root/main/recinfo/cprinfo/cpr/airwayid") + "¢Ë" + model.getValue("/root/main/recinfo/cprinfo/cpr/compressionfstid") + "¢Ë" + model.getValue("/root/main/recinfo/cprinfo/cpr/compressionscndid") + "¢Ë" + model.getValue("/root/main/recinfo/cprinfo/cpr/medid") + "¢Ë" + model.getValue("/root/main/recinfo/cprinfo/cpr/recid") + "¢Ë" + model.getValue("/root/main/recinfo/cprinfo/cpr/drugunit") + "¢Ë"; if(flag == "I"){ sSaveData += "I" + "¢Ì"; }else{ sSaveData += "U" + "¢Ì"; } var sRows = grd_cpcr.rows-2; var sCols = grd_cpcr.cols; var sSaveGridData = ""; var sSaveGridHeader = "pid¢Ëindd¢Ëcretno¢Ëstartdd¢Ëstarttm¢Ëdeptcd¢Ërecno¢Ërecmnt¢Ëinstcd¢Ërecitemflag¢Ërecitemnm¢Ërecmntval¢Ì"; var sSaveSmrData = ""; var sSaveSmrHeader = "pid¢Ëindd¢Ëcretno¢Ëstartdd¢Ëstarttm¢Ëdeptcd¢Ërecno¢Ëinstcd¢Ëprcpcd¢Ëdrugvol¢Ëdrugqty¢Ëprepqty¢Ësumqty¢Ëcntsunit¢Ëcntsvol¢Ëstndunit¢Ëstndvol¢Ì"; // for(i = 0 ; i < grd_cpcr.rows; i++){ // for(j=1 ; j< grd_cpcr.cols; j++){ for(i = 1 ; i < sRows ; i++){ sSaveGridData += model.getValue("/root/main/cond/pid") + "¢Ë" + model.getValue("/root/main/cond/indd") + "¢Ë" + model.getValue("/root/main/cond/cretno") + "¢Ë" + model.getValue("/root/main/recinfo/cprinfo/cpr/startdd") + "¢Ë" + model.getValue("/root/main/recinfo/cprinfo/cpr/starttm") + "¢Ë" + model.getValue("/root/main/cond/deptcd") + "¢Ë" + i + "¢Ë" + "99" + "¢Ë" + model.getValue("/root/main/cond/instcd") + "¢Ë" + model.getValue("/root/main/recinfo/reclist/grid["+i+"]/recitemflag") + "¢Ë" + model.getValue("/root/main/recinfo/reclist/grid["+i+"]/subtitl") + "¢Ë" + "" + "¢Ì" for(j = 0 ; j < 31; j++){ if(model.getValue("/root/main/recinfo/reclist/grid["+i+"]/mnt" + j + "") != "" ){ sSaveGridData += model.getValue("/root/main/cond/pid") + "¢Ë" + model.getValue("/root/main/cond/indd") + "¢Ë" + model.getValue("/root/main/cond/cretno") + "¢Ë" + model.getValue("/root/main/recinfo/cprinfo/cpr/startdd") + "¢Ë" + model.getValue("/root/main/recinfo/cprinfo/cpr/starttm") + "¢Ë" + model.getValue("/root/main/cond/deptcd") + "¢Ë" + i + "¢Ë" + j + "¢Ë" + model.getValue("/root/main/cond/instcd") + "¢Ë" + model.getValue("/root/main/recinfo/reclist/grid["+i+"]/recitemflag") + "¢Ë" + model.getValue("/root/main/recinfo/reclist/grid["+i+"]/subtitl") + "¢Ë" + model.getValue("/root/main/recinfo/reclist/grid["+i+"]/mnt" + j + "") + "¢Ì" } } if(model.getValue("/root/main/recinfo/reclist/grid["+ i +"]/sumqty")!= "") { sSaveSmrData += model.getValue("/root/main/cond/pid") + "¢Ë" + model.getValue("/root/main/cond/indd") + "¢Ë" + model.getValue("/root/main/cond/cretno") + "¢Ë" + model.getValue("/root/main/recinfo/cprinfo/cpr/startdd") + "¢Ë" + model.getValue("/root/main/recinfo/cprinfo/cpr/starttm") + "¢Ë" + model.getValue("/root/main/cond/deptcd") + "¢Ë" + i + "¢Ë" + model.getValue("/root/main/cond/instcd") + "¢Ë" + model.getValue("/root/main/recinfo/reclist/grid["+ i +"]/subtitl") + "¢Ë" + model.getValue("/root/main/recinfo/reclist/grid["+ i +"]/vol") + "¢Ë" + model.getValue("/root/main/recinfo/reclist/grid["+ i +"]/qty") + "¢Ë" + model.getValue("/root/main/recinfo/reclist/grid["+ i +"]/prepqty") + "¢Ë" + model.getValue("/root/main/recinfo/reclist/grid["+ i +"]/sumqty") + "¢Ë" + model.getValue("/root/main/recinfo/reclist/grid["+ i +"]/cntsunit") + "¢Ë" + model.getValue("/root/main/recinfo/reclist/grid["+ i +"]/cntsvol") + "¢Ë" + model.getValue("/root/main/recinfo/reclist/grid["+ i +"]/stndunit") + "¢Ë" + model.getValue("/root/main/recinfo/reclist/grid["+ i +"]/stndvol") + "¢Ì" } } model.makeValue("/root/send/cprbaseinfo", sSaveHeader + sSaveData); model.makeValue("/root/send/cprrecinfo", sSaveGridHeader + sSaveGridData ); model.makeValue("/root/send/cprsmminfo", sSaveSmrHeader + sSaveSmrData); fCpcCondNodeSet(); if(submit("TXMNE03501") == true ){ var saveDate = model.getValue("/root/main/recinfo/cprinfo/cpr/startdd"); var saveTime = model.getValue("/root/main/recinfo/cprinfo/cpr/starttm"); model.setValue("/root/main/srchinfo/srchlist", saveDate + saveTime); if(flag == "I"){ messageBox("ÀúÀåÀÌ ¿Ï·áµÇ¾ú½À´Ï´Ù.", "I"); }else if(flag == "U"){ messageBox("¼öÁ¤ÀÌ ¿Ï·áµÇ¾ú½À´Ï´Ù.", "I"); } } submit("TRMNE03502"); cmb_list.refresh(); } /** * @group : * @ver : 2007.07.21 * @by : ¾çõ´ö * @--------------------------------------------------- * @type : function * @access : public * @desc : ±×¸®µå Width Size º¯°æ * @param : * @return : * @--------------------------------------------------- */ function fColWidthChange(pWidth){ var sWidth = pWidth.split(", "); for (i = 0; i < sWidth.length; i++) { grd_cpcr.colwidth(i) = sWidth[i]; } } /** * @group : * @ver : 2007.07.21 * @by : ¾çõ´ö * @--------------------------------------------------- * @type : function * @access : public * @desc : Â÷Æ®º¸±â ¹öư À̺¥Æ® * @param : * @return : * @--------------------------------------------------- */ function fShowChart(){ btn_Cchrt.visible = true; group2.visible = true; caption8.visible = true; caption12.visible = true; caption13.visible = true; checkbox1.visible = true; checkbox2.visible = true; checkbox3.visible = true; btn_Schrt.visible = false; group6.attribute("style") = "left:0px; top:320px; width:1190px; height:446px;;" ; grd_cpcr.attribute("style") = "left:0px; top:28px; width:1189px; height:415px; text-align:center;" ; fMakeBottomDate("F"); fMakeChart(); model.refresh(); } /** * @group : * @ver : 2007.07.21 * @by : ¾çõ´ö * @--------------------------------------------------- * @type : function * @access : public * @desc : Â÷Æ®´Ý±â ¹öư ÀÌ¹êÆ® * @param : * @return : * @--------------------------------------------------- */ function fCloseChart(){ btn_Cchrt.visible = false; group2.visible = false; caption8.visible = false; caption12.visible = false; caption13.visible = false; checkbox1.visible = false; checkbox2.visible = false; checkbox3.visible = false; btn_Schrt.visible = true; group6.attribute("style") = "left:0px; top:55px; width:1190px; height:711px; "; grd_cpcr.attribute("style") = "left:0px; top:28px; width:1189px; height:680px; text-align:center; "; fMakeBottomDate("S"); } /** * @group : * @ver : 2007.07.21 * @by : ¾çõ´ö * @--------------------------------------------------- * @type : function * @access : public * @desc : °£È£ÀÏÁö TypeII ¿ÀÇ * @param : * @return : * @--------------------------------------------------- */ function fOpenDialRec(){ var sPid = model.getValue("/root/main/cond/pid"); var sIndd = model.getValue("/root/main/cond/indd"); var sCretno = model.getValue("/root/main/cond/cretno"); var sDeptcd = model.getValue("/root/main/cond/deptcd"); var sInstcd = model.getValue("/root/main/cond/instcd"); var sStartdd = model.getValue("/root/main/recinfo/cprinfo/cpr/startdd"); var sStarttm = model.getValue("/root/main/recinfo/cprinfo/cpr/starttm"); //parammsg = "recflag¢Ëdutplaccd¢Ëreclnkkey¢ÌE¢Ë82015¢Ë"+sPid+","+sIndd+","+sCretno+","+sDeptcd+","+sInstcd+"¢Ì"; parammsg = "recflag¢Ëdutplaccd¢Ëreclnkkey¢ÌE¢Ë82015¢Ë"+sPid+","+sIndd+","+sCretno+","+sDeptcd+"¢Ì"; setParameter("SMMNR03400_ParamBase", parammsg); // ÆÄ¶ó¹ÌÅÍ ¼³Á¤ modal("SMMNR03400"); // °£È£ÀÏÁöI È­¸é ÆË¾÷ } /** * @group : * @ver : 2007.07.21 * @by : ¾çõ´ö * @--------------------------------------------------- * @type : function * @access : public * @desc : ó¹æ ¸ñ·Ï Áý°è Ç¥ º¸±â * @param : * @return : * @--------------------------------------------------- */ function fShowSmm(){ pWidth = "20, 96, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 34, 32, 31, 31, 31, 28"; //grd_cpcr.attribute("colwidth") = "20, 101, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 33, 31, 30, 30, 30, 28"; fColWidthChange(pWidth); btn_Ssum.visible = false; btn_Csum.visible = true; } /** * @group : * @ver : 2007.07.21 * @by : ¾çõ´ö * @--------------------------------------------------- * @type : function * @access : public * @desc : ó¹æ ¸ñ·Ï Áý°è Ç¥ ´Ý±â * @param : * @return : * @--------------------------------------------------- */ function fCloseSmm(){ pWidth = "20, 96, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 0, 0, 0, 0, 0, 0"; //grd_cpcr.attribute("colwidth") = "20, 96, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 0, 0, 0, 0, 0, 0"; fColWidthChange(pWidth); btn_Csum.visible = false; btn_Ssum.visible = true; }