123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- 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");
- }
- }
- }
|