12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
- <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
- <xhtml:head>
- <xhtml:title>CAPD기록</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <cond>
- <wardcd/>
- <roomcd/>
- <roomnm/>
- <patnm/>
- <pid/>
- <sa/>
- <recdd/>
- <frstdd/>
- <lastdd/>
- <patnum/>
- <userid/>
- <usernm/>
- <settingrnid/>
- <etcprcplabel/>
- <etcconcenlabel/>
- </cond>
- <recordlist>
- <list>
- <wardcd/>
- <roomcd/>
- <patnm/>
- <pid/>
- <recdd/>
- <rectm/>
- <prcpcd/>
- <pdprcpcd/>
- <concencd/>
- <timscd/>
- <injdd/>
- <injtm/>
- <injamtval/>
- <dragdd/>
- <dragtm/>
- <dragamtval/>
- <diff/>
- <subtotal/>
- <cmt/>
- <recseq/>
- <pdetcprcpnm/>
- <etcconcennm/>
- <lastupdtrid/>
- <status/>
- </list>
- </recordlist>
- <infolist>
- <list>
- <wardcd/>
- <roomcd/>
- <patnm/>
- <pid/>
- <recdd/>
- <rectm/>
- <prcpcd/>
- <pdprcpcd/>
- <concencd/>
- <timscd/>
- <injdd/>
- <injtm/>
- <injamtval/>
- <dragdd/>
- <dragtm/>
- <dragamtval/>
- <diff/>
- <subtotal/>
- <cmt/>
- <recseq/>
- <pdetcprcpnm/>
- <etcconcennm/>
- <lastupdtrid/>
- </list>
- </infolist>
- <bpid/>
- <patinfo>
- <patlist>
- <roomcd/>
- <patnm/>
- </patlist>
- </patinfo>
- <menuitems>
- <item>
- <name>CAPD기록 삭제</name>
- <func>fCapdDel</func>
- </item>
- <item>
- <name>CAPD기록 수정</name>
- <func>fCapdUpt</func>
- </item>
- </menuitems>
- </main>
- <send>
- <reqdata/>
- </send>
- <init>
- <getwardlist>
- <wardlist/>
- </getwardlist>
- <getwardroomlist>
- <roomlist/>
- <settingrn>
- <settingrnnm/>
- <settingrnid/>
- </settingrn>
- </getwardroomlist>
- <getwardpatinfo>
- <patlist/>
- </getwardpatinfo>
- <recordlist>
- <list>
- <wardcd/>
- <roomcd/>
- <patnm/>
- <pid/>
- <recdd/>
- <rectm/>
- <prcpcd/>
- <pdprcpcd/>
- <concencd/>
- <timscd/>
- <injdd/>
- <injtm/>
- <injamtval/>
- <dragdd/>
- <dragtm/>
- <dragamtval/>
- <diff/>
- <subtotal/>
- <cmt/>
- <recseq/>
- <pdetcprcpnm/>
- <etcconcennm/>
- <lastupdtrid/>
- <status/>
- </list>
- </recordlist>
- <infolist>
- <list>
- <wardcd/>
- <roomcd/>
- <patnm/>
- <pid/>
- <recdd/>
- <rectm/>
- <prcpcd/>
- <pdprcpcd/>
- <concencd/>
- <timscd/>
- <injdd/>
- <injtm/>
- <injamtval/>
- <dragdd/>
- <dragtm/>
- <dragamtval/>
- <diff/>
- <subtotal/>
- <cmt/>
- <recseq/>
- <pdetcprcpnm/>
- <etcconcennm/>
- <lastupdtrid/>
- </list>
- </infolist>
- <dialliqd>
- <list>
- <prcpcd/>
- <prcpnm/>
- </list>
- </dialliqd>
- <M0561list>
- </M0561list>
- <M0562list/>
- </init>
- <temp>
- <paminfo/>
- </temp>
- <hidden>
- <recordlist/>
- </hidden>
- </root>
- </instance>
- <script type="javascript">
- <![CDATA[
- var orgPrcpcd=new Array(); //원처방코드
-
- function fInit() {
- //** 상단환자 화면설정 **//
- var node = getGlobalVariable("paminfo");
- setCSVToNode("/root/temp/paminfo", node);
-
- if(getNodesetCount("/root/temp/paminfo/list") > 0) {
- // 첫번째 그리드 삭제하기
- model.removeNodeset("/root/main/recordlist");
- model.makeNode("/root/main/recordlist");
- // 두번째 그리드 삭제하기
- model.removeNodeset("/root/main/infolist");
- model.makeNode("/root/main/infolist");
- //세번째 그리드 삭제하기
- model.removeNodeset("/root/main/patinfo");
-
- //조건 초기화
- model.resetInstanceNode("/root/main/cond");
- model.setValue("/root/main/cond/recdd", getCurrentDate());
- model.setValue("/root/main/cond/userid", getUserId());
- model.setValue("/root/main/cond/usernm", getUserName());
-
- // 공통코드 가져오기
- zbcfGetCodeList( new Array ( "M0561" // 농도 , "M0562" 횟차제외
- )
- , new Array ( "/root/init/M0561list" //, "/root/init/M0562list"
- )
- );
-
- //병동 리스트
- submit("TRMNW09001");
- var wardcd = model.getValue("/root/temp/paminfo/list/wardcd");
- model.makeValue("/root/main/cond/wardcd", wardcd);
- model.makeValue("/root/send/reqdata/wardcd", wardcd);
-
- //병실리스트
- submit("TRMNW09002");
- //병실 리스트
- var roomcd = model.getValue("/root/temp/paminfo/list/roomcd");
- var orddd = getCurrentDate();
- model.makeValue("/root/send/reqdata/orddd", orddd);
-
- //내환자
- for(i = 1; i <= getNodesetCount("/root/init/getwardroomlist/settingrn"); i++ ) {
- if (model.getValue("/root/main/cond/userid") == model.getValue("/root/init/getwardroomlist/settingrn["+ i +"]/settingrnid")) {
- model.setValue("/root/main/cond/settingrnid", model.getValue("/root/main/cond/userid"));
- }
- }
-
- var settingrnid=model.getValue("/root/main/cond/settingrnid");
- model.makeValue("/root/send/reqdata/settingrnid", settingrnid);
-
- submit("TRMNW09003");
-
- model.makeNode("/root/main/patinfo");
- copyNodeListType("/root/main/patinfo", "/root/init/getwardpatinfo/patlist", "replace");
-
- //환자명 리스트
- // indd, instcd, pid, cretno send로 보내기
- var indd = model.getValue("/root/temp/paminfo/list/indd");
- var instcd = model.getValue("/root/temp/paminfo/list/instcd");
- var pid = model.getValue("/root/temp/paminfo/list/pid");
- var cretno = model.getValue("/root/temp/paminfo/list/cretno");
- var patnm = model.getValue("/root/temp/paminfo/list/hngnm");
- var sex = model.getValue("/root/temp/paminfo/list/sex");
- var age = model.getValue("/root/temp/paminfo/list/age");
-
- model.makeValue("/root/send/reqdata/indd", indd);
- model.makeValue("/root/send/reqdata/instcd", instcd);
- model.makeValue("/root/send/reqdata/pid", pid);
- model.makeValue("/root/send/reqdata/cretno", cretno);
- model.makeValue("/root/main/cond/roomnm", roomcd);
- model.makeValue("/root/main/cond/patnm", patnm);
- model.makeValue("/root/main/cond/pid", pid);
- model.makeValue("/root/main/cond/sa", sex+"/"+age);
- //투석액 리스트 가져오기
- submit("TRMNW09005");
-
- //해당 환자에 포커스 맞춤
- for(var i=1; i<=getNodesetCount("/root/main/patinfo/patlist"); i++) {
- if(model.getValue("/root/main/patinfo/patlist["+i+"]/pid")==pid) {
- model.setFocus("grd_patlist");
- grd_patlist.row=i;
- grd_patlist.dispatch("onentercell");
- model.makeValue("/root/main/cond/patnum", i);
- grd_patlist.refresh();
- }
- }
-
- //현재날짜로 세팅
- var currentDate = getCurrentDate();
- ipt_recdd.value = currentDate;
-
- var date = currentDate.toDate("YYYYMMDD");
-
- date.getAddDate(-4, "D");
-
- var frstDate = date.getDateFormat();
- ipt_frstdd.value = frstDate;
- model.makeValue("/root/send/reqdata/frstdate", frstDate);
-
- var lastDate = getCurrentDate();
- ipt_lastdd.value = lastDate;
- model.makeValue("/root/send/reqdata/lastdate", lastDate);
-
- //기록 리스트 조회
- submit("TRMNW09004");
-
- model.copyNode("/root/main/infolist", "/root/init/infolist");
-
- //기타일 경우 pdprcpcd, concencd를 기타값으로 바꿔준다
- var pdetcprcpnm, etcconcennm;
-
- //차이, subtotal
- //현재행 날짜
- var rowdate="";
- //비교날짜: 첫번째 행의 날짜
- var tempdate=model.getValue("/root/main/infolist/list[1]/recdd").substr(0,8);
- var temppid=model.getValue("/root/main/infolist/list[1]/pid");
- var subtotal = 0;
- var dragamtval, injamtval, diff;
-
- for(var i=1; i<=getNodesetCount("/root/main/infolist/list"); i++) {
- //기타일 경우 pdprcpcd, concencd를 기타값으로 바꿔준다
- pdetcprcpnm = model.getValue("/root/main/infolist/list["+i+"]/pdetcprcpnm");
- etcconcennm = model.getValue("/root/main/infolist/list["+i+"]/etcconcennm");
-
- if(!(pdetcprcpnm == "" || pdetcprcpnm == null)) {
- model.setValue("/root/main/infolist/list["+i+"]/pdprcpcd", pdetcprcpnm);
- model.setValue("/root/main/infolist/list["+i+"]/prcpcd", "기타");
- }
- if(!(etcconcennm == "" || etcconcennm == null)) {
- model.setValue("/root/main/infolist/list["+i+"]/concencd", etcconcennm);
- }
-
- //차이, subtotal
- dragamtval = model.getValue("/root/main/infolist/list["+i+"]/dragamtval");
- injamtval = model.getValue("/root/main/infolist/list["+i+"]/injamtval");
-
- rowdate=model.getValue("/root/main/infolist/list["+i+"]/recdd").substr(0,8);
- rowpid=model.getValue("/root/main/infolist/list["+i+"]/pid");
-
- //현재행 날짜와 비교날짜를 비교해서 다르면 subtotal을 그만 쌓고 초기화한다.
- if(tempdate != rowdate) {
- subtotal = 0;
- tempdate = rowdate;
- } else if(temppid!=rowpid && tempdate==rowdate) {
- subtotal = 0;
- temppid = rowpid;
- }
-
- // if(dragamtval != "" && injamtval != "") { //주입량, 배액량이 둘다 있을 경우에만 차이 계산
- if(model.getValue("/root/main/infolist/list["+i+"]/diff") != "") { //주입량, 배액량이 둘다 있을 경우에만 = 차이가 있을 경우에만 subtotal 계산
- // diff = injamtval - dragamtval ;
- // model.makeValue("/root/main/infolist/list["+i+"]/diff", diff);
- subtotal=Number(subtotal)+Number(model.getValue("/root/main/infolist/list["+i+"]/diff"));
- model.makeValue("/root/main/infolist/list["+i+"]/subtotal", subtotal);
- } else { //주입량, 배액량 중 하나라도 공백이 되면.. 초기화
- model.makeValue("/root/main/infolist/list["+i+"]/diff", "");
- model.makeValue("/root/main/infolist/list["+i+"]/subtotal", "");
- }
- }
- grd_info.refresh();
-
- for(var i=1; i < grd_info.rows; i++) {
- //tooltip변경
- grd_info.tooltipText(i, grd_info.colRef("pdprcpcd") ) = model.getValue("/root/init/dialliqd/list[prcpcd='"+model.getValue("/root/main/infolist/list["+i+"]/pdprcpcd")+"']/prcpnm");
- grd_info.tooltipText(i, grd_info.colRef("concencd") ) = model.getValue("/root/init/M0561list/M0561[cdid='"+model.getValue("/root/main/infolist/list["+i+"]/concencd")+"']/cdnm");
- }
-
- //현재일자의 기록이 있다면 기록 그리드에 복사
- for(var i=1; i<grd_info.rows; i++) {
- if(ipt_recdd.value == model.getValue("/root/main/infolist/list["+i+"]/recdd").substr(0,8)) {
- copyNodeListType("/root/main/recordlist", "/root/main/infolist/list["+i+"]", "after");
- }
- }
- grd_record.refresh();
-
- for(var i=1; i < grd_record.rows; i++) {
- grd_record.tooltipText(i, grd_record.colRef("pdprcpcd") ) = model.getValue("/root/init/dialliqd/list[prcpcd='"+model.getValue("/root/main/recordlist/list["+i+"]/pdprcpcd")+"']/prcpnm");
- grd_record.tooltipText(i, grd_record.colRef("concencd") ) = model.getValue("/root/init/M0561list/M0561[cdid='"+model.getValue("/root/main/recordlist/list["+i+"]/concencd")+"']/cdnm");
- }
-
- model.refresh();
-
- } else {
- // 첫번째 그리드 삭제하기
- model.removeNodeset("/root/main/recordlist");
- // 두번째 그리드 삭제하기
- model.removeNodeset("/root/main/infolist");
- //세번째 그리드 삭제하기
- model.removeNodeset("/root/main/patinfo");
-
- //조건 초기화
- model.resetInstanceNode("/root/main/cond");
- model.setValue("/root/main/cond/recdd", getCurrentDate());
- model.setValue("/root/main/cond/userid", getUserId());
- model.setValue("/root/main/cond/usernm", getUserName());
-
- //공통코드 가져오기
- zbcfGetCodeList( new Array ( "M0561" //, "M0562" // 농도, 횟차
- )
- , new Array ( "/root/init/M0561list" //, "/root/init/M0562list"
- )
- );
-
- // 병동리스트 가져오기
- submit("TRMNW09001");
-
- //로그인한 사람 병동
- model.setValue("/root/main/cond/wardcd", getUserInfo("dutplcecd"));
-
- // 조회일자의 처음일자와 마지막일자 가져오기
- var currentDate = getCurrentDate();
- ipt_recdd.value = currentDate;
-
- var date = currentDate.toDate("YYYYMMDD");
-
- date.getAddDate(-4, "D");
-
- var frstDate = date.getDateFormat();
- ipt_frstdd.value = frstDate;
- model.makeValue("/root/send/reqdata/frstdate", frstDate);
-
- var lastDate = getCurrentDate();
- ipt_lastdd.value = lastDate;
- model.makeValue("/root/send/reqdata/lastdate", lastDate);
- }
- }
-
- function fMake_SignData(){
- Sign.addnode("/root/hidden/recordlist");
-
- var xRecinfoPath = Sign.XPATH_SIGNINFO+"/recordlist/list";
-
- //차이, subtotal 계산
- var subtotal = 0;
- var dragamtval, injamtval, diff;
-
- for(var i=1; i<=getNodesetCount("/root/hidden/recordlist/list"); i++){
- // // 투석액
- var prcpcd = model.getValue(xRecinfoPath+"["+i+"]/prcpcd");
- if(prcpcd != ""){
- if(prcpcd != "기타")
- model.makeValue(xRecinfoPath+"["+i+"]/pdprcpcd", model.getValue("/root/init/dialliqd/list[prcpcd='"+prcpcd+"']/prcpnm"));
- else
- model.makeValue(xRecinfoPath+"["+i+"]/pdprcpcd", model.getValue(xRecinfoPath+"["+i+"]/pdetcprcpnm"));
- }
- // 농도
- var concencd = model.getValue(xRecinfoPath+"["+i+"]/concencd");
- var etcconcennm = model.getValue(xRecinfoPath+"["+i+"]/etcconcennm");
- if(concencd != ""){
- if(etcconcennm != "")
- model.makeValue(xRecinfoPath+"["+i+"]/concencd", model.getValue(xRecinfoPath+"["+i+"]/concencd"));
- else
- model.makeValue(xRecinfoPath+"["+i+"]/concencd",model.getValue("/root/init/M0561list/M0561[cdid="+concencd+"]/cdnm"));
- }
-
- // //subtotal 계산 - 처음부터 다시 계산
- // dragamtval = model.getValue(xRecinfoPath+"["+i+"]/dragamtval");
- // injamtval = model.getValue(xRecinfoPath+"["+i+"]/injamtval");
- //
- // if(dragamtval != "" && injamtval != "") { //주입량, 배액량이 둘다 있을 경우에만 차이 계산
- // diff = injamtval - dragamtval ;
- // model.makeValue(xRecinfoPath+"["+i+"]/diff", diff);
- // subtotal=Number(subtotal)+Number(model.getValue(xRecinfoPath+"["+i+"]/diff"));
- //
- // model.makeValue(xRecinfoPath+"["+i+"]/subtotal", subtotal);
- //
- // } else { //주입량, 배액량 중 하나라도 공백이 되면.. 초기화
- // model.makeValue(xRecinfoPath+"["+i+"]/diff", "");
- // model.makeValue(xRecinfoPath+"["+i+"]/subtotal", "");
- // }
- }
- }
-
- function fCheckTime(ftimeset) {
- if(grd_record.col == grd_record.colRef(ftimeset)) {
- var sTime = grd_record.valueMatrix(grd_record.row, grd_record.colRef(ftimeset));
-
- if(sTime.length != 4) {
- messageBox("네자리를 ","C001");
- grd_record.valueMatrix(grd_record.row, grd_record.colRef(ftimeset)) = "";
- return;
- }
-
- var sFrontTime = sTime.substr(0, 2);
- var sBackTime = sTime.substr(2, 2);
-
- if(parseInt(sFrontTime) > 24) {
- messageBox("24시를 ","E003");
- grd_record.valueMatrix(grd_record.row, grd_record.colRef(ftimeset)) = "";
- return;
- }
-
- if(parseInt(sBackTime) > 59) {
- messageBox("59분을 ","E003");
- grd_record.valueMatrix(grd_record.row, grd_record.colRef(ftimeset)) = "";
- return;
- }
- }
- }
-
- function fShowPopupMenu(gridID, menuPath) {
- var gridObj = document.controls.item(gridID);
-
- if(event.button == 3) {
- if(gridObj.isCell(event.target) && gridObj.mouseRow >= gridObj.fixedrows){
- window.setPopupMenu(true, menuPath, "name", "func", false);
- }else{
- window.setPopupMenu(false);
- }
- }
- }
-
- function fCapdDel() {
- var selectRow = grd_info.row;
- // var lastupdtrid = model.getValue("/root/main/infolist/list/lastupdtrid");
- // var userid = getUserInfo("userid");
- // if(lastupdtrid != userid) {
- // messageBox("", "E002");
- // } else {
- //grd_info grid의 selectedRow
- var selectRow = grd_info.row;
- var patnum = opt_patnum.value;
-
- //grd_record grid의 row
- var addRow = grd_record.rows-grd_record.fixedRows+1;
- //grd_info에서 선택한 일자, pid를 받는다.
- var recdd = model.getValue("/root/main/infolist/list["+selectRow+"]/recdd").substring(0,8);
- var pid = model.getValue("/root/main/infolist/list["+selectRow+"]/pid");
- var indd, instcd, cretno;
-
- if(patnum != "") {
- indd = model.getValue("/root/main/patinfo/patlist[pid='"+pid+"']/indd");
- instcd = model.getValue("/root/main/patinfo/patlist[pid='"+pid+"']/instcd");
- cretno = model.getValue("/root/main/patinfo/patlist[pid='"+pid+"']/cretno");
- } else {
- indd = model.getValue("/root/temp/paminfo/list/indd");
- instcd = model.getValue("/root/temp/paminfo/list/instcd");
- cretno = model.getValue("/root/temp/paminfo/list/cretno");
- }
-
- //해당되는 row만 계산
- var count = 0;
- var recrow = -1;
-
- var bdate="";
- var bpid = "";
-
- count=0;
- ipt_recdd.value=recdd;
- model.removeNodeset("/root/main/recordlist");
- model.makeNode("/root/main/recordlist");
-
- //같은 날짜에 해당하는 기록은 전부 grd_record grid로 이동시킨다
- for(var i = 1; i < grd_info.rows; i++) {
- bdate = model.getValue("/root/main/infolist/list["+i+"]/recdd").substring(0,8);
- bpid = model.getValue("/root/main/infolist/list["+i+"]/pid");
- if(bdate == recdd && bpid == pid) {
- if(recrow == -1) recrow = count;
- copyNodeListType("/root/main/recordlist", "/root/main/infolist/list["+i+"]", "after");
- }
- count++;
- }
- model.refresh();
- var delRow = (selectRow-recrow);
- grd_record.rowStatus(delRow) = "4"
-
- for(var i=1; i < grd_record.rows; i++) {
- if( (i % 2) == 1)
- grd_record.rowStyle(i, "data", "background-color") = "#FFFFFF";
- else
- grd_record.rowStyle(i, "data", "background-color") = "#F4F4F4";
- }
-
- var msg = messageBox("선택하신 CAPD기록을 정말 ", "Q001");
- if(msg == 6) {
- btn_save.dispatch("DOMActivate");
- } else {
- grd_record.rowStatus(delRow) = "0";
- btn_reset.dispatch("DOMActivate");
- }
- // }
- }
-
- function fCapdUpt() {
- //grd_info grid의 selectedRow
- var selectRow = grd_info.row;
- var patnum = opt_patnum.value;
-
- //grd_record grid의 row
- var addRow = grd_record.rows-grd_record.fixedRows+1;
- //grd_info에서 선택한 일자, pid를 받는다.
- var recdd = model.getValue("/root/main/infolist/list["+selectRow+"]/recdd").substring(0,8);
- var pid = model.getValue("/root/main/infolist/list["+selectRow+"]/pid");
- //해당되는 row만 계산
- var count = 0;
- var recrow = -1;
-
- var bdate = "";
- var bpid = "";
- //grd_record에 첫 row가 없을때
- if(addRow==1) {
- count=0;
- ipt_recdd.value=recdd;
- model.removeNodeset("/root/main/recordlist");
- model.makeNode("/root/main/recordlist");
-
- //같은 날짜에 해당하는 기록은 전부 grd_record grid로 이동시킨다
- for(var i=1; i<grd_info.rows; i++) {
- bdate=model.getValue("/root/main/infolist/list["+i+"]/recdd").substring(0,8);
- bpid=model.getValue("/root/main/infolist/list["+i+"]/pid");
- if(bdate==recdd && bpid==pid) {
- if(recrow == -1) recrow = count;
- copyNodeListType("/root/main/recordlist", "/root/main/infolist/list["+i+"]", "after");
- }
- count++;
- }
- grd_record.refresh();
-
- //원처벙코드 저장
- for(var i=1; i<=getNodesetCount("/root/main/recordlist/list"); i++) {
- orgPrcpcd[i] = model.getValue("/root/main/recordlist/list["+i+"]/prcpcd");
- grd_record.tooltipText(i, grd_record.colRef("pdprcpcd") ) = model.getValue("/root/init/dialliqd/list[prcpcd='"+model.getValue("/root/main/recordlist/list["+i+"]/pdprcpcd")+"']/prcpnm");
- grd_record.tooltipText(i, grd_record.colRef("concencd") ) = model.getValue("/root/init/M0561list/M0561[cdid='"+model.getValue("/root/main/recordlist/list["+i+"]/concencd")+"']/cdnm");
- }
-
- if((selectRow-recrow) != 0) {
- // model.makeValue("/root/main/recordlist/list["+(selectRow-recrow)+"]/status", "u");
- grd_record.rowStyle(selectRow-recrow, "data", "background-color") = "#BEFCFF";
- }
- } else if(addRow>1) { //grd_record에 row가 하나 이상 있을 때
- if(ipt_recdd.value!=recdd) { //기록일자와 grd_info의 일자가 틀리다면 올리지 않는다.
- var msg = messageBox("이미 선택된 기록이 존재합니다. 기록을 수정하시겠습니까?", "Q");
- if(msg == 6) { //vbYes = 6 예
- //업무일자를 현재 업무일자로 변경한다.
- count=0;
- ipt_recdd.value=recdd;
- model.removeNodeset("/root/main/recordlist");
- model.makeNode("/root/main/recordlist");
-
- //같은 날짜에 해당하는 기록은 전부 grd_record grid로 이동시킨다
- for(var i=1; i<grd_info.rows; i++) {
- bdate=model.getValue("/root/main/infolist/list["+i+"]/recdd").substring(0,8);
- bpid=model.getValue("/root/main/infolist/list["+i+"]/pid");
-
- if(bdate==recdd && bpid==pid) {
- if(recrow == -1) recrow = count;
- copyNodeListType("/root/main/recordlist", "/root/main/infolist/list["+i+"]", "after");
- }
- count++;
- }
- grd_record.refresh();
-
- //원처벙코드 저장
- for(var i=1; i<=getNodesetCount("/root/main/recordlist/list"); i++) {
- orgPrcpcd[i] = model.getValue("/root/main/recordlist/list["+i+"]/prcpcd");
- grd_record.tooltipText(i, grd_record.colRef("pdprcpcd") ) = model.getValue("/root/init/dialliqd/list[prcpcd='"+model.getValue("/root/main/recordlist/list["+i+"]/pdprcpcd")+"']/prcpnm");
- grd_record.tooltipText(i, grd_record.colRef("concencd") ) = model.getValue("/root/init/M0561list/M0561[cdid='"+model.getValue("/root/main/recordlist/list["+i+"]/concencd")+"']/cdnm");
-
- if((selectRow-recrow) != 0) {
- // model.makeValue("/root/main/recordlist/list["+(selectRow-recrow)+"]/status", "u");
- grd_record.rowStyle(selectRow-recrow, "data", "background-color") = "#BEFCFF";
- }
- if( (selectRow-recrow) != i) {
- if( (i % 2) == 1)
- grd_record.rowStyle(i, "data", "background-color") = "#FFFFFF";
- else
- grd_record.rowStyle(i, "data", "background-color") = "#F4F4F4";
- }
- }
-
- }
- } else if(ipt_recdd.value==recdd && model.getValue("/root/main/cond/pid")!=pid) {
- messageBox("이미 선택된 환자가 존재합니다.", "E");
- } else {
- // count=0;
- // model.removeNodeset("/root/main/recordlist");
- // model.makeNode("/root/main/recordlist");
- // //같은 날짜에 해당하는 기록은 전부 grd_record grid로 이동시킨다
- // for(var i=1; i<grd_info.rows; i++) {
- // var bdate=model.getValue("/root/main/infolist/list["+i+"]/recdd").substring(0,8);
- // var bpid=model.getValue("/root/main/infolist/list["+i+"]/pid");
- // if(bdate==recdd && bpid==pid) {
- // count++;
- // copyNodeListType("/root/main/recordlist", "/root/main/infolist/list["+i+"]", "after");
- // }
- //// model.makeValue("/root/main/recordlist/list["+count+"]/status", "u");
- // }
- // model.makeValue("/root/main/recordlist/list["+selectRow+"]/status", "u");
- for(var i=1; i<grd_info.rows; i++) {
- //같은 날짜에 해당하는 기록은 전부 grd_record grid로 이동시킨다
- bdate=model.getValue("/root/main/infolist/list["+i+"]/recdd").substring(0,8);
- bpid=model.getValue("/root/main/infolist/list["+i+"]/pid");
- if(bdate==recdd && bpid==pid) {
- if(recrow == -1) recrow = count;
- if(selectRow == i) {
- // model.makeValue("/root/main/recordlist/list["+(i-recrow)+"]/status", "u");
- grd_record.rowStyle(i-recrow, "data", "background-color") = "#BEFCFF";
- // break;
- } else {
- if( ((i-recrow) % 2) == 1)
- grd_record.rowStyle(i-recrow, "data", "background-color") = "#FFFFFF";
- else
- grd_record.rowStyle(i-recrow, "data", "background-color") = "#F4F4F4";
- }
- }
-
- count++;
- }
- }
- }
- model.refresh();
- }
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInit();
- ]]>
- </script>
- <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
- <submission id="TRTNW99806" mediatype="application/x-www-form-urlencoded" method="post"/>
- <submission id="TRMNW09001" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/init/getwardlist"/>
- <submission id="TRMNW09002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/init/getwardroomlist"/>
- <submission id="TRMNW09003" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/init/getwardpatinfo"/>
- <submission id="TRMNW09004" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/init/infolist"/>
- <submission id="TXMNW09001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/infolist"/>
- <submission id="TRMNW09005" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/init/dialliqd"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../emr/carecomweb/js/ENRSignEngine.js"/>
- </xhtml:head>
- <xhtml:body guideline="2,13;2,263;1,1192;1,1177;1,149;2,402;2,173;" style="margin-left:8; margin-right:8; ">
- <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:257px; height:14px; ">CAPD기록</caption>
- </group>
- <group id="group3" class="datagrid2" scroll="auto" style="left:0px; top:13px; width:1195px; height:767px; ">
- <button id="btn_del" class="btn2_letter3" disable.background-image="../../../com/commonweb/images/dis_btn2_letter3.gif" style="left:1072px; top:50px; width:53px; height:19px; background-image:../../../com/commonweb/images/btn2_letter3.gif; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var row = grd_record.row;
-
- if(grd_record.rowStatus(row) == "1" || grd_record.rowStatus(row) == "3" ) {
- grd_record.deleteRow(grd_record.row);
- } else {
- grd_record.rowStatus(row) = "4";
- }
- ]]>
- </script>
- </button>
- <button id="btn_reset" class="btn2_letter3" visibility="hidden" disable.background-image="../../../com/commonweb/images/dis_btn2_letter3.gif" style="left:962px; top:50px; width:53px; height:19px; background-image:../../../com/commonweb/images/btn2_letter3.gif; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- /*
- ****************************************************************
- * 임미정 선생님 요청으로 초기화 기능 제외 by 2010-03-12
- ****************************************************************
- */
- model.setValue("/root/main/cond/recdd", getCurrentDate());
-
- model.removeNodeset("/root/main/recordlist/list");
-
- model.removeNodeset("/root/send");
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_add" class="btn2_letter3" disable.background-image="../../../com/commonweb/images/dis_btn2_letter3.gif" style="left:1017px; top:50px; width:53px; height:19px; background-image:../../../com/commonweb/images/btn2_letter3.gif; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- /*
- ***********************************************************
- ** 행추가는 등록번호(pid)가 있을 경우에 가능하도록 한다.
- * 1. 환자번호가 없을 경우 messageBox 띄운 후 현재 날짜로 지정
- * 2. 환자번호가 있을 경우 재원기간 내에 있는 경우 행추가
- * 3. 횟차, 주입시간, 주입량, 배액시간, 배액량을 초기화한다.
- ***********************************************************
- */
- //환자정보
- var wardcd = cmb_ward.value;
- var roomcd = opt_roomcd.value;
- var pid = grd_pid.value;
- var patnm = opt_patnm.value;
- var patnum = opt_patnum.value;
- var indd, dschdd;
-
- //기록 날짜 정보
- var recdd = ipt_recdd.value;
- var frstDate = recdd;
- var lastDate = recdd;
-
- if(pid == "") { // 선택된 환자가 없을 경우
- messageBox("환자정보가 ", "I004");
- ipt_recdd.value = getCurrentDate();
- } else {
- if(patnum != "") { // 환자리스트에서 환자를 선택한경우 -> 재원인 경우
- indd = model.getValue("/root/main/patinfo/patlist[pid='"+pid+"']/indd");
- dschdd = model.getValue("/root/main/patinfo/patlist[pid='"+pid+"']/dschdd");
- } else { // 상단정보에서 환자를 선택한 경우 -> 퇴원환자인 경우
- indd = model.getValue("/root/temp/paminfo/list/indd");
- dschdd = model.getValue("/root/temp/paminfo/list/dschdd");
- }
-
- if(!(recdd >= indd && recdd <= dschdd)) { //기록날짜가 재원기간을 벗어나면..
- messageBox("["+patnm+"]님의 기록가능한 날짜는 " +indd.substr(0,4)+"-"+indd.substr(4,2)+"-"+indd.substr(6,2)+"일에서 "
- +dschdd.substr(0,4)+"-"+dschdd.substr(4,2)+"-"+dschdd.substr(6,2)+"일입니다.\n선택하신 날짜는 기록을", "E001");
- ipt_recdd.value = getCurrentDate();
- } else { // 벗어나지 않을때..
- //해당되는 row만 계산
- var count = 0;
- var recrow = -1;
-
- var bdate = "";
- var bpid = "";
-
- //grd_record에 첫 row가 없을때
- if(grd_record.rows == 1) {
- count = 0;
- model.removeNodeset("/root/main/recordlist");
- model.makeNode("/root/main/recordlist");
-
- //같은 날짜에 해당하는 기록은 전부 grd_record grid로 이동시킨다
- for(var i=1; i<grd_info.rows; i++) {
- bdate = model.getValue("/root/main/infolist/list["+i+"]/recdd").substring(0,8);
- bpid = model.getValue("/root/main/infolist/list["+i+"]/pid");
-
- if(bdate == recdd && bpid == pid) {
- if(recrow == -1) recrow = count;
- copyNodeListType("/root/main/recordlist", "/root/main/infolist/list["+i+"]", "after");
- }
- count++;
- }
-
- //원처벙코드 저장
- for(var i=1; i<=getNodesetCount("/root/main/recordlist/list"); i++) {
- orgPrcpcd[i] = model.getValue("/root/main/recordlist/list["+i+"]/prcpcd");
- }
- }
- grd_record.refresh();
-
- grd_record.addRow();
- var addRow=grd_record.row;
- var recdd=ipt_recdd.value;
- var timscd = model.getValue("/root/main/recordlist/list["+(addRow-1)+"]/timscd");
- if(timscd == "") timscd = 0;
-
- // model.makeValue("/root/main/recordlist/list["+addRow+"]/injamtval", "0");
- // model.makeValue("/root/main/recordlist/list["+addRow+"]/injtm", "-");
- // model.makeValue("/root/main/recordlist/list["+addRow+"]/dragamtval", "0");
- // model.makeValue("/root/main/recordlist/list["+addRow+"]/dragtm", "-");
- model.makeValue("/root/main/recordlist/list["+addRow+"]/timscd", ++timscd);
- model.makeValue("/root/main/recordlist/list["+addRow+"]/injdd", ipt_recdd.value);
- model.makeValue("/root/main/recordlist/list["+addRow+"]/dragdd", ipt_recdd.value);
- orgPrcpcd[addRow] = "";
-
- grd_record.refresh();
-
- for(var i=1; i < grd_record.rows; i++) {
- grd_record.tooltipText(i, grd_record.colRef("pdprcpcd") ) = model.getValue("/root/init/dialliqd/list[prcpcd='"+model.getValue("/root/main/recordlist/list["+i+"]/pdprcpcd")+"']/prcpnm");
- grd_record.tooltipText(i, grd_record.colRef("concencd") ) = model.getValue("/root/init/M0561list/M0561[cdid='"+model.getValue("/root/main/recordlist/list["+i+"]/concencd")+"']/cdnm");
- }
- model.refresh();
- }
- }
- ]]>
- </script>
- </button>
- <button id="btn_save" class="btn5_letter4" disable.background-image="../../../com/commonweb/images/dis_btn5_letter4.gif" style="left:1127px; top:50px; width:64px; height:19px; background-image:../../../com/commonweb/images/btn5_letter4.gif; ">
- <caption>인증저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //조회조건 재세팅
- model.removeNodeset("/root/send");
-
- //빈칸검수
- var recordRows=grd_record.rows-grd_record.fixedRows;
- var patnum=opt_patnum.value;
- var setNullFlag=true;
- var setIsNotChgFlag=false;
- var pdprcpcd="";
- var concencd="";
- var timscd="";
- var injdd="";
- var intjm="";
- var injamtval="";
- var dragdd="";
- var dragtm="";
- var dragamtval="";
-
- for(var i=1; i <= recordRows; i++) {
- //차이 계산 -> DB에서 자동 차 계산하는 것으로 변경
- // dragamtval = model.getValue("/root/main/recordlist/list["+i+"]/dragamtval");
- // injamtval = model.getValue("/root/main/recordlist/list["+i+"]/injamtval");
- // diff = dragamtval - injamtval ;
- // model.makeValue("/root/main/recordlist/list["+i+"]/diff", diff);
-
- prcpcd = model.getValue("/root/main/recordlist/list["+i+"]/prcpcd");
- pdprcpcd = model.getValue("/root/main/recordlist/list["+i+"]/pdprcpcd");
- concencd = model.getValue("/root/main/recordlist/list["+i+"]/concencd");
- // timscd = model.getValue("/root/main/recordlist/list["+i+"]/timscd");
- injdd = model.getValue("/root/main/recordlist/list["+i+"]/injdd");
- injtm = model.getValue("/root/main/recordlist/list["+i+"]/injtm");
- injamtval = model.getValue("/root/main/recordlist/list["+i+"]/injamtval");
- dragdd = model.getValue("/root/main/recordlist/list["+i+"]/dragdd");
- dragtm = model.getValue("/root/main/recordlist/list["+i+"]/dragtm");
- dragamtval=model.getValue("/root/main/recordlist/list["+i+"]/dragamtval");
-
- if(prcpcd=="") {messageBox(i+"번째 투석액을 선택하지 않았습니다.", "E"); setNullFlag=false; break;}
- if(pdprcpcd=="") {messageBox(i+"번째 투석액을 선택하지 않았습니다.", "E"); setNullFlag=false; break;}
- if(concencd=="") {messageBox(i+"번째 농도를 선택하지 않았습니다.", "E"); setNullFlag=false; break;}
- // if(timscd=="") {messageBox(i+"번째 횟차를 선택하지 않았습니다.", "E"); setNullFlag=false;}
- // if(injtm=="") model.makeValue("/root/main/recordlist/list["+i+"]/injtm", "-");
- // if(injamtval=="") model.makeValue("/root/main/recordlist/list["+i+"]/injamtval", "0");
- // if(dragtm=="") model.makeValue("/root/main/recordlist/list["+i+"]/dragtm", "-");
- // if(dragamtval=="") model.makeValue("/root/main/recordlist/list["+i+"]/dragamtval", "0");
-
- //주입량이 있을때 주입일자, 주입시간 필수!
- if(injamtval != "") {
- if(injdd == "") {
- messageBox(i+"번째 주입일자를 기입하지 않았습니다.", "E"); setNullFlag=false;
- model.makeValue("/root/main/recordlist/list["+i+"]/injdd", ipt_recdd.value);
- break;
- }
- if(injtm == "") {
- messageBox(i+"번째 주입시간을 기입하지 않았습니다.", "E"); setNullFlag=false;
- break;
- }
- }
- //주입시간이 있을때 주입량 필수!
- if(injtm != "") {
- if(injamtval == "") {
- messageBox(i+"번째 주입량을 기입하지 않았습니다.", "E"); setNullFlag=false;
- break;
- }
- }
-
- //배액량이 있을때 배액일자, 배액시간 필수!
- if(dragamtval != "") {
- if(dragdd == "") {
- messageBox(i+"번째 배액일자를 기입하지 않았습니다.", "E"); setNullFlag=false;
- model.makeValue("/root/main/recordlist/list["+i+"]/dragdd", ipt_recdd.value);
- break;
- }
- if(dragtm == "") {
- messageBox(i+"번째 배액시간을 기입하지 않았습니다.", "E"); setNullFlag=false;
- break;
- }
- }
- //배액시간이 있을때 배액량 필수!
- if(dragtm != "") {
- if(dragamtval == "") {
- messageBox(i+"번째 배액량을 기입하지 않았습니다.", "E"); setNullFlag=false;
- break;
- }
- }
- // if(
- // (prcpcd !="" && pdprcpcd !="") ||
- // ((injtm !="" || injtm != "-") && injdd != "" && injamtval != "") ||
- // ((dragtm !="" || dragtm != "-") && dragdd != "" && dragamtval != "")
- // ) setNullFlag=true;
- }
- // grd_record.refresh();
- //변경된 사항 유무
- var savedata = grd_record.getUpdateData();
- var dataChkIndex=savedata.indexOf("▩");
- var dataChkStr=savedata.substring(dataChkIndex+1);
- if(dataChkStr=="") setIsNotChgFlag=false;
- else setIsNotChgFlag=true;
- //빈칸검수 문제가 없고 변경된 사항이 있다면
- if(setNullFlag==true && setIsNotChgFlag==true) {
- // 기록일자 send로 보내기
- var recdd = model.getValue("/root/main/cond/recdd");
- var rectm = getCurrentTime().substr(0,4);
- model.makeValue("/root/send/save/recdd", recdd);
- model.makeValue("/root/send/save/rectm", rectm);
- // indd, instcd, pid, cretno send로 보내기
- var pid = grd_pid.value;
- var patnum = opt_patnum.value;
- var wardcd = cmb_ward.value;
- var settingrnid = model.getValue("/root/main/cond/settingrnid");
- var roomcd = opt_roomcd.value;
- var instcd, indd, cretno, orddeptcd, orddrid;
-
- if(patnum != "") { // 환자리스트에서 환자를 선택한 경우 -> 재원인 경우
- instcd = model.getValue("/root/main/patinfo/patlist[pid='"+pid+"']/instcd");
- indd = model.getValue("/root/main/patinfo/patlist[pid='"+pid+"']/indd");
- cretno = model.getValue("/root/main/patinfo/patlist[pid='"+pid+"']/cretno");
- orddeptcd = model.getValue("/root/main/patinfo/patlist[pid='"+pid+"']/orddeptcd");
- orddrid = model.getValue("/root/main/patinfo/patlist[pid='"+pid+"']/orddrid");
- } else { // 상단정보에서 환자를 선택한 경우 -> 퇴원환자
- instcd = model.getValue("/root/temp/paminfo/list/instcd");
- indd = model.getValue("/root/temp/paminfo/list/indd");
- cretno = model.getValue("/root/temp/paminfo/list/cretno");
- orddeptcd = model.getValue("/root/temp/paminfo/list/orddeptcd");
- orddrid = model.getValue("/root/temp/paminfo/list/medispclid");
- }
-
- model.makeValue("/root/send/save/pid", pid);
- model.makeValue("/root/send/save/instcd", instcd);
- model.makeValue("/root/send/save/indd", indd);
- model.makeValue("/root/send/save/cretno", cretno);
-
- // 그리드 정보 send로 보내기
- model.makeValue("/root/send/save/savedata", savedata);
- //조회일자를 세팅
- var frstDate = ipt_frstdd.value;
- var lastDate=ipt_lastdd.value;
- var orddd=getCurrentDate();
-
- model.makeValue("/root/send/save/frstdate", frstDate);
- model.makeValue("/root/send/save/lastdate", lastDate);
-
- model.removeNodeset("/root/hidden/recordlist");
- model.makeNode("/root/hidden/recordlist");
-
- for(var i=1; i<grd_record.rows; i++) {
- if(grd_record.rowStatus(i) != "4" ) { //삭제가 아닐경우
- copyNodeListType("/root/hidden/recordlist", "/root/main/recordlist/list["+i+"]", "after");
- }
- }
-
- var status = ""; //삭제여부
- if(getNodesetCount("/root/hidden/recordlist/list") < 1) status = "d";
-
- Sign.certreload = true; //인증저장 재확인
- if(Sign.signprocess()==true) {
- // 1. 환자기본정보 설정(항목 - 가이드/예제 항목 동일)
- model.removeNodeset("/root/send/savedata/signinfo");
- model.makeValue("/root/send/signdata/status" , status); // 삭제여부
- model.makeValue("/root/send/signdata/pid" , pid); // 등록번호
- // 진료일자
- model.makeValue("/root/send/signdata/orddd" , indd);
- model.makeValue("/root/send/signdata/signno" , model.getValue("/root/main/reclist/recinfo/recinfolists/signno")); // 서명번호
- model.makeValue("/root/send/signdata/cretno" , cretno); // 생성번호
- model.makeValue("/root/send/signdata/recdd" , recdd); // 실제 기록이 이루어진 기록일자(통합기록에서 보여짐)
- model.makeValue("/root/send/signdata/rectm" , getCurrentTime()); // 실제 기록이 이루어진 기록시간(통합기록에서 보여짐)
- model.makeValue("/root/send/signdata/recsaveflag" , "Y"); // 전자서명 인적정보 변경여부(기록일시 변경되는 경우 : Y, 그외 : N)
- model.makeValue("/root/send/signdata/signflag" , "02"); // 서명자료구분(01 : 진료, 02 : 간호)
- model.makeValue("/root/send/signdata/signgenrflag", "I"); // 서명발생구분 (코드정의서 M0010 참조)
- model.makeValue("/root/send/signdata/formcd" , "0000002462"); // 각 기록지별 서식코드
- model.makeValue("/root/send/signdata/orddeptcd" , orddeptcd); // 진료부서코드
- model.makeValue("/root/send/signdata/orddrid" , orddrid); // 진료의사ID
-
- model.makeValue("/root/send/signdata/signbfcnts" , Sign.signedInfos[1]); // 인증할 데이터 정보(미기록 노드 제거된 정보)
- model.makeValue("/root/send/signdata/signaftcnts" , Sign.signedInfos[2]); // 공인인증 처리후 데이터
-
- // 2. fMake..함수 : 실제 저장 될 데이터 가공 (grid-노드, 코드값->명칭)
-
- //테이블 저장하는 곳..
- if(submit("TXMNW09001")==true) {
- model.makeValue("/root/send/reqdatawardcd", wardcd);
- model.makeValue("/root/send/reqdatasettingrnid", settingrnid);
- model.makeValue("/root/send/reqdataroomcd", roomcd);
- model.makeValue("/root/send/reqdataindd", indd);
- model.makeValue("/root/send/reqdatainstcd", instcd);
- model.makeValue("/root/send/reqdatapid", pid);
- model.makeValue("/root/send/reqdatacretno", cretno);
- model.makeValue("/root/send/reqdatafrstdate", frstDate);
- model.makeValue("/root/send/reqdatalastdate", lastDate);
-
- // 첫번째 그리드 삭제하기
- model.removeNodeset("/root/main/recordlist");
- model.makeNode("/root/main/recordlist");
-
- // 두번째 그리드 삭제하기
- model.removeNodeset("/root/main/infolist");
- model.makeNode("/root/main/infolist");
-
- model.copyNode("/root/main/infolist", "/root/init/infolist");
-
- var pdetcprcpnm, etcconcennm;
- //기타일 경우 pdprcpcd, concencd를 기타값으로 바꿔준다
- for(var i=1; i<=getNodesetCount("/root/main/infolist/list"); i++) {
- pdetcprcpnm = model.getValue("/root/main/infolist/list["+i+"]/pdetcprcpnm");
- etcconcennm = model.getValue("/root/main/infolist/list["+i+"]/etcconcennm");
-
- if(!(pdetcprcpnm == "" || pdetcprcpnm == null)) {
- model.setValue("/root/main/infolist/list["+i+"]/pdprcpcd", pdetcprcpnm);
- model.setValue("/root/main/infolist/list["+i+"]/prcpcd", "기타");
- }
- if(!(etcconcennm == "" || etcconcennm == null)) {
- model.setValue("/root/main/infolist/list["+i+"]/concencd", etcconcennm);
- }
- }
- grd_info.refresh();
-
- //현재행 날짜
- var rowdate="";
- //비교날짜: 첫번째 행의 날짜
- var tempdate=model.getValue("/root/main/infolist/list[1]/recdd").substr(0, 8);
- var temppid=model.getValue("/root/main/infolist/list[1]/pid");
- var subtotal = 0;
- var dragamtval, injamtval, diff;
-
- //차이, subtotal
- for(var i = 1; i < grd_info.rows; i++){
- dragamtval = model.getValue("/root/main/infolist/list["+i+"]/dragamtval");
- injamtval = model.getValue("/root/main/infolist/list["+i+"]/injamtval");
-
- rowdate = model.getValue("/root/main/infolist/list["+i+"]/recdd").substr(0,8);
- rowpid = model.getValue("/root/main/infolist/list["+i+"]/pid");
-
- //현재행 날짜와 비교날짜를 비교해서 다르면 subtotal을 그만 쌓고 초기화한다.
- if(tempdate != rowdate) {
- subtotal = 0;
- tempdate = rowdate;
- } else if(temppid != rowpid && tempdate == rowdate) {
- subtotal = 0;
- temppid = rowpid;
- }
-
- // if(dragamtval != "" && injamtval != "") { //주입량, 배액량이 둘다 있을 경우에만 차이 계산
- if(model.getValue("/root/main/infolist/list["+i+"]/diff") != "") { //주입량, 배액량이 둘다 있을 경우에만 = 차이가 있을 경우에만 subtotal 계산
- // diff = injamtval - dragamtval ;
- // model.makeValue("/root/main/infolist/list["+i+"]/diff", diff);
- subtotal=Number(subtotal)+Number(model.getValue("/root/main/infolist/list["+i+"]/diff"));
- model.makeValue("/root/main/infolist/list["+i+"]/subtotal", subtotal);
- } else { //주입량, 배액량 중 하나라도 공백이 되면.. 초기화
- model.makeValue("/root/main/infolist/list["+i+"]/diff", "");
- model.makeValue("/root/main/infolist/list["+i+"]/subtotal", "");
- }
- }
- grd_info.refresh();
-
- //현재일자의 기록이 있다면 기록 그리드에 복사
- for(var i=1; i<grd_info.rows; i++) {
- if(ipt_recdd.value == model.getValue("/root/main/infolist/list["+i+"]/recdd").substr(0,8)) {
- copyNodeListType("/root/main/recordlist", "/root/main/infolist/list["+i+"]", "refresh");
- }
- }
- grd_record.clearStatus();
- model.refresh();
- }
- } else {
- alert("인증실패"+Sign.errcode);
- return false;
- }
- }
- ]]>
- </script>
- </button>
- <group id="group6" style="left:0px; top:5px; width:1192px; height:37px; vertical-align:top; ">
- <shape id="roundrect4" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1192px; height:37px; "/>
- <caption id="caption13" class="search_name" style="left:16px; top:10px; width:60px; height:17px; text-align:center; ">병동 :</caption>
- <caption id="caption14" class="search_name" style="left:190px; top:10px; width:71px; height:17px; text-align:center; ">병실 :</caption>
- <select1 id="cmb_ward" ref="/root/main/cond/wardcd" class="combo_search" appearance="minimal" style="left:83px; top:9px; width:100px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/getwardlist/wardlist">
- <label ref="wardnm"/>
- <value ref="wardcd"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- // 첫번째 그리드 삭제하기
- model.removeNodeset("/root/main/recordlist");
- // 두번째 그리드 삭제하기
- model.removeNodeset("/root/main/infolist");
- // 세번째 그리드 삭제하기
- model.removeNodeset("/root/main/patinfo");
-
- model.removenode("/root/send");
-
- //조건들 초기화
-
- model.setValue("/root/main/cond/roomcd", "");
- model.setValue("/root/main/cond/roomnm", "");
- model.setValue("/root/main/cond/patnm", "");
- model.setValue("/root/main/cond/pid", "");
- model.setValue("/root/main/cond/sa", "");
- model.setValue("/root/main/cond/patnum", "");
- model.setValue("/root/main/cond/settingrnid", "");
- model.setValue("/root/main/cond/recdd", getCurrentDate());
-
- var wardcd = model.getValue("/root/main/cond/wardcd");
- model.makeValue("/root/send/reqdata/wardcd", wardcd);
- submit("TRMNW09002"); // 병실정보
- //현재날짜로 세팅
- var currentDate = getCurrentDate();
- ipt_recdd.value = currentDate;
-
- // 날짜값 받아오기
- var recdd = ipt_recdd.value;
- var frstdd = ipt_frstdd.value;
- var lastdd = ipt_lastdd.value;
- model.makeValue("/root/send/reqdata/frstdate", frstdd);
- model.makeValue("/root/send/reqdata/lastdate", lastdd);
- model.makeValue("/root/send/reqdata/orddd", recdd);
-
- //내환자
- for(i = 1; i <= getNodesetCount("/root/init/getwardroomlist/settingrn"); i++ ) {
- if (model.getValue("/root/main/cond/userid") == model.getValue("/root/init/getwardroomlist/settingrn["+ i +"]/settingrnid")) {
- model.setValue("/root/main/cond/settingrnid", model.getValue("/root/main/cond/userid"));
- }
- }
-
- var settingrnid=model.getValue("/root/main/cond/settingrnid");
- model.makeValue("/root/send/reqdata/settingrnid", settingrnid);
-
- submit("TRMNW09003");
-
- model.makeNode("/root/main/patinfo");
- copyNodeListType("/root/main/patinfo", "/root/init/getwardpatinfo/patlist", "replace");
- model.refresh();
- ]]>
- </script>
- </select1>
- <select1 id="cmb_room" ref="/root/main/cond/roomcd" class="combo_search" appearance="minimal" style="left:257px; top:9px; width:69px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/getwardroomlist/roomlist">
- <label ref="roomnm"/>
- <value ref="roomcd"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- // 첫번째 그리드 삭제하기
- model.removeNodeset("/root/main/recordlist");
- // 두번째 그리드 삭제하기
- model.removeNodeset("/root/main/infolist");
- //세번째 그리드 삭제하기
- model.removeNodeset("/root/main/patinfo");
- model.removenode("/root/send");
-
- model.setValue("/root/main/cond/roomnm", "");
- model.setValue("/root/main/cond/patnm", "");
- model.setValue("/root/main/cond/pid", "");
- model.setValue("/root/main/cond/sa", "");
- model.setValue("/root/main/cond/patnum", "");
-
- var wardcd = model.getValue("/root/main/cond/wardcd");
- model.makeValue("/root/send/reqdata/wardcd", wardcd);
-
- var roomcd = model.getValue("/root/main/cond/roomcd");
- if(roomcd!="-") {
- model.makeValue("/root/send/reqdata/roomcd", roomcd);
- }
-
- var settingrnid=model.getValue("/root/main/cond/settingrnid");
- model.makeValue("/root/send/reqdata/settingrnid", settingrnid);
-
- // 날짜값 받아오기
- var orddd = getCurrentDate();
- model.makeValue("/root/send/reqdata/orddd", orddd);
-
- submit("TRMNW09003");
- //현재날짜로 세팅
- var frstdd=ipt_frstdd.value;
- var lastdd=ipt_lastdd.value;
- model.makeValue("/root/send/reqdata/frstdate", frstdd);
- model.makeValue("/root/send/reqdata/lastdate", lastdd);
-
- submit("TRMNW09004");
-
- model.makeNode("/root/main/patinfo");
- copyNodeListType("/root/main/patinfo", "/root/init/getwardpatinfo/patlist", "replace");
- model.refresh();
- ]]>
- </script>
- </select1>
- <select1 id="cmb_settingrn" ref="/root/main/cond/settingrnid" class="combo_search" appearance="minimal" style="left:400px; top:8px; width:75px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/getwardroomlist/settingrn">
- <label ref="settingrnnm"/>
- <value ref="settingrnid"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- // 첫번째 그리드 삭제하기
- model.removeNodeset("/root/main/recordlist");
- // 두번째 그리드 삭제하기
- model.removeNodeset("/root/main/infolist");
- //세번째 그리드 삭제하기
- model.removeNodeset("/root/main/patinfo");
-
- model.removenode("/root/send");
-
- model.setValue("/root/main/cond/recdd", getCurrentDate());
- model.setValue("/root/main/cond/roomnm", "");
- model.setValue("/root/main/cond/patnm", "");
- model.setValue("/root/main/cond/pid", "");
- model.setValue("/root/main/cond/sa", "");
- model.setValue("/root/main/cond/patnum", "");
-
- var wardcd = model.getValue("/root/main/cond/wardcd");
- model.makeValue("/root/send/reqdata/wardcd", wardcd);
-
- var roomcd = model.getValue("/root/main/cond/roomcd");
- if(roomcd!="-") {
- model.makeValue("/root/send/reqdata/roomcd", roomcd);
- }
-
- var settingrnid=model.getValue("/root/main/cond/settingrnid");
- model.makeValue("/root/send/reqdata/settingrnid", settingrnid);
-
- // 날짜값 받아오기
- var orddd = getCurrentDate();
- model.makeValue("/root/send/reqdata/orddd", orddd);
- model.makeValue("/root/send/reqdata/orddd", orddd);
-
- submit("TRMNW09003");
- //현재날짜로 세팅
- var frstdd=ipt_frstdd.value;
- var lastdd=ipt_lastdd.value;
- model.makeValue("/root/send/reqdatafrstdate", frstdd);
- model.makeValue("/root/send/reqdatalastdate", lastdd);
-
- submit("TRMNW09004");
-
- model.makeNode("/root/main/patinfo");
- copyNodeListType("/root/main/patinfo", "/root/init/getwardpatinfo/patlist", "replace");
- model.refresh();
- ]]>
- </script>
- </select1>
- <caption id="caption9" class="search_name" style="left:332px; top:9px; width:75px; height:17px; ">내환자:</caption>
- <line id="line2" class="line_4" style="x1:1105px; y1:7px; x2:1105px; y2:29px; "/>
- <button id="btn_search2" class="btn1_letter2" disable.background-image="../../../com/commonweb/images/dis_btn5_letter4.gif" style="left:1121px; top:7px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- btn_search.dispatch("DOMActivate");
- ]]>
- </script>
- </button>
- <button id="btn_print" class="btn1_letter2" visibility="hidden" style="left:1121px; top:7px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
- <caption>출력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- /*
- ****************************************************************
- * 임미정 선생님 요청으로 출력 기능 제외 by 2010-03-12
- ****************************************************************
- */
- model.removeNodeset("/root/send");
- model.makeNode("/root/send/infolist");
-
- //send 재구성
- model.copyNode("/root/send/infolist", "/root/main/infolist");
-
- for(var i=1; i<=getNodesetCount("/root/send/infolist/list"); i++) {
- if(model.getValue("/root/send/infolist/list["+i+"]/etcconcennm") == "")
- model.makeValue("/root/send/infolist/list["+i+"]/concennm", model.getValue("/root/init/M0561list/M0561[cdid='"+model.getValue("/root/send/infolist/list["+i+"]/concencd")+"']/cdnm"));
- else
- model.makeValue("/root/send/infolist/list["+i+"]/concennm", model.getValue("/root/send/infolist/list["+i+"]/concencd"));
- if(model.getValue("/root/send/infolist/list["+i+"]/prcpcd") != "기타")
- model.makeValue("/root/send/infolist/list["+i+"]/pdprcpnm", model.getValue("/root/init/dialliqd/list[prcpcd='"+model.getValue("/root/send/infolist/list["+i+"]/pdprcpcd")+"']/prcpnm"));
- else model.makeValue("/root/send/infolist/list["+i+"]/pdprcpnm", model.getValue("/root/send/infolist/list["+i+"]/pdprcpcd"));
-
- model.makeValue("/root/send/infolist/list["+i+"]/sa", model.getValue("/root/main/cond/sa"));
- }
-
- exeReportPreview("RPMNW09000", "XMLSTR");
- ]]>
- </script>
- </button>
- </group>
- <caption id="caption1" class="tit_2" style="left:0px; top:53px; width:100px; height:13px; ">환자리스트</caption>
- <output id="opt_patnum" ref="/root/main/cond/patnum" class="input_default" visibility="hidden" style="left:94px; top:50px; width:55px; height:19px; "/>
- <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:180px; y2:70px; "/>
- <datagrid id="grd_patlist" nodeset="/root/main/patinfo/patlist" autoresize="true" caption="병실^환자명" colsep="^" colwidth="50, 112" ellipsis="true" extendlastcol="scroll" mergecells="bycol" mergecellsfixedrows="bycolrec" rowheader="select" rowsep="|" tooltip="true" style="left:0px; top:75px; width:180px; height:688px; ">
- <col ref="roomcd"/>
- <col ref="patnm"/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- // 첫번째 그리드 삭제하기
- model.removeNodeset("/root/main/recordlist");
- model.makeNode("/root/main/recordlist");
- // 두번째 그리드 삭제하기
- model.removeNodeset("/root/main/infolist");
- model.makeNode("/root/main/infolist");
- //send초기화
- model.removeNodeset("/root/send");
-
- //환자리스트의 row
- var row = grd_patlist.row;
- opt_patnum.value=row;
-
- var wardcd = model.getValue("/root/main/patinfo/patlist["+row+"]/wardcd");
- var roomcd = model.getValue("/root/main/patinfo/patlist["+row+"]/roomcd");
- //기록환자 세팅
- var pid = model.getValue("/root/main/patinfo/patlist["+row+"]/pid");
- var patnm = model.getValue("/root/main/patinfo/patlist["+row+"]/patnm");
- var sa = model.getValue("/root/main/patinfo/patlist["+row+"]/sa");
- var indd = model.getValue("/root/main/patinfo/patlist["+row+"]/indd");
- var instcd = model.getValue("/root/main/patinfo/patlist["+row+"]/instcd");
- var pid = model.getValue("/root/main/patinfo/patlist["+row+"]/pid");
- var cretno = model.getValue("/root/main/patinfo/patlist["+row+"]/cretno");
-
- model.makeValue("/root/send/reqdata/wardcd", wardcd);
- model.makeValue("/root/send/reqdata/roomcd", roomcd);
- // indd, instcd, pid, cretno send로 보내기
- model.makeValue("/root/send/reqdata/indd", indd);
- model.makeValue("/root/send/reqdata/instcd", instcd);
- model.makeValue("/root/send/reqdata/pid", pid);
- model.makeValue("/root/send/reqdata/cretno", cretno);
-
- model.makeValue("/root/main/cond/roomnm", roomcd);
- model.makeValue("/root/main/cond/pid", pid);
- model.makeValue("/root/main/cond/patnm", patnm);
- model.makeValue("/root/main/cond/sa", sa);
- //환자리스트 및
- model.makeNode("/root/main/patinfo");
- copyNodeListType("/root/main/patinfo", "/root/init/getwardpatinfo/patlist", "replace");
-
- //투석액 리스트 가져오기
- submit("TRMNW09005");
-
- //현재날짜로 세팅
- var currentDate = getCurrentDate();
- ipt_recdd.value = currentDate;
-
- // 날짜값 받아오기
- var recdd = ipt_recdd.value;
- var frstdd = ipt_frstdd.value;
- var lastdd = ipt_lastdd.value;
-
- model.makeValue("/root/send/reqdata/frstdate", frstdd);
- model.makeValue("/root/send/reqdata/lastdate", lastdd);
-
- //상단정보 세팅
- var ordtype = model.getValue("/root/main/patinfo/patlist["+row+"]/ordtype");
- var param = ordtype+"▦"+pid+"▦"+indd+"▦"+cretno+"▦"+instcd+"▦"+recdd;
- setParameter("condparam", param);
- modal("SPMMO08900", 1, 0, 0, "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
-
- submit("TRMNW09004");
-
- model.copyNode("/root/main/infolist", "/root/init/infolist");
-
- //기타일 경우 pdprcpcd, concencd를 기타값으로 바꿔준다
- var pdetcprcpnm, etcconcennm;
- //차이, subtotal
- //현재행 날짜
- var rowdate="";
- //비교날짜: 첫번째 행의 날짜
- var tempdate=model.getValue("/root/main/infolist/list[1]/recdd");
- var temppid=model.getValue("/root/main/infolist/list[1]/pid");
- var subtotal = 0;
- var dragamtval, injamtval, diff;
-
- for(var i=1; i<=getNodesetCount("/root/main/infolist/list"); i++) {
- pdetcprcpnm = model.getValue("/root/main/infolist/list["+i+"]/pdetcprcpnm");
- etcconcennm = model.getValue("/root/main/infolist/list["+i+"]/etcconcennm");
-
- if(!(pdetcprcpnm == "" || pdetcprcpnm == null)) {
- model.setValue("/root/main/infolist/list["+i+"]/pdprcpcd", pdetcprcpnm);
- model.setValue("/root/main/infolist/list["+i+"]/prcpcd", "기타");
- }
- if(!(etcconcennm == "" || etcconcennm == null)) {
- model.setValue("/root/main/infolist/list["+i+"]/concencd", etcconcennm);
- }
-
- dragamtval = model.getValue("/root/main/infolist/list["+i+"]/dragamtval");
- injamtval = model.getValue("/root/main/infolist/list["+i+"]/injamtval");
-
- rowdate = model.getValue("/root/main/infolist/list["+i+"]/recdd").substr(0,8);
- rowpid = model.getValue("/root/main/infolist/list["+i+"]/pid");
-
- //현재행 날짜와 비교날짜를 비교해서 다르면 subtotal을 그만 쌓고 초기화한다.
- if(tempdate != rowdate) {
- subtotal = 0;
- tempdate = rowdate;
- } else if(temppid != rowpid && tempdate == rowdate) {
- subtotal = 0;
- temppid = rowpid;
- }
-
- // if(dragamtval != "" && injamtval != "") { //주입량, 배액량이 둘다 있을 경우에만 차이 계산
- if(model.getValue("/root/main/infolist/list["+i+"]/diff") != "") { //주입량, 배액량이 둘다 있을 경우에만 = 차이가 있을 경우에만 subtotal 계산
- // diff = injamtval - dragamtval ;
- // model.makeValue("/root/main/infolist/list["+i+"]/diff", diff);
- subtotal=Number(subtotal)+Number(model.getValue("/root/main/infolist/list["+i+"]/diff"));
- model.makeValue("/root/main/infolist/list["+i+"]/subtotal", subtotal);
- } else { //주입량, 배액량 중 하나라도 공백이 되면.. 초기화
- model.makeValue("/root/main/infolist/list["+i+"]/diff", "");
- model.makeValue("/root/main/infolist/list["+i+"]/subtotal", "");
- }
- }
- grd_info.refresh();
-
- for(var i=1; i < grd_info.rows; i++) {
- //tooltip변경
- grd_info.tooltipText(i, grd_info.colRef("pdprcpcd") ) = model.getValue("/root/init/dialliqd/list[prcpcd='"+model.getValue("/root/main/infolist/list["+i+"]/pdprcpcd")+"']/prcpnm");
- grd_info.tooltipText(i, grd_info.colRef("concencd") ) = model.getValue("/root/init/M0561list/M0561[cdid='"+model.getValue("/root/main/infolist/list["+i+"]/concencd")+"']/cdnm");
- }
-
- //해당날짜일 경우 레코드 그리드로 올림
- for(var i=1; i<grd_info.rows; i++) {
- if(ipt_recdd.value == model.getValue("/root/main/infolist/list["+i+"]/recdd").substr(0,8)) {
- copyNodeListType("/root/main/recordlist", "/root/main/infolist/list["+i+"]", "after");
- }
- }
- grd_record.refresh();
-
- for(var i=1; i < grd_record.rows; i++) {
- grd_record.tooltipText(i, grd_record.colRef("pdprcpcd") ) = model.getValue("/root/init/dialliqd/list[prcpcd='"+model.getValue("/root/main/recordlist/list["+i+"]/pdprcpcd")+"']/prcpnm");
- grd_record.tooltipText(i, grd_record.colRef("concencd") ) = model.getValue("/root/init/M0561list/M0561[cdid='"+model.getValue("/root/main/recordlist/list["+i+"]/concencd")+"']/cdnm");
- if( (i % 2) == 1)
- grd_record.rowStyle(i, "data", "background-color") = "#FFFFFF";
- else
- grd_record.rowStyle(i, "data", "background-color") = "#F4F4F4";
- }
-
- model.refresh();
- ]]>
- </script>
- </datagrid>
- <caption id="caption19" class="cell_1" style="left:193px; top:45px; width:55px; height:23px; text-align:center; ">업무일자</caption>
- <input id="ipt_recdd" ref="/root/main/cond/recdd" class="input_default" inputtype="date" style="left:250px; top:47px; width:100px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- /*
- ***********************************************************
- ** 날짜 변경은 등록번호(pid)가 있을 경우에 가능하도록 한다.
- * 1. 환자번호가 없을 경우 messageBox 띄운 후 현재 날짜로 지정
- * 2. 환자번호가 있을 경우 재원기간 내에서 조회가능
- ***********************************************************
- */
- //환자정보
- var wardcd = cmb_ward.value;
- var roomcd = opt_roomcd.value;
- var pid = grd_pid.value;
- var patnm = opt_patnm.value;
- var patnum = opt_patnum.value;
- var indd, dschdd;
-
- //기록 날짜 정보
- var recdd = ipt_recdd.value;
- var frstDate = recdd;
- var lastDate = recdd;
- if(pid == "") { // 선택된 환자가 없을 경우
- messageBox("환자정보가 ", "I004");
- ipt_recdd.value = getCurrentDate();
- } else {
- if(patnum != "") { // 환자리스트에서 환자를 선택한경우 -> 재원인 경우
- indd = model.getValue("/root/main/patinfo/patlist[pid='"+pid+"']/indd");
- dschdd = model.getValue("/root/main/patinfo/patlist[pid='"+pid+"']/dschdd");
- wardcd = model.getValue("/root/main/patinfo/patlist[pid='"+pid+"']/wardcd");
- roomcd = model.getValue("/root/main/patinfo/patlist[pid='"+pid+"']/roomcd");
- settingrnid = model.getValue("/root/main/cond/settingrnid");
- instcd = model.getValue("/root/main/patinfo/patlist[pid='"+pid+"']/instcd");
- cretno = model.getValue("/root/main/patinfo/patlist[pid='"+pid+"']/cretno");
- } else { // 상단정보에서 환자를 선택한 경우 -> 퇴원환자인 경우
- indd = model.getValue("/root/temp/paminfo/list/indd");
- dschdd = model.getValue("/root/temp/paminfo/list/dschdd");
- wardcd = model.getValue("/root/temp/paminfo/list/wardcd");
- roomcd = model.getValue("/root/temp/paminfo/list/roomcd");
- settingrnid = model.getValue("/root/main/cond/settingrnid");
- instcd = model.getValue("/root/temp/paminfo/list/instcd");
- cretno = model.getValue("/root/temp/paminfo/list/cretno");
- }
- if(!(recdd >= indd && recdd <= dschdd)) { //기록날짜가 재원기간을 벗어나면..
- messageBox("["+patnm+"]님의 기록가능한 날짜는 " +indd.substr(0,4)+"-"+indd.substr(4,2)+"-"+indd.substr(6,2)+"일에서 "
- +dschdd.substr(0,4)+"-"+dschdd.substr(4,2)+"-"+dschdd.substr(6,2)+"일입니다.\n선택하신 날짜는 기록을", "E001");
- ipt_recdd.value = getCurrentDate();
- } else { // 벗어나지 않을때..
- //send 초기화
- model.removeNodeset("/root/send");
-
- model.makeValue("/root/send/reqdata/wardcd", wardcd);
- model.makeValue("/root/send/reqdata/settingrnid", settingrnid);
- model.makeValue("/root/send/reqdata/roomcd", roomcd);
- model.makeValue("/root/send/reqdata/indd", indd);
- model.makeValue("/root/send/reqdata/instcd", instcd);
- model.makeValue("/root/send/reqdata/pid", pid);
- model.makeValue("/root/send/reqdata/cretno", cretno);
- model.makeValue("/root/send/reqdata/frstdate", frstDate);
- model.makeValue("/root/send/reqdata/lastdate", lastDate);
-
- if(pid!="") { //환자정보가 있을경우 레코드 그리드에 해당 기록을 가져온다
- submit("TRMNW09004");
-
- // 첫번째 그리드 삭제하기
- model.removeNodeset("/root/main/recordlist");
- model.makeNode("/root/main/recordlist");
-
- model.copyNode("/root/main/recordlist", "/root/init/infolist");
-
- var pdetcprcpnm, etcconcennm;
- //기타일 경우 pdprcpcd, concencd를 기타값으로 바꿔준다
- for(var i=1; i<=getNodesetCount("/root/main/recordlist/list"); i++) {
- pdetcprcpnm = model.getValue("/root/main/recordlist/list["+i+"]/pdetcprcpnm");
- etcconcennm = model.getValue("/root/main/recordlist/list["+i+"]/etcconcennm");
-
- if(!(pdetcprcpnm == "" || pdetcprcpnm == null)) {
- model.setValue("/root/main/recordlist/list["+i+"]/pdprcpcd", pdetcprcpnm);
- model.setValue("/root/main/recordlist/list["+i+"]/prcpcd", "기타");
- }
- if(!(etcconcennm == "" || etcconcennm == null)) {
- model.setValue("/root/main/recordlist/list["+i+"]/concencd", etcconcennm);
- }
- }
-
- grd_record.refresh();
-
- var subtotal = 0;
- var dragamtval, injamtval, diff;
-
- //차이, subtotal
- for(var i = 1; i < grd_record.rows; i++){
- dragamtval = model.getValue("/root/main/recordlist/list["+i+"]/dragamtval");
- injamtval = model.getValue("/root/main/recordlist/list["+i+"]/injamtval");
- if(dragamtval != "" && injamtval != "") { //주입량, 배액량이 둘다 있을 경우에만 차이 계산
- diff = injamtval - dragamtval ;
- model.makeValue("/root/main/recordlist/list["+i+"]/diff", diff);
- subtotal=Number(subtotal)+Number(model.getValue("/root/main/recordlist/list["+i+"]/diff"));
- model.makeValue("/root/main/recordlist/list["+i+"]/subtotal", subtotal);
- } else { //주입량, 배액량 중 하나라도 공백이 되면.. 초기화
- model.makeValue("/root/main/recordlist/list["+i+"]/diff", "");
- model.makeValue("/root/main/recordlist/list["+i+"]/subtotal", "");
- }
- //원처벙코드 저장
- orgPrcpcd[i] = model.getValue("/root/main/recordlist/list["+i+"]/prcpcd");
- //tooltip 변경
- grd_record.tooltipText(i, grd_record.colRef("pdprcpcd") ) = model.getValue("/root/init/dialliqd/list[prcpcd='"+model.getValue("/root/main/recordlist/list["+i+"]/pdprcpcd")+"']/prcpnm");
- grd_record.tooltipText(i, grd_record.colRef("concencd") ) = model.getValue("/root/init/M0561list/M0561[cdid='"+model.getValue("/root/main/recordlist/list["+i+"]/concencd")+"']/cdnm");
- }
- }
- model.refresh();
- }
- }
-
- ]]>
- </script>
- </input>
- <caption id="caption2" class="cell_1" style="left:355px; top:45px; width:40px; height:23px; text-align:center; ">병실</caption>
- <output id="opt_roomcd" ref="/root/main/cond/roomnm" class="input_default" style="left:397px; top:46px; width:55px; height:19px; "/>
- <caption id="caption16" class="cell_1" style="left:456px; top:45px; width:50px; height:23px; text-align:center; ">환자명</caption>
- <output id="opt_patnm" ref="/root/main/cond/patnm" class="input_default" style="left:507px; top:46px; width:80px; height:19px; "/>
- <caption id="caption17" class="cell_1" style="left:591px; top:45px; width:55px; height:23px; text-align:center; ">등록번호</caption>
- <output id="grd_pid" ref="/root/main/cond/pid" class="input_default" style="left:648px; top:46px; width:80px; height:19px; "/>
- <caption id="caption18" class="cell_1" style="left:732px; top:45px; width:40px; height:23px; text-align:center; ">S/A</caption>
- <output id="opt_sa" ref="/root/main/cond/sa" class="input_default" style="left:774px; top:46px; width:55px; height:19px; "/>
- <line id="line4" class="line_1" style="x1:190px; y1:70px; x2:1194px; y2:70px; "/>
- <datagrid id="grd_record" nodeset="/root/main/recordlist/list" class="datagrid2" caption="wardcd^roomcd^patnm^pid^recdd^일시^처방코드^투석액^농도(%)^횟차^주입일자^주입
시간^주입량(ml)^배액일자^배액
시간^배액량(ml)^차이^subtotal^비고^RECSEQ^pdetcprcpnm^concennm^lastupdtrid^status" colsep="^" colwidth="0, 0, 0, 0, 0, 0, 70, 200, 70, 40, 85, 40, 75, 85, 40, 75, 75, 75, 276, 0, 0, 0, 0, 0" ellipsis="true" frozencols="9" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" tooltip="true" style="left:190px; top:75px; width:1004px; height:257px; ">
- <col ref="wardcd" visibility="hidden"/>
- <col ref="roomcd" visibility="hidden"/>
- <col ref="patnm" visibility="hidden"/>
- <col ref="pid" visibility="hidden"/>
- <col ref="recdd" visibility="hidden"/>
- <col ref="rectm" visibility="hidden"/>
- <col ref="prcpcd" type="combo">
- <choices>
- <itemset nodeset="/root/init/dialliqd/list">
- <label ref="prcpcd"/>
- <value ref="prcpcd"/>
- </itemset>
- </choices>
- </col>
- <col editmode="input" ref="pdprcpcd" type="combo">
- <choices>
- <itemset nodeset="/root/init/dialliqd/list">
- <label ref="prcpnm"/>
- <value ref="prcpcd"/>
- </itemset>
- </choices>
- </col>
- <col editmode="input" ref="concencd" type="combo" style="text-align:right; ">
- <choices>
- <itemset nodeset="/root/init/M0561list/M0561">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="timscd" type="input" format="99" style="text-align:right; "/>
- <col ref="injdd" type="inputdate"/>
- <col ref="injtm" type="input" format="hh:nn" style="text-align:right; "/>
- <col ref="injamtval" type="input" format="999,999" style="text-align:right; "/>
- <col ref="dragdd" type="inputdate"/>
- <col ref="dragtm" type="input" format="hh:nn" style="text-align:right; "/>
- <col ref="dragamtval" type="input" format="999,999" style="text-align:right; "/>
- <col ref="diff" format="999999" style="text-align:right; "/>
- <col ref="subtotal" format="999999" style="text-align:right; "/>
- <col ref="cmt" type="input" style="text-align:left; "/>
- <col ref="recseq" visibility="hidden"/>
- <col ref="pdetcprcpnm" visibility="hidden"/>
- <col ref="etcconcennm" visibility="hidden"/>
- <col ref="lastupdtrid" visibility="hidden"/>
- <col ref="status" visibility="hidden"/>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- //현재행
- var recrow=grd_record.row;
-
- if(grd_record.col == grd_record.colRef("injamtval") || grd_record.col == grd_record.colRef("dragamtval")) {
- //현재행 날짜
- var rowdate="";
- //비교날짜: 첫번째 행의 날짜
- var tempdate=ipt_recdd.value.substr(0,8);
- var subtotal = 0;
- var dragamtval, injamtval, diff;
-
- //차이, subtotal
- for(var i = 1; i < grd_record.rows; i++){
- dragamtval = model.getValue("/root/main/recordlist/list["+i+"]/dragamtval");
- injamtval = model.getValue("/root/main/recordlist/list["+i+"]/injamtval");
-
- if(dragamtval != "" && injamtval != "") { //주입량, 배액량이 둘다 있을 경우에만 차이 계산
- diff = injamtval - dragamtval ;
- model.makeValue("/root/main/recordlist/list["+i+"]/diff", diff);
- subtotal=Number(subtotal)+Number(model.getValue("/root/main/recordlist/list["+i+"]/diff"));
-
- model.makeValue("/root/main/recordlist/list["+i+"]/subtotal", subtotal);
-
- } else { //주입량, 배액량 중 하나라도 공백이 되면.. 초기화
- model.makeValue("/root/main/recordlist/list["+i+"]/diff", "");
- model.makeValue("/root/main/recordlist/list["+i+"]/subtotal", "");
- }
- }
- } else if(grd_record.col == grd_record.colRef("prcpcd") || grd_record.col == grd_record.colRef("pdprcpcd")) {
-
- //투석액 기타값 입력시
- var pdprcpcd = model.getValue("/root/main/recordlist/list["+recrow+"]/pdprcpcd");
- var pdetcprcpnm = model.getValue("/root/main/recordlist/list["+recrow+"]/pdetcprcpnm");
- var prcpcd = model.getValue("/root/main/recordlist/list["+recrow+"]/prcpcd");
-
- // prcpcd가 infolist에 있던 정보와 다르면..
- if(prcpcd != orgPrcpcd[recrow]) {
- orgPrcpcd[recrow] = prcpcd;
- pdprcpcd = prcpcd;
- model.setValue("/root/main/recordlist/list["+recrow+"]/pdprcpcd", prcpcd);
- }
- //pdprcpcd가 infolist에 있던 정보와 다르면..
- if(pdprcpcd != orgPrcpcd[recrow]) {
- var etcflag = true;
- //처방리스트에 있는 목록이 아니면..(기타)
- for(var i=1; i<=getNodesetCount("/root/init/dialliqd/list"); i++) {
- if(pdprcpcd == model.getValue("/root/init/dialliqd/list["+i+"]/prcpcd")) {
- etcflag = false;
- break;
- }
- }
- if(etcflag) { //기타값이면..
- orgPrcpcd[recrow] = "기타";
- prcpcd = "기타";
- model.setValue("/root/main/recordlist/list["+recrow+"]/prcpcd", prcpcd);
- } else {
- orgPrcpcd[recrow] = pdprcpcd;
- prcpcd = pdprcpcd;
- model.setValue("/root/main/recordlist/list["+recrow+"]/prcpcd", pdprcpcd);
- }
- }
- grd_record.refresh();
-
- for(var i = 1; i < grd_record.rows; i++) {
- grd_record.tooltipText(i, grd_record.colRef("pdprcpcd") ) = model.getValue("/root/init/dialliqd/list[prcpcd='"+model.getValue("/root/main/recordlist/list["+i+"]/pdprcpcd")+"']/prcpnm");
- grd_record.tooltipText(i, grd_record.colRef("concencd") ) = model.getValue("/root/init/M0561list/M0561[cdid='"+model.getValue("/root/main/recordlist/list["+i+"]/concencd")+"']/cdnm");
- }
-
- //투석액 기타값 처리사항
- if(pdprcpcd == "기타" && pdetcprcpnm == "") { //기타값 처음 입력시
- group2.visible = "false";
- ipt_pdetcprcpnm.value = "";
-
- group2.attribute("top") = 131+(23*(recrow-grd_record.topRow));
-
- group2.visible = "true";
- model.setFocus("ipt_pdetcprcpnm");
- } else if (pdprcpcd == "기타" && pdetcprcpnm != "") { //기타값 재입력시
- group2.visible = "false";
- ipt_pdetcprcpnm.value = model.getValue("/root/main/recordlist/list["+recrow+"]/pdetcprcpnm");
-
- group2.attribute("top") = 131+(23*(recrow-grd_record.topRow));
-
- group2.visible = "true";
- model.setFocus("ipt_pdetcprcpnm");
- } else if (model.getValue("/root/init/dialliqd/list[prcpcd='"+pdprcpcd+"']/prcpnm") != "") { //기타값 이외의 값이 입력시 기타값 초기화
- ipt_pdetcprcpnm.value = "";
- model.setValue("/root/main/recordlist/list["+recrow+"]/pdetcprcpnm", "");
- } else if (model.getValue("/root/init/dialliqd/list[prcpcd='"+pdprcpcd+"']/prcpnm") == "") { //직접 값을 입력할 시
- var pdetcprcpnm = model.getValue("/root/main/recordlist/list["+recrow+"]/pdprcpcd");
- model.setValue("/root/main/recordlist/list["+recrow+"]/pdetcprcpnm", pdetcprcpnm);
- ipt_pdetcprcpnm.value=pdetcprcpnm;
- }
- } else if(grd_record.col == grd_record.colRef("concencd")) {
-
- //농도 기타값 입력시
- var concencd = model.getValue("/root/main/recordlist/list["+recrow+"]/concencd");
- var etcconcennm = model.getValue("/root/main/recordlist/list["+recrow+"]/etcconcennm");
-
- //농도 기타값 처리사항
- if(parseFloat(etcconcennm) >100.000) { // 기타값이 두자리수(99.999) 이상이면 초기화, 재입력
- messageBox("농도값은 100을 넘을 수 없습니다.", "");
- model.setValue("/root/main/recordlist/list["+recrow+"]/concencd", "08");
- model.setValue("/root/main/recordlist/list["+recrow+"]/etcconcennm", "");
- group5.visible = "false";
- ipt_etcconcennm.value = "";
-
- group5.attribute("top") = 131+(23*(recrow-grd_record.topRow));
-
- group5.visible = "true";
- model.setFocus("ipt_etcconcennm");
- } else {
- if(concencd == "08" && etcconcennm == "") { //기타값 처음 입력시
- group5.visible = "false";
- ipt_etcconcennm.value = "";
-
- group5.attribute("top") = 131+(23*(recrow-grd_record.topRow));
-
- group5.visible = "true";
- model.setFocus("ipt_etcconcennm");
- } else if (concencd == "08" && etcconcennm != "") { //기타값 재입력시
-
- group5.visible = "false";
- ipt_etcconcennm.value = model.getValue("/root/main/recordlist/list["+recrow+"]/etcconcennm");
-
- group5.attribute("top") = 131+(23*(recrow-grd_record.topRow));
-
- group5.visible = "true";
- model.setFocus("ipt_etcconcennm");
- } else if (model.getValue("/root/init/M0561list/M0561[cdid='"+concencd+"']/cdnm") != "") { //기타값 이외의 값이 입력시 기타값 초기화
- ipt_etcconcennm.value = "";
- model.setValue("/root/main/recordlist/list["+recrow+"]/etcconcennm", "");
- } else if (model.getValue("/root/init/M0561list/M0561[cdid='"+concencd+"']/cdnm") == "") { //직접 값을 입력할 시
- var etcconcennm = model.getValue("/root/main/recordlist/list["+recrow+"]/concencd");
- model.setValue("/root/main/recordlist/list["+recrow+"]/etcconcennm", etcconcennm);
- ipt_etcconcennm.value=etcconcennm;
- }
- }
- }
- model.refresh();
-
- ]]>
- </script>
- <script type="javascript" ev:event="onendedit">
- <![CDATA[
- //시간 수정시 체크
- var curRow = grd_record.row;
- var injtm = model.getValue("/root/main/recordlist/list["+curRow+"]/injtm");
- var dragtm = model.getValue("/root/main/recordlist/list["+curRow+"]/dragtm");
- if(injtm != "") {
- fCheckTime("injtm");
- }
- if(dragtm != "") {
- fCheckTime("dragtm");
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- // for(var i = 1; i < grd_record.rows; i++) {
- // if( (i % 2) == 1)
- // grd_record.rowStyle(i, "data", "background-color") = "#FFFFFF";
- // else
- // grd_record.rowStyle(i, "data", "background-color") = "#F4F4F4";
- // }
- ]]>
- </script>
- </datagrid>
- <group id="group4" style="left:190px; top:340px; width:1002px; height:35px; vertical-align:top; ">
- <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1002px; height:35px; "/>
- <caption id="caption11" class="search_name" style="left:16px; top:10px; width:86px; height:17px; ">업무일자 :</caption>
- <button id="btn_search" class="btn1_letter2" disable.background-image="../../../com/commonweb/images/dis_btn5_letter4.gif" style="left:931px; top:7px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //send 초기화
- model.removeNodeset("/root/send");
-
- var pid = grd_pid.value;
- var patnum = opt_patnum.value;
- var wardcd = cmb_ward.value;
- var settingrnid = model.getValue("/root/main/cond/settingrnid");
- var roomcd = opt_roomcd.value;
- var instcd, indd, cretno;
-
- if(patnum != "") { // 환자리스트에서 환자를 선택한 경우 -> 재원인 경우
- instcd = model.getValue("/root/main/patinfo/patlist[pid='"+pid+"']/instcd");
- indd = model.getValue("/root/main/patinfo/patlist[pid='"+pid+"']/indd");
- cretno = model.getValue("/root/main/patinfo/patlist[pid='"+pid+"']/cretno");
- } else { // 상단정보에서 환자를 선택한 경우 -> 퇴원환자
- instcd = model.getValue("/root/temp/paminfo/list/instcd");
- indd = model.getValue("/root/temp/paminfo/list/indd");
- cretno = model.getValue("/root/temp/paminfo/list/cretno");
- }
-
- //조회일자를 세팅
- var frstDate = ipt_frstdd.value;
- var lastDate = ipt_lastdd.value;
- var recdd = ipt_recdd.value;
-
- model.makeValue("/root/send/reqdata/wardcd", wardcd);
- model.makeValue("/root/send/reqdata/settingrnid", settingrnid);
- model.makeValue("/root/send/reqdata/roomcd", roomcd);
- model.makeValue("/root/send/reqdata/indd", indd);
- model.makeValue("/root/send/reqdata/instcd", instcd);
- model.makeValue("/root/send/reqdata/pid", pid);
- model.makeValue("/root/send/reqdata/cretno", cretno);
- model.makeValue("/root/send/reqdata/frstdate", frstDate);
- model.makeValue("/root/send/reqdata/lastdate", lastDate);
-
- if(pid!="") {
- submit("TRMNW09004");
-
- // 첫번째 그리드 삭제하기
- model.removeNodeset("/root/main/recordlist");
- model.makeNode("/root/main/recordlist");
-
- // 두번째 그리드 삭제하기
- model.removeNodeset("/root/main/infolist");
- model.makeNode("/root/main/infolist");
-
- model.copyNode("/root/main/infolist", "/root/init/infolist");
-
- //기타일 경우 pdprcpcd, concencd를 기타값으로 바꿔준다
- var pdetcprcpnm, etcconcennm;
-
- //현재행 날짜
- var rowdate = "";
- //비교날짜: 첫번째 행의 날짜
- var tempdate = model.getValue("/root/main/infolist/list[1]/recdd").substr(0.8);
- var temppid = model.getValue("/root/main/infolist/list[1]/pid");
- var subtotal = 0;
- var dragamtval, injamtval, diff;
-
- for(var i=1; i<=getNodesetCount("/root/main/infolist/list"); i++) {
- //기타일 경우 pdprcpcd, concencd를 기타값으로 바꿔준다
- pdetcprcpnm = model.getValue("/root/main/infolist/list["+i+"]/pdetcprcpnm");
- etcconcennm = model.getValue("/root/main/infolist/list["+i+"]/etcconcennm");
-
- if(!(pdetcprcpnm == "" || pdetcprcpnm == null)) {
- model.setValue("/root/main/infolist/list["+i+"]/pdprcpcd", pdetcprcpnm);
- model.setValue("/root/main/infolist/list["+i+"]/prcpcd", "기타");
- }
- if(!(etcconcennm == "" || etcconcennm == null)) {
- model.setValue("/root/main/infolist/list["+i+"]/concencd", etcconcennm);
- }
-
- //차이, subtotal
- dragamtval = model.getValue("/root/main/infolist/list["+i+"]/dragamtval");
- injamtval = model.getValue("/root/main/infolist/list["+i+"]/injamtval");
-
- rowdate = model.getValue("/root/main/infolist/list["+i+"]/recdd").substr(0,8);
- rowpid = model.getValue("/root/main/infolist/list["+i+"]/pid");
-
- //현재행 날짜와 비교날짜를 비교해서 다르면 subtotal을 그만 쌓고 초기화한다.
- if(tempdate != rowdate) {
- subtotal = 0;
- tempdate = rowdate;
- } else if(temppid != rowpid && tempdate == rowdate) {
- subtotal = 0;
- temppid = rowpid;
- }
- // if(dragamtval != "" && injamtval != "") { //주입량, 배액량이 둘다 있을 경우에만 차이 계산
- if(model.getValue("/root/main/infolist/list["+i+"]/diff") != "") { //주입량, 배액량이 둘다 있을 경우에만 = 차이가 있을 경우에만 subtotal 계산
- // diff = injamtval - dragamtval ;
- // model.makeValue("/root/main/infolist/list["+i+"]/diff", diff);
- subtotal=Number(subtotal)+Number(model.getValue("/root/main/infolist/list["+i+"]/diff"));
- model.makeValue("/root/main/infolist/list["+i+"]/subtotal", subtotal);
- } else { //주입량, 배액량 중 하나라도 공백이 되면.. 초기화
- model.makeValue("/root/main/infolist/list["+i+"]/diff", "");
- model.makeValue("/root/main/infolist/list["+i+"]/subtotal", "");
- }
- }
- grd_info.refresh();
- for(var i = 1; i < grd_info.rows; i++) {
- //tooltip변경
- grd_info.tooltipText(i, grd_info.colRef("pdprcpcd") ) = model.getValue("/root/init/dialliqd/list[prcpcd='"+model.getValue("/root/main/infolist/list["+i+"]/pdprcpcd")+"']/prcpnm");
- grd_info.tooltipText(i, grd_info.colRef("concencd") ) = model.getValue("/root/init/M0561list/M0561[cdid='"+model.getValue("/root/main/infolist/list["+i+"]/concencd")+"']/cdnm");
- }
-
- //해당날짜 기록이 존재하면 레코드 그리드에 복사
- for(var i = 1; i < grd_info.rows; i++) {
- if(recdd == model.getValue("/root/main/infolist/list["+i+"]/recdd").substr(0,8)) {
- copyNodeListType("/root/main/recordlist", "/root/main/infolist/list["+i+"]", "after");
- }
- }
- grd_record.refresh();
-
- for(var i = 1; i < grd_record.rows; i++) {
- grd_record.tooltipText(i, grd_record.colRef("pdprcpcd") ) = model.getValue("/root/init/dialliqd/list[prcpcd='"+model.getValue("/root/main/recordlist/list["+i+"]/pdprcpcd")+"']/prcpnm");
- grd_record.tooltipText(i, grd_record.colRef("concencd") ) = model.getValue("/root/init/M0561list/M0561[cdid='"+model.getValue("/root/main/recordlist/list["+i+"]/concencd")+"']/cdnm");
- if( (i % 2) == 1)
- grd_record.rowStyle(i, "data", "background-color") = "#FFFFFF";
- else
- grd_record.rowStyle(i, "data", "background-color") = "#F4F4F4";
- }
-
- model.refresh();
- }
- ]]>
- </script>
- </button>
- <line id="line5" class="line_4" style="x1:915px; y1:7px; x2:915px; y2:29px; "/>
- <input id="ipt_frstdd" ref="/root/main/cond/frstdd" class="input_search" inputtype="date" style="left:105px; top:10px; width:90px; height:19px; "/>
- <caption id="caption12" style="left:200px; top:11px; width:20px; height:20px; font-weight:bold; ">~</caption>
- <input id="ipt_lastdd" ref="/root/main/cond/lastdd" class="input_search" inputtype="date" style="left:215px; top:10px; width:90px; height:19px; "/>
- </group>
- <line id="line6" class="line_1" style="x1:190px; y1:382px; x2:1194px; y2:382px; "/>
- <datagrid id="grd_info" nodeset="/root/main/infolist/list" class="datagrid2" caption="wardcd^roomcd^patnm^pid^업무일자^일시^처방코드^투석액^농도(%)^횟차^주입일자^주입
시간^주입량(ml)^배액일자^배액
시간^배액량(ml)^차이^subtotal^비고^RECSEQ^pdetcprcpnm^etcconcennm^lastupdtrid" colsep="^" colwidth="0, 0, 0, 0, 75, 0, 70, 200, 70, 40, 85, 40, 75, 85, 40, 75, 75, 75, 276, 0, 0, 0, 0" ellipsis="true" frozencols="9" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" tooltip="true" style="left:190px; top:387px; width:1004px; height:360px; text-align:center; ">
- <col ref="wardcd" visibility="hidden"/>
- <col ref="roomcd" visibility="hidden"/>
- <col ref="patnm" visibility="hidden"/>
- <col ref="pid" visibility="hidden"/>
- <col ref="recdd" format="yyyy-mm-dd 24hh:mm"/>
- <col ref="rectm" visibility="hidden"/>
- <col disabled="true" ref="prcpcd" type="combo" style="text-align:left; ">
- <choices>
- <itemset nodeset="/root/init/dialliqd/list">
- <label ref="prcpcd"/>
- <value ref="prcpcd"/>
- </itemset>
- </choices>
- </col>
- <col disabled="true" editmode="input" ref="pdprcpcd" type="combo" style="text-align:left; ">
- <choices>
- <itemset nodeset="/root/init/dialliqd/list">
- <label ref="prcpnm"/>
- <value ref="prcpcd"/>
- </itemset>
- </choices>
- </col>
- <col disabled="true" editmode="input" ref="concencd" type="combo" style="text-align:right; ">
- <choices>
- <itemset nodeset="/root/init/M0561list/M0561">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="timscd" style="text-align:right; "/>
- <col disabled="true" ref="injdd" type="inputdate"/>
- <col ref="injtm" format="hh:nn" style="text-align:right; "/>
- <col ref="injamtval" format="999999" style="text-align:right; "/>
- <col disabled="true" ref="dragdd" type="inputdate"/>
- <col ref="dragtm" format="hh:nn" style="text-align:right; "/>
- <col ref="dragamtval" format="999999" style="text-align:right; "/>
- <col ref="diff" format="999999" style="text-align:right; "/>
- <col ref="subtotal" format="999999" style="text-align:right; "/>
- <col ref="cmt" style="text-align:left; "/>
- <col ref="recseq" visibility="hidden"/>
- <col ref="pdetcprcpnm" visibility="hidden"/>
- <col ref="etcconcennm" visibility="hidden"/>
- <col ref="lastupdtrid" visibility="hidden"/>
- <script type="javascript" ev:event="onmousedown">
- <![CDATA[
- fShowPopupMenu("grd_info","/root/main/menuitems/item");
- ]]>
- </script>
- <script type="javascript" ev:event="DOMFocusOut">
- <![CDATA[
- initPopupMenu();
- ]]>
- </script>
- </datagrid>
- <group id="group2" visibility="hidden" style="left:281px; top:131px; width:225px; height:55px; background-color:#87CEFA; ">
- <caption id="caption3" class="tit_2" style="left:0px; top:5px; width:87px; height:14px; ">투석액 기타</caption>
- <input id="ipt_pdetcprcpnm" ref="/root/main/cond/etcprcplabel" style="left:15px; top:20px; width:100px; height:19px; "/>
- <button id="btn_etcprcpok" class="btn5_letter2" navindex="22" disable.background-image="../../../com/commonweb/images/dis_btn5_letter2.gif" style="left:125px; top:20px; width:42px; height:19px; background-image:../../../com/commonweb/images/btn5_letter2.gif; ">
- <caption>확인</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var recrow=grd_record.row;
- if(ipt_pdetcprcpnm.value != "") {
- if(ipt_pdetcprcpnm.value == "기타") {
- messageBox("'기타'라는 용어는 쓸 수 없습니다.","");
- ipt_pdetcprcpnm.value="";
- model.setFocus("ipt_pdetcprcpnm");
- } else {
- model.makeValue("/root/main/recordlist/list["+recrow+"]/pdetcprcpnm", ipt_pdetcprcpnm.value);
- model.setValue("/root/main/recordlist/list["+recrow+"]/pdprcpcd", ipt_pdetcprcpnm.value);
- group2.visible = false;
- }
- } else {
- ipt_pdetcprcpnm.value="-";
- model.makeValue("/root/main/recordlist/list["+recrow+"]/pdetcprcpnm", ipt_pdetcprcpnm.value);
- model.setValue("/root/main/recordlist/list["+recrow+"]/pdprcpcd", ipt_pdetcprcpnm.value);
- group2.visible = false;
- }
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_etcprcpcl" class="btn5_letter2" navindex="22" disable.background-image="../../../com/commonweb/images/dis_btn5_letter2.gif" style="left:170px; top:20px; width:42px; height:19px; background-image:../../../com/commonweb/images/btn5_letter2.gif; ">
- <caption>취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var recrow=grd_record.row;
- ipt_pdetcprcpnm.value="";
- model.setValue("/root/main/recordlist/list["+recrow+"]/pdprcpcd", model.getValue("/root/main/recordlist/list["+recrow+"]/pdetcprcpnm"));
- group2.visible = false;
- ]]>
- </script>
- </button>
- </group>
- <group id="group5" visibility="hidden" style="left:481px; top:131px; width:225px; height:55px; background-color:#87CEFA; ">
- <caption id="caption4" class="tit_2" style="left:0px; top:5px; width:87px; height:13px; ">농도 기타</caption>
- <input id="ipt_etcconcennm" ref="/root/main/cond/etcconcenlabel" maxlength="6" format="#.999" style="left:15px; top:20px; width:100px; height:19px; "/>
- <button id="btn_etcconcenok" class="btn5_letter2" navindex="22" disable.background-image="../../../com/commonweb/images/dis_btn5_letter2.gif" style="left:125px; top:20px; width:42px; height:19px; background-image:../../../com/commonweb/images/btn5_letter2.gif; ">
- <caption>확인</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var recrow = grd_record.row;
- var etcconcennm = ipt_etcconcennm.value;
-
- if(parseFloat(etcconcennm) > 100.000) {
- messageBox("농도값은 100을 넘을 수 없습니다.", "");
- ipt_etcconcennm.value = "";
- model.setFocus("ipt_etcconcennm");
- } else if (model.getValue("/root/init/M0561list/M0561[cdnm='"+etcconcennm+"']/cdid") != "") { //농도코드에 있는 값이면 그 값으로 대체
- ipt_etcconcennm.value = "";
- model.setValue("/root/main/recordlist/list["+recrow+"]/etcconcennm", "");
- model.setValue("/root/main/recordlist/list["+recrow+"]/concencd", model.getValue("/root/init/M0561list/M0561[cdnm='"+etcconcennm+"']/cdid"));
- group5.visible = false;
- } else if(etcconcennm != "") {
- model.makeValue("/root/main/recordlist/list["+recrow+"]/etcconcennm", etcconcennm);
- model.setValue("/root/main/recordlist/list["+recrow+"]/concencd", etcconcennm);
- group5.visible = false;
- } else {
- ipt_etcconcennm.value="0";
- model.makeValue("/root/main/recordlist/list["+recrow+"]/etcconcennm", ipt_etcconcennm.value);
- model.setValue("/root/main/recordlist/list["+recrow+"]/concencd", ipt_etcconcennm.value);
- group5.visible = false;
- }
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_etcconcencl" class="btn5_letter2" navindex="22" disable.background-image="../../../com/commonweb/images/dis_btn5_letter2.gif" style="left:170px; top:20px; width:42px; height:19px; background-image:../../../com/commonweb/images/btn5_letter2.gif; ">
- <caption>취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var recrow=grd_record.row;
- ipt_etcconcennm.value="";
- model.setValue("/root/main/recordlist/list["+recrow+"]/concencd", model.getValue("/root/main/recordlist/list["+recrow+"]/etcconcennm"));
- group5.visible = false;
- ]]>
- </script>
- </button>
- </group>
- <caption id="caption5" style="left:1169px; top:750px; width:26px; height:13px; ">[표]</caption>
- </group>
- </xhtml:body>
- </xhtml:html>
|