123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399 |
- var instance = document.models(0).instances(0);
- var pageInfo = new PAGEINFO();
- /**
- * @group :
- * @ver : 2007.03.20
- * @by : ??????
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : ?????? Enable / Disable
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize() {
- model.removeNodeset("/root/main/recinfo");
- grd_diaglist.col = 4;
- grd_diaglist.row = grd_diaglist.rows - 1;
- model.refresh();
- //dispOnLoadComplete("", model.getValue(pageInfo.formmastRef + "/formcd"));
- dispOnLoadComplete("", "0000000900");
- //parent.body.dispatch("opr_onloadcomplete");
- }
- /**
- * @group :
- * @ver : 2007.03.20
- * @by : ??????
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : ?????? Enable / Disable
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGrdDelRow(){
- var iRow = grd_diaglist.row;
- var smmcnts = model.getValue("/root/main/recinfo/grid[" + iRow + "]/recitem[colno='0']/rectermnm");
- var smmcntcd = model.getValue("/root/main/recinfo/grid[" + iRow + "]/recitem[colno='0']/rectermcd");
- if(iRow > 0 && (smmcnts != "" || smmcntcd != "")){
- model.removeNodeset("/root/main/recinfo/grid[" + iRow + "]");
- model.removeNodeset("/root/main/selectdiaglist[" + iRow + "]");
- model.removeNodeset("/root/tmpop/selectoplist[" + 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='0000509.0000509']/rowno"); //수술명header
- var path2 = node.selectSingleNode("recitem[degnitemlevlcd='0000509.0000509.0000509']/rowno"); //수술명
- var path3 = node.selectSingleNode("recitem[degnitemlevlcd='0000509.0000509.0000168']/rowno"); //Comments
-
- path1.text = irowcnt;
- path2.text = irowcnt;
- path3.text = irowcnt;
- */
- irowcnt++;
- }
-
- grd_diaglist.rebuild();
- }
- /**
- * @group :
- * @ver : 2007.03.20
- * @by : ??????
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : ?????? Enable / Disable
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fAfterSrch()
- {
- var pageInfo = new PAGEINFO();
- var instance = document.models(0).instances(0);
- var nodelistMain = null;
- var nodelistTemp = null;
- var iLeng = 0;
- var sTmpdiagcd = "";
- var sTmpdiagengnm = "";
- nodelistMain = instance.selectNodes("/root/main/selectoplist");
- nodelistTemp = instance.selectNodes("/root/tmpop/selectoplist");
- var iMainleng = nodelistMain.length;
- //var iMainleng = instance.selectNodes("/root/main/recinfo/grid").length;
-
- var iRow = grd_diaglist.row;
- var path = "/root/main/recinfo/grid";
- var nodelistJuh = instance.selectNodes(path);
- var nodelength = nodelistJuh.length;
- var smmcnts = model.getValue(path + "[" + nodelength + "]/recitem[degnitemcd = '0000509001' and degnitemkind = 'GSU']/rectermnm");
- if (smmcnts == "")
- {
- model.removeNodeset("/root/main/recinfo/grid[" + nodelength + "]");
- model.removeNodeset("/root/main/selectdiaglist[" + nodelength + "]");
- grd_diaglist.refresh();
- }
- if(nodelistTemp.length >= 1)
- {
- for(var i = 1; i <= nodelistTemp.length; i++)
- {
- sTmpdiagcd = model.getValue("/root/tmpop/selectoplist[" + i + "]/opcd");
- sTmpdiagengnm = model.getValue("/root/tmpop/selectoplist[" + i + "]/opengnm");
- 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", sTmpdiagcd);
- model.makeValue("/root/main/selectdiaglist[" + iLeng + "]/col["+ 1 + "]/reccnts", sTmpdiagengnm);
- model.makeValue("/root/main/selectdiaglist[" + iLeng + "]/col["+ 1 + "]/cntsyn", "N");
- model.makeValue("/root/main/selectdiaglist[" + iLeng + "]/col["+ 1 + "]/comp", "true");
- model.makeValue("/root/main/selectdiaglist[" + iLeng + "]/col["+ 1 + "]/colno", "0");
- model.makeValue("/root/main/selectdiaglist[" + iLeng + "]/col["+ 1 + "]/rectermflag", "003");
- }
- }
- }
- 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='0']/rectermnm");
- if(smmcnts != "" || nodelength == 0)
- {
- model.makeValue("/root/main/selectdiaglist[" + 1 + "]/col["+ 1 + "]/rectermcd", "");
- model.makeValue("/root/main/selectdiaglist[" + 1 + "]/col["+ 1 + "]/reccnts", "-");
- model.makeValue("/root/main/selectdiaglist[" + 1 + "]/col["+ 1 + "]/cntsyn", "N");
- model.makeValue("/root/main/selectdiaglist[" + 1 + "]/col["+ 1 + "]/comp", "true");
- model.makeValue("/root/main/selectdiaglist[" + 1 + "]/col["+ 1 + "]/colno", "0");
- model.makeValue("/root/main/selectdiaglist[" + 1 + "]/col["+ 1 + "]/rectermflag", "003");
- 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='0']/rectermnm");
- var termcd = model.getValue("/root/main/recinfo/grid[degnitemno = '1'][" + nodelength + "]/recitem[colno='0']/rectermcd");
-
- if(smmcnts != "" && termcd == "")
- {
- model.setValue("/root/main/recinfo/grid[degnitemno = '1'][" + nodelength + "]/recitem[colno='0']/rectermcd", "-");
- }
-
- var sOprnm = model.getValue("/root/main/recinfo/grid[degnitemno = '1'][" + grd_diaglist.row + "]/recitem[colno='0']/rectermnm");
-
- if (sOprnm == "")
- {
- fGrdDelRow();
- }
- }
- function old_fSrchOprlist()
- {
- model.removeNodeset("/root/tmpop/selectoplist");
- model.removeNodeset("/root/main/paminfo/list");
- var node = getGlobalVariable("paminfo");
- if(node != "" && node != null){
- setCSVToNode("/root/main/paminfo", node);
- model.makeValue("/root/send/pid", model.getValue("/root/main/paminfo/list/pid"));
- model.makeValue("/root/send/cretno", model.getValue("/root/main/paminfo/list/cretno"));
- if (model.getValue("/root/main/paminfo/list/ioflag") == "O")
- {
- model.makeValue("/root/send/orddd", model.getValue("/root/main/paminfo/list/orddd"));
- }
- else
- {
- model.makeValue("/root/send/orddd", model.getValue("/root/main/paminfo/list/indd"));
- }
- model.makeValue("/root/send/srchmode", "opr");
- model.removeNodeset("/root/main/recinfo/recitem[degnitemno = '1']");
- if ( submit("TRMRF04301") )
- {
- fAfterSrch();
- }
- }
- }
- function fSrchOprlist(paminfo)
- {
- var pageInfo = new PAGEINFO();
- var degnlvcd = model.getValue(pageInfo.initRecinfoGridrecItemRef + "[orgdegnitemkind='OPN']/degnitemlevlcd").substring(0, 7);
- fSetOpNmbyDegnItemLevlCd(paminfo, degnlvcd);
-
- fAddrow();
- }
- //삭제예정(해당기록지에서 직접 조회하여 데이터 넘김) 2008.05.20 박종훈
- function fSrchOprPerfDrlist(oprsrvno, cOdt1)
- {
- model.removeNodeset("/root/tmpop/selectoplist");
- model.removeNodeset("/root/main/paminfo/list");
- var node = getGlobalVariable("paminfo");
- if(node != "" && node != null){
- setCSVToNode("/root/main/paminfo", node);
- model.makeValue("/root/send/pid", model.getValue("/root/main/paminfo/list/pid"));
- model.makeValue("/root/send/cretno", model.getValue("/root/main/paminfo/list/cretno"));
- if (model.getValue("/root/main/paminfo/list/ioflag") == "O")
- {
- model.makeValue("/root/send/orddd", model.getValue("/root/main/paminfo/list/orddd"));
- }
- else
- {
- model.makeValue("/root/send/orddd", model.getValue("/root/main/paminfo/list/indd"));
- }
- model.makeValue("/root/send/oprsrvno", oprsrvno);
- model.makeValue("/root/send/srchmode", "dr");
- model.removeNodeset("/root/main/recinfo/recitem[degnitemno = '1']");
- if ( submit("TRMRF04301") )
- {
- fAfterSrch();
- }
- if ( submit("TRMRF04302") )
- {
- var perfdrid = model.getValue("/root/tmp/perfdr/perfdrid");
- parent.model.setValue("/root/main/recinfo/recitem[degnitemno='" + cOdt1 + "']/recrefcd", perfdrid);
- }
- }
- }
- function fSrchOprPerfDrlist_loc(oprsrvno, cOdt1)
- {
- model.removeNodeset("/root/tmpop/selectoplist");
- // model.makeValue("/root/send/pid", pid);
- // model.makeValue("/root/send/orddd", orddd);
- // model.makeValue("/root/send/cretno", cretno);
- model.makeValue("/root/send/oprsrvno", oprsrvno);
- model.makeValue("/root/send/pid", "00005726");
- model.makeValue("/root/send/orddd", "20070105");
- model.makeValue("/root/send/cretno", 1);
- model.makeValue("/root/send/oprsrvno", oprsrvno);
- model.makeValue("/root/send/srchmode", "dr");
- model.removeNodeset("/root/main/recinfo/recitem[degnitemno = '1']");
- if ( submit("TRMRF04301") ) {
- fAfterSrch();
- }
- if ( submit("TRMRF04302") )
- {
- var perfdrid = model.getValue("/root/tmp/perfdr/perfdrid");
- parent.model.setValue("/root/main/recinfo/recitem[degnitemno='" + cOdt1 + "']/recrefcd", perfdrid);
- }
- }
- function fSrchOprlist_loc()
- {
- model.removeNodeset("/root/tmpop/selectoplist");
- // model.makeValue("/root/send/pid", pid);
- // model.makeValue("/root/send/orddd", orddd);
- // model.makeValue("/root/send/cretno", cretno);
- model.makeValue("/root/send/pid", "00005726");
- model.makeValue("/root/send/orddd", "20070105");
- model.makeValue("/root/send/cretno", 1);
- model.makeValue("/root/send/srchmode", "opr");
- model.removeNodeset("/root/main/recinfo/recitem[degnitemno = '1']");
- if ( submit("TRMRF04301") ) {
- fAfterSrch();
- }
- }
- function fInitPage(colhide, heig, wid, ivwID)
- {
- 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;
- body.refresh();
- }
- function clearData()
- {
- model.removeNodeset("/root/main/recinfo");
- model.refresh();
- }
- /**
- * @desc : Comments 기록 존재 여부에 따른 컬럼 표시
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fIsCommentExist()
- {
- var iFndRow = getNodesetCnt(model, "/root/main/recinfo/grid/recitem[degnitemcd ='0000509001' and degnitemkind = 'GSU' and reccnts != '']");
-
- if (iFndRow > 0)
- {
- grd_diaglist.colhidden(grd_diaglist.colref("recitem[colno='0']/reccnts")) = false;
- }
- else
- {
- grd_diaglist.colhidden(grd_diaglist.colref("recitem[colno='0']/reccnts")) = true;
- }
-
- grd_diaglist.refresh();
- }
|