/** * @desc : ¾ÆÆÄÄ¡Ç׸ñ°ª ÀúÀå * @ * @param : * @return : * @author : * @--------------------------------------------------- */ //function fSaveApache(){ function fSaveApache(flag){ ////¾ÆÆÄÄ¡ ±â·ÏÁ¤º¸ ÀÎÁõÀúÀå //function fSaveApchEspi(flag) //{ if (flag == null) { flag = "N" } var apchhr = "06"; //¾ÆÆÄÄ¡Àû¿ë½Ã°£ var instcd = getUserInfo("dutplceinstcd"); var pid = opener.javascript.getParameter("SPMMR03200_pid"); var orddd = opener.javascript.getParameter("SPMMR03200_orddd"); var cretno = opener.javascript.getParameter("SPMMR03200_cretno"); //var apchdd = opener.javascript.getParameter("SPMMR03200_apchdd"); model.setValue("/root/send/selectdata/status", status); model.refresh(); if(model.getValue("/root/send/selectdata/ordinfo") == "" ){ messageBox("ÀÔ½Ç, Àç¿øÁß, Åð½Ç ¿©ºÎ¸¦ ", "C002" ); return; } submit("TRMMR03213"); var cnt = getNodesetCount("/root/temp/apchlist"); if(cnt > 0){ var status = "u"; var m = "u"; }else if(cnt <= 0){ var status = "i"; var m = "i"; } var currentdate = getCurrentDate() + getCurrentTime(); var ref = "/root/main/apchitem/item"; var dataCnt = getNodesetCnt(model, ref); var savedata1 ="status¢Ëinstcd¢Ëpid¢Ëorddd¢Ëcretno¢Ëapchdd¢Ëapchitemcd¢Ëreptrslt¢Ërsltrgstdt¢Ëapchval¢Ëapchscore¢Ëapchlabel¢Ì"; //Çì´õºÎºÐ Ä÷³ var savedata2 ="m¢Ëinstcd¢Ëpid¢Ëorddd¢Ëcretno¢Ëapchdd¢Ëapchscore¢Ëdethrate¢Ëapchscorea¢Ëdethratea¢Ëapchhr¢Ëadjustednm¢Ëordinfo¢Ëlastespiyn¢Ësignno¢Ì"; //Çì´õºÎºÐ Ä÷³ var dataString1 = ""; var dataString2 = ""; var apchdd = model.getValue("/root/main/reqstnddd"); for (var i=1 ; i <= dataCnt ; i++) { var apchitemcd = model.getValue(ref + "[" + i + "]/apchitemcd"); var reptrslt = model.getValue(ref + "[" + i + "]/apchitemvalue"); var rsltrgstdt = model.getValue(ref + "[" + i + "]/apchitemdt"); var apchval = model.getValue(ref + "[" + i + "]/apchitemval"); var apchscore = model.getValue(ref + "[" + i + "]/apchitemscore"); //model.setValue(ref + "[" + i + "]/apchitemlabel", model.getValue("/root/init/item/apchitemlabel["+ i +"]")); var apchlabel = model.getValue(ref + "[" + i + "]/apchitemlabel"); dataString1 = dataString1 + status + "¢Ë" + instcd + "¢Ë" + pid + "¢Ë" + orddd + "¢Ë" + cretno + "¢Ë" + apchdd + "¢Ë"; dataString1 = dataString1 + apchitemcd + "¢Ë" + reptrslt + "¢Ë" + rsltrgstdt + "¢Ë" + apchval + "¢Ë" + apchscore + "¢Ë" + apchlabel+ "¢Ì"; }//for i END var apchscore = model.getValue(ref + "[apchitemcd='18']/apchitemscore"); var dethrate = model.getValue(ref + "[apchitemcd='19']/apchitemscore"); var apchscorea = model.getValue(ref + "[apchitemcd='20']/apchitemscore"); var dethratea = model.getValue(ref + "[apchitemcd='21']/apchitemscore"); var adjustednm = model.getValue("/root/send/selectdata/adjustednm"); var ordinfo = model.getValue("/root/send/selectdata/ordinfo"); model.setValue("/root/send/selectdata/lastespiyn",flag); var lastespiyn = model.getValue("/root/send/selectdata/lastespiyn"); //model.setValue("/root/send/selectdata/signno",model.getValue("/root/temp/sign/no")); var signno = model.getValue("/root/send/selectdata/signno"); var fstrgstrid = model.getValue("/root/send/selectdata/fstrgstrid"); var fstrgstdt = model.getValue("/root/send/selectdata/fstrgstdt"); var lastupdtrid = model.getValue("/root/send/selectdata/lastupdtrid"); var lastupdtdt = model.getValue("/root/send/selectdata/lastupdtdt"); dataString2 = dataString2 + m + "¢Ë" + instcd + "¢Ë" + pid + "¢Ë" + orddd + "¢Ë" + cretno + "¢Ë" + apchdd + "¢Ë"; dataString2 = dataString2 + apchscore + "¢Ë" + dethrate + "¢Ë" + apchscorea + "¢Ë" + dethratea + "¢Ë" + apchhr + "¢Ë"; dataString2 = dataString2 + adjustednm + "¢Ë" + ordinfo + "¢Ë" + lastespiyn + "¢Ë" + signno + "¢Ë"; dataString2 = dataString2 + fstrgstrid + "¢Ë" + fstrgstdt + "¢Ë" + lastupdtrid + "¢Ë" + lastupdtdt + "¢Ì"; if(dataString1.length > 0 && dataString2.length > 0) { model.setValue("/root/send/savedata/apchitem", savedata1 + dataString1); model.setValue("/root/send/savedata/apchscore", savedata2 + dataString2); if(model.getValue("/root/main/apchitem/item[apchitemcd='21']/apchitemscore") != "N"){ //Ç׸ñº° model.removeNode("/root/main/apchresult"); model.makeNode("/root/main/apchresult"); copyNodeset("/root/main/apchresult", "/root/main/apchitem", "", model, model); // ÀÎÁõÁ¤º¸ if(submit("TXMMR03210")==true){ if (flag == "Y") { // 2009.08.10. *** ¾ÆÆÄÄ¡±â·ÏÁ¤º¸ ÀÎÁõµ¥ÀÌŸ ¸¸µé±â.. fGetApchRecCert(); } //if(submit("TXMMR03210")==true){ messageBox("ÀúÀå","I002"); fInit(); } }else{ messageBox("APACHE ¥± - ADJUSTED Ç׸ñÀ» ", "C002" ); return; } model.refresh(); }//if END }//fSaveApache END /** * @desc : ¾ÆÆÄÄ¡ »ó¼¼Ç׸ñ Excel ÆÄÀÏ·Î ÀúÀå * @ * @param : * @return : * @author : * @--------------------------------------------------- */ function fSelect(){ model.setValue("/root/main/apchitem/item[apchitemcd='01']/apchitemlabel", cmb_temp.label); model.setValue("/root/main/apchitem/item[apchitemcd='02']/apchitemlabel", cmb_zpam.label); model.setValue("/root/main/apchitem/item[apchitemcd='03']/apchitemlabel", cmb_zfc.label); model.setValue("/root/main/apchitem/item[apchitemcd='04']/apchitemlabel", cmb_zfr.label); model.setValue("/root/main/apchitem/item[apchitemcd='05']/apchitemlabel", cmb_zaa.label); model.setValue("/root/main/apchitem/item[apchitemcd='06']/apchitemlabel", cmb_pao.label); model.setValue("/root/main/apchitem/item[apchitemcd='07']/apchitemlabel", cmb_hco.label); model.setValue("/root/main/apchitem/item[apchitemcd='08']/apchitemlabel", cmb_ph.label); model.setValue("/root/main/apchitem/item[apchitemcd='09']/apchitemlabel", cmb_na.label); model.setValue("/root/main/apchitem/item[apchitemcd='10']/apchitemlabel", cmb_ka.label); model.setValue("/root/main/apchitem/item[apchitemcd='11']/apchitemlabel", cmb_uree.label); model.setValue("/root/main/apchitem/item[apchitemcd='12']/apchitemlabel", cmb_urea.label); model.setValue("/root/main/apchitem/item[apchitemcd='13']/apchitemlabel", cmb_hc.label); model.setValue("/root/main/apchitem/item[apchitemcd='14']/apchitemlabel", cmb_gb.label); model.setValue("/root/main/apchitem/item[apchitemcd='15']/apchitemlabel", cmb_glas.label); model.setValue("/root/main/apchitem/item[apchitemcd='16']/apchitemlabel", cmb_age.label); model.setValue("/root/main/apchitem/item[apchitemcd='17']/apchitemlabel", cmb_mcro.label); model.setValue("/root/main/apchitem/item[apchitemcd='23']/apchitemlabel", cmb_simple.label); model.setValue("/root/main/apchitem/item[apchitemcd='24']/apchitemlabel", ipt_fio2.value); model.setValue("/root/main/apchitem/item[apchitemcd='25']/apchitemlabel", opt_aao2.value); model.setValue("/root/main/apchitem/item[apchitemcd='26']/apchitemlabel", ipt_paco2.value); model.setValue("/root/main/apchitem/item[apchitemcd='27']/apchitemlabel", ipt_pao2.value); model.setValue("/root/main/apchitem/item[apchitemcd='28']/apchitemlabel", ipt_hco3.value); model.refresh(); } function fSaveExcel() { var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*"); if (fileName != "") { item.saveExcel(fileName, "SheetName", true, true, "", "", "Boolean colHiddenExtend"); } } /** * @desc : ¾ÆÆÄÄ¡ ½ºÄÚ¾î µðÆúÆ®°ª ÁöÁ¤ * @ * @param : * @return : * @author : * @--------------------------------------------------- */ function fInit(){ var instcd = getUserInfo("dutplceinstcd"); var vNowDD = getCurrentDate(); var ref = "/root/main/apchitem/item"; var dataCnt = getNodesetCnt(model, ref); var node = getGlobalVariable("paminfo"); var pid = opener.javascript.getParameter("SPMMR03200_pid"); var hngnm = opener.javascript.getParameter("SPMMR03200_hngnm"); var orddd = opener.javascript.getParameter("SPMMR03200_orddd"); var cretno = opener.javascript.getParameter("SPMMR03200_cretno"); var apchdd = opener.javascript.getParameter("SPMMR03200_apchdd"); var age = opener.javascript.getParameter("SPMMR03200_age"); var fromdd = opener.javascript.getParameter("SPMMR03200_fromdd"); var todd = opener.javascript.getParameter("SPMMR03200_todd"); if(model.getValue("/root/send/selectdata/daylist") != apchdd && model.getValue("/root/send/selectdata/daylist") != ""){ model.setValue("/root/main/reqstnddd", model.getValue("/root/send/selectdata/daylist")); }else if(model.getValue("/root/send/selectdata/daylist") == apchdd || model.getValue("/root/send/selectdata/daylist") == ""){ model.setValue("/root/main/reqstnddd", apchdd); } if (pid!=""){ model.setValue("/root/send/selectdata/hngnm",hngnm); model.setValue("/root/send/selectdata/pid",pid); model.setValue("/root/send/selectdata/instcd",instcd); model.setValue("/root/send/selectdata/orddd",orddd); model.setValue("/root/send/selectdata/cretno",cretno); model.setValue("/root/send/selectdata/apchdd",model.getValue("/root/main/reqstnddd")); model.setValue("/root/send/selectdata/fromdd",fromdd); model.setValue("/root/send/selectdata/todd",todd); //ipt_zage.value = age; submit("TRMMR03214"); //cmb_daylist.select(0); model.refresh(); } cmb_device.visible = false; cmb_nasal.visible = false; cmb_simple.visible = false; cpt_O2.visible = false; cpt_L.visible = false; model.refresh(); submit("TRMMR03210"); //³ªÀÌ if(model.getValue("/root/main/apchitem/item[apchitemcd='16']/apchitemvalue") == ""){ ipt_zage.value = age; }else{ ipt_zage.value = model.getValue("/root/main/apchitem/item[apchitemcd='16']/apchitemvalue"); } //±â·ÏÁ¤º¸ À¯Çü if(model.getValue("/root/temp/apchpidlist/item/ordinfo") == ""){ if(model.getValue("/root/send/selectdata/apchdd") == model.getValue("/root/send/selectdata/fromdd")){ rdo_ordinfo.value = "1"; } }else{ rdo_ordinfo.value = model.getValue("/root/temp/apchpidlist/item/ordinfo"); } //Adjusted ¸íĪ if(opt_zmorta.value != ""){ if(model.getValue("/root/temp/apchpidlist/item/adjustednm") != ""){ opt_content.value = model.getValue("/root/temp/apchpidlist/item/adjustednm"); } }else{ opt_content.value = ""; } //ÀÎÁõÀúÀåÁ¤º¸ model.setValue("/root/send/selectdata/lastespiyn", model.getValue("/root/temp/apchpidlist/item/lastespiyn")); //signno model.setValue("/root/send/selectdata/signno", model.getValue("/root/temp/apchpidlist/item/signno")); model.refresh(); fView(); } /** * @desc : ¾ÆÆÄÄ¡ »ó¼¼Ç׸ñ ¼±Åà ½ºÄھ ÀúÀå * @ * @param : * @return : * @author : * @--------------------------------------------------- */ // 1. Temperature function fValueTEMP() { setInputNodeCurText(); if (ipt_ztemp.currentText == ""){ cmb_temp.value = "90"; } else if (ipt_ztemp.currentText <= 29.9){ cmb_temp.value = "14"; } else if (ipt_ztemp.currentText >= 30 && ipt_ztemp.currentText <= 31.9){ cmb_temp.value = "13"; } else if (ipt_ztemp.currentText >= 32 && ipt_ztemp.currentText <= 33.9){ cmb_temp.value = "12"; } else if (ipt_ztemp.currentText >= 34 && ipt_ztemp.currentText <= 35.9){ cmb_temp.value = "11"; } else if (ipt_ztemp.currentText >= 36 && ipt_ztemp.currentText <= 38.4){ cmb_temp.value = "10"; } else if (ipt_ztemp.currentText >= 38.5 && ipt_ztemp.currentText <= 38.9){ cmb_temp.value = "21"; } else if (ipt_ztemp.currentText >= 39 && ipt_ztemp.currentText <= 40.9){ cmb_temp.value = "23"; } else if (ipt_ztemp.currentText >= 41){ cmb_temp.value = "24"; } fCalcTEMP(); model.refresh(); } function fCalcTEMP() { //99 opt_ztemp.value = cmb_temp.value.substr(1, 2); ztemp = cmb_temp.value.substr(1, 2); lbtemp = cmb_temp.label; opt_zapa.value = fCalcAPA(); opt_zmort.value = fCalcMort(); //opt_zmorta.value = fCalcMorta(); if(model.getValue("/root/main/apchitem/item[apchitemcd='20']/apchitemscore") == ""){ opt_zmorta.value = fCalcMort(); }else{ opt_zmorta.value = model.getValue("/root/main/apchitem/item[apchitemcd='21']/apchitemscore"); } //99 if(opt_zmorta.value == ""){ //99 if(opt_ztemp.value == ""){ if(ztemp == ""){ model.setValue("/root/init/item/apchitemscore1", "0"); model.setValue("/root/init/item/apchitemlabel1", ""); //99 model.makeValue("/root/init/item2/apchitemscore[1]", "0"); }else{ //99 model.setValue("/root/main/apchitem/item[apchitemcd='01']/apchitemscore", opt_ztemp.value); model.setValue("/root/init/item/apchitemscore1", ztemp); model.setValue("/root/init/item/apchitemlabel1", lbtemp); //99 model.makeValue("/root/init/item2/apchitemscore[1]", "0"); } model.refresh(); } // 2. Mean Arterial Pressure function fValuePAM() { setInputNodeCurText(); if (ipt_zpam.currentText == ""){ cmb_zpam.value = "90"; } else if (ipt_zpam.currentText <= 49){ cmb_zpam.value = "14"; } else if (ipt_zpam.currentText >= 50 && ipt_zpam.currentText <= 69){ cmb_zpam.value = "12"; } else if (ipt_zpam.currentText >= 70 && ipt_zpam.currentText <= 109){ cmb_zpam.value = "10"; } else if (ipt_zpam.currentText >= 110 && ipt_zpam.currentText <= 129){ cmb_zpam.value = "22"; } else if (ipt_zpam.currentText >= 130 && ipt_zpam.currentText <= 159){ cmb_zpam.value = "23"; } else if (ipt_zpam.currentText >= 160){ cmb_zpam.value = "24"; } fCalcPAM(); model.refresh(); } function fCalcPAM() { //99 opt_zpam.value = cmb_zpam.value.substr(1,2); zpam = cmb_zpam.value.substr(1,2); lbpam = cmb_zpam.label; opt_zapa.value = fCalcAPA(); opt_zmort.value = fCalcMort(); //opt_zmorta.value = fCalcMorta(); if(model.getValue("/root/main/apchitem/item[apchitemcd='20']/apchitemscore") == ""){ opt_zmorta.value = fCalcMort(); }else{ opt_zmorta.value = model.getValue("/root/main/apchitem/item[apchitemcd='21']/apchitemscore"); } //99 if(opt_zpam.value == ""){ if(zpam == ""){ model.setValue("/root/init/item/apchitemscore2", "0"); model.setValue("/root/init/item/apchitemlabel2", ""); }else{ //99 model.setValue("/root/main/apchitem/item[apchitemcd='02']/apchitemscore", opt_zpam.value); model.setValue("/root/init/item/apchitemscore2", zpam); model.setValue("/root/init/item/apchitemlabel2", lbpam); } model.refresh(); } // 3. Heart Rate function fValueFC() { setInputNodeCurText(); if (ipt_zfc.currentText == ""){ cmb_zfc.value = "90"; } else if (ipt_zfc.currentText <= 39){ cmb_zfc.value = "14"; } else if (ipt_zfc.currentText >= 40 && ipt_zfc.currentText <= 54){ cmb_zfc.value = "13"; } else if (ipt_zfc.currentText >= 55 && ipt_zfc.currentText <= 69){ cmb_zfc.value = "12"; } else if (ipt_zfc.currentText >= 70 && ipt_zfc.currentText <= 109){ cmb_zfc.value = "10"; } else if (ipt_zfc.currentText >= 110 && ipt_zfc.currentText <= 139){ cmb_zfc.value = "22"; } else if (ipt_zfc.currentText >= 140 && ipt_zfc.currentText <= 179){ cmb_zfc.value = "23"; } else if (ipt_zfc.currentText >= 180){ cmb_zfc.value = "24"; } fCalcFC(); model.refresh(); } function fCalcFC() { //99 opt_zfc.value = cmb_zfc.value.substr(1,2); zfc = cmb_zfc.value.substr(1,2); lbfc = cmb_zfc.label; opt_zapa.value = fCalcAPA(); opt_zmort.value = fCalcMort(); //opt_zmorta.value = fCalcMorta(); if(model.getValue("/root/main/apchitem/item[apchitemcd='20']/apchitemscore") == ""){ opt_zmorta.value = fCalcMort(); }else{ opt_zmorta.value = model.getValue("/root/main/apchitem/item[apchitemcd='21']/apchitemscore"); } //99 if(opt_zfc.value == ""){ if(zfc == ""){ model.setValue("/root/init/item/apchitemscore3", "0"); model.setValue("/root/init/item/apchitemlabel3", ""); }else{ //model.setValue("/root/main/apchitem/item[apchitemcd='03']/apchitemscore", opt_zfc.value); model.setValue("/root/init/item/apchitemscore3", zfc); model.setValue("/root/init/item/apchitemlabel3", lbfc); } model.refresh(); } // 4. Respiratory Rate function fValueFR() { setInputNodeCurText(); if (ipt_zfr.currentText == ""){ cmb_zfr.value = "90"; } else if (ipt_zfr.currentText <= 5){ cmb_zfr.value = "14"; } else if (ipt_zfr.currentText >= 6 && ipt_zfr.currentText <= 9){ cmb_zfr.value = "12"; } else if (ipt_zfr.currentText >= 10 && ipt_zfr.currentText <= 11){ cmb_zfr.value = "11"; } else if (ipt_zfr.currentText >= 12 && ipt_zfr.currentText <= 24){ cmb_zfr.value = "10"; } else if (ipt_zfr.currentText >= 25 && ipt_zfr.currentText <= 34){ cmb_zfr.value = "21"; } else if (ipt_zfr.currentText >= 35 && ipt_zfr.currentText <= 49){ cmb_zfr.value = "23"; } else if (ipt_zfr.currentText >= 50){ cmb_zfr.value = "24"; } fCalcFR(); model.refresh(); } function fCalcFR() { //99 opt_zfr.value = cmb_zfr.value.substr(1,2); zfr = cmb_zfr.value.substr(1,2); lbfr = cmb_zfr.label; opt_zapa.value = fCalcAPA(); opt_zmort.value = fCalcMort(); //opt_zmorta.value = fCalcMorta(); if(model.getValue("/root/main/apchitem/item[apchitemcd='20']/apchitemscore") == ""){ opt_zmorta.value = fCalcMort(); }else{ opt_zmorta.value = model.getValue("/root/main/apchitem/item[apchitemcd='21']/apchitemscore"); } //99 if(opt_zfr.value == ""){ if(zfr == ""){ model.setValue("/root/init/item/apchitemscore4", "0"); model.setValue("/root/init/item/apchitemlabel4", ""); }else{ //model.setValue("/root/main/apchitem/item[apchitemcd='04']/apchitemscore", opt_zfr.value); model.setValue("/root/init/item/apchitemscore4", zfr); model.setValue("/root/init/item/apchitemlabel4", lbfr); } model.refresh(); } // 5. If FIO2>=0, 5:(A-a)O2 function fValueAA() { if (ipt_zaa.currentText == ""){ cmb_zaa.value = "90"; } else if (ipt_zaa.currentText < 200){ cmb_zaa.value = "20"; } else if (ipt_zaa.currentText >= 200 && ipt_zaa.currentText <= 349){ cmb_zaa.value = "22"; } else if (ipt_zaa.currentText >= 350 && ipt_zaa.currentText <= 499){ cmb_zaa.value = "23"; } else if (ipt_zaa.currentText >= 500){ cmb_zaa.value = "24"; } fCalcAA(); model.refresh(); } function fCalcAA() { //99 opt_zaa.value = cmb_zaa.value.substr(1,2); zaa = cmb_zaa.value.substr(1,2); lbaa = cmb_zaa.label; opt_zapa.value = fCalcAPA(); opt_zmort.value = fCalcMort(); //opt_zmorta.value = fCalcMorta(); if(model.getValue("/root/main/apchitem/item[apchitemcd='20']/apchitemscore") == ""){ opt_zmorta.value = fCalcMort(); }else{ opt_zmorta.value = model.getValue("/root/main/apchitem/item[apchitemcd='21']/apchitemscore"); } //99 if(opt_zaa.value == ""){ if(zaa == ""){ model.setValue("/root/init/item/apchitemscore5", "0"); model.setValue("/root/init/item/apchitemlabel5", ""); }else{ //model.setValue("/root/main/apchitem/item[apchitemcd='05']/apchitemscore", opt_zaa.value); model.setValue("/root/init/item/apchitemscore5", zaa); model.setValue("/root/init/item/apchitemlabel5", lbaa); } model.refresh(); } // 6. If FIO2<0, 5:PaO2 function fValuePAO() { if (ipt_zpao.currentText == ""){ cmb_pao.value = "90"; } else if (ipt_zpao.currentText < 55){ cmb_pao.value = "14"; } else if (ipt_zpao.currentText >= 55 && ipt_zpao.currentText <= 60){ cmb_pao.value = "13"; } else if (ipt_zpao.currentText >= 61 && ipt_zpao.currentText <= 70){ cmb_pao.value = "11"; } else if (ipt_zpao.currentText > 70){ cmb_pao.value = "20"; } fCalcPAO(); model.refresh(); } function fCalcPAO() { //99 opt_zpao.value = cmb_pao.value.substr(1,2); zpao = cmb_pao.value.substr(1,2); lbpao = cmb_pao.label; opt_zapa.value = fCalcAPA(); opt_zmort.value = fCalcMort(); //opt_zmorta.value = fCalcMorta(); if(model.getValue("/root/main/apchitem/item[apchitemcd='20']/apchitemscore") == ""){ opt_zmorta.value = fCalcMort(); }else{ opt_zmorta.value = model.getValue("/root/main/apchitem/item[apchitemcd='21']/apchitemscore"); } //99 if(opt_zpao.value == ""){ if(zpao == ""){ model.setValue("/root/init/item/apchitemscore6", "0"); model.setValue("/root/init/item/apchitemlabel6", ""); }else{ //model.setValue("/root/main/apchitem/item[apchitemcd='06']/apchitemscore", opt_zpao.value); model.setValue("/root/init/item/apchitemscore6", zpao); model.setValue("/root/init/item/apchitemlabel6", lbpao); } model.refresh(); } // 7. If no A.B Gs: Serum HCO3- function fValueHCO() { if (ipt_zhco.currentText == ""){ cmb_hco.value = "90"; } else if (ipt_zhco.currentText >= 52){ cmb_hco.value = "14"; } else if (ipt_zhco.currentText >= 41 && ipt_zhco.currentText <= 51.9){ cmb_hco.value = "13"; } else if (ipt_zhco.currentText >= 32 && ipt_zhco.currentText <= 40.9){ cmb_hco.value = "11"; } else if (ipt_zhco.currentText >= 22 && ipt_zhco.currentText <= 31.9){ cmb_hco.value = "10"; } else if (ipt_zhco.currentText >= 18 && ipt_zhco.currentText <= 21.9){ cmb_hco.value = "22"; } else if (ipt_zhco.currentText >= 15 && ipt_zhco.currentText <= 17.9){ cmb_hco.value = "23"; } else if (ipt_zhco.currentText < 15){ cmb_hco.value = "24"; } fCalcHCO(); model.refresh(); } function fCalcHCO() { //99 opt_zhco.value = cmb_hco.value.substr(1,2); zhco = cmb_hco.value.substr(1,2); lbhco = cmb_hco.label; opt_zapa.value = fCalcAPA(); opt_zmort.value = fCalcMort(); //opt_zmorta.value = fCalcMorta(); if(model.getValue("/root/main/apchitem/item[apchitemcd='20']/apchitemscore") == ""){ opt_zmorta.value = fCalcMort(); }else{ opt_zmorta.value = model.getValue("/root/main/apchitem/item[apchitemcd='21']/apchitemscore"); } //99 if(opt_zhco.value == ""){ if(zhco == ""){ model.setValue("/root/init/item/apchitemscore7", "0"); model.setValue("/root/init/item/apchitemlabel7", ""); }else{ //model.setValue("/root/main/apchitem/item[apchitemcd='07']/apchitemscore", opt_zhco.value); model.setValue("/root/init/item/apchitemscore7", zhco); model.setValue("/root/init/item/apchitemlabel7", lbhco); } model.refresh(); } // 8. Aterial pH. function fValuePH() { setInputNodeCurText(); if (ipt_zph.currentText == ""){ cmb_ph.value = "90"; } else if (ipt_zph.currentText >= 7.7){ cmb_ph.value = "14"; } else if (ipt_zph.currentText >= 7.6 && ipt_zph.currentText <= 7.69){ cmb_ph.value = "13"; } else if (ipt_zph.currentText >= 7.5 && ipt_zph.currentText <= 7.59){ cmb_ph.value = "11"; } else if (ipt_zph.currentText >= 7.33 && ipt_zph.currentText <= 7.49){ cmb_ph.value = "10"; } else if (ipt_zph.currentText >= 7.25 && ipt_zph.currentText <= 7.32){ cmb_ph.value = "22"; } else if (ipt_zph.currentText >= 7.15 && ipt_zph.currentText <= 7.24){ cmb_ph.value = "23"; } else if (ipt_zph.currentText < 7.15){ cmb_ph.value = "24"; } fCalcPH(); model.refresh(); } function fCalcPH() { //99 opt_zph.value = cmb_ph.value.substr(1,2); zph = cmb_ph.value.substr(1,2); lbph = cmb_ph.label; opt_zapa.value = fCalcAPA(); opt_zmort.value = fCalcMort(); //opt_zmorta.value = fCalcMorta(); if(model.getValue("/root/main/apchitem/item[apchitemcd='20']/apchitemscore") == ""){ opt_zmorta.value = fCalcMort(); }else{ opt_zmorta.value = model.getValue("/root/main/apchitem/item[apchitemcd='21']/apchitemscore"); } //99 if(opt_zph.value == ""){ if(zph == ""){ model.setValue("/root/init/item/apchitemscore8", "0"); model.setValue("/root/init/item/apchitemlabel8", ""); }else{ //model.setValue("/root/main/apchitem/item[apchitemcd='08']/apchitemscore", opt_zph.value); model.setValue("/root/init/item/apchitemscore8", zph); model.setValue("/root/init/item/apchitemlabel8", lbph); } model.refresh(); } // 9. Serum Sodium function fValueNA() { setInputNodeCurText(); if (ipt_zna.currentText == ""){ cmb_na.value = "90"; } else if (ipt_zna.currentText >= 180){ cmb_na.value = "14"; } else if (ipt_zna.currentText >= 160 && ipt_zna.currentText <= 179){ cmb_na.value = "13"; } else if (ipt_zna.currentText >= 155 && ipt_zna.currentText <= 159){ cmb_na.value = "12"; } else if (ipt_zna.currentText >= 150 && ipt_zna.currentText <= 154){ cmb_na.value = "11"; } else if (ipt_zna.currentText >= 130 && ipt_zna.currentText <= 149){ cmb_na.value = "10"; } else if (ipt_zna.currentText >= 120 && ipt_zna.currentText <= 129){ cmb_na.value = "22"; } else if (ipt_zna.currentText >= 111 && ipt_zna.currentText <= 119){ cmb_na.value = "23"; } else if (ipt_zna.currentText <= 110){ cmb_na.value = "24"; } fCalcNA(); model.refresh(); } function fCalcNA() { //99 opt_zna.value = cmb_na.value.substr(1,2); zna = cmb_na.value.substr(1,2); lbna = cmb_na.label; opt_zapa.value = fCalcAPA(); opt_zmort.value = fCalcMort(); //opt_zmorta.value = fCalcMorta(); if(model.getValue("/root/main/apchitem/item[apchitemcd='20']/apchitemscore") == ""){ opt_zmorta.value = fCalcMort(); }else{ opt_zmorta.value = model.getValue("/root/main/apchitem/item[apchitemcd='21']/apchitemscore"); } //99 if(opt_zna.value == ""){ if(zna == ""){ model.setValue("/root/init/item/apchitemscore9", "0"); model.setValue("/root/init/item/apchitemlabel9", ""); }else{ //model.setValue("/root/main/apchitem/item[apchitemcd='09']/apchitemscore", opt_zna.value); model.setValue("/root/init/item/apchitemscore9", zna); model.setValue("/root/init/item/apchitemlabel9", lbna); } model.refresh(); } // 10. Serum Potassium function fValueKA() { setInputNodeCurText(); if (ipt_zka.currentText == ""){ cmb_ka.value = "90"; } else if (ipt_zka.currentText >= 7){ cmb_ka.value = "14"; } else if (ipt_zka.currentText >= 6 && ipt_zka.currentText <= 6.9){ cmb_ka.value = "13"; } else if (ipt_zka.currentText >= 5.5 && ipt_zka.currentText <= 5.9){ cmb_ka.value = "11"; } else if (ipt_zka.currentText >= 3.5 && ipt_zka.currentText <= 5.4){ cmb_ka.value = "10"; } else if (ipt_zka.currentText >= 3 && ipt_zka.currentText <= 3.4){ cmb_ka.value = "21"; } else if (ipt_zka.currentText >= 2.5 && ipt_zka.currentText <= 2.9){ cmb_ka.value = "22"; } else if (ipt_zka.currentText < 2.5){ cmb_ka.value = "24"; } fCalcKA(); model.refresh(); } function fCalcKA() { //99 opt_zka.value = cmb_ka.value.substr(1,2); zka = cmb_ka.value.substr(1,2); lbka = cmb_ka.label; opt_zapa.value = fCalcAPA(); opt_zmort.value = fCalcMort(); //opt_zmorta.value = fCalcMorta(); if(model.getValue("/root/main/apchitem/item[apchitemcd='20']/apchitemscore") == ""){ opt_zmorta.value = fCalcMort(); }else{ opt_zmorta.value = model.getValue("/root/main/apchitem/item[apchitemcd='21']/apchitemscore"); } //99 if(opt_zka.value == ""){ if(zka == ""){ model.setValue("/root/init/item/apchitemscore10", "0"); model.setValue("/root/init/item/apchitemlabel10", ""); }else{ //model.setValue("/root/main/apchitem/item[apchitemcd='10']/apchitemscore", opt_zka.value); model.setValue("/root/init/item/apchitemscore10", zka); model.setValue("/root/init/item/apchitemlabel10", lbka); } model.refresh(); } // 11. Serum Creatinine With Acute Renal Failure function fValueUREE() { setInputNodeCurText(); if (ipt_zuree.currentText == ""){ cmb_uree.value = "90"; } else if (ipt_zuree.currentText < 0.6){ cmb_uree.value = "14"; } else if (ipt_zuree.currentText >= 0.6 && ipt_zuree.currentText <= 1.4){ cmb_uree.value = "20"; } else if (ipt_zuree.currentText >= 1.5 && ipt_zuree.currentText <= 1.9){ cmb_uree.value = "24"; } else if (ipt_zuree.currentText >= 2 && ipt_zuree.currentText <= 3.4){ cmb_uree.value = "26"; } else if (ipt_zuree.currentText >= 3.5){ cmb_uree.value = "28"; } fCalcUREE(); model.refresh(); } function fCalcUREE() { //99 opt_zuree.value = cmb_uree.value.substr(1,2); zuree = cmb_uree.value.substr(1,2); lburee = cmb_uree.label; opt_zapa.value = fCalcAPA(); opt_zmort.value = fCalcMort(); //opt_zmorta.value = fCalcMorta(); if(model.getValue("/root/main/apchitem/item[apchitemcd='20']/apchitemscore") == ""){ opt_zmorta.value = fCalcMort(); }else{ opt_zmorta.value = model.getValue("/root/main/apchitem/item[apchitemcd='21']/apchitemscore"); } //99 if(opt_zuree.value == ""){ if(zuree == ""){ model.setValue("/root/init/item/apchitemscore11", "0"); model.setValue("/root/init/item/apchitemlabel11", ""); }else{ //model.setValue("/root/main/apchitem/item[apchitemcd='11']/apchitemscore", opt_zuree.value); model.setValue("/root/init/item/apchitemscore11", zuree); model.setValue("/root/init/item/apchitemlabel11", lburee); } model.refresh(); } // 12. Serum Creatinine Without Acute Renal Failure function fValueUREA() { setInputNodeCurText(); if (ipt_zurea.currentText == ""){ cmb_urea.value = "90"; } else if (ipt_zurea.currentText < 0.6){ cmb_urea.value = "12"; } else if (ipt_zurea.currentText >= 0.6 && ipt_zurea.currentText <= 1.4){ cmb_urea.value = "20"; } else if (ipt_zurea.currentText >= 1.5 && ipt_zurea.currentText <= 1.9){ cmb_urea.value = "22"; } else if (ipt_zurea.currentText >= 2 && ipt_zurea.currentText <= 3.4){ cmb_urea.value = "23"; } else if (ipt_zurea.currentText >= 3.5){ cmb_urea.value = "24"; } fCalcUREA(); model.refresh(); } function fCalcUREA() { //99 opt_zurea.value = cmb_urea.value.substr(1,2); zurea = cmb_urea.value.substr(1,2); lburea = cmb_urea.label; opt_zapa.value = fCalcAPA(); opt_zmort.value = fCalcMort(); //opt_zmorta.value = fCalcMorta(); if(model.getValue("/root/main/apchitem/item[apchitemcd='20']/apchitemscore") == ""){ opt_zmorta.value = fCalcMort(); }else{ opt_zmorta.value = model.getValue("/root/main/apchitem/item[apchitemcd='21']/apchitemscore"); } //99 if(opt_zurea.value == ""){ if(zurea == ""){ model.setValue("/root/init/item/apchitemscore12", "0"); model.setValue("/root/init/item/apchitemlabel12", ""); }else{ //model.setValue("/root/main/apchitem/item[apchitemcd='12']/apchitemscore", opt_zurea.value); model.setValue("/root/init/item/apchitemscore12", zurea); model.setValue("/root/init/item/apchitemlabel12", lburea); } model.refresh(); } // 13. Ht function fValueHC() { setInputNodeCurText(); if (ipt_zhc.currentText == ""){ cmb_hc.value = "90"; } else if (ipt_zhc.currentText < 20){ cmb_hc.value = "14"; } else if (ipt_zhc.currentText >= 20 && ipt_zhc.currentText <= 29.9){ cmb_hc.value = "12"; } else if (ipt_zhc.currentText >= 30 && ipt_zhc.currentText <= 45.9){ cmb_hc.value = "10"; } else if (ipt_zhc.currentText >= 46 && ipt_zhc.currentText <= 49.9){ cmb_hc.value = "21"; } else if (ipt_zhc.currentText >= 50 && ipt_zhc.currentText <= 59.9){ cmb_hc.value = "22"; } else if (ipt_zhc.currentText >= 60){ cmb_hc.value = "24"; } fCalcHC(); model.refresh(); } function fCalcHC() { //99 opt_zhc.value = cmb_hc.value.substr(1,2); zhc = cmb_hc.value.substr(1,2); lbhc = cmb_hc.label; opt_zapa.value = fCalcAPA(); opt_zmort.value = fCalcMort(); //opt_zmorta.value = fCalcMorta(); if(model.getValue("/root/main/apchitem/item[apchitemcd='20']/apchitemscore") == ""){ opt_zmorta.value = fCalcMort(); }else{ opt_zmorta.value = model.getValue("/root/main/apchitem/item[apchitemcd='21']/apchitemscore"); } //99 if(opt_zhc.value == ""){ if(zhc == ""){ model.setValue("/root/init/item/apchitemscore13", "0"); model.setValue("/root/init/item/apchitemlabel13", ""); }else{ //model.setValue("/root/main/apchitem/item[apchitemcd='13']/apchitemscore", opt_zhc.value); model.setValue("/root/init/item/apchitemscore13", zhc); model.setValue("/root/init/item/apchitemlabel13", lbhc); } model.refresh(); } // 14. W.B.C function fValueGB() { setInputNodeCurText(); if (ipt_zgb.currentText == ""){ cmb_gb.value = "90"; } else if (ipt_zgb.currentText < 1){ cmb_gb.value = "14"; } else if (ipt_zgb.currentText >= 1 && ipt_zgb.currentText <= 2.9){ cmb_gb.value = "12"; } else if (ipt_zgb.currentText >= 3 && ipt_zgb.currentText <= 14.9){ cmb_gb.value = "10"; } else if (ipt_zgb.currentText >= 15 && ipt_zgb.currentText <= 19.9){ cmb_gb.value = "21"; } else if (ipt_zgb.currentText >= 20 && ipt_zgb.currentText <= 39.9){ cmb_gb.value = "22"; } else if (ipt_zgb.currentText >= 40){ cmb_gb.value = "24"; } fCalcGB(); model.refresh(); } function fCalcGB() { //99 opt_zgb.value = cmb_gb.value.substr(1,2); zgb = cmb_gb.value.substr(1,2); lbgb = cmb_gb.label; opt_zapa.value = fCalcAPA(); opt_zmort.value = fCalcMort(); //opt_zmorta.value = fCalcMorta(); if(model.getValue("/root/main/apchitem/item[apchitemcd='20']/apchitemscore") == ""){ opt_zmorta.value = fCalcMort(); }else{ opt_zmorta.value = model.getValue("/root/main/apchitem/item[apchitemcd='21']/apchitemscore"); } //99 if(opt_zgb.value == ""){ if(zgb == ""){ model.setValue("/root/init/item/apchitemscore14", "0"); model.setValue("/root/init/item/apchitemlabel14", ""); }else{ //model.setValue("/root/main/apchitem/item[apchitemcd='14']/apchitemscore", opt_zgb.value); model.setValue("/root/init/item/apchitemscore14", zgb); model.setValue("/root/init/item/apchitemlabel14", lbgb); } model.refresh(); } // 15. Glasgow Coma Score function fValueGLAS() { //setInputNodeCurText(); if (ipt_zglas.currentText == ""){ cmb_glas.value = "90"; } else if (ipt_zglas.currentText == 15){ cmb_glas.value = "0"; } else if (ipt_zglas.currentText == 14){ cmb_glas.value = "1"; } else if (ipt_zglas.currentText == 13){ cmb_glas.value = "2"; } else if (ipt_zglas.currentText == 12){ cmb_glas.value = "3"; } else if (ipt_zglas.currentText == 11){ cmb_glas.value = "4"; } else if (ipt_zglas.currentText == 10){ cmb_glas.value = "5"; } else if (ipt_zglas.currentText == 9){ cmb_glas.value = "6"; } else if (ipt_zglas.currentText == 8){ cmb_glas.value = "7"; } else if (ipt_zglas.currentText == 7){ cmb_glas.value = "8"; } else if (ipt_zglas.currentText == 6){ cmb_glas.value = "9"; } else if (ipt_zglas.currentText == 5){ cmb_glas.value = "10"; } else if (ipt_zglas.currentText == 4){ cmb_glas.value = "11"; } else if (ipt_zglas.currentText == 3){ cmb_glas.value = "12"; } fCalcGLAS(); model.refresh(); } function fCalcGLAS() { if (cmb_glas.value == 90) { //99 opt_zglas.value = cmb_glas.value.substr(1,2); zglas = cmb_glas.value.substr(1,2); } else { //99 opt_zglas.value = cmb_glas.value; zglas = cmb_glas.value; } lbglas = cmb_glas.label; opt_zapa.value = fCalcAPA(); opt_zmort.value = fCalcMort(); //opt_zmorta.value = fCalcMorta(); if(model.getValue("/root/main/apchitem/item[apchitemcd='20']/apchitemscore") == ""){ opt_zmorta.value = fCalcMort(); }else{ opt_zmorta.value = model.getValue("/root/main/apchitem/item[apchitemcd='21']/apchitemscore"); } //99 if(opt_zglas.value == ""){ if(zglas == ""){ model.setValue("/root/init/item/apchitemscore15", "0"); model.setValue("/root/init/item/apchitemlabel15", ""); }else{ //model.setValue("/root/main/apchitem/item[apchitemcd='15']/apchitemscore", opt_zglas.value); model.setValue("/root/init/item/apchitemscore15", zglas); model.setValue("/root/init/item/apchitemlabel15", lbglas); } model.refresh(); } // 16. Age function fValueAGE() { setInputNodeCurText(); if (ipt_zage.currentText == ""){ cmb_age.value = "90"; } else if (ipt_zage.currentText <= 44){ cmb_age.value = "10"; } else if (ipt_zage.currentText >= 45 && ipt_zage.currentText <= 54){ cmb_age.value = "12"; } else if (ipt_zage.currentText >= 55 && ipt_zage.currentText <= 64){ cmb_age.value = "13"; } else if (ipt_zage.currentText >= 65 && ipt_zage.currentText <= 74){ cmb_age.value = "15"; } else if (ipt_zage.currentText >= 75){ cmb_age.value = "16"; } fCalcAGE(); model.refresh(); } function fCalcAGE() { //99 opt_zage.value = cmb_age.value.substr(1,2); zage = cmb_age.value.substr(1,2); lbage = cmb_age.label; opt_zapa.value = fCalcAPA(); opt_zmort.value = fCalcMort(); //opt_zmorta.value = fCalcMorta(); if(model.getValue("/root/main/apchitem/item[apchitemcd='20']/apchitemscore") == ""){ opt_zmorta.value = fCalcMort(); }else{ opt_zmorta.value = model.getValue("/root/main/apchitem/item[apchitemcd='21']/apchitemscore"); } //99 if(opt_zage.value == ""){ if(zage == ""){ model.setValue("/root/init/item/apchitemscore16", "0"); model.setValue("/root/init/item/apchitemlabel16", ""); }else{ //model.setValue("/root/main/apchitem/item[apchitemcd='16']/apchitemscore", opt_zage.value); model.setValue("/root/init/item/apchitemscore16", zage); model.setValue("/root/init/item/apchitemlabel16", lbage); } model.refresh(); } // 17. Chronic Organ Insufficiency immuno-compromised function fCalcMCRO() { //99 opt_zmcro.value = cmb_mcro.value.substr(1,2); zmcro = cmb_mcro.value.substr(1,2); lbmcro = cmb_mcro.label; opt_zapa.value = fCalcAPA(); opt_zmort.value = fCalcMort(); //opt_zmorta.value = fCalcMorta(); if(model.getValue("/root/main/apchitem/item[apchitemcd='20']/apchitemscore") == ""){ opt_zmorta.value = fCalcMort(); }else{ opt_zmorta.value = model.getValue("/root/main/apchitem/item[apchitemcd='21']/apchitemscore"); } //99 if(opt_zmcro.value == ""){ if(zmcro == ""){ model.setValue("/root/init/item/apchitemscore17", "0"); model.setValue("/root/init/item/apchitemlabel17", ""); }else{ //model.setValue("/root/main/apchitem/item[apchitemcd='17']/apchitemscore", opt_zmcro.value); model.setValue("/root/init/item/apchitemscore17", zmcro); model.setValue("/root/init/item/apchitemlabel17", lbmcro); } model.refresh(); } function fCalcAPA() { var z = eval(opt_ztemp.value); z = z + eval(opt_zpam.value); z = z + eval(opt_zfc.value); z = z + eval(opt_zfr.value); z = z + eval(opt_zaa.value); z = z + eval(opt_zpao.value); z = z + eval(opt_zhco.value); z = z + eval(opt_zph.value); z = z + eval(opt_zna.value); z = z + eval(opt_zka.value); z = z + eval(opt_zuree.value); z = z + eval(opt_zurea.value); z = z + eval(opt_zhc.value); z = z + eval(opt_zgb.value); z = z + eval(opt_zage.value); z = z + eval(opt_zglas.value); z = z + eval(opt_zmcro.value); if (opt_zuree.value > 0 && opt_zurea.value > 0) { alert("Acute renal failure or not ?"); } if (opt_zph.value > 0 && opt_zhco.value > 0) { alert(" Serum HCO3 : use only if no ABGs"); } if (opt_zaa.value > 0 && opt_zpao.value > 0) { alert(" FIO2 > or< 0.5 ?"); } model.setValue("/root/main/apchitem/item[apchitemcd='18']/apchitemscore", z); model.refresh(); return ''+z; } function fCalcMort(){ z = eval(opt_zapa.value); z = -3.517 + z * (0.146); z = Math.exp(z) / (1 + Math.exp(z)); z = fFmt(100 * z); return z; model.setValue("/root/main/apchitem/item[apchitemcd='19']/apchitemscore", opt_zmort.value); // % model.refresh(); } function fCalcMorta() { /* var z = 0; z = eval(model.getValue("/root/main/y") + "+z"); z = Math.exp(z) / (1 + Math.exp(z)); z = fFmt(100 * z); opt_zmorta.value = z; */ var z = 0; t = eval(model.getValue("/root/main/y")); z = eval(model.getValue("/root/main/zapa")); b = -3.517 + z * (0.146); z = b + t; z = Math.exp(z) / (1 + Math.exp(z)); z = fFmt(100 * z); opt_zmorta.value = z; return z; } function fFmt(x) { var v if(x >= 0) { v = '' + (x + 0.05) } else { v = '' + (x - 0.05) } return v.substring(0,v.indexOf('.')+2) } function fPrd(){ var adjusted = model.getValue("/root/main/y"); var content = model.getValue("/root/main/content"); var pdr = model.getValue("/root/main/pdeathrate"); opener.model.setValue("/root/main/apchitem/item[apchitemcd='20']/apchitemscore", adjusted); opener.model.setValue("/root/send/selectdata/adjustednm", content); opener.model.setValue("/root/main/apchitem/item[apchitemcd='21']/apchitemscore", pdr); opener.model.refresh(); window.close(); } function fGubun() { //var fio2 = model.getValue("/root/main/apchitem/item[apchitemcd='23']/apchitemvalue"); var fio2 = cmb_fio2.value; var lbfio2 = cmb_fio2.label; model.setValue("/root/main/apchitem/item[apchitemcd='23']/apchitemlabel", lbfio2); if (fio2 == "0"){ cmb_device.visible = false; cmb_nasal.visible = false; cmb_simple.visible = false; cpt_O2.visible = false; cpt_L.visible = false; model.setValue("/root/main/apchitem/item[apchitemcd='26']/apchitemvalue", "21"); model.refresh(); var paco2 = model.getValue("/root/main/apchitem/item[apchitemcd='28']/apchitemvalue"); if(paco2 != ""){ fValue(); model.setFocus("ipt_zpao"); ipt_zpao.dispatch("onkeydown"); fValuePAO(); }else{ model.setFocus("ipt_paco2"); } }else if(fio2 == "1"){ cmb_device.visible = true; cmb_nasal.visible = true; cmb_simple.visible = false; cpt_O2.visible = true; cpt_L.visible = true; model.setValue("/root/main/apchitem/item[apchitemcd='26']/apchitemvalue", ""); fDevice(); fValue(); }else if(fio2 == "2"){ cmb_device.visible = false; cmb_nasal.visible = false; cmb_simple.visible = false; cpt_O2.visible = false; cpt_L.visible = false; model.setValue("/root/main/apchitem/item[apchitemcd='26']/apchitemvalue", ""); fDevice(); //fValue(); model.setFocus("ipt_fio2"); } /* var fio2 = model.getValue("/root/main/apchitem/item[apchitemcd='26']/apchitemvalue"); var paco2 = model.getValue("/root/main/apchitem/item[apchitemcd='28']/apchitemvalue"); var pao2 = model.getValue("/root/main/apchitem/item[apchitemcd='29']/apchitemvalue"); var aao2value = (760-47) * fio2 * 0.01 - paco2 - pao2; model.setValue("/root/main/apchitem/item[apchitemcd='27']/apchitemvalue", aao2value); */ model.refresh(); //fValue(); } function fDevice() { var device = model.getValue("/root/main/apchitem/item[apchitemcd='24']/apchitemvalue"); var lbdevice = cmb_device.label; model.setValue("/root/main/apchitem/item[apchitemcd='24']/apchitemlabel", lbdevice); model.setValue("/root/main/apchitem/item[apchitemcd='26']/apchitemvalue",""); if (device == "0"){ //Nasal cauuula cpt_L.visible = true; cmb_nasal.visible = true; cmb_simple.visible = false; }else if(device == "1"){ //Simple face mask cpt_L.visible = true; cmb_nasal.visible = false; cmb_simple.visible = true; }else if(device =="2"){ //Ventilator cpt_L.visible = false; cmb_nasal.visible = false; cmb_simple.visible = false; model.setFocus("ipt_fio2"); //model.setValue("/root/main/apchitem/item[apchitemcd='26']/apchitemvalue", ""); }else{ cpt_L.visible = false; cmb_nasal.visible = false; cmb_simple.visible = false; } model.refresh(); } function fNasal() { var napro = model.getValue("/root/main/apchitem/item[apchitemcd='25']/apchitemvalue"); model.setValue("/root/main/apchitem/item[apchitemcd='26']/apchitemvalue", napro); if(model.getValue("/root/main/apchitem/item[apchitemcd='26']/apchitemvalue") >= 50){ model.setValue("/root/main/apchitem/item[apchitemcd='05']/apchitemvalue", model.getValue("/root/main/apchitem/item[apchitemcd='27']/apchitemvalue")); model.setFocus("ipt_zaa"); ipt_zaa.dispatch("onkeydown"); fValueAA(); }else if (model.getValue("/root/main/apchitem/item[apchitemcd='26']/apchitemvalue") < 50){ model.setValue("/root/main/apchitem/item[apchitemcd='06']/apchitemvalue", model.getValue("/root/main/apchitem/item[apchitemcd='29']/apchitemvalue")); model.setFocus("ipt_zpao"); ipt_zpao.dispatch("onkeydown"); fValuePAO(); }else if (model.getValue("/root/main/apchitem/item[apchitemcd='28']/apchitemvalue") == "" && model.getValue("/root/main/apchitem/item[apchitemcd='29']/apchitemvalue") == ""){ model.setValue("/root/main/apchitem/item[apchitemcd='07']/apchitemvalue", model.getValue("/root/main/apchitem/item[apchitemcd='30']/apchitemvalue")); model.setFocus("ipt_zhco"); ipt_zhco.dispatch("onkeydown"); fValueHCO(); } model.refresh(); } function fSimple() { var simpro = model.getValue("/root/main/apchitem/item[apchitemcd='25']/apchitemvalue"); model.setValue("/root/main/apchitem/item[apchitemcd='26']/apchitemvalue", simpro); if(model.getValue("/root/main/apchitem/item[apchitemcd='26']/apchitemvalue") >= 50){ model.setValue("/root/main/apchitem/item[apchitemcd='05']/apchitemvalue", model.getValue("/root/main/apchitem/item[apchitemcd='27']/apchitemvalue")); fCalcAao2(); fValue(); model.setFocus("ipt_zaa"); ipt_zaa.dispatch("onkeydown"); fValueAA(); }else if (model.getValue("/root/main/apchitem/item[apchitemcd='26']/apchitemvalue") < 50){ model.setValue("/root/main/apchitem/item[apchitemcd='06']/apchitemvalue", model.getValue("/root/main/apchitem/item[apchitemcd='29']/apchitemvalue")); fCalcAao2(); fValue(); model.setFocus("ipt_zpao"); ipt_zpao.dispatch("onkeydown"); fValuePAO(); }else if (model.getValue("/root/main/apchitem/item[apchitemcd='28']/apchitemvalue") == "" && model.getValue("/root/main/apchitem/item[apchitemcd='29']/apchitemvalue") == ""){ model.setValue("/root/main/apchitem/item[apchitemcd='07']/apchitemvalue", model.getValue("/root/main/apchitem/item[apchitemcd='30']/apchitemvalue")); fCalcAao2(); fValue(); model.setFocus("ipt_zhco"); ipt_zhco.dispatch("onkeydown"); fValueHCO(); } model.refresh(); } function fCalcAao2() { //var fio2 = model.getValue("/root/main/apchbun/apchfio2per"); //var paco2 = model.getValue("/root/main/apchbun/apchpaco2"); //var pao2 = model.getValue("/root/main/apchbun/apchpao2"); var fio2 = model.getValue("/root/main/apchitem/item[apchitemcd='26']/apchitemvalue"); var paco2 = model.getValue("/root/main/apchitem/item[apchitemcd='28']/apchitemvalue"); var pao2 = model.getValue("/root/main/apchitem/item[apchitemcd='29']/apchitemvalue"); var aao2value = (760-47) * fio2 * 0.01 - paco2 - pao2; model.setValue("/root/main/apchitem/item[apchitemcd='27']/apchitemvalue", aao2value); model.refresh(); } function fValue() { var apchitemdt = getCurrentDate() + getCurrentTime(); //If FiO2>=0.5 : (A-a)O2 if(model.getValue("/root/main/apchitem/item[apchitemcd='27']/apchitemvalue") != "" && model.getValue("/root/main/apchitem/item[apchitemcd='26']/apchitemvalue") >= 50){ if(model.getValue("/root/main/apchitem/item[apchitemcd='06']/apchitemvalue") != ""){ model.setValue("/root/main/apchitem/item[apchitemcd='06']/apchitemvalue", ""); model.setValue("/root/main/apchitem/item[apchitemcd='06']/apchitemval", ""); } if(model.getValue("/root/main/apchitem/item[apchitemcd='07']/apchitemvalue") != ""){ model.setValue("/root/main/apchitem/item[apchitemcd='07']/apchitemvalue", ""); model.setValue("/root/main/apchitem/item[apchitemcd='07']/apchitemval", ""); } model.setValue("/root/main/apchitem/item[apchitemcd='05']/apchitemvalue", model.getValue("/root/main/apchitem/item[apchitemcd='27']/apchitemvalue")); model.refresh(); //If FiO2<0.5 : PaO2 }else if (model.getValue("/root/main/apchitem/item[apchitemcd='28']/apchitemvalue") != "" && model.getValue("/root/main/apchitem/item[apchitemcd='26']/apchitemvalue") < 50){ if(model.getValue("/root/main/apchitem/item[apchitemcd='05']/apchitemvalue") != ""){ model.setValue("/root/main/apchitem/item[apchitemcd='05']/apchitemvalue", ""); model.setValue("/root/main/apchitem/item[apchitemcd='05']/apchitemval", ""); } if(model.getValue("/root/main/apchitem/item[apchitemcd='07']/apchitemvalue") != ""){ model.setValue("/root/main/apchitem/item[apchitemcd='07']/apchitemvalue", ""); model.setValue("/root/main/apchitem/item[apchitemcd='07']/apchitemval", ""); } model.setValue("/root/main/apchitem/item[apchitemcd='06']/apchitemvalue", model.getValue("/root/main/apchitem/item[apchitemcd='29']/apchitemvalue")); model.refresh(); //If no A.B Gs : Serum HCO3- }else if (model.getValue("/root/main/apchitem/item[apchitemcd='28']/apchitemvalue") == "" && model.getValue("/root/main/apchitem/item[apchitemcd='29']/apchitemvalue") == ""){ //setInputNodeCurText(); if(model.getValue("/root/main/apchitem/item[apchitemcd='05']/apchitemvalue") != ""){ model.setValue("/root/main/apchitem/item[apchitemcd='05']/apchitemvalue", ""); model.setValue("/root/main/apchitem/item[apchitemcd='05']/apchitemval", ""); } if(model.getValue("/root/main/apchitem/item[apchitemcd='06']/apchitemvalue") != ""){ model.setValue("/root/main/apchitem/item[apchitemcd='06']/apchitemvalue", ""); model.setValue("/root/main/apchitem/item[apchitemcd='06']/apchitemval", ""); } model.setValue("/root/main/apchitem/item[apchitemcd='07']/apchitemvalue", model.getValue("/root/main/apchitem/item[apchitemcd='30']/apchitemvalue")); model.refresh(); } model.refresh(); } function fValue_Back() { var apchitemdt = getCurrentDate() + getCurrentTime(); //If FiO2>=0.5 : (A-a)O2 //if(model.getValue("/root/main/apchbun/apchpaco2") != "" && model.getValue("/root/main/apchbun/apchfio2per") >= 0.5){ if(model.getValue("/root/main/apchitem/item[apchitemcd='27']/apchitemvalue") != "" && model.getValue("/root/main/apchitem/item[apchitemcd='26']/apchitemvalue") >= 50){ if(model.getValue("/root/main/apchitem/item[apchitemcd='06']/apchitemvalue") != ""){ model.setValue("/root/main/apchitem/item[apchitemcd='06']/apchitemvalue", ""); model.setValue("/root/main/apchitem/item[apchitemcd='06']/apchitemval", ""); model.setValue("/root/main/apchitem/item[apchitemcd='06']/apchitemscore", "0"); model.setValue("/root/main/apchitem/item[apchitemcd='06']/apchitemdt", ""); } if(model.getValue("/root/main/apchitem/item[apchitemcd='07']/apchitemvalue") != ""){ model.setValue("/root/main/apchitem/item[apchitemcd='07']/apchitemvalue", ""); model.setValue("/root/main/apchitem/item[apchitemcd='07']/apchitemval", ""); model.setValue("/root/main/apchitem/item[apchitemcd='07']/apchitemscore", "0"); model.setValue("/root/main/apchitem/item[apchitemcd='07']/apchitemdt", ""); } //var aao2 = model.getValue("/root/main/apchbun/apchaao2"); //ipt_zaa.currentText = aao2; //model.setValue("/root/main/apchitem/item[apchitemcd='05']/apchitemvalue", model.getValue("/root/main/apchbun/apchaao2")); model.setValue("/root/main/apchitem/item[apchitemcd='05']/apchitemvalue", model.getValue("/root/main/apchitem/item[apchitemcd='27']/apchitemvalue")); model.setValue("/root/main/apchitem/item[apchitemcd='06']/apchitemscore", "0"); model.setValue("/root/main/apchitem/item[apchitemcd='06']/apchitemdt", ""); model.setValue("/root/main/apchitem/item[apchitemcd='07']/apchitemscore", "0"); model.setValue("/root/main/apchitem/item[apchitemcd='07']/apchitemdt", ""); model.refresh(); //If FiO2<0.5 : PaO2 //}else if (model.getValue("/root/main/apchbun/apchpaco2") != "" && model.getValue("/root/main/apchbun/apchfio2per") < 0.5){ }else if (model.getValue("/root/main/apchitem/item[apchitemcd='28']/apchitemvalue") != "" && model.getValue("/root/main/apchitem/item[apchitemcd='26']/apchitemvalue") < 50){ if(model.getValue("/root/main/apchitem/item[apchitemcd='05']/apchitemvalue") != ""){ model.setValue("/root/main/apchitem/item[apchitemcd='05']/apchitemvalue", ""); model.setValue("/root/main/apchitem/item[apchitemcd='05']/apchitemval", ""); model.setValue("/root/main/apchitem/item[apchitemcd='05']/apchitemscore", "0"); model.setValue("/root/main/apchitem/item[apchitemcd='05']/apchitemdt", ""); } if(model.getValue("/root/main/apchitem/item[apchitemcd='07']/apchitemvalue") != ""){ model.setValue("/root/main/apchitem/item[apchitemcd='07']/apchitemvalue", ""); model.setValue("/root/main/apchitem/item[apchitemcd='07']/apchitemval", ""); model.setValue("/root/main/apchitem/item[apchitemcd='07']/apchitemscore", "0"); model.setValue("/root/main/apchitem/item[apchitemcd='07']/apchitemdt", ""); } //model.setValue("/root/main/apchitem/item[apchitemcd='06']/apchitemvalue", model.getValue("/root/main/apchbun/apchpao2")); model.setValue("/root/main/apchitem/item[apchitemcd='06']/apchitemvalue", model.getValue("/root/main/apchitem/item[apchitemcd='29']/apchitemvalue")); model.setValue("/root/main/apchitem/item[apchitemcd='05']/apchitemscore", "0"); model.setValue("/root/main/apchitem/item[apchitemcd='05']/apchitemdt", ""); model.setValue("/root/main/apchitem/item[apchitemcd='07']/apchitemscore", "0"); model.setValue("/root/main/apchitem/item[apchitemcd='07']/apchitemdt", ""); model.refresh(); //If no A.B Gs : Serum HCO3- //}else if (model.getValue("/root/main/apchbun/apchpaco2") == "" && model.getValue("/root/main/apchbun/apchpao2") == ""){ }else if (model.getValue("/root/main/apchitem/item[apchitemcd='28']/apchitemvalue") == "" && model.getValue("/root/main/apchitem/item[apchitemcd='29']/apchitemvalue") == ""){ setInputNodeCurText(); if(model.getValue("/root/main/apchitem/item[apchitemcd='05']/apchitemvalue") != ""){ model.setValue("/root/main/apchitem/item[apchitemcd='05']/apchitemvalue", ""); model.setValue("/root/main/apchitem/item[apchitemcd='05']/apchitemval", ""); model.setValue("/root/main/apchitem/item[apchitemcd='05']/apchitemscore", "0"); model.setValue("/root/main/apchitem/item[apchitemcd='05']/apchitemdt", ""); } if(model.getValue("/root/main/apchitem/item[apchitemcd='06']/apchitemvalue") != ""){ model.setValue("/root/main/apchitem/item[apchitemcd='06']/apchitemvalue", ""); model.setValue("/root/main/apchitem/item[apchitemcd='06']/apchitemval", ""); model.setValue("/root/main/apchitem/item[apchitemcd='06']/apchitemscore", "0"); model.setValue("/root/main/apchitem/item[apchitemcd='06']/apchitemdt", ""); } //model.setValue("/root/main/apchitem/item[apchitemcd='07']/apchitemvalue", model.getValue("/root/main/apchbun/apchhco3")); model.setValue("/root/main/apchitem/item[apchitemcd='07']/apchitemvalue", model.getValue("/root/main/apchitem/item[apchitemcd='30']/apchitemvalue")); model.setValue("/root/main/apchitem/item[apchitemcd='05']/apchitemscore", "0"); model.setValue("/root/main/apchitem/item[apchitemcd='05']/apchitemdt", ""); model.setValue("/root/main/apchitem/item[apchitemcd='06']/apchitemscore", "0"); model.setValue("/root/main/apchitem/item[apchitemcd='06']/apchitemdt", ""); model.refresh(); } model.refresh(); } function fView() { var fio2 = model.getValue("/root/main/apchitem/item[apchitemcd='23']/apchitemvalue"); var lbfio2 = cmb_fio2.label; model.setValue("/root/main/apchitem/item[apchitemcd='23']/apchitemlabel", lbfio2); if (fio2 == "0"){ cpt_O2.visible = false; cpt_L.visible = false; cmb_device.visible = false; cmb_nasal.visible = false; cmb_simple.visible = false; //model.setValue("/root/main/apchbun/apchfio2per", "0.21"); model.setValue("/root/main/apchitem/item[apchitemcd='26']/apchitemvalue", "21"); }else if(fio2 == "1"){ cpt_O2.visible = true; cpt_L.visible = true; cmb_device.visible = true; fDevice(); }else if(fio2 == "2"){ cpt_O2.visible = false; cpt_L.visible = false; cmb_device.visible = false; fDevice(); } submit("TRMMR03212"); model.setValue("/root/init/item/apchitemlabel1", cmb_temp.label); model.setValue("/root/init/item/apchitemlabel2", cmb_zpam.label); model.setValue("/root/init/item/apchitemlabel3", cmb_zfc.label); model.setValue("/root/init/item/apchitemlabel4", cmb_zfr.label); model.setValue("/root/init/item/apchitemlabel5", cmb_zaa.label); model.setValue("/root/init/item/apchitemlabel6", cmb_pao.label); model.setValue("/root/init/item/apchitemlabel7", cmb_hco.label); model.setValue("/root/init/item/apchitemlabel8", cmb_ph.label); model.setValue("/root/init/item/apchitemlabel9", cmb_na.label); model.setValue("/root/init/item/apchitemlabel10", cmb_ka.label); model.setValue("/root/init/item/apchitemlabel11", cmb_uree.label); model.setValue("/root/init/item/apchitemlabel12", cmb_urea.label); model.setValue("/root/init/item/apchitemlabel13", cmb_hc.label); model.setValue("/root/init/item/apchitemlabel14", cmb_gb.label); model.setValue("/root/init/item/apchitemlabel15", cmb_glas.label); model.setValue("/root/init/item/apchitemlabel16", cmb_age.label); model.setValue("/root/init/item/apchitemlabel17", cmb_mcro.label); for (var i = 1; i < 18; i++){ model.setValue("/root/main/apchitem/item[" + i + "]/apchitemlabel", model.getValue("/root/init/item/apchitemlabel" + i)); } /* var ref = "/root/main/apchitem/item"; var dataCnt = getNodesetCnt(model, ref); for (var i = 1; i < 18; i++){ if((model.getValue("/root/main/apchitem/item[" + i + "]/apchitemvalue") == "") && (i != 17)){ model.setValue("/root/main/apchitem/item[" + i + "]/apchitemscore", "0"); }else if(model.getValue("/root/init/item/apchitemscore" + i) != ""){ model.setValue("/root/main/apchitem/item[" + i + "]/apchitemscore", model.getValue("/root/init/item/apchitemscore" + i)); } model.setValue("/root/main/apchitem/item[" + i + "]/apchitemlabel", model.getValue("/root/init/item/apchitemlabel" + i)); } */ //³ªÀÌ var age = model.getValue("/root/temp/apchpidlist/item/age"); if(model.getValue("/root/main/apchitem/item[apchitemcd='16']/apchitemvalue") == ""){ ipt_zage.value = age; }else{ ipt_zage.value = model.getValue("/root/main/apchitem/item[apchitemcd='16']/apchitemvalue"); } //±â·ÏÁ¤º¸ À¯Çü if(model.getValue("/root/temp/apchpidlist/item/ordinfo") == ""){ if(model.getValue("/root/send/selectdata/apchdd") == model.getValue("/root/send/selectdata/fromdd")){ rdo_ordinfo.value = "1"; } }else{ rdo_ordinfo.value = model.getValue("/root/temp/apchpidlist/item/ordinfo"); } //Adjusted ¸íĪ if(model.getValue("/root/temp/apchpidlist/item/adjustednm") != ""){ opt_content.value = model.getValue("/root/temp/apchpidlist/item/adjustednm"); } //ÀÎÁõÀúÀåÁ¤º¸ model.setValue("/root/send/selectdata/lastespiyn", model.getValue("/root/temp/apchpidlist/item/lastespiyn")); //signno model.setValue("/root/send/selectdata/signno", model.getValue("/root/temp/apchpidlist/item/signno")); //ÃÖÃÊÀÛ¼ºÀÚ model.setValue("/root/send/selectdata/fstrgstrid", model.getValue("/root/temp/apchpidlist/item/fstrgstrid")); model.setValue("/root/send/selectdata/fstrgstdt", model.getValue("/root/temp/apchpidlist/item/fstrgstdt")); //ÃÖÁ¾ÀÛ¼ºÀÚ model.setValue("/root/send/selectdata/lastupdtrid", model.getValue("/root/temp/apchpidlist/item/lastupdtrid")); model.setValue("/root/send/selectdata/lastupdtdt", model.getValue("/root/temp/apchpidlist/item/lastupdtdt")); model.refresh(); } // °è»ê ¹öư function fCalc() { var ref = "/root/main/apchitem/item"; var dataCnt = getNodesetCnt(model, ref); var apchitemdt = getCurrentDate() + getCurrentTime(); //for (var i = 1; i < dataCnt; i++){ for (var i = 1; i < 18; i++){ if((model.getValue("/root/main/apchitem/item[" + i + "]/apchitemvalue") == "") && (i != 17)){ model.setValue("/root/main/apchitem/item[" + i + "]/apchitemscore", "0"); }else if(model.getValue("/root/init/item/apchitemscore" + i) != ""){ model.setValue("/root/main/apchitem/item[" + i + "]/apchitemscore", model.getValue("/root/init/item/apchitemscore" + i)); } model.setValue("/root/main/apchitem/item[" + i + "]/apchitemlabel", model.getValue("/root/init/item/apchitemlabel" + i)); //if((model.getValue("/root/main/apchitem/item[" + i + "]/apchitemdt") == "") && (i != 5) && (i != 6) && (i != 7)){ if(((model.getValue("/root/main/apchitem/item[" + i + "]/apchitemdt") == "") && (model.getValue("/root/main/apchitem/item[" + i + "]/apchitemvalue") == ""))|| ((model.getValue("/root/main/apchitem/item[" + i + "]/apchitemdt") == "") && (model.getValue("/root/main/apchitem/item[" + i + "]/apchitemvalue") != ""))){ model.setValue("/root/main/apchitem/item[" + i + "]/apchitemdt", apchitemdt); } if(i == 16){ model.setValue("/root/main/apchitem/item[" + i + "]/apchitemdt", apchitemdt); } } opt_zapa.value = fCalcAPA(); opt_zmort.value = fCalcMort(); opt_zmorta.value = fCalcMorta(); if(model.getValue("/root/main/apchitem/item[apchitemcd='19']/apchitemscore") == "N"){ //opt_zmorta.value = fCalcMort(); fCalcMort(); fCalcMorta(); } model.refresh(); } /** * @ver : 2009.08.10. * @--------------------------------------------------- * @type : function * @access : public * @desc : ¾ÆÆÄÄ¡ ±â·ÏÁ¤º¸ ÀÎÁõÀúÀå * @param : pFlag : TempSave : ÀÓ½ÃÀúÀå, CertSave : ÀÎÁõÀúÀå * @return : * @--------------------------------------------------- */ function fGetApchRecCert(){ model.removeNode("/root/main/signSaveData"); model.makeNode("/root/main/signSaveData"); //copyNodeset("/root/main/signSaveData/apchinfo", "/root/main/apchitem", "", model, model); copyNodeset("/root/main/signSaveData/apchinfo", "/root/main/apchresult", "", model, model); //var dataCnt = getNodesetCnt(model, "/root/main/apchitem/item"); var dataCnt = getNodesetCnt(model, "/root/main/apchresult/item"); for (var i=1 ; i <= dataCnt ; i++) { /* var apchitemnm = model.getValue("/root/main/apchitem/item["+ i +"]/apchitemnm"); var apchitemvalue = model.getValue("/root/main/apchitem/item["+ i +"]/apchitemvalue"); var apchitemlabel = model.getValue("/root/main/apchitem/item["+ i +"]/apchitemlabel"); //var apchitemlabel = model.getValue("/root/init/item/apchitemlabel["+ i +"]"); alert("apchitemlabel : " + apchitemlabel); var apchitemval = model.getValue("/root/main/apchitem/item["+ i +"]/apchitemval"); var apchitemscore = model.getValue("/root/main/apchitem/item["+ i +"]/apchitemscore"); var apchitemdt = model.getValue("/root/main/apchitem/item["+ i +"]/apchitemdt"); */ var apchitemnm = model.getValue("/root/main/apchresult/item["+ i +"]/apchitemnm"); var apchitemvalue = model.getValue("/root/main/apchresult/item["+ i +"]/apchitemvalue"); var apchitemlabel = model.getValue("/root/main/apchresult/item["+ i +"]/apchitemlabel"); //var apchitemlabel = model.getValue("/root/init/item/apchitemlabel["+ i +"]"); var apchitemval = model.getValue("/root/main/apchresult/item["+ i +"]/apchitemval"); var apchitemscore = model.getValue("/root/main/apchresult/item["+ i +"]/apchitemscore"); var apchitemdt = model.getValue("/root/main/apchresult/item["+ i +"]/apchitemdt"); model.makeValue("/root/main/signSaveData/apchinfo/item["+ i +"]/apchitemnm", apchitemnm); model.makeValue("/root/main/signSaveData/apchinfo/item["+ i +"]/apchitemvalue", apchitemvalue); model.makeValue("/root/main/signSaveData/apchinfo/item["+ i +"]/apchitemlabel", apchitemlabel); model.makeValue("/root/main/signSaveData/apchinfo/item["+ i +"]/apchitemval", apchitemval); model.makeValue("/root/main/signSaveData/apchinfo/item["+ i +"]/apchitemscore", apchitemscore); model.makeValue("/root/main/signSaveData/apchinfo/item["+ i +"]/apchitemdt", apchitemdt); } copyNodeset("/root/main/signSaveData/espidata", "/root/send/selectdata" , "", model, model); //ÀÎÁõÀúÀå if (!fSign()) return; if(submit("TXMMR03212")){ model.removenodeset("/root/main/signSaveData"); //alert("±â·ÏÁö°¡ ÀúÀåµÇ¾ú½À´Ï´Ù."); } else { alert("±â·ÏÁö°¡ ÀúÀåµÇÁö ¾Ê¾Ò½À´Ï´Ù."); } } /** * @group : * @ver : 2009.08.10. * @--------------------------------------------------- * @type : function * @access : public * @desc : ÀÎÁõ·ÎÁ÷ * @param : * @return : * @--------------------------------------------------- */ function fSign(){ //var node = getGlobalVariable("paminfo"); //model.removeNodeset("/root/main/paminfo/list"); //setCSVToNode("/root/main/paminfo", node); sPid = model.getValue("/root/send/selectdata/pid"); // ȯÀÚ¹øÈ£ sOrddd = model.getValue("/root/send/selectdata/orddd"); // ÀÔ¿øÀÏÀÚ sCretNo = model.getValue("/root/send/selectdata/cretno"); // ȯÀÚ ÀÏÀÚº° ÀϷùøÈ£ sApchdd = model.getValue("/root/send/selectdata/apchdd"); // ȯÀÚ ÀÏÀÚº° ÀϷùøÈ£ submit("TRMMR03215"); sFormcd = model.getValue("/root/temp/cd/formcd"); //¼­½ÄÄÚµå Sign.certreload = true ; // ÀüÀÚ¼­¸í È£Ãâ½Ã ÀÎÁõÀúÀå ¹öưÀ» ´©´Ã¶§¸¶´Ù ÀÎÁõ¼­°¡ ¶ßµµ·Ï ó¸® if(Sign.signprocess() == true){ // ÀüÀÚÀÎÁõ °ü·Ã ȯÀÚ ÀÎÀû Á¤º¸¸¦ º¸³»ÁÜ. model.makeValue("/root/send/signdata/pid", sPid );//µî·Ï¹øÈ£ model.makeValue("/root/send/signdata/orddd", sOrddd);//ÀÔ¿øÀÏÀÚ(ÀÔ¿ø,ÀÀ±Þ)/Áø·áÀÏÀÚ(¿Ü·¡) model.makeValue("/root/send/signdata/signno", ""); //¼­¸í¹øÈ£ model.makeValue("/root/send/signdata/cretno", sCretNo); //ÀϷùøÈ£ model.makeValue("/root/send/signdata/recdd", sApchdd);// ½ÇÁ¦ ±â·ÏÀÌ ÀÌ·ç¾îÁø ±â·ÏÀÏÀÚ model.makeValue("/root/send/signdata/rectm", getCurrentTime());//½ÇÁ¦ ±â·ÏÀÌ ÀÌ·ç¾îÁø ±â·Ï½Ã°£ model.makeValue("/root/send/signdata/recsaveflag" , "Y"); //ÀüÀÚ¼­¸í ÀÎÀûÁ¤º¸ º¯°æ¿©ºÎ(±â·ÏÀϽà º¯°æµÇ´Â °æ¿ì : Y, ±×¿Ü : N) model.makeValue("/root/send/signdata/signflag" , "01" ); //¼­¸íÀڷᱸºÐ (01 : Áø·á, 02 : °£È£, 03 : LIS, 04 : Áø·áÁö¿ø) model.makeValue("/root/send/signdata/signgenrflag", "I"); //¿Ü·¡/ÀÔ¿ø±¸ºÐ(ÄÚµåÁ¤ÀǼ­ M0010 ÂüÁ¶) //model.makeValue("/root/send/signdata/formcd" , "0900006103"); //¾ÆÆÄÄ¡±â·ÏÁö ¼­½ÄÄÚµå model.makeValue("/root/send/signdata/formcd" , sFormcd); //¾ÆÆÄÄ¡±â·ÏÁö ¼­½ÄÄÚµå model.makeValue("/root/send/signdata/orddeptcd" , getUserInfo("dutplcecd")); //Áø·áºÎ¼­ÄÚµå model.makeValue("/root/send/signdata/orddrid" , getUserInfo("userid")); //Áø·áÀÇ»çID model.makeValue("/root/send/signdata/dispyn" , "Y"); //±â·Ïºä¾î¿¡´Â Á¶È¸¾ÈµÇµµ·Ï // ÀÎÁõÇÒ µ¥ÀÌÅÍ Á¤º¸(¹Ì±â·Ï ³ëµå Á¦°ÅµÈ Á¤º¸) // ¹Ì±â·Ï ³ëµå Á¦°ÅÀü ¿øº» ³ëµå Á¤º¸ : Sign.signedInfos[3] model.makeValue("/root/send/signdata/signbfcnts" , Sign.signedInfos[1]); // °øÀÎÀÎÁõ ó¸®ÈÄ µ¥ÀÌÅÍ model.makeValue("/root/send/signdata/signaftcnts" , Sign.signedInfos[2]); }else{ return false; } model.makeValue("/root/send/signdata/screenid", getScreenID()); return true; } /** * @group : * @ver : 2009.08.10 * @--------------------------------------------------- * @type : function * @access : public * @desc : ÀÎÁõµ¥ÀÌÅÍ »ý¼ºÇÔ¼ö * @param : * @return : * @--------------------------------------------------- */ function fMake_SignData(){ Sign.addnode("/root/main/signSaveData"); }