12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763 |
- <?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>식사처방출력</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <data>
- <ward/>
- <wardnm/>
- <room/>
- <pid/>
- <hngnm/>
- <disp1/>
- <disp2/>
- <disp3/>
- <dietnm2/>
- <remfactnm/>
- <remark/>
- <room1/>
- <dietnm1/>
- <bfremfactcd/>
- <bfremfactnm/>
- <room2/>
- <choidietyn/>
- <iptpsn/>
- <iptdt/>
- <prcpdd/>
- <dietmeal/>
- <calr/>
- <mealcnt/>
- <procermealyn/>
- <dietcd/>
- <dietmdlnm/>
- <dietsmlnm/>
- <remfactcd/>
- <remfactnm1/>
- <remfactnm2/>
- <remfactnm3/>
- <remfactnm4/>
- <calrunit/>
- <remark1/>
- <remark2/>
- <remark3/>
- <dietnm/>
- </data>
- <printlist>
- <ward/>
- <wardnm/>
- <bfroom/>
- <room/>
- <pid/>
- <hngnm/>
- <disp1/>
- <disp2/>
- <disp3/>
- <pdisp1/>
- <pdisp2/>
- <pdisp3/>
- <dietnm2/>
- <clinccmtcnts/>
- <prcpdelivefact/>
- <tfdtlcd/>
- <remark/>
- <room1/>
- <dietnm1/>
- <bfremfactcd/>
- <bfremfactnm/>
- <room2/>
- <choidietyn/>
- <iptpsn/>
- <iptdt/>
- <prcpdd/>
- <dietmeal/>
- <calr/>
- <mealcnt/>
- <procermealyn/>
- <dietcd/>
- <dietmdlnm/>
- <dietsmlnm/>
- <calrunit/>
- <remark1/>
- <remark2/>
- <remark3/>
- <dietnm/>
- <bmealdrnknm/>
- <prntprcpdelivefact/>
- <newbfroom/>
- </printlist>
- <printlist2>
- <ward/>
- <wardnm/>
- <bfroom/>
- <room/>
- <pid/>
- <hngnm/>
- <disp1/>
- <disp2/>
- <disp3/>
- <dietnm2/>
- <clinccmtcnts/>
- <prcpdelivefact/>
- <tfdtlcd/>
- <remark/>
- <room1/>
- <dietnm1/>
- <bfremfactcd/>
- <bfremfactnm/>
- <room2/>
- <choidietyn/>
- <iptpsn/>
- <iptdt/>
- <prcpdd/>
- <dietmeal/>
- <calr/>
- <mealcnt/>
- <procermealyn/>
- <dietcd/>
- <dietmdlnm/>
- <dietsmlnm/>
- <calrunit/>
- <remark1/>
- <remark2/>
- <remark3/>
- <dietnm/>
- <bmealdrnknm/>
- <prntprcpdelivefact/>
- </printlist2>
- <patinfo>
- <patinfolist/>
- </patinfo>
- <endtm>
- <data>
- <mealflag/>
- <endflag/>
- <fromtm/>
- <totm/>
- <lastupdtdt/>
- <lastupdtrid/>
- </data>
- </endtm>
- </main>
- <main1>
- <printlist3>
- <ward/>
- <wardnm/>
- <bfroom/>
- <room/>
- <pid/>
- <hngnm/>
- <dietnm2/>
- <clinccmtcnts/>
- <prcpdelivefact/>
- <tfdtlcd/>
- <remark/>
- <room1/>
- <dietnm1/>
- <bfremfactcd/>
- <bfremfactnm/>
- <room2/>
- <choidietyn/>
- <iptpsn/>
- <iptdt/>
- <prcpdd/>
- // <dietmeal/>
- <calr/>
- <mealcnt/>
- <procermealyn/>
- <dietcd/>
- <dietmdlnm/>
- <dietsmlnm/>
- <calrunit/>
- <remark1/>
- <remark2/>
- <remark3/>
- <dietnm/>
- <bmealdrnknm/>
- <prntprcpdelivefact/>
- </printlist3>
- </main1>
- <main2>
- <magamlist>
- <magaminfo>
- <magamyn/>
- </magaminfo>
- </magamlist>
- </main2>
- <printinfo>
- <printlist>
- <ward/>
- <wardnm/>
- <bfroom/>
- <room/>
- <pid/>
- <hngnm/>
- <disp1/>
- <disp2/>
- <disp3/>
- <dietnm2/>
- <clinccmtcnts/>
- <prcpdelivefact/>
- <tfdtlcd/>
- <remark/>
- <room1/>
- <dietnm1/>
- <bfremfactcd/>
- <bfremfactnm/>
- <room2/>
- <choidietyn/>
- <iptpsn/>
- <iptdt/>
- <prcpdd/>
- <dietmeal/>
- <calr/>
- <mealcnt/>
- <procermealyn/>
- <dietcd/>
- <dietmdlnm/>
- <dietsmlnm/>
- <calrunit/>
- <remark1/>
- <remark2/>
- <remark3/>
- <dietnm/>
- </printlist>
- </printinfo>
- <send>
- <searchitem>
- <dietdd/>
- <mealflag/>
- <endflag/>
- <nmcardflag/>
- <ward/>
- <nutrward/>
- <updtyn/>
- <updtflag/>
- <instcd/>
- <userid/>
- <endyn/>
- <endmsg/>
- <pid/>
- <hngnm/>
- </searchitem>
- <nmcardcnt/>
- <patdietslip>
- <prcpdd/>
- <dietmeal/>
- </patdietslip>
- <bmealslip>
- <prcpdd/>
- <dietmeal/>
- </bmealslip>
- <tflabel/>
- <dietchnglist/>
- <popup>
- <flag/>
- <pid/>
- <prcpdd/>
- </popup>
- </send>
- <send1>
- <printlist/>
- </send1>
- <send2>
- <timelist>
- <cdid/>
- <cdnm/>
- <dispseq/>
- <cntlcd1/>
- </timelist>
- </send2>
- <temp>
- <ret>
- <retmsg/>
- </ret>
- </temp>
- <init>
- <code>
- <ward>
- <dept>
- <deptcd/>
- <depthngnm/>
- </dept>
- </ward>
- <room>
- <cdid/>
- <cdnm/>
- </room>
- </code>
- <basecode>
- <meal>
- <A0047>
- <cdid/>
- <cdnm/>
- </A0047>
- </meal>
- <dietmeal>
- <M0042>
- <cdid/>
- <cdnm/>
- </M0042>
- </dietmeal>
- <clinccmtcnts>
- <item>
- <cdid/>
- <cdnm/>
- </item>
- </clinccmtcnts>
- <wardcls>
- <data>
- <wardcd/>
- <wardnm/>
- </data>
- </wardcls>
- <endflag>
- <A0054>
- <cdid/>
- <cdnm/>
- </A0054>
- </endflag>
- </basecode>
- </init>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- finit();
- btn_search.disabled = !checkAuth("R");
- //btn_excel.disabled = !checkAuth("P");
- model.setValue("/root/send/searchitem/instcd", getUserInfo("dutplceinstcd"));
- model.setValue("/root/send/searchitem/userid", getUserInfo("userid"));
- // btn_dietprcpsum.disabled = true;
- // btn_dietprcpcopy.disabled = true;
-
- var auth_id = getUserInfo("userid");
- if ( auth_id == "10396" || auth_id == "10249" || auth_id == "99207" || auth_id == "99262" || auth_id == "AST") {
- btn_dietprcpsum.visible = true; //식사처방집계 버튼 안보이도록.
- btn_dietprcpcopy.visible = true; //식사처방복사 버튼 안보이도록.
- btn_dietchnglist.visible = true; //식사변경내역전표 버튼 안보이도록.
- }else {
- btn_dietprcpsum.visible = false; //식사처방집계 버튼 안보이도록.
- btn_dietprcpcopy.visible = false; //식사처방복사 버튼 안보이도록.
- btn_dietchnglist.visible = false; //식사변경내역전표 버튼 안보이도록.
- }
- if( auth_id == "EVER1"|| auth_id == "EVER2"){
- btn_dietprcpsum.visible = true; // 식사처방집계 버튼
- btn_dietprcpcopy.visible = true; //식사처방복사 버튼
- }
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
- //초기화
- function finit() {
- //화면open시 공통코드 setting
- zbcfGetCodeList( new Array( "A0047", "M0042", "A0054" ), new Array( "/root/init/basecode/meal", "/root/init/basecode/dietmeal", "/root/init/basecode/endflag" ) );
- //zbcfGetDeptCodeList(getUserInfo("dutplceinstcd"), 'orduseyn', 'W', '/root/init/code/ward', 'depthngnm', 'asc', new Date().getDateFormat("YYYYMMDD"), "", 'after');
- zsdfGetWardDeptList(getUserInfo("dutplceinstcd"), '/root/init/code/ward', 'depthngnm', 'asc', new Date().getDateFormat("YYYYMMDD"), 'after');
- submit("TRANT00102"); //조절코드 조회
- submit("TRANB00208"); //영양팀병동 조회
- astfAddCombo("/root/init/basecode/wardcls","data","wardcd,wardnm",",");
- model.removeNodeset("/root/main/data");
- //model.resetInstanceNode("/root/send");
- model.setValue("/root/send/searchitem/dietdd", getCurrentDate());
- //화면open시 현재시간을 계산하여 끼니와 마감구분 자동setting
- //각 끼니별 2차 마감시간으로부터 2시간후까지는 이전끼니로 setting
- var tm = getCurrentTime();
- if ( tm.substr(0,4) <= 0830 ) { //조식 2차 마감시간은 06:30
- //if ( tm.substr(0,4) <= 0630 ) {
- model.setValue("/root/send/searchitem/mealflag", "1");
- if ( tm.substr(0,4) <= 0530 ) {
- model.setValue("/root/send/searchitem/endflag", "1");
- } else {
- model.setValue("/root/send/searchitem/endflag", "2");
- }
- } else if ( (tm.substr(0,4) > 0830) && (tm.substr(0,4) <= 1330) ) { //중식 2차 마감시간은 11:30
- //} else if ( (tm.substr(0,4) > 0630) && (tm.substr(0,4) <= 1130) ) {
- model.setValue("/root/send/searchitem/mealflag", "2");
- if ( tm.substr(0,4) <= 1030 ) {
- model.setValue("/root/send/searchitem/endflag", "1");
- } else {
- model.setValue("/root/send/searchitem/endflag", "2");
- }
- } else if ( (tm.substr(0,4) > 1330) ) {
- //} else if ( (tm.substr(0,4) > 1130) ) {
- model.setValue("/root/send/searchitem/mealflag", "3");
- if ( tm.substr(0,4) <= 1600 ) {
- model.setValue("/root/send/searchitem/endflag", "1");
- } else {
- model.setValue("/root/send/searchitem/endflag", "2");
- }
- }
- model.setValue("/root/send/searchitem/nmcardflag", "0");
- //model.setValue("/root/send/searchitem/updtflag", "-");
- model.refresh();
- }
-
- //경장영양식라벨 출력
- function ftflabel(meal, mealtm) {
- model.copyNode("/root/send/tflabel", "/root/main");
- var lastrow = grd_data.rows;
- //cc계산 및 횟수가 4회 이상인 환자의 라벨 추가생성
- for ( i=1; i<grd_data.rows; i++) {
- //cc계산
- if (getUserInfo("dutplceinstcd") == "012"){
- model.makeNode("/root/send/tflabel/printlist[" + i + "]/cc");
- var calr = model.getValue("/root/send/tflabel/printlist[" + i + "]/calr");
- var mealcnt = model.getValue("/root/send/tflabel/printlist[" + i + "]/mealcnt");
- var cc = Math.round(calr/mealcnt);
- model.setValue("/root/send/tflabel/printlist[" + i + "]/cc", cc);
- model.setValue("/root/send/tflabel/printlist[" + i + "]/dietmeal", mealtm);
- //횟수가 4회 이상인 환자의 라벨 추가생성
- if ( (meal == '조식') && (mealcnt > 4) ) {
- var mealnm = model.getValue("/root/send2/timelist[cntlcd1='11']/cdid");
- if (mealnm != ""){
- copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
- //model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", '10:00');
- model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
- lastrow = lastrow + 1;
- }
- }
- else if ( (meal == '중식') && (mealcnt > 3) ) {
- var mealnm = model.getValue("/root/send2/timelist[cntlcd1='21']/cdid");
- if (mealnm != ""){
- copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
- //model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", '15:00');
- model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
- lastrow = lastrow + 1;
- }
- }
- else if ( (meal == '석식') && (mealcnt > 5) ) {
- var mealnm = model.getValue("/root/send2/timelist[cntlcd1='31']/cdid");
- var mcount = parseInt(model.getValue("/root/send2/timelist[cntlcd1='31']/dispseq"));
- if (mealnm != ""){
- for (var k = 0; k < mcount; k ++){
- copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
- //model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", '20:30');
- model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
- lastrow = lastrow + 1;
- }
- }
- }
- }else if (getUserInfo("dutplceinstcd") == "013"){
- //횟수가 4회 이상인 환자의 라벨 추가생성
- //alert("1==> " + mealtm + "==" + meal);
- model.makeNode("/root/send/tflabel/printlist[" + i + "]/cc");
- var calr = model.getValue("/root/send/tflabel/printlist[" + i + "]/calr");
- var mealcnt = model.getValue("/root/send/tflabel/printlist[" + i + "]/mealcnt");
- var cc = Math.round(calr/mealcnt);
- model.makeValue("/root/send/tflabel/printlist[" + i + "]/cc", cc);
- model.makeValue("/root/send/tflabel/printlist[" + i + "]/dietmeal", mealtm);
- if ( meal == '조식'){
- if (mealcnt > 4) {
- /*
- model.makeNode("/root/send/tflabel/printlist[" + i + "]/cc");
- var calr = model.getValue("/root/send/tflabel/printlist[" + i + "]/calr");
- var mealcnt = model.getValue("/root/send/tflabel/printlist[" + i + "]/mealcnt");
- var cc = Math.round(calr/mealcnt);
- model.makeValue("/root/send/tflabel/printlist[" + i + "]/cc", cc);
- model.makeValue("/root/send/tflabel/printlist[" + i + "]/dietmeal", mealtm);
- */
- var mealnm = model.getValue("/root/send2/timelist[cntlcd1='11']/cdid");
- if (mealnm != ""){
- copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
- //model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", '10:00');
- model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
- lastrow = lastrow + 1;
- }
- }
- }
- else if (meal == '중식') {
- if (mealcnt > 4){
- var mealnm = model.getValue("/root/send2/timelist[cntlcd1='21']/cdid");
- if (mealnm != ""){
- //copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
- //model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", '15:00');
- model.setValue("/root/send/tflabel/printlist[" + i + "]/dietmeal", mealnm);
- lastrow = lastrow + 1;
- }
- }else{
- model.makeNode("/root/send/tflabel/printlist[" + i + "]/cc");
- var calr = model.getValue("/root/send/tflabel/printlist[" + i + "]/calr");
- var cc = Math.round(calr/mealcnt);
- model.makeValue("/root/send/tflabel/printlist[" + i + "]/cc", cc);
- model.makeValue("/root/send/tflabel/printlist[" + i + "]/dietmeal", mealtm);
- }
- }
- else if (meal == '석식') {
- model.makeNode("/root/send/tflabel/printlist[" + i + "]/cc");
- var calr = model.getValue("/root/send/tflabel/printlist[" + i + "]/calr");
- var cc = Math.round(calr/mealcnt);
- model.setValue("/root/send/tflabel/printlist[" + i + "]/cc", cc);
- model.setValue("/root/send/tflabel/printlist[" + i + "]/dietmeal", mealtm);
- if (mealcnt == 4){
- var mealnm = model.getValue("/root/send2/timelist[cntlcd1='31']/cdid");
- if (mealnm != ""){
- copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
- //model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", '15:00');
- model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
- lastrow = lastrow + 1;
- }
- }else if (mealcnt == 5){
- var mealnm = model.getValue("/root/send2/timelist[cntlcd1='31']/cdid");
- if (mealnm != ""){
- copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
- //model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", '15:00');
- model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
- lastrow = lastrow + 1;
- }
- }else if (mealcnt == 6){
- var mealnm = model.getValue("/root/send2/timelist[cntlcd1='31']/cdid");
- var mcount = parseInt(model.getValue("/root/send2/timelist[cntlcd1='31']/dispseq"));
- if (mealnm != ""){
- for (var k = 0; k < mcount; k ++){
- copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
- //model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", '20:30');
- model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
- lastrow = lastrow + 1;
- }
- }
- }
- }
- }else if (getUserInfo("dutplceinstcd") == "011"){
- //횟수가 4회 이상인 환자의 라벨 추가생성
- //alert("1==> " + mealtm + "==" + meal);
- model.makeNode("/root/send/tflabel/printlist[" + i + "]/cc");
- var calr = model.getValue("/root/send/tflabel/printlist[" + i + "]/calr");
- var mealcnt = model.getValue("/root/send/tflabel/printlist[" + i + "]/mealcnt");
- var cc = Math.round(calr/mealcnt);
- model.makeValue("/root/send/tflabel/printlist[" + i + "]/cc", cc);
- model.makeValue("/root/send/tflabel/printlist[" + i + "]/dietmeal", mealtm);
- if ( meal == '조식'){
-
- if (mealcnt > 4){
- var mealnm = model.getValue("/root/send2/timelist[cntlcd1='11']/cdid");
- if (mealnm != ""){
- copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
- model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
- lastrow = lastrow + 1;
- }
- }
-
- }
- else if (meal == '중식') {
- model.makeNode("/root/send/tflabel/printlist[" + i + "]/cc");
- var calr = model.getValue("/root/send/tflabel/printlist[" + i + "]/calr");
- var cc = Math.round(calr/mealcnt);
- model.makeValue("/root/send/tflabel/printlist[" + i + "]/cc", cc);
- model.makeValue("/root/send/tflabel/printlist[" + i + "]/dietmeal", mealtm);
-
- if (mealcnt > 4){
- var mealnm = model.getValue("/root/send2/timelist[cntlcd1='21']/cdid");
- if (mealnm != ""){
- copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
- model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
- lastrow = lastrow + 1;
- }
- }
- }
- else if (meal == '석식') {
- model.makeNode("/root/send/tflabel/printlist[" + i + "]/cc");
- var calr = model.getValue("/root/send/tflabel/printlist[" + i + "]/calr");
- var cc = Math.round(calr/mealcnt);
- model.setValue("/root/send/tflabel/printlist[" + i + "]/cc", cc);
- model.setValue("/root/send/tflabel/printlist[" + i + "]/dietmeal", mealtm);
- if (mealcnt == 4){
- var mealnm = model.getValue("/root/send2/timelist[cntlcd1='31']/cdid");
- if (mealnm != ""){
- copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
- model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
- lastrow = lastrow + 1;
- }
- }else if (mealcnt == 5){
- var mealnm = model.getValue("/root/send2/timelist[cntlcd1='31']/cdid");
- if (mealnm != ""){
- copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
- model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
- lastrow = lastrow + 1;
- }
- }else if (mealcnt == 6){
- var mealnm = model.getValue("/root/send2/timelist[cntlcd1='31']/cdid");
- var mcount = parseInt(model.getValue("/root/send2/timelist[cntlcd1='31']/dispseq"));
- if (mealnm != ""){
- for (var k = 0; k < mcount; k ++){
- copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
- //model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", '20:30');
- model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
- lastrow = lastrow + 1;
- }
- }
- }
- }
-
-
- }else{
- //횟수가 4회 이상인 환자의 라벨 추가생성
- //alert("1==> " + mealtm + "==" + meal);
- model.makeNode("/root/send/tflabel/printlist[" + i + "]/cc");
- var calr = model.getValue("/root/send/tflabel/printlist[" + i + "]/calr");
- var mealcnt = model.getValue("/root/send/tflabel/printlist[" + i + "]/mealcnt");
- //var cc = Math.round(calr/mealcnt); // 2011.02.16 CYW
- var cc = calr;
- model.makeValue("/root/send/tflabel/printlist[" + i + "]/cc", cc);
- model.makeValue("/root/send/tflabel/printlist[" + i + "]/dietmeal", mealtm);
- if ( meal == '조식'){
-
- //if (mealcnt > 4) {
- /*
- model.makeNode("/root/send/tflabel/printlist[" + i + "]/cc");
- var calr = model.getValue("/root/send/tflabel/printlist[" + i + "]/calr");
- var mealcnt = model.getValue("/root/send/tflabel/printlist[" + i + "]/mealcnt");
- var cc = Math.round(calr/mealcnt);
- model.makeValue("/root/send/tflabel/printlist[" + i + "]/cc", cc);
- model.makeValue("/root/send/tflabel/printlist[" + i + "]/dietmeal", mealtm);
- */
- /*
- var mealnm = model.getValue("/root/send2/timelist[cntlcd1='11']/cdid");
- if (mealnm != ""){
- copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
- //model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", '10:00');
- model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
- lastrow = lastrow + 1;
- }
- }
- */
-
- }
- else if (meal == '중식') {
- model.makeNode("/root/send/tflabel/printlist[" + i + "]/cc");
- var calr = model.getValue("/root/send/tflabel/printlist[" + i + "]/calr");
- //var cc = Math.round(calr/mealcnt); // 2011.02.16 CYW
- var cc = calr;
- model.makeValue("/root/send/tflabel/printlist[" + i + "]/cc", cc);
- model.makeValue("/root/send/tflabel/printlist[" + i + "]/dietmeal", mealtm);
- }
- else if (meal == '석식') {
- model.makeNode("/root/send/tflabel/printlist[" + i + "]/cc");
- var calr = model.getValue("/root/send/tflabel/printlist[" + i + "]/calr");
- //var cc = Math.round(calr/mealcnt); // 2011.02.16 CYW
- var cc = calr;
- model.setValue("/root/send/tflabel/printlist[" + i + "]/cc", cc);
- model.setValue("/root/send/tflabel/printlist[" + i + "]/dietmeal", mealtm);
- if (mealcnt == 4){
- var mealnm = model.getValue("/root/send2/timelist[cntlcd1='31']/cdid");
- if (mealnm != ""){
- copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
- //model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", '15:00');
- model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
- lastrow = lastrow + 1;
- }
- }else if (mealcnt == 5){
- var mealnm = model.getValue("/root/send2/timelist[cntlcd1='31']/cdid");
- var mcount = parseInt(model.getValue("/root/send2/timelist[cntlcd1='31']/dispseq"));
- if (mealnm != ""){
- for (var k = 0; k < mcount; k ++){
- copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
- //model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", '20:30');
- model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
- lastrow = lastrow + 1;
- }
- }
- }
- }
- }
- }
- exeReportPreview("RPANT00104", "XMLSTR", "/root/send/tflabel");
- }
- //간식전료 출력
- function ganlabel(meal, mealtm) {
- var lastrow = grd_data.rows;
- //cc계산 및 횟수가 4회 이상인 환자의 라벨 추가생성
- for ( i=1; i<grd_data.rows; i++) {
- //cc계산
- if (getUserInfo("dutplceinstcd") == "012"){
- model.makeNode("/root/send/bmealslip/printlist[" + i + "]/cc");
- var calr = model.getValue("/root/send/bmealslip/printlist[" + i + "]/calr");
- var mealcnt = model.getValue("/root/send/bmealslip/printlist[" + i + "]/mealcnt");
- var cc = Math.round(calr/mealcnt);
- model.setValue("/root/send/bmealslip/printlist[" + i + "]/cc", cc);
- model.setValue("/root/send/bmealslip/printlist[" + i + "]/dietmeal", mealtm);
- //횟수가 4회 이상인 환자의 라벨 추가생성
- if ( (meal == '조식') && (mealcnt > 4) ) {
- var mealnm = model.getValue("/root/send2/timelist[cntlcd1='11']/cdid");
- if (mealnm != ""){
- copyNodesetType("/root/send/bmealslip/printlist", "/root/send/bmealslip/printlist[" + i + "]", "after", model, model);
- //model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", '10:00');
- model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", mealnm);
- lastrow = lastrow + 1;
- }
- }
- else if ( (meal == '중식') && (mealcnt > 3) ) {
- var mealnm = model.getValue("/root/send2/timelist[cntlcd1='21']/cdid");
- if (mealnm != ""){
- copyNodesetType("/root/send/bmealslip/printlist", "/root/send/bmealslip/printlist[" + i + "]", "after", model, model);
- //model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", '15:00');
- model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", mealnm);
- lastrow = lastrow + 1;
- }
- }
- else if ( (meal == '석식') && (mealcnt > 5) ) {
- var mealnm = model.getValue("/root/send2/timelist[cntlcd1='31']/cdid");
- var mcount = parseInt(model.getValue("/root/send2/timelist[cntlcd1='31']/dispseq"));
- if (mealnm != ""){
- for (var k = 0; k < mcount; k ++){
- copyNodesetType("/root/send/bmealslip/printlist", "/root/send/bmealslip/printlist[" + i + "]", "after", model, model);
- //model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", '20:30');
- model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", mealnm);
- lastrow = lastrow + 1;
- }
- }
- }
- }else{
- //횟수가 4회 이상인 환자의 라벨 추가생성
- //alert("1==> " + mealtm + "==" + meal);
- var mealcnt = model.getValue("/root/send/bmealslip/printlist[" + i + "]/mealcnt");
- alert("==" + meal + "==" + mealcnt);
- if ( (meal == '조식') && (mealcnt > 4) ) {
- model.makeNode("/root/send/bmealslip/printlist[" + i + "]/cc");
- var calr = model.getValue("/root/send/bmealslip/printlist[" + i + "]/calr");
- var mealcnt = model.getValue("/root/send/bmealslip/printlist[" + i + "]/mealcnt");
- var cc = Math.round(calr/mealcnt);
- model.makeValue("/root/send/bmealslip/printlist[" + i + "]/cc", cc);
- model.makeValue("/root/send/bmealslip/printlist[" + i + "]/dietmeal", mealtm);
- var mealnm = model.getValue("/root/send2/timelist[cntlcd1='11']/cdid");
- if (mealnm != ""){
- copyNodesetType("/root/send/bmealslip/printlist", "/root/send/bmealslip/printlist[" + i + "]", "after", model, model);
- //model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", '10:00');
- model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", mealnm);
- lastrow = lastrow + 1;
- }
- }
- else if (meal == '중식') {
- if (mealcnt > 4){
- var mealnm = model.getValue("/root/send2/timelist[cntlcd1='21']/cdid");
- if (mealnm != ""){
- //copyNodesetType("/root/send/bmealslip/printlist", "/root/send/bmealslip/printlist[" + i + "]", "after", model, model);
- //model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", '15:00');
- model.setValue("/root/send/bmealslip/printlist[" + i + "]/dietmeal", mealnm);
- lastrow = lastrow + 1;
- }
- }else{
- model.makeNode("/root/send/bmealslip/printlist[" + i + "]/cc");
- var calr = model.getValue("/root/send/bmealslip/printlist[" + i + "]/calr");
- var cc = Math.round(calr/mealcnt);
- model.makeValue("/root/send/bmealslip/printlist[" + i + "]/cc", cc);
- model.makeValue("/root/send/bmealslip/printlist[" + i + "]/dietmeal", mealtm);
- }
- }
- else if (meal == '석식') {
- model.makeNode("/root/send/bmealslip/printlist[" + i + "]/cc");
- var calr = model.getValue("/root/send/bmealslip/printlist[" + i + "]/calr");
- var cc = Math.round(calr/mealcnt);
- model.setValue("/root/send/bmealslip/printlist[" + i + "]/cc", cc);
- model.setValue("/root/send/bmealslip/printlist[" + i + "]/dietmeal", mealtm);
- if (mealcnt == 4){
- var mealnm = model.getValue("/root/send2/timelist[cntlcd1='31']/cdid");
- if (mealnm != ""){
- copyNodesetType("/root/send/bmealslip/printlist", "/root/send/bmealslip/printlist[" + i + "]", "after", model, model);
- //model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", '15:00');
- model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", mealnm);
- lastrow = lastrow + 1;
- }
- }else if (mealcnt == 5){
- var mealnm = model.getValue("/root/send2/timelist[cntlcd1='31']/cdid");
- if (mealnm != ""){
- copyNodesetType("/root/send/bmealslip/printlist", "/root/send/bmealslip/printlist[" + i + "]", "after", model, model);
- //model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", '15:00');
- model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", mealnm);
- lastrow = lastrow + 1;
- }
- }else if (mealcnt == 6){
- var mealnm = model.getValue("/root/send2/timelist[cntlcd1='31']/cdid");
- var mcount = parseInt(model.getValue("/root/send2/timelist[cntlcd1='31']/dispseq"));
- if (mealnm != ""){
- for (var k = 0; k < mcount; k ++){
- copyNodesetType("/root/send/bmealslip/printlist", "/root/send/bmealslip/printlist[" + i + "]", "after", model, model);
- //model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", '20:30');
- model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", mealnm);
- lastrow = lastrow + 1;
- }
- }
- }
- }
- }
- }
- }
- function fdevifact(){
-
- var nmcardcnt = 0;
-
- //전달사항을 코드별로 나누고 코드명으로 전환하여 remfactnm1~4 인스턴스에 분리하여 담기
- //전달사항에 '끓인물(14)'이 있으면 추가로 boiledwater 노드 생성후 Y 셋팅
- for ( i=1; i<grd_data.rows; i++) {
-
- var clinccmtcnts = model.getValue("/root/main/printlist[" + i + "]/clinccmtcnts");
- /*
- var temp = "";
- var c = 1;
- if ( clinccmtcnts != "" ) {
- for ( j = 0; j < clinccmtcnts.length; j+=3 ) {
- temp = model.getValue("/root/init/basecode/clinccmtcnts/item[cdid='"+ clinccmtcnts.substr(j,2) +"']/cdnm");
- if ( temp != "" ) {
- model.makeNode("/root/main/printlist[" + i + "]/remfactnm" + c);
- model.setValue("/root/main/printlist[" + i + "]/remfactnm" + c, temp);
- c = c + 1;
- }
- if ( clinccmtcnts.substr(j,2) == '14' ) {
- model.makeValue("/root/main/printlist[" + i + "]/boiledwater", "Y");
- }
- }
- }
- */
- if (isSearchString(clinccmtcnts,'14')) {
- model.makeValue("/root/main/printlist[" + i + "]/boiledwater", "Y");
- }
-
- // *********************** 특이사항의 모든 항목을 ',' 단위로 분리함.***************************
- var prntprcpdelivefact = model.getValue("/root/main/printlist["+i+"]/prntprcpdelivefact");
- var temp = "";
- if(prntprcpdelivefact != "" && prntprcpdelivefact != null){
- temp = prntprcpdelivefact.split(",");
- prntprcpdelivefact = "";
- for(var j = 0; j < temp.length; j++){
- tmp = prntprcpdelivefact.split("\n");
-
- if((tmp[tmp.length-1].length+temp[j].length)/50 >= 1 ){ // 저장된 특이사항의 맨 마지막 행을 값을 비교
- prntprcpdelivefact += "\n"; // 각 사항을 \n로 구분
- }
-
- prntprcpdelivefact += temp[j];
- if(j != temp.length-1){
- prntprcpdelivefact += ", "; // ',' 삽입
- }
- }
- if(prntprcpdelivefact != ""){
- model.makeNode("/root/main/printlist[" + i + "]/remfactnm");
- model.setValue("/root/main/printlist[" + i + "]/remfactnm", prntprcpdelivefact);
- }
- }
- //**************************************************************************************
- //네임카드 갯수 카운트 : 금식, 경장영양식 제외
- /*
- var dietcd = model.getValue("/root/main/printlist[" + i + "]/dietcd");
- if ( dietcd.substr(0,2) != 'Q9' && dietcd.substr(0,4) != 'Q209' ) {
- nmcardcnt = nmcardcnt + 1 ;
- }
- */
-
- //네임카드 갯수 카운트 : 금식, 경장영양식 제외
- /*
- var dietcd = model.getValue("/root/main/printlist[" + i + "]/dietcd");
- if ( dietcd.substr(0,2) != 'Q9' && dietcd.substr(0,4) != 'Q209' ) {
- nmcardcnt = nmcardcnt + 1 ;
- }
- */
- var etcgb = model.getValue("/root/main/printlist[" + i + "]/etcgb");
- if (etcgb == "1"){
- nmcardcnt = nmcardcnt + 1 ;
- }
- }
- }
- ]]>
- </script>
- <submission id="TRZBC00101"/>
- <submission id="TRZSD00109" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
- <submission id="TRANT00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/main"/>
- <submission id="TRANT00102" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/init/basecode/clinccmtcnts"/>
- <submission id="TRANT00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/main2/magamlist"/>
- <submission id="TXANT00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/temp"/>
- <submission id="TXANT00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/temp"/>
- <submission id="TXANT00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/temp"/>
- <submission id="TRANB00208" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/init/basecode/wardcls"/>
- <submission id="TRANT01005" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/send2"/>
- <submission id="TRANB00201" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/main/endtm"/>
- <bind id="bind_ward" ref="/root/main/data/ward" readonly="../ward!=''"/>
- </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/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
- <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
- </xhtml:head>
- <xhtml:body guideline="1,1194;1,0;2,784;2,757;2,715;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:1195px; height:15px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:100px; height:15px; ">식사처방출력</caption>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:15px; width:1195px; height:745px; ">
- <group id="group2" style="left:0px; top:10px; width:1195px; height:65px; vertical-align:top; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:65px; background-color:#fffbf2; "/>
- <caption id="caption1" class="search_name" style="left:15px; top:9px; width:86px; height:17px; ">일자 :</caption>
- <input id="ipt_dietdd" ref="/root/send/searchitem/dietdd" class="input_s_essential" inputtype="date" style="left:79px; top:8px; width:100px; height:19px; "/>
- <button id="btn_search" class="btn1_letter2" style="left:1118px; top:23px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //조회시점이 마감시간 전인지 마감시간 후인지 체크
- submit("TRANB00201");
- submit("TRANT00103");
- var tm = getCurrentTime();
- var dd = model.getValue("/root/send/searchitem/dietdd");
- var mealflag = model.getValue("/root/send/searchitem/mealflag"); //끼니
- var endflag = model.getValue("/root/send/searchitem/endflag"); //마감구분
- // if ( dd > getCurrentDate() ||
- // (dd==getCurrentDate() && mealflag=='1' && endflag=='1' && tm.substr(0,4) <= 0530) ||
- // (dd==getCurrentDate() && mealflag=='1' && tm.substr(0,4) <= 0630) ||
- // (dd==getCurrentDate() && mealflag=='2' && tm.substr(0,4) <= 1130) ||
- // (dd==getCurrentDate() && mealflag=='3' && tm.substr(0,4) <= 1700) ) {
- var sendtm11 = model.getValue("/root/main/endtm/data[mealflag='1' and endflag = '1']/totm");
- var sendtm12 = model.getValue("/root/main/endtm/data[mealflag='1' and endflag = '2']/totm");
- var sendtm21 = model.getValue("/root/main/endtm/data[mealflag='2' and endflag = '1']/totm");
- var sendtm22 = model.getValue("/root/main/endtm/data[mealflag='2' and endflag = '2']/totm");
- var sendtm31 = model.getValue("/root/main/endtm/data[mealflag='3' and endflag = '1']/totm");
- var sendtm32 = model.getValue("/root/main/endtm/data[mealflag='3' and endflag = '2']/totm");
- //alert("==" + sendtm11 + "==" + sendtm12 + "==" + sendtm21 + "==" + sendtm22 + "==" + sendtm31 + "==" + sendtm32);
- if (model.getValue("/root/main2/magamlist/magaminfo/magamyn") == "N"){
- /* 20090817 서버시간과 화면시간의 차이가 있어 수정
- if ( dd > getCurrentDate() ||
- (dd==getCurrentDate() && mealflag=='1' && endflag=='1' && tm.substr(0,4) <= sendtm11) ||
- (dd==getCurrentDate() && mealflag=='1' && endflag=='2' && tm.substr(0,4) <= sendtm12) ||
- (dd==getCurrentDate() && mealflag=='2' && endflag=='1' && tm.substr(0,4) <= sendtm21) ||
- (dd==getCurrentDate() && mealflag=='2' && endflag=='2' && tm.substr(0,4) <= sendtm22) ||
- (dd==getCurrentDate() && mealflag=='3' && endflag=='1' && tm.substr(0,4) <= sendtm31) ||
- (dd==getCurrentDate() && mealflag=='3' && endflag=='2' && tm.substr(0,4) <= sendtm32) ) {
- */
- /*
- (dd==getCurrentDate() && mealflag=='1' && endflag=='1' && tm.substr(0,4) <= 0530) ||
- (dd==getCurrentDate() && mealflag=='1' && endflag=='2' && tm.substr(0,4) <= 0630) ||
- (dd==getCurrentDate() && mealflag=='2' && endflag=='1' && tm.substr(0,4) <= 1030) ||
- (dd==getCurrentDate() && mealflag=='2' && endflag=='2' && tm.substr(0,4) <= 1130) ||
- (dd==getCurrentDate() && mealflag=='3' && endflag=='1' && tm.substr(0,4) <= 1600) ||
- (dd==getCurrentDate() && mealflag=='3' && endflag=='2' && tm.substr(0,4) <= 1700) ) {
- */
- //마감전 데이터임.
- model.setValue("/root/send/searchitem/endyn", "N");
- model.setValue("/root/send/searchitem/endmsg", "식사마감이 완료되지 않았습니다.");
- } else {
- //마감후 데이터임.
- model.setValue("/root/send/searchitem/endyn", "Y");
- model.setValue("/root/send/searchitem/endmsg", "마감완료된 식사입니다.");
- }
-
- if ( model.getValue("/root/send/searchitem/ward") == "" ) {
- model.setValue("/root/send/searchitem/ward", "-");
- }
-
- submit("TRANT00101");
-
- fdevifact();
-
- var nmcardcnt = 0;
-
- //전달사항을 코드별로 나누고 코드명으로 전환하여 remfactnm1~4 인스턴스에 분리하여 담기
- //전달사항에 '끓인물(14)'이 있으면 추가로 boiledwater 노드 생성후 Y 셋팅
- for ( i=1; i<grd_data.rows; i++) {
- var etcgb = model.getValue("/root/main/printlist[" + i + "]/etcgb");
- if (etcgb == "1"){
- nmcardcnt = nmcardcnt + 1 ;
- }
- // 감염정보 이미지 입히기
- // var disp1 = model.getValue("/root/main/printlist[" + i + "]/disp1");
- // var disp2 = model.getValue("/root/main/printlist[" + i + "]/disp2");
- // var disp3 = model.getValue("/root/main/printlist[" + i + "]/disp3");
- // if (disp1 == "Y") {
- // model.setValue("/root/main/printlist[" + i + "]/pdisp1","");
- // grd_data.cellstyle("background-image", i, grd_data.colRef("pdisp1")) = "../../../com/hismainweb/images/btn_top_infection0.gif";
- // }else{
- // grd_data.cellstyle("background-image", i, grd_data.colRef("pdisp1")) = "";
- // }
- // if (disp2 == "Y") {
- // model.setValue("/root/main/printlist[" + i + "]/pdisp2","");
- // grd_data.cellstyle("background-image", i, grd_data.colRef("pdisp2")) = "../../../com/hismainweb/images/btn_top_infection1.gif";
- // }else{
- // grd_data.cellstyle("background-image", i, grd_data.colRef("pdisp2")) = "";
- // }
- // if (disp3 == "Y") {
- // model.setValue("/root/main/printlist[" + i + "]/pdisp3","");
- // grd_data.cellstyle("background-image", i, grd_data.colRef("pdisp3")) = "../../../com/hismainweb/images/btn_top_infection2.gif";
- // }else{
- // grd_data.cellstyle("background-image", i, grd_data.colRef("pdisp3")) = "";
- // }
- }
- model.setValue("/root/send/nmcardcnt", nmcardcnt);
- //remark2,3의 내용을 ','로 연결하기
- for ( i=1; i<grd_data.rows; i++) {
- var remark = "";
- //var remark1 = model.getValue("/root/main/printlist[" + i + "]/remark1");
- var remark2 = model.getValue("/root/main/printlist[" + i + "]/remark2");
- var remark3 = model.getValue("/root/main/printlist[" + i + "]/remark3");
-
- if ( remark2 != "" || remark3 != "" ) {
- // if ( remark1 != "" || remark2 != "" || remark3 != "" ) {
- // if ( remark1 != "" ) {
- // remark = remark + remark1 + ",";
- // }
- if ( remark2 != "" ) {
- remark = remark + remark2 + ",";
- }
- if ( remark3 != "" ) {
- remark = remark + remark3 + ",";
- }
- remark = remark.substr(0, remark.length-1);
- model.setValue("/root/main/printlist[" + i + "]/remark", remark);
- }
- }
-
- model.refresh();
- ]]>
- </script>
- </button>
- <line id="line1" style="x1:1099px; y1:9px; x2:1099px; y2:58px; "/>
- <caption id="caption10" class="search_name" style="left:808px; top:9px; width:87px; height:17px; ">세부선택 :</caption>
- <caption id="caption2" class="search_name" style="left:578px; top:9px; width:91px; height:17px; ">마감구분 :</caption>
- <select1 id="rdo_meal" ref="/root/send/searchitem/mealflag" class="radio_search" appearance="full" cellspacing="5" cols="3" rows="1" overflow="visible" style="left:355px; top:8px; width:150px; height:20px; ">
- <choices>
- <item>
- <label>조식</label>
- <value>1</value>
- </item>
- <item>
- <label>중식</label>
- <value>2</value>
- </item>
- <item>
- <label>석식</label>
- <value>3</value>
- </item>
- </choices>
- </select1>
- <caption id="caption3" class="search_name" style="left:15px; top:35px; width:86px; height:17px; ">병동 :</caption>
- <select id="chk_updtyn" ref="/root/send/searchitem/updtyn" class="checkbox_search" visibility="hidden" overflow="visible" appearance="full" style="left:960px; top:35px; width:66px; height:20px; ">
- <choices>
- <item>
- <label>변경분</label>
- <value>Y</value>
- </item>
- </choices>
- </select>
- <caption id="caption4" class="search_name" visibility="hidden" style="left:870px; top:35px; width:91px; height:17px; ">변경구분 :</caption>
- <caption id="caption5" class="search_name" style="left:265px; top:9px; width:91px; height:17px; ">끼니구분 :</caption>
- <select1 id="cmb_endflag" ref="/root/send/searchitem/endflag" class="combo_s_essential" appearance="minimal" style="left:666px; top:9px; width:65px; height:19px; ">
- <choices>
- <item>
- <label>1차</label>
- <value>1</value>
- </item>
- <item>
- <label>2차</label>
- <value>2</value>
- </item>
- <item>
- <label>마감후</label>
- <value>3</value>
- </item>
- </choices>
- </select1>
- <select1 id="cmb_updtflag" ref="/root/send/searchitem/updtflag" class="combo_search" visibility="hidden" appearance="minimal" style="left:1030px; top:35px; width:65px; height:19px; ">
- <choices>
- <item>
- <label>전체</label>
- <value>-</value>
- </item>
- <item>
- <label>병실</label>
- <value>1</value>
- </item>
- <item>
- <label>식사</label>
- <value>2</value>
- </item>
- </choices>
- </select1>
- <select1 id="cmb_ward" ref="/root/send/searchitem/ward" class="combo_s_essential" appearance="minimal" style="left:79px; top:35px; width:141px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/code/ward/dept">
- <label ref="depthngnm"/>
- <value ref="deptcd"/>
- </itemset>
- </choices>
- </select1>
- <select1 id="cmb_nmcardflag" ref="/root/send/searchitem/nmcardflag" class="combo_s_essential" appearance="minimal" style="left:895px; top:9px; width:120px; height:19px; ">
- <choices>
- <item>
- <label>전체</label>
- <value>0</value>
- </item>
- <item>
- <label>치료식</label>
- <value>4</value>
- </item>
- <item>
- <label>경장영양</label>
- <value>5</value>
- </item>
- <item>
- <label>간식</label>
- <value>6</value>
- </item>
- <item>
- <label>금식제외</label>
- <value>7</value>
- </item>
- <item>
- <label>개인금식</label>
- <value>8</value>
- </item>
- <item>
- <label>주치의처방금식</label>
- <value>9</value>
- </item>
- <item>
- <label>밥</label>
- <value>1</value>
- </item>
- <item>
- <label>죽</label>
- <value>2</value>
- </item>
- <item>
- <label>미음</label>
- <value>3</value>
- </item>
- <item>
- <label>산모야식</label>
- <value>10</value>
- </item>
- </choices>
- </select1>
- <button id="btn_before" class="icon_pre" style="left:183px; top:10px; width:13px; height:15px; ">
- <caption/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var dd = model.getValue("/root/send/searchitem/dietdd");
- dd = dd.toDate().getAddDate(-1, "D");
- dd = dd.getDateFormat();
- model.setValue("/root/send/searchitem/dietdd", dd);
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="button1" class="icon_next" style="left:196px; top:10px; width:13px; height:15px; ">
- <caption/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var dd = model.getValue("/root/send/searchitem/dietdd");
- dd = dd.toDate().getAddDate(1, "D");
- dd = dd.getDateFormat();
- model.setValue("/root/send/searchitem/dietdd", dd);
- model.refresh();
- ]]>
- </script>
- </button>
- <caption id="caption7" class="search_name" style="left:265px; top:35px; width:100px; height:17px; ">영양팀병동 :</caption>
- <select1 id="cmb_nutrward" ref="/root/send/searchitem/nutrward" class="combo_s_essential" appearance="minimal" style="left:369px; top:35px; width:111px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/basecode/wardcls/data">
- <label ref="wardnm"/>
- <value ref="wardcd"/>
- </itemset>
- </choices>
- </select1>
- <caption id="caption8" class="search_name" style="left:578px; top:35px; width:134px; height:17px; ">등록번호/환자명 :</caption>
- <caption id="caption9" style="left:782px; top:35px; width:24px; height:17px; ">/</caption>
- <input id="ipt_pid" ref="/root/send/searchitem/pid" class="input_search" autonext="false" maxlength="10" format="9999999999" style="left:710px; top:35px; width:70px; height:19px; ">
- <script type="javascript" ev:event="onkeydown">
- <![CDATA[
- inputEnterKey("btn_search", "DOMActivate");
- ]]>
- </script>
- </input>
- <input id="ipt_hngnm" ref="/root/send/searchitem/hngnm" class="input_search" style="left:790px; top:35px; width:65px; height:19px; ">
- <script type="javascript" ev:event="onkeydown">
- <![CDATA[
- inputEnterKey("btn_search", "DOMActivate");
- ]]>
- </script>
- </input>
- <button id="btn_hngnm" class="icon_search" visibility="hidden" style="left:860px; top:37px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- modal("SPPMC02500", "", "200", "200", "SPPMC02500", "/root/temp", "/root/main/patinfo/patinfolist");
- model.setValue("/root/send/searchitem/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
- model.setValue("/root/send/searchitem/hngnm", model.getValue("/root/main/patinfo/patinfolist/hngnm"));
- model.refresh();
- ]]>
- </script>
- </button>
- </group>
- <output id="opt_temp" class="output_search" style="left:5px; top:77px; width:40px; height:10px; background-color:#ffffff; border-color:#ffffff; border-style:hidden; ">
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if (btn_dietprcpsum.attribute("visibility")=="hidden") {
- btn_dietprcpsum.attribute("visibility")="visible";
- btn_dietprcpcopy.attribute("visibility")="visible";
- } else if (btn_dietprcpsum.attribute("visibility")=="visible") {
- btn_dietprcpsum.attribute("visibility")="hidden";
- btn_dietprcpcopy.attribute("visibility")="hidden";
- }
- ]]>
- </script>
- </output>
- <button id="btn_excel" class="btn2_letter2" style="left:1146px; top:77px; width:42px; height:19px; ">
- <caption>엑셀</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if ( grd_data.rows-1 > 0 ) {
- var filename = window.fileDialog("save", ",", false, "식사처방출력", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- if (filename != "") {
- grd_data.saveExcel(filename, "grd_data", true, false, "", "", "");
- }
- } else {
- messageBox("엑셀로 저장할 데이터가", "I004")
- return;
- }
- ]]>
- </script>
- </button>
- <datagrid id="grd_data" nodeset="/root/main/printlist" caption="병동^병동명^변경전병실^병실^등록번호^환자명^h혈액^h접촉^h공기^식사명^특이사항^remark^입력자^입력일시^test 변경전병실^caption1^caption2" colsep="^" colwidth="0, 0, 70, 60, 65, 85, 10, 10, 10, 210, 220, 192, 75, 110, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:103px; width:1195px; height:601px; text-align:center; ">
- <col ref="ward" type="combo">
- <choices>
- <itemset nodeset="/root/init/code/ward/dept">
- <label ref="depthngnm"/>
- <value ref="deptcd"/>
- </itemset>
- </choices>
- </col>
- <col ref="wardnm"/>
- <col ref="bfroom"/>
- <col ref="room"/>
- <col ref="pid"/>
- <col ref="hngnm"/>
- <col ref="disp1" visibility="hidden"/>
- <col ref="disp2" visibility="hidden"/>
- <col ref="disp3" visibility="hidden"/>
- <col ref="dietnm2" style="text-align:left; "/>
- <col ref="prcpdelivefact" style="text-align:left; "/>
- <col ref="remark" style="text-align:left; "/>
- <col ref="iptpsn"/>
- <col ref="iptdt" format="yyyy-mm-dd hh:nn"/>
- <col ref="newbfroom" visibility="hidden"/>
- <col ref="etcgb" visibility="hidden"/>
- <col ref="dietnm" visibility="hidden"/>
- <col ref="choidietyn" visibility="hidden"/>
- <col ref="clinccmtcnts" visibility="hidden"/>
- <col ref="tfdtlcd" visibility="hidden"/>
- <col ref="prcpdd" visibility="hidden"/>
- <col ref="dietmeal" visibility="hidden"/>
- <col ref="calr" visibility="hidden"/>
- <col ref="mealcnt" visibility="hidden"/>
- <col ref="dietcd" visibility="hidden"/>
- <col ref="dietmdlnm" visibility="hidden"/>
- <col ref="dietsmlnm" visibility="hidden"/>
- <col ref="calrunit" visibility="hidden"/>
- <col ref="remark1" visibility="hidden"/>
- <col ref="remark2" visibility="hidden"/>
- <col ref="remark3" visibility="hidden"/>
- <col ref="bmealdrnknm" visibility="hidden"/>
- <col ref="prntprcpdelivefact" visibility="hidden"/>
- <col ref="dietlrgcd" visibility="hidden"/>
- <col ref="remfactnm" visibility="hidden"/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- //환자별식사력조회 화면으로 연결
- if ( grd_data.isCell(event.target) && grd_data.row >= grd_data.fixedRows ) {
- // 'P'는 식사처방출력 화면임을 뜻하는 구분자임.
- model.setValue("/root/send/popup/flag", "P");
- model.setValue("/root/send/popup/pid", model.getValue("/root/main/printlist["+grd_data.row+"]/pid"));
- model.setValue("/root/send/popup/prcpdd", model.getValue("/root/main/printlist["+grd_data.row+"]/prcpdd"));
- open("SMANT01000", "", "", "", "popup", "/root/send/popup", "/root/main/receivedata");
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_data.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <caption id="caption13" class="cell_1" style="left:984px; top:718px; width:107px; height:23px; vertical-align:middle; ">네임카드 개수</caption>
- <line id="line2" class="line_1" style="x1:984px; y1:713px; x2:1194px; y2:713px; "/>
- <line id="line6" class="line_3" style="x1:984px; y1:741px; x2:1194px; y2:741px; "/>
- <output id="opt_nmcardcnt" ref="/root/send/nmcardcnt" class="output_fix" style="left:1094px; top:719px; width:100px; height:19px; text-align:center; "/>
- <line id="line5" class="line_1" style="x1:0px; y1:98px; x2:1195px; y2:98px; "/>
- <datagrid id="datagrid1" nodeset="/root/main/printlist2" visibility="hidden" caption="병동^병동명^변경전병실^병실^등록번호^환자명^식사명^특이사항^remark^보호자식^입력자^입력일시^caption1" colsep="^" colwidth="0, 0, 70, 60, 65, 85, 210, 220, 192, 70, 75, 110, 100" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:680px; top:350px; width:435px; height:290px; text-align:center; ">
- <col ref="ward" type="combo">
- <choices>
- <itemset nodeset="/root/init/code/ward/dept">
- <label ref="depthngnm"/>
- <value ref="deptcd"/>
- </itemset>
- </choices>
- </col>
- <col ref="wardnm"/>
- <col ref="bfroom"/>
- <col ref="room"/>
- <col ref="pid"/>
- <col ref="hngnm"/>
- <col ref="dietnm2" style="text-align:left; "/>
- <col ref="prcpdelivefact" style="text-align:left; "/>
- <col ref="remark" style="text-align:left; "/>
- <col ref="procermealyn"/>
- <col ref="iptpsn"/>
- <col ref="iptdt" format="yyyy-mm-dd hh:nn"/>
- <col ref="etcgb" visibility="hidden"/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- //환자별식사력조회 화면으로 연결
- if ( grd_data.isCell(event.target) && grd_data.row >= grd_data.fixedRows ) {
- // 'P'는 식사처방출력 화면임을 뜻하는 구분자임.
- model.setValue("/root/send/popup/flag", "P");
- model.setValue("/root/send/popup/pid", model.getValue("/root/main/printlist["+grd_data.row+"]/pid"));
- model.setValue("/root/send/popup/prcpdd", model.getValue("/root/main/printlist["+grd_data.row+"]/prcpdd"));
- open("SMANT01000", "", "", "", "popup", "/root/send/popup", "/root/main/receivedata");
- }
- ]]>
- </script>
- </datagrid>
- </group>
- <group id="grp_btn" scroll="auto" style="left:0px; top:761px; width:1195px; height:23px; ">
- <button id="btn_endafterupdate" class="btn4_letter9" style="left:1px; top:1px; width:128px; height:22px; ">
- <caption>마감후식사처방수정</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //navigate("SMANC00300", 0,100,150, "SMANC00300", "/root/send/openpopup", "/root/main/receivedata");
- //navigate("SMANT01200", 0,100,150, "SMANT01200");
- //modal("SMANT01200");
- open("SMANT01200", "","","", "SMANT01200");
- ]]>
- </script>
- </button>
- <button id="btn_tableset" class="btn4_letter5" style="left:144px; top:1px; width:92px; height:22px; ">
- <caption>상차림현황</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //navigate("SMANC00300", 0,100,150, "SMANC00300", "/root/send/openpopup", "/root/main/receivedata");
- //navigate("SMANT00600", 0,100,150, "SMANT00600");
- //modal("SMANT00600");
- open("SMANT00600", "","","", "SMANT00600");
- ]]>
- </script>
- </button>
- <button id="btn_wardtableset" class="btn4_letter8" style="left:239px; top:1px; width:128px; height:22px; ">
- <caption>병동별상차림현황</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //navigate("SMANC00300", 0,100,150, "SMANC00300", "/root/send/openpopup", "/root/main/receivedata");
- //navigate("SMANT00800", 0,100,150, "SMANT00800");
- //modal("SMANT00800");
- open("SMANT00800", "","","", "SMANT00800");
- ]]>
- </script>
- </button>
- <button id="btn_nmcard" class="btn4_letter6" style="left:791px; top:1px; width:104px; height:22px; ">
- <caption>NameCard</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var instcd = getUserInfo("dutplceinstcd");
- if (model.getValue("/root/send/searchitem/endflag") == "2"){
- openLoadingBar("2차 NameCard 작업중입니다.") ;
- //model.removeNodeset("/root/main/printlist3");
- var kk = 0;
- var chk = "";
- for (var i = 1; i < grd_data.rows; i ++){
- chk = "N";
- var spid = model.getValue("/root/main/printlist[" + i + "]/pid");
- var sdietcd = model.getValue("/root/main/printlist[" + i + "]/dietcd");
- var slrgcd = model.getValue("/root/main/printlist[" + i + "]/dietlrgcd");
- var smeal = model.getValue("/root/main/printlist[" + i + "]//procermealyn");
- var setc = model.getValue("/root/main/printlist[" + i + "]/etcgb");
- var setc2 = "";
- for (var j = 1; j < datagrid1.rows; j ++){
- var spid1 = model.getValue("/root/main/printlist2[" + j + "]/pid");
- var sdietcd1 = model.getValue("/root/main/printlist2[" + j + "]/dietcd");
- setc2 = model.getValue("/root/main/printlist2[" + j + "]/etcgb");
- if (spid == spid1 && sdietcd == sdietcd1){
- chk = "Y";
- //break;
- }
- }
- /*
- if (spid == "718899"){
- alert("==" + chk + "==" + slrgcd + "==" + smeal + "==" + setc2);
- }
- */
- if (chk == "N"){
- if (slrgcd == "Q9"){
- if (smeal != " " && smeal != ""){
- kk = parseInt(kk) + 1;
- if (kk == 1){
- copyNodesetType("/root/main1/printlist3", "/root/main/printlist[" + i + "]", "replace", model, model);
- model.setValue("/root/main1/printlist3[" + kk + "]/dietnm2", smeal);
- model.setValue("/root/main1/printlist3[" + kk + "]/remfactnm", "");
- model.setValue("/root/main1/printlist3[" + kk + "]/bmealdrnknm", "");
- model.setValue("/root/main1/printlist3[" + kk + "]/remark", "");
- }else{
- copyNodesetType("/root/main1/printlist3", "/root/main/printlist[" + i + "]", "after", model, model);
- model.setValue("/root/main1/printlist3[" + kk + "]/dietnm2", smeal);
- model.setValue("/root/main1/printlist3[" + kk + "]/remfactnm", "");
- model.setValue("/root/main1/printlist3[" + kk + "]/bmealdrnknm", "");
- model.setValue("/root/main1/printlist3[" + kk + "]/remark", "");
- }
- }
- }else{
- kk = parseInt(kk) + 1;
- if (kk == 1){
- copyNodesetType("/root/main1/printlist3", "/root/main/printlist[" + i + "]", "replace", model, model);
- }else{
- copyNodesetType("/root/main1/printlist3", "/root/main/printlist[" + i + "]", "after", model, model);
- }
- if (smeal != " " && smeal != ""){
- kk = parseInt(kk) + 1;
- if (kk == 1){
- copyNodesetType("/root/main1/printlist3", "/root/main/printlist[" + i + "]", "replace", model, model);
- model.setValue("/root/main1/printlist3[" + kk + "]/dietnm2", smeal);
- model.setValue("/root/main1/printlist3[" + kk + "]/remfactnm", "");
- model.setValue("/root/main1/printlist3[" + kk + "]/bmealdrnknm", "");
- model.setValue("/root/main1/printlist3[" + kk + "]/remark", "");
- }else{
- copyNodesetType("/root/main1/printlist3", "/root/main/printlist[" + i + "]", "after", model, model);
- model.setValue("/root/main1/printlist3[" + kk + "]/dietnm2", smeal);
- model.setValue("/root/main1/printlist3[" + kk + "]/remfactnm", "");
- model.setValue("/root/main1/printlist3[" + kk + "]/bmealdrnknm", "");
- model.setValue("/root/main1/printlist3[" + kk + "]/remark", "");
- }
- }
- }
- }else{
- if (setc == "2"){
- if (slrgcd == "Q9"){
- if (smeal != " " && smeal != ""){
- kk = parseInt(kk) + 1;
- if (kk == 1){
- copyNodesetType("/root/main1/printlist3", "/root/main/printlist[" + i + "]", "replace", model, model);
- model.setValue("/root/main1/printlist3[" + kk + "]/dietnm2", smeal);
- model.setValue("/root/main1/printlist3[" + kk + "]/remfactnm", "");
- model.setValue("/root/main1/printlist3[" + kk + "]/bmealdrnknm", "");
- model.setValue("/root/main1/printlist3[" + kk + "]/remark", "");
- }else{
- copyNodesetType("/root/main1/printlist3", "/root/main/printlist[" + i + "]", "after", model, model);
- model.setValue("/root/main1/printlist3[" + kk + "]/dietnm2", smeal);
- model.setValue("/root/main1/printlist3[" + kk + "]/remfactnm", "");
- model.setValue("/root/main1/printlist3[" + kk + "]/bmealdrnknm", "");
- model.setValue("/root/main1/printlist3[" + kk + "]/remark", "");
- }
- }
- }else{
- if (smeal != " " && smeal != ""){
- kk = parseInt(kk) + 1;
- if (kk == 1){
- copyNodesetType("/root/main1/printlist3", "/root/main/printlist[" + i + "]", "replace", model, model);
- model.setValue("/root/main1/printlist3[" + kk + "]/dietnm2", smeal);
- model.setValue("/root/main1/printlist3[" + kk + "]/remfactnm", "");
- model.setValue("/root/main1/printlist3[" + kk + "]/bmealdrnknm", "");
- model.setValue("/root/main1/printlist3[" + kk + "]/remark", "");
- }else{
- copyNodesetType("/root/main1/printlist3", "/root/main/printlist[" + i + "]", "after", model, model);
- model.setValue("/root/main1/printlist3[" + kk + "]/dietnm2", smeal);
- model.setValue("/root/main1/printlist3[" + kk + "]/remfactnm", "");
- model.setValue("/root/main1/printlist3[" + kk + "]/bmealdrnknm", "");
- model.setValue("/root/main1/printlist3[" + kk + "]/remark", "");
- }
- }
- }
- }else{
- if (smeal != " " && smeal != ""){
- kk = parseInt(kk) + 1;
- if (kk == 1){
- copyNodesetType("/root/main1/printlist3", "/root/main/printlist[" + i + "]", "replace", model, model);
- model.setValue("/root/main1/printlist3[" + kk + "]/dietnm2", smeal);
- model.setValue("/root/main1/printlist3[" + kk + "]/remfactnm", "");
- model.setValue("/root/main1/printlist3[" + kk + "]/bmealdrnknm", "");
- model.setValue("/root/main1/printlist3[" + kk + "]/remark", "");
- }else{
- copyNodesetType("/root/main1/printlist3", "/root/main/printlist[" + i + "]", "after", model, model);
- model.setValue("/root/main1/printlist3[" + kk + "]/dietnm2", smeal);
- model.setValue("/root/main1/printlist3[" + kk + "]/remfactnm", "");
- model.setValue("/root/main1/printlist3[" + kk + "]/bmealdrnknm", "");
- model.setValue("/root/main1/printlist3[" + kk + "]/remark", "");
- }
- }
- }
- }
- /*
- if (chk == "N"){
- if (slrgcd == "Q9"){
- if (smeal != " " && smeal != ""){
- model.setValue("/root/main/printlist[" + i + "]/etcgb", "1");
- model.setValue("/root/main/printlist[" + i + "]/dietnm2", smeal);
- }else{
- model.setValue("/root/main/printlist[" + i + "]/etcgb", "2");
- }
- }else{
- model.setValue("/root/main/printlist[" + i + "]/etcgb", "1");
- }
- }else{
- if (setc == "2"){
- if (slrgcd == "Q9"){
- if (smeal != " " && smeal != ""){
- model.setValue("/root/main/printlist[" + i + "]/etcgb", "1");
- model.setValue("/root/main/printlist[" + i + "]/dietnm2", smeal);
- }else{
- model.setValue("/root/main/printlist[" + i + "]/etcgb", "2");
- }
- }else{
- model.setValue("/root/main/printlist[" + i + "]/etcgb", "2");
- }
- }else if (setc2 == "1"){
- model.setValue("/root/main/printlist[" + i + "]/etcgb", "2");
- }
- }
- */
- }
- closeLoadingBar() ;
- }
- fdevifact();
- model.refresh();
- if ( grd_data.rows-1 > 0 ) {
- if ( messageBox(model.getValue("/root/send/searchitem/endmsg"), "Q003") == 6 ) {
- if (model.getValue("/root/send/searchitem/endflag") == "2"){
- copyNodesetType("/root/send1/printlist", "/root/main1/printlist3", "replace", model, model);
- // if(instcd == "031"){
- // exeReportPreview("RPANT00108", "XMLSTR", "/root/send1/printlist"); // 20120430 본원 프린터 변경으로 출력지 변경
- // }else{/
- exeReportPreview("RPANT00110", "XMLSTR", "/root/send1/printlist");
- //}
- }else{
- copyNodesetType("/root/send1/printlist", "/root/main/printlist[etcgb='1']", "replace", model, model);
- // if(instcd == "031"){
- // exeReportPreview("RPANT00107", "XMLSTR", "/root/send1/printlist");
- // }else{
- exeReportPreview("RPANT00109", "XMLSTR", "/root/send1/printlist");
- //}
- }
- } else { return; }
- } else {
- messageBox("출력할 데이터가", "I004")
- return;
- }
- ]]>
- </script>
- </button>
- <button id="btn_bmealslip" class="btn4_letter4" style="left:899px; top:1px; width:80px; height:22px; ">
- <caption>간식전표</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //간식전표 클릭시 세부구분 조건을 간식으로 선택후 자동 조회
- model.setValue("/root/send/searchitem/nmcardflag", "6");
- btn_search.dispatch("DOMActivate");
- submit("TRANT01005");
- if ( grd_data.rows-1 > 0 ) {
- //var endyn = model.getValue("/root/send/searchitem/endyn");
- //var dd = model.getValue("/root/send/searchitem/dietdd");
- var meal = model.getValue("/root/send/searchitem/mealflag");
-
- if (meal=='1') {
- meal = '조식';
- //var mealtm = '10:00';
- var mealtm = model.getValue("/root/send2/timelist[cntlcd1='11']/cdid");
- } else if (meal=='2') {
- meal = '중식';
- //var mealtm = '15:00';
- var mealtm = model.getValue("/root/send2/timelist[cntlcd1='21']/cdid");
- } else if (meal=='3') {
- meal = '석식';
- //var mealtm = '20:30';
- var mealtm = model.getValue("/root/send2/timelist[cntlcd1='31']/cdid");
- }
-
- if ( messageBox(model.getValue("/root/send/searchitem/endmsg"), "Q003") == 6 ) {
- model.copyNode("/root/send/bmealslip", "/root/main");
- //ganlabel(meal, mealtm);
- //model.setValue("/root/send/bmealslip/printlist[1]/dietmeal", mealtm);
-
- // 여의도 성모병원은 1/2차이면서 중식이면서 경장영양식 4회 일 경우는 간식전표 미출력되게 한다.
- if (getUserInfo("dutplceinstcd") == "011" && model.getValue("/root/send/searchitem/endflag") != "3" ) {
- model.removeNodeset("/root/send/bmealslip/printlist[dietmeal='중식' and mealcnt='4' and dietlrgcd='Q2' and dietmdlcd='09']");
- model.refresh();
- }
-
- model.makeValue("/root/send/bmealslip/mealtm", mealtm);
- exeReportPreview("RPANT00103", "XMLSTR", "/root/send/bmealslip");
- } else { return; }
- } else {
- messageBox("출력할 데이터가", "I004")
- return;
- }
- ]]>
- </script>
- </button>
- <button id="btn_tflabel" class="btn4_letter7" style="left:982px; top:1px; width:116px; height:22px; ">
- <caption>경장영양식라벨</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //경장영양식라벨 클릭시 세부구분 조건을 경장영양으로 선택후 자동 조회
- model.setValue("/root/send/searchitem/nmcardflag", "5");
- btn_search.dispatch("DOMActivate");
- submit("TRANT01005");
- if ( grd_data.rows-1 > 0 ) {
- //var endyn = model.getValue("/root/send/searchitem/endyn");
- //var dd = model.getValue("/root/send/searchitem/dietdd");
- var meal = model.getValue("/root/send/searchitem/mealflag");
- //dd = dd.substr(6,2);
- if (meal=='1') {
- meal = '조식';
- //var mealtm = '07:30';
- var mealtm = model.getValue("/root/send2/timelist[cntlcd1='1']/cdid");
- } else if (meal=='2') {
- meal = '중식';
- //var mealtm = '12:30';
- //var mealtm = instance1.selectSingleNode("/root/send2/timelist[cntlcd1='2']");
- var mealtm = model.getValue("/root/send2/timelist[cntlcd1='2']/cdid");
- } else if (meal=='3') {
- meal = '석식';
- //var mealtm = '18:00';
- var mealtm = model.getValue("/root/send2/timelist[cntlcd1='3']/cdid");
- }
- if ( messageBox(model.getValue("/root/send/searchitem/endmsg"), "Q003") == 6 ) {
- ftflabel(meal, mealtm);
- } else { return; }
- } else {
- messageBox("출력할 데이터가", "I004")
- return;
- }
- ]]>
- </script>
- </button>
- <button id="btn_patdietslip" class="btn4_letter5" style="left:1100px; top:1px; width:92px; height:22px; ">
- <caption>환자식전표</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if ( grd_data.rows-1 > 0 ) {
-
- //환자식전표에서 동일 병실은 첫번째 행에만 병실을 표시하기 위함.
- // model.makeValue("/root/main/printlist[1]/roomhiddenyn", "N");
- // for (var i = 2; i < grd_data.rows; i ++) {
- // var room1 = model.getValue("/root/main/printlist[" + i + "]/room");
- // var room2 = model.getValue("/root/main/printlist[" + (i-1) + "]/room");
- // if ( room1 != room2 ) {
- // model.makeValue("/root/main/printlist[" + i + "]/roomhiddenyn", "N");
- // } else {
- // model.makeValue("/root/main/printlist[" + i + "]/roomhiddenyn", "Y");
- // }
- // }
-
- if ( messageBox(model.getValue("/root/send/searchitem/endmsg"), "Q003") == 6 ) {
- // var kk = 0;
- // for (var i = 0; i < grd_data.rows; i ++) {
- // kk = parseFloat(kk) + 1;
- // model.makeValue("/root/printinfo/printlist[" + kk + "]/ward", model.getValue("/root/main/printlist[" + i + "]/ward"));
- // model.makeValue("/root/printinfo/printlist[" + kk + "]/wardnm", model.getValue("/root/main/printlist[" + i + "]/wardnm"));
- // model.makeValue("/root/printinfo/printlist[" + kk + "]/room", model.getValue("/root/main/printlist[" + i + "]/room"));
- // model.makeValue("/root/printinfo/printlist[" + kk + "]/pid", model.getValue("/root/main/printlist[" + i + "]/pid"));
- // model.makeValue("/root/printinfo/printlist[" + kk + "]/hngnm", model.getValue("/root/main/printlist[" + i + "]/hngnm"));
- // model.makeValue("/root/printinfo/printlist[" + kk + "]/dietnm2", model.getValue("/root/main/printlist[" + i + "]/dietnm2"));
- // if (model.getValue("/root/main/printlist[" + i + "]/prcpdelivefact") != "-") {
- // kk = parseFloat(kk) + 1;
- // model.makeValue("/root/printinfo/printlist[" + kk + "]/wardnm", model.getValue("/root/main/printlist[" + i + "]/wardnm"));
- // model.makeValue("/root/printinfo/printlist[" + kk + "]/room", model.getValue("/root/main/printlist[" + i + "]/room"));
- // model.makeValue("/root/printinfo/printlist[" + kk + "]/dietnm2", model.getValue("/root/main/printlist[" + i + "]/prcpdelivefact"));
- // }
- // }
- model.copyNode("/root/send/patdietslip", "/root/main");
- // model.copyNode("/root/send/patdietslip", "/root/printinfo");
- exeReportPreview("RPANT00102", "XMLSTR", "/root/send/patdietslip");
- } else { return; }
- } else {
- messageBox("출력할 데이터가", "I004")
- return;
- }
- ]]>
- </script>
- </button>
- <button id="btn_dietchnglist" class="btn4_letter8" style="left:660px; top:1px; width:128px; height:22px; ">
- <caption>식사변경내역전표</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //클릭시 마감구분을 '마감후'로 선택후 자동 조회
- model.setValue("/root/send/searchitem/endflag", "3");
- btn_search.dispatch("DOMActivate");
-
- if ( grd_data.rows-1 > 0 ) {
- model.copyNode("/root/send/dietchnglist", "/root/main");
- //model.setValue("/root/send/bmealslip/printlist[1]/dietmeal", mealtm);
- exeReportPreview("RPANT00105", "XMLSTR", "/root/send/dietchnglist");
- } else {
- messageBox("출력할 데이터가", "I004")
- return;
- }
- ]]>
- </script>
- </button>
- <button id="btn_dietprcpsum" class="btn4_letter6" style="left:370px; top:1px; width:104px; height:22px; ">
- <caption>식사처방집계</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if ( messageBox("수동집계를", "Q004") == 6 ) {
- model.makeNode("/root/send/searchitem/batchflag");
- model.setValue("/root/send/searchitem/batchflag", "manual"); //batch 실행구분 = manual(수동)
- submit("TXANT00101");
- if ( model.getValue("/root/temp/ret/retmsg") == "OK" ) {
- messageBox("수동집계가", "I002");
- }
- model.resetInstanceNode("/root/temp");
- model.removenode("/root/send/searchitem/batchflag");
- } else { return; }
- ]]>
- </script>
- </button>
- <button id="btn_dietprcpcopy" class="btn4_letter6" style="left:475px; top:1px; width:104px; height:22px; ">
- <caption>식사처방복사</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if ( messageBox(ipt_dietdd.value.substr(4,2) + "월 " + ipt_dietdd.value.substr(6,2) + "일 식사처방 발생을", "Q004") == 6 ) {
- model.makeNode("/root/send/searchitem/batchflag");
- model.setValue("/root/send/searchitem/batchflag", "manual"); //batch 실행구분 = manual(수동)
- submit("TXANT00102");
- if ( model.getValue("/root/temp/ret/retmsg") == "OK" ) {
- messageBox("식사처방복사가", "I002");
- }
- model.resetInstanceNode("/root/temp");
- model.removenode("/root/send/searchitem/batchflag");
- } else { return; }
- ]]>
- </script>
- </button>
- <button id="button2" class="btn4_letter4" style="left:580px; top:1px; width:80px; height:22px; ">
- <caption>환자R복사</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if ( messageBox(ipt_dietdd.value.substr(4,2) + "월 " + ipt_dietdd.value.substr(6,2) + "일 개별환자관리 리마크 복사를", "Q004") == 6 ) {
- model.makeNode("/root/send/searchitem/batchflag");
- model.setValue("/root/send/searchitem/batchflag", "manual"); //batch 실행구분 = manual(수동)
- submit("TXANT00103");
- if ( model.getValue("/root/temp/ret/retmsg") == "OK" ) {
- messageBox("개별환자관리 리마크 복사", "I002");
- }
- model.resetInstanceNode("/root/temp");
- model.removenode("/root/send/searchitem/batchflag");
- } else { return; }
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|