12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910 |
- /*
-
- (SMMNR07600_혈액미불출리스트조회.xrw - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- var xTopAttributePath = "/root/main/topattribute";
- var xRecgrupListPath = "/root/main/recgrup/recgruplist";
- var xHIsgrupListPath = "/root/main/histgrup/histgruplist";
- var xRecHIstPntListPath = "/root/main/rechistpntgrup/rechistpntlist";
- var xClsListPath = "/root/main/detlgrup/detlgruplist"
- var xHIsgrupListBKPath = "/root/temp/histgrup/histgruplist";
- var xlrgListPath = "/root/main/lrggrup/lrggruplist"
- var xCondPath = "/root/main/cond";
- var xClsListBKPath = "/root/temp/main/detlgrup/detlgruplist";
- var xPopWndClsListBKPath = "/root/temp/main/cond/execpopwnddetlgrup/execpopwnddetlgruplist";
- var xExecDetlListPath = "/root/main/cond/execdetlgrup/execdetlgruplist";
- var xPopWndExecDetlListPath = "/root/main/cond/execpopwnddetlgrup/execpopwnddetlgruplist";
- var xDelDeliveExecPrcpListPath = "/root/main/cond/delivedetlgrup/delivedetlgruplist";
- var xBlodReturnReqGrupListPath = "/root/main/cond/blodreturnreqgrup/blodreturnreqgruplist";
- /**
- * @group :
- * @ver : 2007.06.18
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 혈액미불출 리스트 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetBlodNoDeliveList(){
- if(radio1.value == "patient") {
- if (input3.value == ""){
- messageBox("등록번호를 ","C001");
- model.setfocus("input3");
- return;
- }
- }
- model.removenode("/root/send");
- model.makeValue("/root/send/prcpddfrom", input2.value);
- model.makeValue("/root/send/prcpddto", input11.value);
- model.makeValue("/root/send/wardcd", combo7.value);
- model.makeValue("/root/send/roomcd", combo2.value);
- model.makeValue("/root/send/hngnm", combo8.value);
- model.makeValue("/root/send/pid", input3.value);
- model.makeValue("/root/send/dateflag", combo1.value);
- model.makeValue("/root/send/wardpatientflag", radio1.value);
- model.makeValue("/root/send/deliveflag", radio2.value);
- if(submit("TRMNR07606")){
- }
- }
-
- /**
- * @group :
- * @ver : 2007.07.20
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 혈액반납의뢰 저장
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fBlodReturnSave(){
- var sRowCnt = datagrid1.rows-datagrid1.fixedrows;
- model.removenode("/root/send");
- model.makeValue("/root/send/detlgrup",datagrid1.getupdatedataAll("i"));
-
- var saveyn = 0 ;
- for(var i=1; i<= sRowCnt; i++){
- // ****************************** 반납사유 필수 로직 추가 ***************************************
- //alert(model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/etcprcpresncd"));
- if(model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/reqflag") == "-" || model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/reqflag") == ""){//반납/폐기를 체크
- messageBox("반납/폐기를 ","C002");
- return;
- }
- if(model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/returnabandondate") == "-" || model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/returnabandondate") == ""){//반납/폐기일 체크
- messageBox("반납/폐기일을 ","C002");
- return;
- }
- if(model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/etcprcpresncd") == "-" || model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/etcprcpresncd") == ""){//반납사유 체크
- messageBox("반납/폐기 사유를 ","C002");
- return;
- }
- }
- if(submit("TXMNR07630")){
- model.copyNode("/root/hidden/main","/root/main");
- }
- }
- /**
- * @group :
- * @ver : 2007.07.16
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 혈액불출 내역 조회 리스트
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fBlodDeliveList(){
- var sRowCnt = datagrid5.rows-datagrid5.fixedrows;
- if( model.getValue("/root/main/cond/blodno") == "" ){
-
- messageBox("혈액번호를 ","C001");
- model.setfocus("input13");
- return;
-
- }
- for(var i=1; i<= sRowCnt; i++){ // 반납의뢰 혈액번호가 중복되었는지 체크
- if( input13.value == model.getValue("/root/main/cond/blodreturnreqgrup["+i+"]/blodreturnreqgruplist["+1+"]/blodno") ) {
-
- messageBox("이미 조회된 등록번호 ","E008");
- return;
-
- }
- }
- model.removenode("/root/send");
- model.refresh();
- model.makeValue("/root/send/blodno", input13.value );
- if(submit("TRMNR07620")){
- }
- model.setfocus("input13");
- }
- /**
- * @group :
- * @ver : 2007.07.09
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 혈액불출 내역 선택 삭제
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDelDeliveExecPrcp(){
- var sRowCnt = datagrid7.rows-datagrid7.fixedrows;
- model.removenode("/root/send");
- model.makeValue("/root/send/detlgrup",datagrid7.getupdatedataAll("i"));
- //alert(datagrid7.getupdatedataAll("i"));
-
- var saveyn = 0 ;
- // for(var i=1; i<= sRowCnt; i++){
- //
- // if(model.getValue(xDelDeliveExecPrcpListPath+"["+i+"]/stat") != "-") {
- //
- // saveyn = 1 ;
- //
- // }
- //
- // if(model.getValue(xDelDeliveExecPrcpListPath+"["+i+"]/stat") != "-" && model.getValue(xDelDeliveExecPrcpListPath+"["+i+"]/appno") == ""){
- // messageBox("신청수량은 ","I003");
- // return;
- // }
- //
- // if( parseInt(model.getValue(xDelDeliveExecPrcpListPath+"["+i+"]/prcpqty")) < parseInt(model.getValue(xDelDeliveExecPrcpListPath+"["+i+"]/appno")) ) {
- //
- // messageBox("신청수량은 불출수량보다 크게 입력 ","E001");
- // return;
- // }
- //
- // }
- //
- // if(saveyn <= 0 ){
- // messageBox("수정사항이 없어 저장 ","E001");
- // return;
- // }
-
- //alert("result : " + saveyn);
- // if(saveyn <= 0 ){
- // messageBox("수정사항이 없어 저장 ","E001");
- // return;
- // }
- //alert(model.getValue("/root/main/cond/clsflag"));
- //alert(model.getValue("/root/main/cond/recflag"));
-
-
- //if(messageBox("","Q002") != 6) return;
- //alert(model.getValue("/root/main/cond/todd"));
- // model.makeValue("/root/send/lrggrupcd", model.getValue(xCondPath+"/lrggrupcd"));
- // model.makeValue("/root/send/clsflag", model.getValue("/root/main/cond/clsflag"));
- // model.makeValue("/root/send/recflag", model.getValue("/root/main/cond/recflag"))
- // model.makeValue("/root/send/todd2", model.getValue("/root/main/cond/todd"))
- //alert(model.getValue("/root/send/todd2"));
- if(submit("TXMNR07610")){
- model.copyNode("/root/hidden/main","/root/main");
- }
- }
- /**
- * @group :
- * @ver : 2007.06.18
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 불출신청 내역 조회 리스트
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGettDeliveDetlList(){
- if( model.getValue("/root/main/cond/wardcdgrup/wardcdgruplist") == "" ){
-
- // messageBox("병동을 ","C002");
- // model.setfocus("combo7");
- // return;
-
- }
- model.removenode("/root/send");
-
- model.makeValue("/root/send/prcpddfrom", input2.value);
- model.makeValue("/root/send/prcpddto", input11.value);
- model.makeValue("/root/send/wardcd", combo7.value);
- model.makeValue("/root/send/roomcd", combo2.value);
- model.makeValue("/root/send/hngnm", combo8.value);
- model.makeValue("/root/send/pid", input3.value);
- if(submit("TRMNR07609")){
- }
- }
- /**
- * @group :
- * @ver : 2007.04.02
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 수행처방 선택시 체크사항
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSelchange(){
- var iRow = datagrid5.row ;
- // alert(parseInt(model.getValue(xExecDetlListPath+"["+iRow+"]/prcpqty")));
- //
- // alert(parseInt(model.getValue(xExecDetlListPath+"["+iRow+"]/appno")));
- if( parseInt(model.getValue(xExecDetlListPath+"["+iRow+"]/prcpqty")) <= parseInt(model.getValue(xExecDetlListPath+"["+iRow+"]/appno")) ) {
- model.setValue(xExecDetlListPath+"["+iRow+"]/sel", "false" ) ;
- messageBox("신청수량이 처방수량보다 클 수 ","I004");
- return;
- }
- if( model.getValue(xExecDetlListPath+"["+iRow+"]/prcpstatcd") == "D/C") {
- model.setValue(xExecDetlListPath+"["+iRow+"]/sel", "false" ) ;
- messageBox("D/C 상태에서는 신청할 수 ","I004");
- return;
- } else if( model.getValue(xExecDetlListPath+"["+iRow+"]/prcpstatcd") == "의사") {
- model.setValue(xExecDetlListPath+"["+iRow+"]/sel", "false" ) ;
- messageBox("의사 상태에서는 신청할 수 ","I004");
- return;
- } else if( model.getValue(xExecDetlListPath+"["+iRow+"]/prcpstatcd") == "완료") {
- model.setValue(xExecDetlListPath+"["+iRow+"]/sel", "false" ) ;
- messageBox("완료 상태에서는 신청할 수 ","I004");
- return;
- }
-
- }
- /**
- * @group :
- * @ver : 2007.04.02
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 그리드의 값이 변경되었을때, 상태값을 변경한다.
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fChangedGridCol(){
- var sDetlGrupRow = datagrid5.row;
- var sDetlGrupBKRow=0;
- var num = model.getValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/num");
- for(var i=1; i<= getNodesetCount(xPopWndClsListBKPath); i++){
- if(model.getValue(xPopWndClsListBKPath+"["+i+"]/num") == num){
- sDetlGrupBKRow = i;
- break;
- }
- }
- if(event.keyCode == "32") {
- messageBox("신청수량에 스페이스를 넣을 수 ","I004");
- model.setValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/stat","-");
- model.setValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/appno","");
- datagrid5.refresh();
- return;
- }
- var irr = datagrid5.textmatrix(sDetlGrupRow,6) ;
- if(model.getValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/appno") == "0" || model.getValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/appno") == ""){
- model.setValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/stat","-");
- datagrid5.rebuild();
- //return;
- }
- // alert(instance1.selectSingleNode(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]").xml);
- //
- // alert(instance1.selectSingleNode(xPopWndClsListBKPath+"["+sDetlGrupBKRow+"]").xml);
- if(instance1.selectSingleNode(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]").xml != instance1.selectSingleNode(xPopWndClsListBKPath+"["+sDetlGrupBKRow+"]").xml){
- model.setValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/stat","I");
- datagrid5.rebuild();
- }
- }
- /**
- * @group :
- * @ver : 2007.07.20
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 혈액불출관리 init
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fPopWndSave(){
- var sRowCnt = datagrid5.rows-datagrid5.fixedrows;
- model.removenode("/root/send");
- model.makeValue("/root/send/detlgrup",datagrid5.getupdatedataAll("i"));
-
- var saveyn = 0 ;
- for(var i=1; i<= sRowCnt; i++){
- if(model.getValue(xPopWndExecDetlListPath+"["+i+"]/stat") != "-") {
- saveyn = 1 ;
- }
- if(model.getValue(xPopWndExecDetlListPath+"["+i+"]/stat") != "-" && model.getValue(xPopWndExecDetlListPath+"["+i+"]/appno") == ""){
- messageBox("신청수량은 ","I003");
- return;
- }
- // if( !isNumber(model.getValue(xPopWndExecDetlListPath+"["+i+"]/appno")) ) {
- //
- // messageBox("숫자형을 ","C001");
- // return;
- //
- // }
- if( parseInt(model.getValue(xPopWndExecDetlListPath+"["+i+"]/appno")) < 1 || parseInt(model.getValue(xPopWndExecDetlListPath+"["+i+"]/appno")) == " " ) {
- messageBox("신청수량은 1건 이하로 입력할 수 ","E001");
- return;
- }
-
- if( parseInt(model.getValue(xPopWndExecDetlListPath+"["+i+"]/delivepossno")) < parseInt(model.getValue(xPopWndExecDetlListPath+"["+i+"]/appno")) ) {
- messageBox("신청수량은 불출수량보다 크게 입력 ","E001");
- return;
- }
- // alert( model.getValue(xPopWndExecDetlListPath+"["+i+"]/prcphopedd") );
- // alert( model.getValue(xPopWndExecDetlListPath+"["+i+"]/prcphopetm") );
- if(model.getValue(xPopWndExecDetlListPath+"["+i+"]/prcphopedd") == "" || model.getValue(xPopWndExecDetlListPath+"["+i+"]/prcphopetm") == ""){
- messageBox("예약일자/예약시간은 ","I003");
- return;
- }
-
- }
- if(saveyn <= 0 ){
- messageBox("수정사항이 없어 저장 ","E001");
- return;
- }
-
- //alert("result : " + saveyn);
- // if(saveyn <= 0 ){
- // messageBox("수정사항이 없어 저장 ","E001");
- // return;
- // }
- //alert(model.getValue("/root/main/cond/clsflag"));
- //alert(model.getValue("/root/main/cond/recflag"));
-
-
- //if(messageBox("","Q002") != 6) return;
- //alert(model.getValue("/root/main/cond/todd"));
- // model.makeValue("/root/send/lrggrupcd", model.getValue(xCondPath+"/lrggrupcd"));
- // model.makeValue("/root/send/clsflag", model.getValue("/root/main/cond/clsflag"));
- // model.makeValue("/root/send/recflag", model.getValue("/root/main/cond/recflag"))
- // model.makeValue("/root/send/todd2", model.getValue("/root/main/cond/todd"))
- //alert(model.getValue("/root/send/todd2"));
- if(submit("TXMNR07608")){
- model.copyNode("/root/hidden/main","/root/main");
- }
- // grd_detlgrup.row = 1;
- window.close();
- }
- /**
- * @group :
- * @ver : 2007.07.20
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 혈액불출관리 init
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fPopWndInit(){
- model.makeValue("/root/send/prcpddfrom", opener.window.javascript.getParameter("prcpddfrom") );
- model.makeValue("/root/send/prcpddto", opener.window.javascript.getParameter("prcpddto") );
- model.makeValue("/root/send/wardcd", opener.window.javascript.getParameter("wardcd") );
- model.makeValue("/root/send/roomcd", opener.window.javascript.getParameter("roomcd") );
- model.makeValue("/root/send/pid", opener.window.javascript.getParameter("pid") );
- model.makeValue("/root/send/queryprcpdd", opener.window.javascript.getParameter("queryprcpdd") );
- model.makeValue("/root/send/queryprcpno", opener.window.javascript.getParameter("queryprcpno") );
- model.makeValue("/root/send/queryprcphistno", opener.window.javascript.getParameter("queryprcphistno") );
- //alert(prcpddfrom); alert(prcpddto); alert(wardcd); alert(roomcd); alert(pid);
-
- if(submit("TRMNR07607")){
- model.copyNode("/root/temp/main","/root/main");
- }
- }
- /**
- * @group :
- * @ver : 2007.06.18
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 혈액불출신청 팝업
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fPopWnd(){
- var iRows = datagrid5.rows;
- var queryprcpdd = "" ;
- var queryprcpno = "" ;
- var queryprcphistno = "" ;
- var checkcnt = 0 ;
- for(var i = 1 ; i < datagrid5.rows; i++ ) {// 전체를 돌면서 그룹에 값이 체크되어 있는것 초기화
- if( model.getValue(xExecDetlListPath+"["+ i +"]/sel") == "true" ) {
- // alert("111");
- queryprcpdd = queryprcpdd + "'" + model.getValue(xExecDetlListPath+"["+ i +"]/prcpdd2") + "'," ;
- queryprcpno = queryprcpno + "" + model.getValue(xExecDetlListPath+"["+ i +"]/prcpno") + "," ;
- // alert(model.getValue(xExecDetlListPath+"["+ i +"]/prcphistno"));
- queryprcphistno = queryprcphistno + "" + model.getValue(xExecDetlListPath+"["+ i +"]/prcphistno") + "," ;
- checkcnt++ ;
- } else {
- // alert("222");
-
- }
-
- }
- if( checkcnt <= 0 ) {
-
- messageBox("수행처방내역을 ","C002");
- return false;
-
- }
- queryprcpdd = queryprcpdd.replace(/-/g,"")
- // alert(queryprcpdd.replace(/-/g,""));
- // alert(queryprcpdd.substr(0,queryprcpdd.length-1));
- // alert(queryprcpno.substr(0,queryprcpno.length-1));
- // alert(queryprcphistno.substr(0,queryprcphistno.length-1));
- queryprcpdd = queryprcpdd.substr(0,queryprcpdd.length-1) ;
- queryprcpno = queryprcpno.substr(0,queryprcpno.length-1) ;
- queryprcphistno = queryprcphistno.substr(0,queryprcphistno.length-1) ;
- // for(var i = 0 ; i < data.length; i++ ) {
- //
- // queryprcpno = queryprcpno + data[i] ;
- //
- // }
- setParameter("prcpddfrom", input2.value);
- setParameter("prcpddto", input11.value);
- setParameter("wardcd", combo7.value);
- setParameter("roomcd", combo2.value);
- setParameter("pid", input3.value);
- setParameter("queryprcpdd", queryprcpdd);
- setParameter("queryprcpno", queryprcpno);
- setParameter("queryprcphistno", queryprcphistno);
- var left = event.screenX-1000;
- var top = event.screenY+50;
- modal("SMMNR07601",1,left,top);
- }
- /**
- * @group :
- * @ver : 2007.06.18
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자 상세정보 조회 combo
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetPatientInfo(){
- model.removenode("/root/send");
-
- model.makeValue("/root/send/wardcd", combo7.value);
- model.makeValue("/root/send/roomcd", combo2.value);
- if( input3.value != "" ){
- model.makeValue("/root/send/pid", input3.value);
- } else if( model.makeValue("/root/send/pid", combo8.value) != "" ){
- model.makeValue("/root/send/pid", combo8.value);
- }
- if(submit("TRMNR07605")){
- }
- model.setfocus("button3");
- }
- /**
- * @group :
- * @ver : 2007.06.18
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자 정보 조회 combo
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetPatientList(){
- model.removenode("/root/send");
-
- model.makeValue("/root/send/wardcd", combo7.value);
- model.makeValue("/root/send/roomcd", combo2.value);
- if(submit("TRMNR07604")){
- }
- model.setfocus("combo8");
- }
- /**
- * @group :
- * @ver : 2007.06.18
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 병실 조회 combo
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetRoomList(){
- model.removenode("/root/send");
-
- model.makeValue("/root/send/wardcd", combo7.value);
- //alert(cmb_wardcd.value);
- if(submit("TRMNR07603")){
- }
- model.setfocus("combo2");
- }
- /**
- * @group :
- * @ver : 2007.06.18
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 병동 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetWardList(){
- model.removenode("/root/send");
-
- model.makeValue("/root/send/wardcd", model.getValue("/root/main/cond/wardcdgrup/wardcdgruplist/wardcd"));
- if(submit("TRMNR07602")){
- }
- model.setfocus("combo7");
- }
- /**
- * @group :
- * @ver : 2007.07.20
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 혈액불출관리 init
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInit(){
- fGetWardList();// 병동코드 리스트
- }
- /**
- * @group :
- * @ver : 2007.07.20
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 중증도 등록버튼 누를때, 최근값으로 상세내역 셋팅
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fRecHistPntListInsert(){
- // alert();
- var iRow = datagrid2.row;
- model.removenode("/root/send");
- model.makeValue("/root/send/execdt", model.getvalue(xRecgrupListPath+"["+iRow+"]/execdt"));
- model.makeValue("/root/send/pid", model.getvalue("/root/main/recgrup/rectmaxvallist/pid"));
- model.makeValue("/root/send/clsflag", model.getvalue("/root/main/recgrup/rectmaxvallist/clsflag"));
- model.makeValue("/root/send/recflag", model.getvalue("/root/main/recgrup/rectmaxvallist/recflag"));
- model.makeValue("/root/send/grupcd", model.getvalue("/root/main/recgrup/rectmaxvallist/grupcd"));
- // model.setValue("/root/main/hiddengrup/grupcd",model.getValue("/root/main/recgrup/rectmaxvallist/grupcd"));// 등록시 grupcd 를 가지고 마지막 등록값을 가져온다.
- // model.setValue("/root/main/hiddengrup/pid",model.getValue("/root/main/recgrup/rectmaxvallist/pid"));// 등록시 pid 를 가지고 마지막 등록값을 가져온다.
- // model.setValue("/root/main/hiddengrup/clsflag",model.getValue("/root/main/recgrup/rectmaxvallist/clsflag"));// 등록시 clsflag 를 가지고 마지막 등록값을 가져온다.
- // model.setValue("/root/main/hiddengrup/recflag",model.getValue("/root/main/recgrup/rectmaxvallist/recflag"));// 등록시 recflag 를 가지고 마지막 등록값을 가져온다.
- if(submit("TRMNW04007")){
- var iRowNum = datagrid1.row;
- }
- var iRow = grd_histgrup.row;
- var iCol = grd_histgrup.col;
- /* 중증도 상세내역 구분 체크 시작 */
- var nodelist = bind1.nodeset;
- var cNt = nodelist.length;
- for(var ins = 1 ; ins <= cNt; ins++ ){// 체크된 값 전체를 돈다.
- for(var i = 1 ; i < grd_histgrup.rows; i++ ){// 전체를 돌면서 그룹에 값이 체크되어 있는것 초기화
- if(
- (model.getValue(xHIsgrupListPath+"["+ i +"]/supcd") == model.getValue("/root/main/rechistpntgrup/serdiaghislist["+ ins +"]/supcd")) &&
- (model.getValue(xHIsgrupListPath+"["+ i +"]/basepnt") == model.getValue("/root/main/rechistpntgrup/serdiaghislist["+ ins +"]/timsval"))
- ) {
- grd_histgrup.textmatrix(i,1) = "Y";
- grd_histgrup.textmatrix(i,0) = "I";
- }
-
- }
- }
- /* 중증도 상세내역 구분 체크 끝 */
- }
- /**
- * @group :
- * @ver : 2007.07.20
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 중증도 저장/업데이트 후 리로딩
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fReload(iRow){
- // alert(iRow);
- datagrid2.row = iRow ;
- for(var i = 1 ; i < datagrid2.rows; i++ ){// 전체를 돌면서 중증도 내역선택시 상태를 초기화
- datagrid2.textmatrix(i,1) = "-"; // 중증도 내역선택시 상태를 초기화
- }
- tar_desccnts.value = "" ; // 중증도 내역 선택시 설명 부분 클리어
- tar_desccnts.refresh();// 화면에 적용. 그리드는 rebuild()
- fFlag();// 중증도구분 / 낙상 구분 체크
-
- fHistList(); // 중증도 상세내역 리스트 04006
- fRecHistPntList();// 중증도 상세점수 내역 / 한글명 / 체크 점수 목록 04007
- fColLqidty();// 중증도 상세점수 display : true , false / 총점 중증도
-
- rdo_clsflaga.disabled = true ;// 중증도구분 비활성화 시킨다.
- rdo_clsflagb.disabled = true ;// 낙상구분 비활성화 시킨다.
- }
- /**
- * @group :
- * @ver : 2007.07.20
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 중증도 상세내역 구분을 선택했을 때 동작
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGrupTest(){
- var iRow = grd_histgrup.row;
- var iCol = grd_histgrup.col;
- //alert(iCol);
- var sDetlGrupRow = grd_histgrup.row;
- var sDetlGrupBKRow=0;
- // alert( model.getValue(xHIsgrupListPath+"["+sDetlGrupRow+"]/supcd") );
- //
- // alert(grd_histgrup.textmatrix(iRow,1));
- if(model.getValue(xHIsgrupListPath+"["+sDetlGrupRow+"]/supcd") == "00000000"){// supcd 00000000 일때, 00000000을 초기화
- grd_histgrup.textmatrix(sDetlGrupRow,1) = "N";
- grd_histgrup.textmatrix(sDetlGrupRow,0) = "-";
- return;
- }
- //alert(model.getValue(xHIsgrupListPath+"["+sDetlGrupRow+"]/supcd"));
- var supcd = model.getValue(xHIsgrupListPath+"["+sDetlGrupRow+"]/supcd") ;
- for(var i = 1 ; i < grd_histgrup.rows; i++ ){// 전체를 돌면서 그룹에 값이 체크되어 있는것 초기화
- if(supcd == model.getValue(xHIsgrupListPath+"["+ i +"]/supcd") ) {
- // alert("supcd : " + supcd);
- // alert("grd_histgrup : " + model.getValue(xHIsgrupListPath+"["+i+"]/supcd"));
- grd_histgrup.textmatrix(i,1) = "N";
- grd_histgrup.textmatrix(i,0) = "-";
- }
- }
- grd_histgrup.textmatrix(sDetlGrupRow,1) = "Y"; // 현재 선택값 다시 체크
- var cNt = 0 ;
- // for(var i = 1 ; i < grd_histgrup.rows; i++ ){// 전체를 돌면서 값이 체크 값을 찾아 중증도 내역 총점에 합산한다.
- //
- // if(grd_histgrup.textmatrix(i,1) == "Y") {
- //
- // cNt = cNt + parseInt(model.getValue(xHIsgrupListPath+"["+i+"]/basepnt"));
- //
- // }
- //
- // }
- //
- // datagrid2.textmatrix(1,13) = cNt;
- // datagrid2.textmatrix(1,0) = "U";
- //
- //
- // alert(datagrid2.textmatrix(1,0));
- //
- // return ;
- if(iCol == 1){
- var sDetlGrupRow = grd_histgrup.row;
-
- var sDetlGrupBKRow=0;
-
- if(model.getValue(xHIsgrupListPath+"["+sDetlGrupRow+"]/stat") != "-"){
- return;
- }
-
- var grupcd = model.getValue(xHIsgrupListPath+"["+sDetlGrupRow+"]/grupcd");
-
- for(var i=1; i<= getNodesetCount(xHIsgrupListBKPath); i++){
- if(model.getValue(xHIsgrupListBKPath+"["+i+"]/grupcd") == grupcd){
- sDetlGrupBKRow = i;
- break;
- }
- }
-
- // alert(instance1.selectSingleNode(xHIsgrupListPath+"["+sDetlGrupRow+"]").xml);
- // alert(instance1.selectSingleNode(xHIsgrupListBKPath+"["+sDetlGrupBKRow+"]").xml);
-
- if(instance1.selectSingleNode(xHIsgrupListPath+"["+sDetlGrupRow+"]").xml != instance1.selectSingleNode(xHIsgrupListBKPath+"["+sDetlGrupBKRow+"]").xml){
- // if( model.getValue(xHIsgrupListPath+"["+sDetlGrupRow+"]/supcd") ){
- // }
- model.setValue(xHIsgrupListPath+"["+sDetlGrupRow+"]/stat","I");
- grd_histgrup.rebuild();
- fMakeTreeView();
- }
-
- }else{
- return ;
- }
- }
- /**
- * @group :
- * @ver : 2007.07.20
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 중증도 / 낙상 선택시 중증도 상세내역 리스트 출력
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSerDiagChoi(arg){
- // var iRow = datagrid2.row;
- //
- // if( model.getValue(xRecgrupListPath+"["+"1"+"]/stat") != "I" ){
- //
- // messageBox("수정시 중증도/낙상을 변경","E001");
- // return;
- //
- // }
- var clsflag = "" ;
- var recflag = "" ;
- if( arg == "rdo_clsflaga" ){
- clsflag = model.getValue("/root/main/topattribute/clsflaga") ;
- recflag = '1';
- rdo_clsflagb.value = "" ;
- } else if ( arg == "rdo_clsflagb" ){
- clsflag = model.getValue("/root/main/topattribute/clsflagb") ;
- recflag = '2';
- rdo_clsflaga.value = "" ;
- }
- model.makeValue("/root/send/supcd", "00000000");
- model.makeValue("/root/send/clsflag", clsflag);
- model.makeValue("/root/send/recflag", recflag);
- if(submit("TRMNW04006")){
- model.copyNode("/root/temp","/root/main");
- fMakeTreeView();
- }
- }
- /**
- * @group :
- * @ver : 2007.03.30
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 중증도 값을 저장한다.
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSave(){
- var iRowUpd = datagrid2.row ;
- var inpt = "" ;
- // alert(model.getValue(xRecgrupListPath+"["+"1"+"]/stat"));
- if( model.getValue(xRecgrupListPath+"["+"1"+"]/stat") == "I" ){
- inpt = "inpt"
- } else {
- inpt = "updt"
- }
- var fstrgstrid = model.getValue(xRecgrupListPath+"["+iRowUpd+"]/fstrgstrid") ;
- // alert(fstrgstrid);
- //
- // alert(inpt);
- /* 수정시 입력한 사람과 ID가 동일한지 체크 시작 */
- if(inpt == "updt" ){
- if( getUserId() == fstrgstrid ){
- //alert("1111");
- } else {
- //alert("222");
- //messageBox("등록자와 아이디가 ","E004");
- // return ; // 나중에 풀어야 함. 반드시 ****************************************************************************
- }
- }
- /* 수정시 입력한 사람과 ID가 동일한지 체크 끝 */
- // return ;
- var sRowCnt = datagrid2.rows-datagrid2.fixedrows;
-
- var iRows = datagrid1.rows ;
- var iRow = datagrid1.row ;
- var sRowCntHist = datagrid2.rows-grd_histgrup.fixedrows;
- // alert(iRows);
- if( iRows < 2 ){
- messageBox("환자정보가 없어 저장","E001");
- return;
- }
- model.removenode("/root/send");
- // alert(datagrid2.getupdatedataAll("i"));
- // alert(grd_histgrup.getupdatedataAll("i"));
- var saveyn = 0 ;
- if(inpt == "inpt"){// 등록시
-
- if(sRowCnt <= 0){
- messageBox("저장할 데이터를 입력하지 ","E007");
- return;
- }
- if(rdo_clsflaga.value == '' && rdo_clsflagb.value == ''){
- messageBox("중증도 구분 / 낙상이 선택되지 ","E007");
- return;
- }
- for(var i=1; i<= sRowCnt; i++){
- if(model.getValue(xRecgrupListPath+"["+i+"]/stat") != "-") {
- saveyn = 1 ;
- }
-
- }
-
- if(saveyn <= 0 ){
- messageBox("등록정보가 없어 저장 ","E001");
- return;
- }
- if(cmb_execkind.value == ""){
- messageBox("기록활 duty를 선택하지 ","E007");
- return;
- }
- } else if (inpt == "updt") {//수정시
- for(var i=1; i<= grd_histgrup.rows ; i++){
- //alert(model.getValue(xHIsgrupListPath+"["+i+"]/stat"));
- if(model.getValue(xHIsgrupListPath+"["+i+"]/stat") == "U") {
- saveyn = 1 ;
- }
-
- }
-
- if(saveyn <= 0 ){
- messageBox("수정정보가 없어 저장 ","E001");
- return;
- }
- }
- if(messageBox("","Q002") != 6) return;// 저장하시겠습니까?
- // alert(model.getValue("/root/main/topattribute/clsflaga"));
- // alert(model.getValue("/root/main/topattribute/clsflagb"));
- var clsflag = '';
- var recflag = '';
- if ( model.getValue("/root/main/topattribute/clsflagb") == "7" || model.getValue("/root/main/topattribute/clsflagb") == "8"){
- //alert("222");
- clsflag = model.getValue("/root/main/topattribute/clsflagb") ;
- recflag = '2';
- }else if( parseInt(model.getValue("/root/main/topattribute/clsflaga")) < 7){
- //alert("111");
- clsflag = model.getValue("/root/main/topattribute/clsflaga") ;
- recflag = '1';
- }
- //return ;
- var iRowCnt = datagrid2.row ;
- // alert(clsflag);
- // alert(model.getValue("/root/main/detlgrup/detlgruplist["+ iRow +"]/indd"));
- // alert(cmb_execkind.value);
- model.makeValue("/root/send/clsflag", clsflag);
- model.makeValue("/root/send/recflag", recflag);
- model.makeValue("/root/send/indd", model.getValue("/root/main/detlgrup/detlgruplist["+ iRow +"]/indd"));
- model.makeValue("/root/send/pid", model.getValue("/root/main/topattribute/pid"));
- model.makeValue("/root/send/cretno", "1");
- model.makeValue("/root/send/seqno", "1");
- model.makeValue("/root/send/certkey", "123456");
- model.makeValue("/root/send/execkind", cmb_execkind.value);
- // alert(cmb_wardcd.value);
- model.makeValue("/root/send/wardcd", combo7.value );
- model.makeValue("/root/send/roomcd", model.getValue("/root/main/topattribute/roomcd"));
- model.makeValue("/root/send/grupcdval", model.getValue("/root/main/recgrup/recgruplist["+ iRowCnt +"]/grupcd"));
- // alert(model.getValue("/root/main/topattribute/pid"));
- // alert(clsflag);
- // return ;
-
- var cNt = 0 ;
- if(inpt == "inpt"){// 등록시
- for(var i = 1 ; i < grd_histgrup.rows; i++ ){// 전체를 돌면서 값이 체크 값을 찾아 중증도 내역 총점에 합산한다.
- if(grd_histgrup.textmatrix(i,1) == "Y") {
- cNt = cNt + parseInt(model.getValue(xHIsgrupListPath+"["+i+"]/basepnt"));
- }
- }
- datagrid2.textmatrix(iRowCnt,13) = cNt;
- // alert(datagrid2.getupdatedataAll("i"));
- // alert(grd_histgrup.getupdatedataAll("i"));
- //
- // return ;
- model.makeValue("/root/send/recgrup",datagrid2.getupdatedataAll("i"));
- model.makeValue("/root/send/histgrup",grd_histgrup.getupdatedataAll("i"));
- if(submit("TXMNW04001")){
- model.copyNode("/root/temp","/root/main");
- datagrid2.row = 1;// 저장후 저장한 로우를 선택
- fReload(iRowCnt);// 업데이트후 화면값 리로딩
- }
- } else if (inpt == "updt") {//수정시
- for(var i = 1 ; i < grd_histgrup.rows; i++ ){// 전체를 돌면서 값이 체크 값을 찾아 중증도 내역 총점에 합산한다.
- if(grd_histgrup.textmatrix(i,1) == "Y") {
- cNt = cNt + parseInt(model.getValue(xHIsgrupListPath+"["+i+"]/basepnt"));
- }
- }
- // alert(cNt);
- datagrid2.textmatrix(iRowCnt,13) = cNt;
- model.makeValue("/root/send/recgrup",datagrid2.getupdatedataAll("i"));
- model.makeValue("/root/send/histgrup",grd_histgrup.getupdatedataAll("i"));
- // alert(model.getValue(xRecgrupListPath+"["+iRowCnt+"]/totpnt"));
- //
- // return ;
- if(submit("TXMNW04002")){
- model.copyNode("/root/temp","/root/main");
- fReload(iRowCnt);// 업데이트후 화면값 리로딩
- }
-
- }
- rdo_clsflaga.disabled = true ;// 중증도구분 비활성화 시킨다.
- rdo_clsflagb.disabled = true ;// 낙상구분 비활성화 시킨다.
- inpt = "" ;// 등록/수정 클리어
- }
- /**
- * @group :
- * @ver : 2007.07.20
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 중증도 내역 삭제 버튼
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDel(){
- if(messageBox("신규정보를","Q001") != 6) return;
- model.removeNodeset("/root/main/rechistpntgrup/rechistpntlist");// 중증도 상세점수 클리어
- model.removeNodeset("/root/main/histgrup/histgruplist");// 중증도 상세내역 클리어
-
- datagrid3.refresh();
- grd_histgrup.refresh();
- model.removeNodeset("/root/main/recgrup/recgruplist");
- fSelect() ;// 중증도 내역 리스트
- datagrid2.rebuild();
- datagrid2.refresh();
- datagrid2.row = 1;
- }
- /**
- * @group :
- * @ver : 2007.07.20
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 중증도 내역 등록 버튼
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fAddInsertRow(){
- if(cmb_execkind.value == "" || cmb_execkind.value == "0"){
- messageBox("기록활 duty를 선택하지 ","E007");
- return;
- }
- var iRows = datagrid1.rows ;
- if( iRows < 2 ){
- messageBox("환자정보가 없어 등록","E001");
- return;
- }
- if( model.getValue(xRecgrupListPath+"["+"1"+"]/stat") == "I" ){
- messageBox("중증도 내역은 한번에 1건이상 저장할 수","E001");
- return;
- }
- fSelect();//등록버튼 클릭시 현재 최종값을 셋팅
- var iRow = datagrid2.rows;
- // alert(iRow);
- if(iRow < 2){
- iRow = 1 ;
- datagrid2.addRow(true, true);
- } else {
- datagrid2.insertRow("1", "above");
- // datagrid2.insertRow(datagrid2.row);
- }
- // alert(getUserName());
- rdo_clsflaga.value= "" ;// 중증도 구분 클리어
- rdo_clsflagb.value= "" ;//낙상 클리어
- model.removeNodeset("/root/main/rechistpntgrup/rechistpntlist");// 중증도 상세점수 클리어
- model.setValue(xRecgrupListPath+"["+"1"+"]/stat","I"); //
- model.setValue(xRecgrupListPath+"["+"1"+"]/execdt",ipt_execdt.value );
- model.setValue(xRecgrupListPath+"["+"1"+"]/exectm",input4.value); //
- model.setValue(xRecgrupListPath+"["+"1"+"]/clsgrupkind", ""); //
- model.setValue(xRecgrupListPath+"["+"1"+"]/totpnt", ""); //
- model.setValue(xRecgrupListPath+"["+"1"+"]/usernm", "테스트"); //
- datagrid2.rebuild();
- datagrid2.row = 1;
-
- model.makeValue("/root/send/supcd", "00000000");
- // model.makeValue("/root/send/clsflag", "1");
- // model.makeValue("/root/send/recflag", "1");
- /* 처음 등록시 일반병동/ 아니면 마지막 등록한 값 시작 */
- if(model.getvalue("/root/main/recgrup/rectmaxvallist/clsflag") == "" || model.getvalue("/root/main/recgrup/rectmaxvallist/recflag") == "" ){
- model.makeValue("/root/send/clsflag", "1");
- model.makeValue("/root/send/recflag", "1");
- rdo_clsflaga.value = "1" ;
- rdo_clsflagb.value = "1" ;
- } else {
- model.makeValue("/root/send/clsflag", model.getvalue("/root/main/recgrup/rectmaxvallist/clsflag"));
- model.makeValue("/root/send/recflag", model.getvalue("/root/main/recgrup/rectmaxvallist/recflag"));
- // alert(model.getvalue("/root/main/recgrup/rectmaxvallist/clsflag"));
- // alert(model.getvalue("/root/main/recgrup/rectmaxvallist/recflag"));
- var cLsflag = model.getvalue("/root/main/recgrup/rectmaxvallist/clsflag") ;
- /* 최종값을 가지고 중증도/낙상 체크 시작 */
- if( cLsflag < 7 ){
- if( cLsflag == 1 ){
- rdo_clsflaga.select(0);
- } else if ( cLsflag == 2 ){
- rdo_clsflaga.select(1);
- } else if ( cLsflag == 3 ){
- rdo_clsflaga.select(2);
- } else if ( cLsflag == 4 ){
- rdo_clsflaga.select(3);
- } else if ( cLsflag == 5 ){
- rdo_clsflaga.select(4);
- } else if ( cLsflag == 6 ){
- rdo_clsflaga.select(5);
- }
- } else if(cLsflag > 6 ) {
-
- if ( cLsflag == 7 ){
- rdo_clsflagb.select(0);
- } else if ( cLsflag == 8 ){
- rdo_clsflagb.select(1);
- }
- }
- rdo_clsflaga.refresh();
- rdo_clsflagb.refresh();
- /* 최종값을 가지고 중증도/낙상 체크 끝 */
- }
- /* 처음 등록시 일반병동/ 아니면 마지막 등록한 값 끝 */
- if(submit("TRMNW04006")){
- model.copyNode("/root/temp","/root/main");
- fMakeTreeView(); //
- }
- //rdo_clsflaga.value = "1" ;
- rdo_clsflaga.disabled = false ;// 중증도구분 등록시 활성화 시킨다.
- rdo_clsflagb.disabled = false ;// 낙상구분 등록시 활성화 시킨다.
- model.makeValue("/root/main/rechistpntgrup/rechistpntlist/pid",model.getValue(xClsListPath+"["+iRow+"]/pid"));
- model.makeValue("/root/main/rechistpntgrup/rechistpntlist/hngnm",model.getValue(xClsListPath+"["+iRow+"]/hngnm"));
- fRecHistPntListInsert();//등록버튼 클릭시 마지막 입력한 값으로 셋팅
- model.removeNodeset("/root/main/rechistpntgrup/rechistpntlist");// 중증도 상세점수 클리어
- datagrid3.refresh();
- }
- /**
- * @group :
- * @ver : 2007.07.20
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 중증도 상세점수 display : true , false / 총점 중증도
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fColLqidty() {
- var cNt = model.getValue("/root/main/rechistpntgrup/rechistpntlist/cnt")
- if(cNt > 0 ){
- var no = 1 ;
- var notitl = 0 ;
- for( var i = 0 ; i < cNt ; i++ ) {
- no++ ;
- notitl++ ;
- datagrid3.colhidden(no) = false;
- datagrid3.colwidth(no) = 50;
- datagrid3.valuematrix(0,no) = model.getValue("/root/main/rechistpntgrup/pnttitlgruplist["+ notitl +"]/hngnm");
- }
- datagrid3.colhidden(42) = false;
- datagrid3.colhidden(43) = false;
-
- datagrid3.colwidth(42) = 50;
- datagrid3.colwidth(43) = 50;
- var iRow = datagrid1.row ;
- datagrid3.valuematrix(1,0) = model.getValue("/root/main/detlgrup/detlgruplist["+ iRow +"]/pid");
- datagrid3.valuematrix(1,1) = model.getValue("/root/main/detlgrup/detlgruplist["+ iRow +"]/hngnm");
- datagrid3.refresh();
- }
-
- }
- /**
- * @group :
- * @ver : 2007.07.20
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 중증도 상세점수 내역 / 한글명 / 체크 점수 목록
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fRecHistPntList(){
- var iRow = datagrid2.row;
- model.removenode("/root/send");
- model.makeValue("/root/send/pid", model.getvalue(xRecgrupListPath+"["+iRow+"]/pid"));
- model.makeValue("/root/send/execdt", model.getvalue(xRecgrupListPath+"["+iRow+"]/execdt"));
- model.makeValue("/root/send/clsflag", model.getvalue(xRecgrupListPath+"["+iRow+"]/clsflag"));
- model.makeValue("/root/send/recflag", model.getvalue(xRecgrupListPath+"["+iRow+"]/recflag"));
- model.makeValue("/root/send/grupcd", model.getvalue(xRecgrupListPath+"["+iRow+"]/grupcd"));
- if(submit("TRMNW04007")){
- var iRowNum = datagrid1.row;
- }
- var iRow = grd_histgrup.row;
- var iCol = grd_histgrup.col;
- /* 중증도 상세내역 구분 체크 시작 */
- var nodelist = bind1.nodeset;
- var cNt = nodelist.length;
- for(var ins = 1 ; ins <= cNt; ins++ ){// 체크된 값 전체를 돈다.
- for(var i = 1 ; i < grd_histgrup.rows; i++ ){// 전체를 돌면서 그룹에 값이 체크되어 있는것 초기화
- if(
- (model.getValue(xHIsgrupListPath+"["+ i +"]/supcd") == model.getValue("/root/main/rechistpntgrup/serdiaghislist["+ ins +"]/supcd")) &&
- (model.getValue(xHIsgrupListPath+"["+ i +"]/basepnt") == model.getValue("/root/main/rechistpntgrup/serdiaghislist["+ ins +"]/timsval"))
- ) {
- grd_histgrup.textmatrix(i,1) = "Y";
- grd_histgrup.textmatrix(i,0) = "-";
- }
-
- }
- }
- /* 중증도 상세내역 구분 체크 끝 */
- }
- /**
- * @group :
- * @ver : 2007.03.27
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 중증도구분 낙상 구분 체크
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fFlag(){
- var iRow = datagrid2.row;
- //alert(iRow);
- var cLsflag = model.getValue(xRecgrupListPath+"["+iRow+"]/clsflag") ;
- //alert(cLsflag);
- rdo_clsflaga.value = "" ;
- rdo_clsflagb.value = "" ;
- if( cLsflag < 7 ){
- if( cLsflag == 1 ){
- rdo_clsflaga.select(0);
- } else if ( cLsflag == 2 ){
- rdo_clsflaga.select(1);
- } else if ( cLsflag == 3 ){
- rdo_clsflaga.select(2);
- } else if ( cLsflag == 4 ){
- rdo_clsflaga.select(3);
- } else if ( cLsflag == 5 ){
- rdo_clsflaga.select(4);
- } else if ( cLsflag == 6 ){
- rdo_clsflaga.select(5);
- }
- } else if(cLsflag > 6 ) {
-
- if ( cLsflag == 7 ){
- rdo_clsflagb.select(0);
- } else if ( cLsflag == 8 ){
- rdo_clsflagb.select(1);
- }
- }
- rdo_clsflaga.refresh();
- rdo_clsflagb.refresh();
- }
- /**
- * @group :
- * @ver : 2007.03.27
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 중증도 상세내역의 설명을 조회한다.
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fHistDesc(){
- var iRow = grd_histgrup.row;
- tar_desccnts.value = model.getValue(xHIsgrupListPath+"["+iRow+"]/desccnts") ;
- tar_desccnts.refresh();
- }
- /**
- * @group :
- * @ver : 2007.03.27
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 중증도 상세내역 트리구조로 변환
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fMakeTreeView(){
- var sRowCnt = grd_histgrup.rows-grd_histgrup.fixedRows;
- for(var i=1; i<= sRowCnt; i++){
- grd_histgrup.IsSubtotal(i)=true;
- grd_histgrup.outlinelevel(i)=model.getValue(xHIsgrupListPath+"["+i+"]/depth");
- grd_histgrup.colDisabled(11) = true ;
- }
- grd_histgrup.OutlineCol = 3; //
- grd_histgrup.OutlineBar = 4; //
- grd_histgrup.TreeColor="gray";
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.04.30
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 중증도 상세내역 리스트 출력
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fHistList(){
- var iRow = datagrid2.row;
- model.removenode("/root/send");
- model.makeValue("/root/send/supcd","00000000");
- model.makeValue("/root/send/clsflag",model.getValue(xRecgrupListPath+"["+iRow+"]/clsflag"));
- model.makeValue("/root/send/recflag",model.getValue(xRecgrupListPath+"["+iRow+"]/recflag"));
- model.makeValue("/root/send/indd",model.getValue(xRecgrupListPath+"["+iRow+"]/indd"));
- if(submit("TRMNW04006")){
- model.copyNode("/root/temp","/root/main");
- //model.copyNode("/root/temp/main","/root/main");
- fMakeTreeView();
- }
- }
- /**
- * @group :
- * @ver : 2007.03.27
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 설명
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fAddHist(){
- datagrid2.insertRow(1);// 0 : 다음줄에 삽입 , 1 : 첫번째 줄에 삽입
- datagrid2.rebuild();
-
- }
- /**
- * @group :
- * @ver : 2007.04.30
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 중증도 내역을 더블클릭했을때. 중증도 상세점수 / 중증도 상세내역 리스트를 출력
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSelect(){
- // alert();
- var iRow = datagrid1.row;
- if(iRow < 1) return;
- opt_roomcd.value = model.getValue(xClsListPath+"["+iRow+"]/roomcd");
- opt_pid.value = model.getValue(xClsListPath+"["+iRow+"]/pid");
- opt_hngnm.value = model.getValue(xClsListPath+"["+iRow+"]/hngnm");
- opt_pid.value = model.getValue(xClsListPath+"["+iRow+"]/pid"); // 중증도 상세점수 등록번호
- opt_hngnm.value = model.getValue(xClsListPath+"["+iRow+"]/hngnm"); // 중증도 상세점수 환자명
- //alert(model.getValue(xClsListPath+"["+iRow+"]/pid"));
- // datagrid3.textmatrix(1,0) = model.getValue(xClsListPath+"["+iRow+"]/pid");
- // datagrid3.textmatrix(1,1) = model.getValue(xClsListPath+"["+iRow+"]/hngnm");
- model.makeValue("/root/main/rechistpntgrup/rechistpntlist/pid",model.getValue(xClsListPath+"["+iRow+"]/pid"));
- model.makeValue("/root/main/rechistpntgrup/rechistpntlist/hngnm",model.getValue(xClsListPath+"["+iRow+"]/hngnm"));
- // var no = 1 ;
- //
- // for( var i = 0 ; i < 43 ; i++ ) {
- //
- // no++ ;
- //
- // datagrid3.colhidden(no) = true;// 환자선택시 중증도 상세점수 필드 환자명 다음 컬럼부터 숨기기
- //
- // }
- datagrid3.rebuild();
- model.makeValue("/root/send/pid",model.getValue(xClsListPath+"["+iRow+"]/pid"));
- model.makeValue("/root/send/execdt",ipt_execdt.value);
- model.makeValue("/root/send/execkind",cmb_execkind.value);
- model.makeValue("/root/send/wardcd", model.getValue("/root/temp/wardcd"));
- model.makeValue("/root/send/srchym", model.getValue("/root/temp/srchym"));
- // model.makeValue("/root/main/rechistpntgrup/rechistpntlist["+1+"]", model.getValue(xClsListPath+"["+iRow+"]/hngnm");
- if(submit("TRMNW04005")){
- }
- ipt_execdtrect.value = model.getValue("/root/main/recgrup/rectmaxvallist/execdtrect") ;//최근 저장일을 화면에 표시
-
- model.setValue("/root/main/hiddengrup/grupcd",model.getValue("/root/main/recgrup/rectmaxvallist/grupcd"));// 등록시 grupcd 를 가지고 마지막 등록값을 가져온다.
- model.setValue("/root/main/hiddengrup/pid",model.getValue("/root/main/recgrup/rectmaxvallist/pid"));// 등록시 pid 를 가지고 마지막 등록값을 가져온다.
- model.setValue("/root/main/hiddengrup/clsflag",model.getValue("/root/main/recgrup/rectmaxvallist/clsflag"));// 등록시 clsflag 를 가지고 마지막 등록값을 가져온다.
- model.setValue("/root/main/hiddengrup/recflag",model.getValue("/root/main/recgrup/rectmaxvallist/recflag"));// 등록시 recflag 를 가지고 마지막 등록값을 가져온다.
- //alert(model.getValue("/root/main/recgrup/rectmaxvallist/grupcd"));
- datagrid2.row = 1;
- rdo_clsflaga.disabled = true ;// 중증도구분 비활성화 시킨다.
- rdo_clsflagb.disabled = true ;// 낙상구분 비활성화 시킨다.
- }
- /**
- * @group :
- * @ver : 2007.06.18
- * @by : 정찬성
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 병동내 환자 정보를 조회한다.
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fPatientList(){
- model.removenode("/root/send");
-
- model.makeValue("/root/send/wardcd", model.getValue("/root/main/cond/wardcdgrup/wardcdgruplist/wardcd"));
- model.makeValue("/root/send/srchym", model.getValue("/root/main/cond/srchym"));
- model.removenode("/root/temp");
- model.makeValue("/root/temp/wardcd", model.getValue("/root/main/cond/wardcdgrup/wardcdgruplist/wardcd"));
- model.makeValue("/root/temp/srchym", model.getValue("/root/main/cond/srchym"));
- if(submit("TRMNW04004")){
- //model.copyNode("/root/temp/main", "/root/main");
- //fMakeTreeView();
- }
- datagrid1.row = 1;
- rdo_clsflaga.disabled = true ;// 중증도구분 비활성화 시킨다.
- rdo_clsflagb.disabled = true ;// 낙상구분 비활성화 시킨다.
- }
|