123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799 |
- var instance = document.models(0).instances(0);
- var pageInfo = new PAGEINFO();
- /**
- * @group :
- * @ver : 2007.03.20
- * @by :
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize()
- {
- model.removeNodeset("/root/main/selectdiaglist");
- grd_diaglist.col = 4;
- grd_diaglist.row = grd_diaglist.rows - 1;
-
- //dispOnLoadComplete("", model.getValue(pageInfo.formmastRef + "/formcd"));
- dispOnLoadComplete("", "0000000899");
- // model.refresh();
- // parent.body.dispatch("diag_onloadcomplete");
- }
- /**
- * @group :
- * @ver : 2007.03.20
- * @by :
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fCheckChange()
- {
- var iLeng = 0;
- var degnitemcd = model.getValue("/root/main/recinfo/grid[" + grd_diaglist.row + "]/recitem[degnitemno = '13' and degnitemkind = 'GSU']/degnitemcd");
- var dgnm = "";
- //2010.02.05 dhkim - 진단명 코드변경
- if(degnitemcd.substring(0, 7) == '0000960'){
- dgnm = model.getValue("/root/main/recinfo/grid[" + grd_diaglist.row + "]/recitem[degnitemcd = '" + degnitemcd + "' and degnitemkind = 'GSU']/rectermnm");
- }
-
- if (dgnm == "")
- {
- model.setValue("/root/main/recinfo/grid[" + grd_diaglist.row + "]/recitem[degnitemcd='0001443001' and degnitemkind = 'GSU']/rectermnm", "");
- model.setValue("/root/main/recinfo/grid[" + grd_diaglist.row + "]/recitem[degnitemcd='0001443001' and degnitemkind = 'GSU']/rectermcd", "S");
-
- model.setValue("/root/main/recinfo/grid[" + grd_diaglist.row + "]/recitem[degnitemcd='0004249001' and degnitemkind = 'GSU']/rectermnm", "");
- model.setValue("/root/main/recinfo/grid[" + grd_diaglist.row + "]/recitem[degnitemcd='0004249001' and degnitemkind = 'GSU']/rectermcd", "C");
- return false;
- }
-
- //주/부 비교 및 주가 맨위로
- if ( grd_diaglist.valueMatrix ( grd_diaglist.row,2 ) == "M" && grd_diaglist.col == "2" )
- {
- for ( var i = 1; i < grd_diaglist.rows; i++ )
- {
- if ( grd_diaglist.valueMatrix ( i, 2 ) == "M" && i != grd_diaglist.row )
- {
- grd_diaglist.valueMatrix ( i, 2 ) = "S";
- //model.setValue("/root/main/recinfo/recitem[" + i + "]/recitem[degnitemcd='" + '0001443001' + "']/recitemnm", "");
- //model.setValue("/root/main/recinfo/grid[" + i + "]/recitem[degnitemcd='" + '0001443001' + "']/recitemnm", "");
- model.setValue("/root/main/recinfo/grid[" + i + "]/recitem[degnitemcd='" + '0001443001' + "']/rectermnm", "");
- }
- }
- model.setValue("/root/main/recinfo/grid[" + grd_diaglist.row + "]/recitem[degnitemcd='0001443001']/rectermnm", "주");
- model.refresh();
- var iRow = grd_diaglist.row;
- if (iRow != 1)
- {
- var sNodeRowNo = ""; //선택된 행의 rowno
- var fNodeRowNo = ""; //첫번째 행의 rowno
-
- fNodeRowNo = model.getValue("/root/main/recinfo/grid[" + 1 + "]/recitem[" + 1 + "]/rowno");
- sNodeRowNo = model.getValue("/root/main/recinfo/grid[" + iRow + "]/recitem[" + 1 + "]/rowno");
-
- //첫번째 행의 rowno를 선택된 행의 rowno로 바꾼다
- var fnodelist = model.instance1.selectNodes("/root/main/recinfo/grid[" + 1 + "]/recitem");
- for(var i = 0; i < fnodelist.length; i++)
- {
- var node = fnodelist.item(i);
- var path1 = node.selectSingleNode("rowno");
-
- path1.text = sNodeRowNo;
- }
-
- //선택된 행의 rowno를 첫번째 행의 rowno로 바꾼다
- var snodelist = model.instance1.selectNodes("/root/main/recinfo/grid[" + iRow + "]/recitem");
- for(var i = 0; i < snodelist.length; i++)
- {
- var node = snodelist.item(i);
- var path1 = node.selectSingleNode("rowno");
-
- path1.text = fNodeRowNo;
- }
-
- model.makeValue("root/hidden/temp", "");
- model.copyNode("root/hidden/temp", "/root/main/recinfo/grid[" + iRow + "]");
- model.copyNode("/root/main/recinfo/grid[" + iRow + "]", "/root/main/recinfo/grid[" + 1 + "]");
- model.copyNode("/root/main/recinfo/grid[" + 1 + "]", "root/hidden/temp");
- model.removeNodeset("root/hidden/temp");
- }
- }
- else if ( grd_diaglist.valueMatrix ( grd_diaglist.row,2 ) == "S" && grd_diaglist.col == "2" )
- {
- var chkmskind = false;
- for ( var i = 1; i < grd_diaglist.rows; i++ )
- {
- if ( grd_diaglist.valueMatrix ( i, 2 ) == "M")
- {
- chkmskind = true;
- }
- }
-
- if(chkmskind)
- {
- model.setValue("/root/main/recinfo/grid[" + grd_diaglist.row + "]/recitem[degnitemcd='" + '0001443001' + "']/rectermnm", "");
- }
- else
- {
-
- messageBox("하나의 주진단은 필수 ", "I009");
- model.setValue("/root/main/recinfo/grid[" + grd_diaglist.row + "]/recitem[degnitemcd='0001443001']/rectermcd", "M");
- model.setValue("/root/main/recinfo/grid[" + grd_diaglist.row + "]/recitem[degnitemcd='0001443001']/rectermnm", "주");
- return false;
- }
- }
- //R/O비교
- if ( grd_diaglist.valueMatrix ( grd_diaglist.row,1 ) == "R" && grd_diaglist.col == "1" )
- {
- model.setValue("/root/main/recinfo/grid[" + grd_diaglist.row + "]/recitem[degnitemcd='0004249001']/rectermnm", "R/O");
- model.refresh();
- }
- else if ( grd_diaglist.valueMatrix ( grd_diaglist.row,1 ) == "C" && grd_diaglist.col == "1" )
- {
- model.setValue("/root/main/recinfo/grid[" + grd_diaglist.row + "]/recitem[degnitemcd='" + '0004249001' + "']/rectermnm", "");
- }
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.03.20
- * @by : ??????
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : ?????? Enable / Disable
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGrdDelRow()
- {
- if ( grd_diaglist.valueMatrix ( grd_diaglist.row,2 ) == "M")
- {
- messageBox("주진단은 삭제", "E001");
- return;
- }
- else
- {
- var iRow = grd_diaglist.row;
- var smmcnts = model.getValue("/root/main/recinfo/grid[" + iRow + "]/recitem[colno='2']/rectermnm");
- var smmcntcd = model.getValue("/root/main/recinfo/grid[" + iRow + "]/recitem[colno='2']/rectermcd");
-
- if(iRow > 0 && (smmcnts != "" || smmcntcd != "")){
- model.removeNodeset("/root/main/recinfo/grid[" + iRow + "]");
- model.removeNodeset("/root/main/selectdiaglist[" + iRow + "]");
- model.removeNodeset("/root/tmpdiag/selectdiaglist[" + iRow + "]");
- }
- else
- {
- return;
- }
-
- var nodelist = model.instance1.selectNodes("/root/main/recinfo/grid");
- var totrow = nodelist.length;
- var irowcnt = 0;
-
- for(var i = 0; i < totrow; i++)
- {
- var node = nodelist.item(i);
- var tmpnode = node.selectNodes("recitem");
-
- for(var j = 0; j < tmpnode.length; j++)
- {
- var node = tmpnode.item(j);
- var path1 = node.selectSingleNode("rowno");
-
- path1.text = irowcnt;
- }
- /*
- var path1 = node.selectSingleNode("recitem[degnitemlevlcd='0000521.0000960']/rowno"); //진단header
- var path2 = node.selectSingleNode("recitem[degnitemlevlcd='0000521.0000960.0004249']/rowno"); //R/O
- var path3 = node.selectSingleNode("recitem[degnitemlevlcd='0000521.0000960.0001443']/rowno"); //주/부
- var path4 = node.selectSingleNode("recitem[degnitemlevlcd='0000521.0000960.0000960']/rowno"); //진단명
- var path5 = node.selectSingleNode("recitem[degnitemlevlcd='0000521.0000960.0000168']/rowno"); //Comments
-
- path1.text = irowcnt;
- path2.text = irowcnt;
- path3.text = irowcnt;
- path4.text = irowcnt;
- path5.text = irowcnt;
- */
- irowcnt++;
- }
-
- grd_diaglist.rebuild();
- }
- }
- function fClickPopUp()
- {
- setParameter("SPMMO3200_param_nodepath", "/root/tmpdiag");
- modal("../../../emr/prcpmngtweb/xrw/SPMMO03200_진단팝업.xrw", 1, 0, 0, "", "", "");
- var nodelistMain = instance.selectNodes("/root/main/selectdiaglist");
- var nodelistTemp = instance.selectNodes("/root/tmpdiag/selectdiaglist");
-
- var iRow = grd_diaglist.row;
- var path = "/root/main/recinfo/grid";
- var nodelistJuh = instance.selectNodes(path);
- var nodelength = nodelistJuh.length;
- var smmcnts = "";
-
- //2010.02.05 dhkim - 진단명 코드변경
- var degnitemcd = model.getValue("/root/main/recinfo/grid[" + grd_diaglist.row + "]/recitem[degnitemno = '13' and degnitemkind = 'GSU']/degnitemcd");
- if(degnitemcd.substring(0, 7) == '0000960'){
- smmcnts = model.getValue(path + "[" + nodelength + "]/recitem[degnitemcd = '" + degnitemcd + "' and degnitemkind = 'GSU']/rectermnm");
- }
-
- // var smmcnts = model.getValue(path + "[" + nodelength + "]/recitem[degnitemcd = '0000960001' and degnitemkind = 'GSU']/rectermnm")
- if (smmcnts == "")
- {
- model.removeNodeset("/root/main/recinfo/grid[" + nodelength + "]");
- model.removeNodeset("/root/main/selectdiaglist[" + nodelength + "]");
- grd_diaglist.refresh();
- }
- var iLeng = 0;
- var sTmpdiagcd = "";
- var sTmpdiagengnm = "";
- var iMainleng = nodelistMain.length;
- //var iMainleng = instance.selectNodes("/root/main/recinfo/grid").length;
- if(nodelistTemp.length >= 1)
- {
- for(var i = 1; i <= nodelistTemp.length; i++)
- {
- sTmpdiagcd = model.getValue("/root/tmpdiag/selectdiaglist[" + i + "]/diagcd");
- sTmpdiagengnm = model.getValue("/root/tmpdiag/selectdiaglist[" + i + "]/diagengnm");
- //var iFndRow = getNodesetCnt(model, "/root/main/selectdiaglist/col[rectermcd='" + sTmpdiagcd + "']");
- var iFndRow = getNodesetCnt(model, "/root/main/recinfo/grid/recitem[rectermcd='" + sTmpdiagcd + "']");
- if(iFndRow > 0){
- iMainleng = iMainleng - 1;
- }else if(iFndRow <= 0){
- iLeng = i + iMainleng;
- model.makeValue("/root/main/selectdiaglist[" + iLeng + "]/col["+ 1 + "]/rectermcd", "C");
- model.makeValue("/root/main/selectdiaglist[" + iLeng + "]/col["+ 1 + "]/reccnts", "");
- model.makeValue("/root/main/selectdiaglist[" + iLeng + "]/col["+ 1 + "]/comp", "false");
- model.makeValue("/root/main/selectdiaglist[" + iLeng + "]/col["+ 1 + "]/colno", "0");
- model.makeValue("/root/main/selectdiaglist[" + iLeng + "]/col["+ 2 + "]/rectermcd", "S");
- model.makeValue("/root/main/selectdiaglist[" + iLeng + "]/col["+ 2 + "]/reccnts", "부");
- model.makeValue("/root/main/selectdiaglist[" + iLeng + "]/col["+ 2 + "]/comp", "false");
- model.makeValue("/root/main/selectdiaglist[" + iLeng + "]/col["+ 2 + "]/colno", "1");
- model.makeValue("/root/main/selectdiaglist[" + iLeng + "]/col["+ 3 + "]/rectermcd", sTmpdiagcd);
- model.makeValue("/root/main/selectdiaglist[" + iLeng + "]/col["+ 3 + "]/reccnts", sTmpdiagengnm);
- model.makeValue("/root/main/selectdiaglist[" + iLeng + "]/col["+ 3 + "]/cntsyn", "N");
- model.makeValue("/root/main/selectdiaglist[" + iLeng + "]/col["+ 3 + "]/comp", "true");
- model.makeValue("/root/main/selectdiaglist[" + iLeng + "]/col["+ 3 + "]/colno", "2");
- }
- }
- }
- makeProgInstance(pageInfo, instance, nodelistMain);
-
- fAddrow();
- }
- /**
- * @desc : 줄추가
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fAddrow()
- {
- var path1 = "/root/main/recinfo/grid[degnitemno = '1']";
- var nodelistDGN = instance.selectNodes(path1);
- var nodelength = nodelistDGN.length;
- var path2 = "/root/main/recinfo/grid[degnitemno = '1'][" + nodelength + "]";
- copyNodeset("/root/tmp", path2, "replace", model, model);
-
- var smmcnts = model.getValue("/root/tmp/recitem[colno='2']/rectermnm");
- if(smmcnts != "" || nodelength == 0)
- {
- model.makeValue("/root/main/selectdiaglist[" + 1 + "]/col["+ 1 + "]/rectermcd", "C");
- model.makeValue("/root/main/selectdiaglist[" + 1 + "]/col["+ 1 + "]/reccnts", "");
- model.makeValue("/root/main/selectdiaglist[" + 1 + "]/col["+ 1 + "]/comp", "false");
- model.makeValue("/root/main/selectdiaglist[" + 1 + "]/col["+ 1 + "]/colno", "0");
- model.makeValue("/root/main/selectdiaglist[" + 1 + "]/col["+ 2 + "]/rectermcd", "S");
- model.makeValue("/root/main/selectdiaglist[" + 1 + "]/col["+ 2 + "]/reccnts", "");
- model.makeValue("/root/main/selectdiaglist[" + 1 + "]/col["+ 2 + "]/comp", "false");
- model.makeValue("/root/main/selectdiaglist[" + 1 + "]/col["+ 2 + "]/colno", "1");
- model.makeValue("/root/main/selectdiaglist[" + 1 + "]/col["+ 3 + "]/rectermcd", "");
- model.makeValue("/root/main/selectdiaglist[" + 1 + "]/col["+ 3 + "]/reccnts", "-");
- model.makeValue("/root/main/selectdiaglist[" + 1 + "]/col["+ 3 + "]/cntsyn", "N");
- model.makeValue("/root/main/selectdiaglist[" + 1 + "]/col["+ 3 + "]/comp", "true");
- model.makeValue("/root/main/selectdiaglist[" + 1 + "]/col["+ 3 + "]/colno", "2");
- nodelistMain = instance.selectNodes("/root/main/selectdiaglist");
- makeProgInstance(pageInfo, instance, nodelistMain);
- // grd_diaglist.row = nodelength + 1;
- // grd_diaglist.col = 2;
- // grd_diaglist.editCell();
- grd_diaglist.refresh();
- }
- }
- /**
- * @desc : 편집 후 termcd가 없는 경우 '-'를 넣어줌(저장문제)
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fEndEdit()
- {
- //debugger;
- var path1 = "/root/main/recinfo/grid[degnitemno = '1']";
- var nodelistJuh = instance.selectNodes(path1);
- var nodelength = nodelistJuh.length;
- var smmcnts = model.getValue("/root/main/recinfo/grid[degnitemno = '1'][" + nodelength + "]/recitem[colno='2']/rectermnm");
- var termcd = model.getValue("/root/main/recinfo/grid[degnitemno = '1'][" + nodelength + "]/recitem[colno='2']/rectermcd");
-
- if(smmcnts != "" && termcd == "")
- {
- model.setValue("/root/main/recinfo/grid[degnitemno = '1'][" + nodelength + "]/recitem[colno='2']/rectermcd", "-");
- }
-
- var sDisgnm = model.getValue("/root/main/recinfo/grid[degnitemno = '1'][" + grd_diaglist.row + "]/recitem[colno='2']/rectermnm");
-
- if (sDisgnm == "")
- {
- fGrdDelRow();
- }
- }
- function fInitPage(colhide, heig, wid, ivwID, initnm)
- {
- body.attribute("height") = heig;
- body.attribute("width") = wid;
- grd_diaglist.attribute("height") = heig - 2;
- grd_diaglist.attribute("width") = wid - 4;
- grd_diaglist.extendLastCol = "scroll";
- if(colhide)
- {
- grd_diaglist.colhidden(0) = colhide;
- btn_pop.attribute("visibility") = "hidden";
- }
- if (ivwID != null && ivwID != "")
- gSendParentCallID = ivwID;
- if (initnm != null && initnm != "")
- grd_diaglist.valueMatrix(0, 4) = initnm;
- body.refresh();
- }
- /**
- * @group :
- * @ver : 2007.03.20
- * @by : ??????
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : ?????? Enable / Disable
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function old_fGetDiagNm()
- {
- var pamInfoCvs = getGlobalVariable("paminfo"); //상단정보가 있을 경우는 검색
- if(pamInfoCvs != null && pamInfoCvs != "")
- { //cvs가 null이 아닌 경우에만 처리함.
- model.removeNodeSet ("/root/init/paminfo/list");
- setCSVToNode ("/root/init/paminfo", pamInfoCvs);
- var sPid = model.getValue ("/root/init/paminfo/list/pid");
- var sCretno = cretno = model.getValue ("/root/init/paminfo/list/cretno");
- var sIoflag = ioflag = model.getValue ("/root/init/paminfo/list/ioflag");
- var sOrddeptcd = orddeptcd = model.getValue ("/root/init/paminfo/list/orddeptcd");
- var sOrddd = "";
- if (ioflag == "O")
- {
- sOrddd = model.getValue ("/root/init/paminfo/list/orddd");
- } else {
- sOrddd = model.getValue ("/root/init/paminfo/list/indd");
- }
- }
- model.removeNodeset("/root/main/diaginfo");
- model.makeValue("/root/send/cond1", sPid);
- model.makeValue("/root/send/cond2", sOrddd);
- model.makeValue("/root/send/cond3", sCretno);
- model.makeValue("/root/send/cond4", sOrddeptcd);
- model.makeValue("/root/send/cond5", sIoflag);
- // model.makeValue("/root/send/cond1", "00301165");
- // model.makeValue("/root/send/cond2", "20070524");
- // model.makeValue("/root/send/cond3", "1");
- // model.makeValue("/root/send/cond4", "1000000004");
- // model.makeValue("/root/send/cond5", "I");
- submit("TRMMO00105", false);
- fSetDiagNmInstance();
- }
- /**
- * @group :
- * @ver : 2007.03.20
- * @by : ??????
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : ?????? Enable / Disable
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetDiagNm(paminfo)
- {
- var pageInfo = new PAGEINFO();
- var degnlvcd = model.getValue(pageInfo.initRecinfoGridrecItemRef + "[orgdegnitemkind='DGN']/degnitemlevlcd").substring(0, 7);
-
- if(paminfo != null)
- {
- var pid = paminfo.selectSingleNode("pid").text
- var cretno = paminfo.selectSingleNode("cretno").text
- var orddd = paminfo.selectSingleNode("orddd").text
- var orddeptcd = paminfo.selectSingleNode("orddeptcd").text
- var ioflag = paminfo.selectSingleNode("chosflag").text
-
- fSetDiagNmbyDegnItemLevlCd(pid, cretno, orddd, orddeptcd, ioflag, degnlvcd);
-
- fAddrow();
- }
- }
- var gDegnItemNm = null;
- function fSetDiagNmInstance()
- {
- var nodelistDiaginfo = instance.selectNodes("/root/main/diaginfo/diagcdlist");
- var nodelistMain = instance.selectNodes("/root/main/selectdiaglist");
- var ro = "";
- var ms = "";
- var sDiagkindcd = "";
- var sDiagkindcdflag = "";
-
- if(nodelistDiaginfo.length >= 1){
- for(var i = 1; i <= nodelistDiaginfo.length; i++)
- {
- sDiagkindcd = model.getValue("/root/main/diaginfo/diagcdlist[" + i + "]/diagkindcd");
- sDiagkindcdflag = model.getValue("/root/main/diaginfo/diagcdlist[" + i + "]/diagkindcdflag");
- sTmpdiagcd = model.getValue("/root/main/diaginfo/diagcdlist[" + i + "]/icd10cd");
- sTmpdiagengnm = model.getValue("/root/main/diaginfo/diagcdlist[" + i + "]/diagengnm");
- if (sDiagkindcd == "R")
- {
- ro = "R/O";
- }
- else
- {
- ro = "";
- sDiagkindcd = "C";
- }
- if (sDiagkindcdflag == "M")
- {
- ms = "주";
- }
- else
- {
- ms = "부";
- sDiagkindcdflag = "S";
- }
- model.makeValue("/root/main/selectdiaglist[" + i + "]/col["+ 1 + "]/rectermcd", sDiagkindcd);
- model.makeValue("/root/main/selectdiaglist[" + i + "]/col["+ 1 + "]/reccnts", ro);
- model.makeValue("/root/main/selectdiaglist[" + i + "]/col["+ 1 + "]/comp", "false");
- model.makeValue("/root/main/selectdiaglist[" + i + "]/col["+ 1 + "]/colno", "0");
- model.makeValue("/root/main/selectdiaglist[" + i + "]/col["+ 2 + "]/rectermcd", sDiagkindcdflag);
- model.makeValue("/root/main/selectdiaglist[" + i + "]/col["+ 2 + "]/reccnts", ms);
- model.makeValue("/root/main/selectdiaglist[" + i + "]/col["+ 2 + "]/comp", "false");
- model.makeValue("/root/main/selectdiaglist[" + i + "]/col["+ 2 + "]/colno", "1");
- model.makeValue("/root/main/selectdiaglist[" + i + "]/col["+ 3 + "]/rectermcd", sTmpdiagcd);
- model.makeValue("/root/main/selectdiaglist[" + i + "]/col["+ 3 + "]/reccnts", sTmpdiagengnm);
- model.makeValue("/root/main/selectdiaglist[" + i + "]/col["+ 3 + "]/comp", "true");
- model.makeValue("/root/main/selectdiaglist[" + i + "]/col["+ 3 + "]/colno", "2");
- model.makeValue("/root/main/selectdiaglist[" + i + "]/col["+ 3 + "]/rectermflag", "002");
- if (sDiagkindcdflag == "M")
- {
- parent.window.javascript.setParameter("SSMRF04000_diagnm", sTmpdiagengnm);
- }
- }
- makeProgInstance(pageInfo, instance, nodelistMain, gDegnItemNm);
- }
-
- fAddrow();
- model.refresh();
- }
- /**
- * @desc : 수술예약번호를 통한 진단명, 마취종류 조회삭제예정
- (해당기록지에서 직접 조회하여 데이터 넘김) 2008.05.20 박종훈
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetdiagFormOprsrvno(oprsrvno, iMcdnm, iMcdnm, iScdnm, iScdnm)
- {
- if(oprsrvno != ""){
- model.removeNodeset("/root/main/diaginfo/diagcdlist");
- model.makeValue("/root/send/oprsrvno", oprsrvno);
- //model.makeValue("/root/send/oprsrvno", "2007000009");
- submit("TRMRF04001", false);
- var anstmthdcd = model.getValue("/root/main/diaginfo/anstlist/anstmthdcd");
- var mcdnm = model.getValue("/root/main/diaginfo/anstlist/mcdnm");
- var anstmthdcdsub = model.getValue("/root/main/diaginfo/anstlist/anstmthdcdsub");
- var scdnm = model.getValue("/root/main/diaginfo/anstlist/scdnm");
- //주마취
- parent.model.setValue("/root/main/recinfo/recitem[degnitemno='" + iMcdnm + "']/recrefcd", anstmthdcd);
- parent.model.setValue("/root/main/recinfo/recitem[degnitemno='" + iMcdnm + "']/recitemnm", mcdnm);
- //부마취
- parent.model.setValue("/root/main/recinfo/recitem[degnitemno='" + iScdnm + "']/recrefcd", anstmthdcdsub);
- parent.model.setValue("/root/main/recinfo/recitem[degnitemno='" + iScdnm + "']/recitemnm", scdnm);
- fSetDiagNmInstance();
- return true;
- }else{
- alert("해당환자는 수술환자가 아닙니다!");
- parent.grup_base.disabled = true;
- //parent.window.javascript.fBtnDisable();
- return false;
- }
- // var diagcdlistNode = instance1.selectSingleNode("/root/main/diaginfo");
- //
- // if((diagcdlistNode.childNodes).length > 0){
- //
- // var selectNode = ivw_0007983001.instance1.selectSingleNode("/root/main/diaginfo");
- //
- // if(selectNode == null){
- // ivw_0007983001.model.makeNode("/root/main/diaginfo");
- // }
- //
- // copyNode(ivw_0007983001.model, model, "/root/main/diaginfo/diagcdlist", "/root/main/diaginfo/diagcdlist");
- // ivw_0007983001.window.javascript.fSetDiagNmInstance();
- //
- // var anstmthdcd = model.getValue("/root/main/diaginfo/diagcdlist/anstmthdcd");
- // var mcdnm = model.getValue("/root/main/diaginfo/diagcdlist/mcdnm");
- // var anstmthdcdsub = model.getValue("/root/main/diaginfo/diagcdlist/anstmthdcdsub");
- // var scdnm = model.getValue("/root/main/diaginfo/diagcdlist/scdnm");
- // //주마취
- // model.setValue("/root/main/recinfo/recitem[degnitemno='" + iMcdnm + "']/recrefcd", anstmthdcd);
- // model.setValue("/root/main/recinfo/recitem[degnitemno='" + iMcdnm + "']/recitemnm", mcdnm);
- // //부마취
- // model.setValue("/root/main/recinfo/recitem[degnitemno='" + iScdnm + "']/recrefcd", anstmthdcdsub);
- // model.setValue("/root/main/recinfo/recitem[degnitemno='" + iScdnm + "']/recitemnm", scdnm);
- //
- // model.refresh();
- // }
- }
- /**
- * @desc : 수술예약번호를 통한 진단명, 마취종류 조회
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetdiagFormOprsrvno_loc(tmp, iMcdnm, iMcdnm, iScdnm, iScdnm)
- {
- model.removeNodeset("/root/main/diaginfo/diagcdlist");
- //model.makeValue("/root/send/oprsrvno", oprsrvno);
- model.makeValue("/root/send/oprsrvno", tmp);
- submit("TRMRF04001", false);
- var anstmthdcd = model.getValue("/root/main/diaginfo/anstlist/anstmthdcd");
- var mcdnm = model.getValue("/root/main/diaginfo/anstlist/mcdnm");
- var anstmthdcdsub = model.getValue("/root/main/diaginfo/anstlist/anstmthdcdsub");
- var scdnm = model.getValue("/root/main/diaginfo/anstlist/scdnm");
- //주마취
- parent.model.setValue("/root/main/recinfo/recitem[degnitemno='" + iMcdnm + "']/recrefcd", anstmthdcd);
- parent.model.setValue("/root/main/recinfo/recitem[degnitemno='" + iMcdnm + "']/recitemnm", mcdnm);
- //부마취
- parent.model.setValue("/root/main/recinfo/recitem[degnitemno='" + iScdnm + "']/recrefcd", anstmthdcdsub);
- parent.model.setValue("/root/main/recinfo/recitem[degnitemno='" + iScdnm + "']/recitemnm", scdnm);
- fSetDiagNmInstance();
- return true;
- }
- function clearData()
- {
- model.removeNodeset("/root/main/recinfo");
- model.refresh();
- }
- /**
- * @desc : Comments 기록 존재 여부에 따른 컬럼 표시
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fIsCommentExist()
- {
-
- var iFndRow = 0;
- //2010.02.05 dhkim - 진단명 코드변경
- var degnitemcd = model.getValue("/root/main/recinfo/grid[" + grd_diaglist.row + "]/recitem[degnitemno = '13' and degnitemkind = 'GSU']/degnitemcd");
- if(degnitemcd.substring(0, 7) == '0000960'){
- iFndRow = getNodesetCnt(model, "/root/main/recinfo/grid/recitem[degnitemcd = '" + degnitemcd + "' and degnitemkind = 'GSU' and reccnts != '']");
- }
-
- // var iFndRow = getNodesetCnt(model, "/root/main/recinfo/grid/recitem[degnitemcd ='0000960001' and degnitemkind = 'GSU' and reccnts != '']");
-
- if (iFndRow > 0)
- {
- grd_diaglist.colhidden(grd_diaglist.colref("recitem[colno='2']/reccnts")) = false;
- }
- else
- {
- grd_diaglist.colhidden(grd_diaglist.colref("recitem[colno='2']/reccnts")) = true;
- }
- }
- /**
- * @desc : 저장전 검사
- * : 2010.01.18 dhkim - 추가(isChk가 true일때만 체크함)
- * @
- * @param : 추가
- * @return :
- * @---------------------------------------------------
- */
- function fChkGrdPreSave(isChk, itemNm)
- {
-
- if(isChk == null || isChk == false){
- return false;
- }
-
- if(isChk){
-
- }
-
- }
- /**
- * @desc : 저장전 검사(입퇴원요약기록_MMR00800에서만 사용)
- * : 2010.01.27 dhkim - 추가(isChk가 true일때만 체크함)
- * @
- * @param : 추가
- * @return :
- * @---------------------------------------------------
- */
- function fChkGrdPreSave_MMR00800(isChk, itemNm)
- {
-
- if(isChk == null || isChk == false){
- return false;
- }
-
- if(isChk){
-
-
- model.addLog("MRF04000.js fChkGrdPreSave_MMR00800내부 == ");
-
- //2010.01.27 dhkim
- //1. 주진단체크
- //2. 진단이 1건일 경우 부진단이 있는지 여부를 물어봄
- //3. 부진단이 있다고 하면 저장안하고 리턴시킴
- if(itemNm == null || itemNm == ""){
- var pageInfo = new PAGEINFO();
- itemNm = model.instances(0).selectSingleNode(pageInfo.formdegnRef + "[degnitemkind = 'GRD']").getXPathString("itemnm");
- }
-
- var path = "/root/main/recinfo/grid";
-
- var nodelist = instance.selectNodes(path);
- var nodelength = (nodelist.length);
- var msFlag, diagnm, diagcd;
- var isMChk = false;//주진단체크여부
- var isSChk = false;//부진단체크여부
-
- for(var i = 1; i <= nodelength; i++){
-
- msFlag = model.getValue(path + "[" + i + "]/recitem[colno='1']/rectermcd");//주부체크
- diagnm = model.getValue(path + "[" + i + "]/recitem[colno='2']/rectermnm");//진단명
- diagcd = model.getValue(path + "[" + i + "]/recitem[colno='2']/rectermcd");//진단코드
-
- if(diagcd != ""){
- if(msFlag == "M"){
- isMChk = true;
- }else if(msFlag == "S"){
- isSChk = true;
- }
- }
-
- if(diagcd == "-" && diagnm == ""){
- messageBox(i + "행에 진단명을 입력하십시요", "E");
- return false;
- }
-
- }
-
- //주진단체크여부
- if(isMChk == false){
- messageBox("하나의 주진단은 필수 ", "I009");
- return false;
- }
-
- //부진단체크여부 -
- //부진단입력확인메세지에 "예" 클릭하는 경우 리턴(예:6, 아니오:7)
- if(isSChk == false){
-
- //2010.02.11 dhkim - 메세지변경요청
- /*
- 김은미 02-11 11:07
- 부진단미입력시, 메세지내용을 변경하려고 합니다.
- 김은미 02-11 11:09
- (기존)부진단이 없습니다. 부진단을 입력하시겠습니까? ->(변경요청내용) 부진단은 JCI 필수입력항목입니다. 해당환자에게 입력된 부진단이 없습니다. 입력하시겠습니까?
- 김은미 02-11 11:09
- 로 변경해주세요....
- */
- //if(messageBox("부진단이 없습니다. 부진단을 입력하시겠습니까?", "Q") == 6){
- if(messageBox("부진단은 JCI 필수입력항목입니다. 해당환자에게 입력된 부진단이 없습니다. 입력하시겠습니까?", "Q") == 6){
- return false;
- }
- }
-
- return true;
-
- }
-
- }
|