function fInit(){ if(isPopup()){ var sPrcpdd = opener.model.getValue("/root/send/popupinfo/prcpdd"); model.setValue("/root/send/userinfo/fromdd", sPrcpdd); model.setValue("/root/send/userinfo/todd", sPrcpdd); model.setValue("/root/send/userinfo/pid", opener.model.getValue("/root/send/popupinfo/pid")); model.setValue("/root/send/userinfo/cretno", opener.model.getValue("/root/send/popupinfo/cretno")); fGetAntiCancerFlowSheet(); } } function fGetAntiCancerFlowSheet(){ if(isNull(model.getValue("/root/send/userinfo/pid"))){ return; }else{ fSetFlowSheet(); } } function fSetFlowSheet(){ submit("TRMQI04001"); fSetDataGrid(); model.setValue("/root/main/title", model.getValue("/root/temp/flowsheet/patinfo/hngnm") +" ("+ model.getValue("/root/temp/flowsheet/patinfo/pid") + ")"); model.refresh(); grid_flowsheet.rowhidden(eval(grid_flowsheet.rows - 1)) = true; } function fSetDataGrid(){ grid_flowsheet.caption = "±¸ºÐ^^^^Ç׸ñ^" + model.getValue("/root/temp/flowsheet/tableinfo/caption"); copyNodesetType("/root/main/flowsheet/datainfo","/root/temp/flowsheet/datainfo", "replace"); for(var i=1; i<=grid_flowsheet.cols; i++){ grid_flowsheet.mergeCells = "bycol"; if(i > 1){ if(i == 5){ grid_flowsheet.colWidth(i) = 250; }else{ grid_flowsheet.colWidth(i) = 150; } grid_flowsheet.mergeCol(i) = false; grid_flowsheet.colAttribute ( i, "style" ) = "text-align:left;"; }else{ grid_flowsheet.mergeCol(i) = true; } } grid_flowsheet.rebuild(); grid_flowsheet.refresh(); fSetDataGridRowStyle(); } function fSetDataGridRowStyle(){ var rows = eval(grid_flowsheet.rows -1); var checkedAC = false; for(var i=2; i < rows; i++){ var row = eval(i-1); var nextrow = i; var acflag = model.getValue("/root/main/flowsheet/datainfo["+row+"]/subtitle"); var nextacflag = model.getValue("/root/main/flowsheet/datainfo["+nextrow+"]/subtitle"); if( (acflag != nextacflag)){ grid_flowsheet.rowstyle(row, "data", "border-bottom-width") = "2px"; grid_flowsheet.rowstyle(row, "data", "border-bottom-color") = "#000000"; } } grid_flowsheet.rebuild(); grid_flowsheet.refresh(); } function fSetAntiCancerFlowSheetinfo(){ model.setValue("/root/send/prcpinfo" ,grid_flowsheet.getUpdateData()); submit("TXMQI04001"); fGetAntiCancerFlowSheet(); } function fSetResetAntiCancerFlowSheetinfo(){ copyNodesetType("/root/main/flowsheet/datainfo","/root/temp/flowsheet/datainfo", "replace"); grid_flowsheet.rebuild(); grid_flowsheet.refresh(); grid_flowsheet.rowhidden(eval(grid_flowsheet.rows - 1)) = true; } function fActionClose(){ if(isPopup()){ if(opener.window.javascript.getScreenID() == "SMMQI04000"){ opener.window.javascript.fGetAntiCancerFlowSheet(); } } } function fGetOpenAutoTextPopup(acflag, itemcd, row){ if((acflag == "AC05" && itemcd == "PURPOSE") || (acflag == "AC02" && itemcd == "SideEffect") || (acflag == "AC06" && itemcd == "React") ){ setParameter("SPMQI04001_itemval", model.getValue("/root/main/flowsheet/datainfo[subtitle = '"+acflag+"' and prcpcd = '"+itemcd+"' ]/date1")); setParameter("SPMQI04001_itemcd", itemcd); setParameter("SPMQI04001_acflag", acflag); modal("SPMQI04001"); // º¯°æµÈ ³»¿ëÀÌ ¿øº»°ú ´Ù¸¦°æ¿ì ÇØ´ç Datagrid rowÀÇ »óŸ¦ Update·Î º¯°æ if(model.getValue("/root/temp/flowsheet/datainfo[subtitle = '"+acflag+"' and prcpcd = '"+itemcd+"' ]/date1") != model.getValue("/root/main/flowsheet/datainfo[subtitle = '"+acflag+"' and prcpcd = '"+itemcd+"' ]/date1")){ grid_flowsheet.addStatus(row, "update"); } } }