123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192 |
- /*
-
- 지시처방 불러오기(SPMNR04800.xrw - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- var xDoctPrcpListPath = "/root/main/prcpinfo/doctprcplist";
- var xCarePrcpListPath = "/root/main/prcpinfo/careprcplist";
- /**
- * @group :
- * @ver : 2007.08.01
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면 초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize(){
- var iRow = 0;
- model.makeValue("/root/send/deptcd","all");
- if(submit("TRMNR04801")){
- model.copyNode("/root/temp/prcpinfo","/root/main/prcpinfo");
- setTree(grd_doctprcplist,5,2,false);
- setTree(grd_careprcplist,9,2,false);
- for(iRow =grd_doctprcplist.fixedrows; iRow <= grd_doctprcplist.rows-grd_doctprcplist.fixedrows; iRow++){
- grd_doctprcplist.rowStatus(iRow) = 0;
- if(model.getValue(xDoctPrcpListPath+"["+iRow+"]/depth") == "1"){
- grd_doctprcplist.isReadOnly(iRow,1) = true;
- }
- }
-
- for(iRow =grd_careprcplist.fixedrows; iRow <= grd_careprcplist.rows-grd_careprcplist.fixedrows; iRow++){
- grd_careprcplist.rowStatus(iRow) = 0;
- if(model.getValue(xCarePrcpListPath+"["+iRow+"]/depth") == "1"){
- grd_careprcplist.isReadOnly(iRow,1) = true;
- }
- }
- }
- }
- /**
- * @group :
- * @ver : 2007.08.01
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc :그리드 클릭시
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fClinckGridRow(pFlag){
- var sDepth = 0;
- var iRow = 0;
- var iCol = 0;
- switch(pFlag){
- case "doct" :
- iRow = grd_doctprcplist.row;
- iCol = grd_doctprcplist.col;
- if(iRow < 1) return;
- if(iCol == 1) return;
- sDepth = eval(model.getValue(xDoctPrcpListPath+"["+iRow+"]/depth"));
- if(sDepth == 1) return;
-
- if(model.getValue(xDoctPrcpListPath+"["+iRow+"]/check") == "true"){
- model.setValue(xDoctPrcpListPath+"["+iRow+"]/check","false");
- }else{
- model.setValue(xDoctPrcpListPath+"["+iRow+"]/check","true");
- }
-
- break;
- case "care" :
- iRow = grd_careprcplist.row;
- iCol = grd_careprcplist.col;
- if(iRow < 1) return;
- if(iCol == 1) return;
- sDepth = model.getValue(xCarePrcpListPath+"["+iRow+"]/depth");
- if(sDepth == 1) return;
- if(model.getValue(xCarePrcpListPath+"["+iRow+"]/check") == "true"){
- model.setValue(xCarePrcpListPath+"["+iRow+"]/check","false");
- fDelGridRow();
- }else{
- model.setValue(xCarePrcpListPath+"["+iRow+"]/check","true");
- fDelGridRow();
- }
- break;
- }
- }
- /**
- * @group :
- * @ver : 2007.08.01
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 처방 선택 이동
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSendPrcpList(){
- var iCarePrcpRow = -1;
- var sPrcpCD = "";
- var sPrcpClsCD1 = "";
- var sPrcpClsCD2 = "";
- var sPrcpClsCD3 = "";
- var iPrcpClsCD1 = "";
- var iPrcpClsCD2 = "";
- var iPrcpClsCD3 = "";
- for(var iRow=grd_doctprcplist.fixedrows; iRow<=grd_doctprcplist.rows-grd_doctprcplist.fixedrows; iRow++){
- if(model.getValue(xDoctPrcpListPath+"["+iRow+"]/check") == "true"){
- sPrcpCD = model.getValue(xDoctPrcpListPath+"["+iRow+"]/prcpcd");
- model.setValue(xDoctPrcpListPath+"["+iRow+"]/check","false");
- if(model.getValue(xCarePrcpListPath+"[prcpcd ='"+sPrcpCD+"']/prcpcd") != "") continue;
-
- grd_careprcplist.addRow(false);
- iCarePrcpRow = grd_careprcplist.rows - grd_careprcplist.fixedrows;
- model.setValue(xCarePrcpListPath+"["+iCarePrcpRow+"]/prcpnm", model.getValue(xDoctPrcpListPath+"["+iRow+"]/prcpnm"));
- model.setValue(xCarePrcpListPath+"["+iCarePrcpRow+"]/prcpcd", model.getValue(xDoctPrcpListPath+"["+iRow+"]/prcpcd"));
- model.setValue(xCarePrcpListPath+"["+iCarePrcpRow+"]/instcd", model.getValue(xDoctPrcpListPath+"["+iRow+"]/instcd"));
- model.setValue(xCarePrcpListPath+"["+iCarePrcpRow+"]/deptcd", "all");
- model.setValue(xCarePrcpListPath+"["+iCarePrcpRow+"]/prcpclscd1", model.getValue(xDoctPrcpListPath+"["+iRow+"]/prcpclscd1"));
- model.setValue(xCarePrcpListPath+"["+iCarePrcpRow+"]/prcpclscd2", model.getValue(xDoctPrcpListPath+"["+iRow+"]/prcpclscd2"));
- model.setValue(xCarePrcpListPath+"["+iCarePrcpRow+"]/prcpclscd3", model.getValue(xDoctPrcpListPath+"["+iRow+"]/prcpclscd3"));
- model.setValue(xCarePrcpListPath+"["+iCarePrcpRow+"]/depth", 2);
- }
- }
- grd_careprcplist.refresh();
- }
- /**
- * @group :
- * @ver : 2007.08.06
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 간호setting 지시처방 삭제
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDelGridRow(){
- var sCheck = "";
- var sStatus = 0;
- var iRow = grd_careprcplist.row;
- sCheck = model.getValue(xCarePrcpListPath+"["+iRow+"]/check");
- if(sCheck == "true"){
- sStatus = grd_careprcplist.rowStatus(iRow);
- if(sStatus == 1 || sStatus == 3){
- grd_careprcplist.deleteRow(iRow,false);
- }else{
- grd_careprcplist.rowStatus(iRow)=4;
- }
- }else{
- grd_careprcplist.rowStatus(iRow)=0;
- }
-
- }
- /**
- * @group :
- * @ver : 2007.08.06
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 간호setting 지시처방 저장
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSave(){
- var sSaveData = grd_careprcplist.getUpdateData();
- if(getArrayData(sSaveData,1,4) == ""){
- messageBox("저장할 데이터가","I004");
- return;
- }
- model.removenode("/root/send");
- model.makeValue("/root/send/careprcplist",sSaveData);
-
- if(submit("TXMNR04801")){
- opener.javascript.setParameter("SMMNR04800_SaveFlag","Y");
- window.close();
- }
- }
|