123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- /*
-
- 상병선택Help 관리(SPMRT01000.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- var xCondPath = "/root/hidden/condition";
- var xIndxListPath = "/root/main/indxlist/item";
- var xTermListPath = "/root/main/termlist/terminfo";
- /**
- * @group :
- * @ver : 2007.04.13
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitalize(){
- var indxflag = opener.javascript.getParameter("indxflag");
- // Edited by NJ 2007-07-21 getDate() -> getCurrentDate()
- //model.setValue(xCondPath+"/basedd", getDate());
- model.setValue(xCondPath+"/basedd", getCurrentDate());
- model.setValue(xCondPath+"/indxflag", indxflag); // 0 : 진단, 9 : 수술, 2 : 주호소
-
- switch(indxflag){
- case "0" : // 진단
- model.toggle("case_diagindx");
- model.toggle("case_diagterminfo");
- break;
- case "9" : // 수술
- model.toggle("case_opindx");
- model.toggle("case_opterminfo");
- break;
- case "2" : // 조호소
- model.toggle("case_ccindx");
- model.toggle("case_ccterminfo");
- break;
- }
- model.removenodeset(xIndxListPath);
- model.removenodeset(xTermListPath);
- model.refresh();
- model.makeValue("/root/send/indxflag", indxflag);
- submit("TRMRT01001");
-
- }
- /**
- * @group :
- * @ver : 2007.04.13
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 용어 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSearchTermInfo(flag){
- // 색인선택 없이 조회 요청 2008-09-15 박정옥
- /* if(model.getValue(xCondPath+"/indxcd") == ""){
- messageBox("색인을 먼저","C002");
- return;
- } */
- model.removenode("/root/send");
- if(flag == "index"){
- model.makeValue("/root/send/srchflag", "");
- model.makeValue("/root/send/srchnm", "");
- } else {
- model.makeValue("/root/send/srchflag", model.getValue(xCondPath+"/srchflag"));
- model.makeValue("/root/send/srchnm", model.getValue(xCondPath+"/srchnm"));
- }
- model.makeValue("/root/send/indxflag", model.getValue(xCondPath+"/indxflag"));
- model.makeValue("/root/send/indxcd", model.getValue(xCondPath+"/indxcd"));
- model.makeValue("/root/send/basedd", model.getValue(xCondPath+"/basedd"));
- submit("TRMRT01002");
- }
- /**
- * @group :
- * @ver : 2007.04.13
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 선택된 용어 등록
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSendTermInfo(){
- var indxflag = model.getValue(xCondPath+"/indxflag"); // 0 : 진단, 9 : 수술
- var sRowCnt = 0;
- var iSrchDiagRow = 0;
- var sTermCd = "";
- switch(indxflag){
- case "0" : // 진단
- sRowCnt = grd_diaginfo.rows - grd_diaginfo.fixedrows;
- var sSrchDiagObj = opener.document.controls("grd_srcheddiaginfo");
- var sSrchDiagListPath = "/root/main/srcheddiagcdlist/srcheddiagcdinfo";
- for(var iRow=1; iRow <= sRowCnt; iRow++){
- if(model.getValue(xTermListPath+"["+iRow+"]/check") == "true"){
- sTermCd = model.getValue(xTermListPath+"["+iRow+"]/termcd");
- if(opener.model.getValue(sSrchDiagListPath+"[termcd = '"+sTermCd+"']/termcd") == ""){
- sSrchDiagObj.addItem();
- iSrchDiagRow = sSrchDiagObj.rows - sSrchDiagObj.fixedrows;
- opener.model.setValue(sSrchDiagListPath+"["+iSrchDiagRow+"]/termcd",sTermCd);
- opener.model.setValue(sSrchDiagListPath+"["+iSrchDiagRow+"]/termengnm",model.getValue(xTermListPath+"["+iRow+"]/termengnm"));
- opener.model.setValue(sSrchDiagListPath+"["+iSrchDiagRow+"]/termhngnm",model.getValue(xTermListPath+"["+iRow+"]/termhngnm"));
- }
- }
- }
- sSrchDiagObj.rebuild();
- break;
- case "9" : // 수술
- sRowCnt = grd_opinfo.rows - grd_opinfo.fixedrows;
- var sSrchOpObj = opener.document.controls("grd_srchedopinfo");
- var sSrchOpListPath = "/root/main/srchedopcdlist/srchedopcdinfo";
- var iSrchOpRow = 0;
- for(var iRow=1; iRow <= sRowCnt; iRow++){
- if(model.getValue(xTermListPath+"["+iRow+"]/check") == "true"){
- sTermCd = model.getValue(xTermListPath+"["+iRow+"]/termcd");
- if(opener.model.getValue(sSrchOpListPath+"[termcd = '"+sTermCd+"']/termcd") == ""){
- sSrchOpObj.addItem();
- iSrchOpRow = sSrchOpObj.rows - sSrchOpObj.fixedrows;
- opener.model.setValue(sSrchOpListPath+"["+iSrchOpRow+"]/termcd",sTermCd);
- opener.model.setValue(sSrchOpListPath+"["+iSrchOpRow+"]/termengnm",model.getValue(xTermListPath+"["+iRow+"]/termengnm"));
- opener.model.setValue(sSrchOpListPath+"["+iSrchOpRow+"]/termhngnm",model.getValue(xTermListPath+"["+iRow+"]/termhngnm"));
- }
- }
- }
- sSrchOpObj.rebuild();
- break;
- case "2" : // 주호소
- sRowCnt = grd_ccinfo.rows - grd_ccinfo.fixedrows;
- var sSrchCCObj = opener.document.controls("grd_srchedccinfo");
- var sSrchCCListPath = "/root/main/srchedcccdlist/srchedcccdinfo";
- var iSrchCCRow = 0;
- for(var iRow=1; iRow <= sRowCnt; iRow++){
- if(model.getValue(xTermListPath+"["+iRow+"]/check") == "true"){
- sTermCd = model.getValue(xTermListPath+"["+iRow+"]/termcd");
- if(opener.model.getValue(sSrchCCListPath+"[termcd = '"+sTermCd+"']/termcd") == ""){
- sSrchCCObj.addItem();
- iSrchCCRow = sSrchCCObj.rows - sSrchCCObj.fixedrows;
- opener.model.setValue(sSrchCCListPath+"["+iSrchCCRow+"]/termcd",sTermCd);
- opener.model.setValue(sSrchCCListPath+"["+iSrchCCRow+"]/termengnm",model.getValue(xTermListPath+"["+iRow+"]/termengnm"));
- opener.model.setValue(sSrchCCListPath+"["+iSrchCCRow+"]/termhngnm",model.getValue(xTermListPath+"["+iRow+"]/termhngnm"));
- }
- }
- }
- sSrchCCObj.rebuild();
- break;
- }
- }
|