12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136 |
- <?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>
- <glycosuria>
- <cerealgrup1/>
- <lipidlow1/>
- <lipidmid1/>
- <lipidhigh1/>
- <vegtgrup/>
- <lipidgrup1/>
- <milkgrup1/>
- <fruitgrup/>
- <pid/>
- <nutrmngtkind/>
- <execdd/>
- <cnstflag/>
- </glycosuria>
- <kidney>
- <cerealgrup2/>
- <meatgrup2/>
- <vegtlowk2/>
- <vegtmidk2/>
- <vegthighk2/>
- <lipidgrup2/>
- <milkgrup2/>
- <fruitlowk2/>
- <fruitmidk2/>
- <fruithighk2/>
- <calrsupply2/>
- <pid/>
- <nutrmngtkind/>
- <execdd/>
- <cnstflag/>
- </kidney>
- <etrlfd>
- <pid/>
- <nutrmngtkind/>
- <execdd/>
- <cnstflag/>
- <intkkind/>
- <intknutrcd/>
- <intknutrnm/>
- <intkunit/>
- <intkqty/>
- </etrlfd>
- <varices>
- <pid/>
- <nutrmngtkind/>
- <execdd/>
- <cnstflag/>
- <intkkind2/>
- <intknutrcd2/>
- <intknutrnm2/>
- <intkunit2/>
- <intkqty2/>
- </varices>
- <supply>
- <pid/>
- <nutrmngtkind/>
- <execdd/>
- <cnstflag/>
- <intkkind3/>
- <intknutrcd3/>
- <intknutrnm3/>
- <intkunit3/>
- <intkqty3/>
- </supply>
- <comnutr>
- <check/>
- <pid/>
- <nutrmngtkind/>
- <execdd/>
- <cnstflag/>
- <nutrcd/>
- <nutroral/>
- <nutroralints/>
- <nutrvein/>
- <nutrsum/>
- <recmqty/>
- </comnutr>
- </data>
- <common>
- <valu>
- <calrintk/>
- <calr/>
- <protintk/>
- <prot/>
- <intkqtyetc/>
- <dietercmt/>
- <intknutr/>
- <intkqty/>
- <intknutr2/>
- <intkqty2/>
- <intknutr3/>
- <intkqty3/>
- </valu>
- </common>
- <exchbase>
- <glycosuria>
- <exchstndcd/>
- <calr/>
- <prot/>
- <lipo/>
- <gluco/>
- </glycosuria>
- <kidney>
- <exchstndcd/>
- <calr/>
- <prot/>
- <sodium/>
- <potas/>
- <phos/>
- </kidney>
- <etrlfd>
- <exchstndcd/>
- <exchstndnm/>
- <exchstndunit/>
- <calr/>
- <prot/>
- <lipo/>
- <gluco/>
- <sodium/>
- <calcium/>
- <phos/>
- <iron/>
- <potas/>
- <fiber/>
- </etrlfd>
- <varices>
- <exchstndcd/>
- <exchstndnm/>
- <exchstndunit/>
- <calr/>
- <prot/>
- <lipo/>
- <gluco/>
- <sodium/>
- <calcium/>
- <phos/>
- <iron/>
- <potas/>
- <fiber/>
- </varices>
- <supply>
- <exchstndcd/>
- <exchstndnm/>
- <exchstndunit/>
- <calr/>
- <prot/>
- <lipo/>
- <gluco/>
- <sodium/>
- <calcium/>
- <phos/>
- <iron/>
- <potas/>
- <fiber/>
- </supply>
- </exchbase>
- <receivedata/>
- </main>
- <send>
- <searchitem>
- <sickcd/>
- </searchitem>
- <data>
- <comnutr/>
- <glycosuria/>
- <kidney/>
- <etrlfd/>
- <varices/>
- <supply/>
- </data>
- </send>
- <hidden/>
- <init>
- <basecode>
- <nutrcd>
- <A0527>
- <cdid/>
- <cdnm/>
- </A0527>
- </nutrcd>
- <etcmatr>
- <etrlfd>
- <cdid/>
- <cdnm/>
- </etrlfd>
- <varices>
- <cdid/>
- <cdnm/>
- </varices>
- <supply>
- <cdid/>
- <cdnm/>
- </supply>
- </etcmatr>
- </basecode>
- </init>
- <temp>
- <data/>
- </temp>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- finit();
- fopensearch();
- //btn_calc.dispatch("DOMActivate"); //화면 오픈시 계산 수행
- //model.setFocus("ipt_pid");
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
- function finit() {
- // 화면open시 공통코드 setting
- zbcfGetCodeList( new Array( "A0527" ), new Array( "/root/init/basecode/nutrcd" ) );
- model.resetInstanceNode("/root/main/data");
- model.resetInstanceNode("/root/send");
- //model.removeNodeset("/root/main/data/glycosuria");
- //model.refresh();
- }
- function fopensearch() {
- submit("TRANC00104");
- model.setValue("/root/main/common/valu/calrintk", model.getValue("/root/main/receivedata/calrintk"));
- model.setValue("/root/main/common/valu/calr", model.getValue("/root/main/receivedata/calrintkqty"));
- model.setValue("/root/main/common/valu/protintk", model.getValue("/root/main/receivedata/protintk"));
- model.setValue("/root/main/common/valu/prot", model.getValue("/root/main/receivedata/protintkqty"));
- model.setValue("/root/main/common/valu/intkqtyetc", model.getValue("/root/main/receivedata/intkqtyetc"));
- model.setValue("/root/main/common/valu/dietercmt", model.getValue("/root/main/receivedata/dietercmt"));
- //저장된 영양소별 데이터가 없을경우 환자별영양관리 화면의 열량 및 단백질 권장량 계산값을 자동셋팅
- if (model.getValue("/root/main/data/comnutr[1]/pid") == "") {
- model.setValue("/root/main/data/comnutr[" + 2 + "]/recmqty", model.getValue("/root/main/receivedata/calrrecmqty"));
- model.setValue("/root/main/data/comnutr[" + 3 + "]/recmqty", model.getValue("/root/main/receivedata/protrecmqty"));
- }
- //model.refresh();
- submit("TRANC00108"); //경장,정맥,보충 재료 조회
- }
- ]]>
- </script>
- <submission id="TRZBC00101"/>
- <submission id="TXANC00104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" resultref="/root/hidden"/>
- <submission id="TRANC00104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/receivedata" resultref="/root/main/data"/>
- <submission id="TRANC00105" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/main/exchbase"/>
- <submission id="TRANC00108" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/init/basecode/etcmatr"/>
- <bind id="bind_nutrcd" ref="/root/main/data/comnutr/nutrcd" readonly="../nutrcd!=''"/>
- </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"/>
- </xhtml:head>
- <xhtml:body pagewidth="950" pageheight="620" guideline="1,900;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="grp_biz" scroll="auto" style="left:0px; top:0px; width:900px; height:574px; ">
- <button id="btn_clear" class="btn2_letter3" style="left:797px; top:37px; width:53px; height:19px; ">
- <caption>Clear</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if ( btn_glycosuria.selected ) {
- model.resetInstanceNode("/root/main/data/glycosuria");
- }
- else if ( btn_kidney.selected ) {
- model.resetInstanceNode("/root/main/data/kidney");
- }
- else if ( btn_etrlfd.selected ) {
- model.resetInstanceNode("/root/main/data/etrlfd");
- }
- else if ( btn_varices.selected ) {
- model.resetInstanceNode("/root/main/data/varices");
- }
- else if ( btn_supply.selected ) {
- model.resetInstanceNode("/root/main/data/supply");
- }
- //model.refresh();
- ]]>
- </script>
- </button>
- <line id="line20" class="line_1" style="x1:0px; y1:405px; x2:895px; y2:405px; "/>
- <line id="line21" class="line_2" style="x1:0px; y1:431px; x2:895px; y2:431px; "/>
- <caption id="caption41" class="tit_2" style="left:9px; top:389px; width:206px; height:13px; ">섭취량 평가</caption>
- <line id="line23" class="line_2" style="x1:0px; y1:454px; x2:895px; y2:454px; "/>
- <input id="ipt_calrvol" ref="/root/main/common/valu/calr" class="input_search" style="left:68px; top:433px; width:249px; height:19px; text-align:center; "/>
- <input id="ipt_protvol" ref="/root/main/common/valu/prot" class="input_search" style="left:498px; top:434px; width:342px; height:19px; text-align:center; "/>
- <button id="btn_calc" class="btn2_letter2" style="left:852px; top:37px; width:42px; height:19px; ">
- <caption>계산</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var glycosuria_calr = 0; //당뇨-열량
- var glycosuria_prot = 0; //당뇨-단백질
- var glycosuria_lipo = 0; //당뇨-지질
- var glycosuria_gluco = 0; //당뇨-당질
- var kidney_calr = 0; //신장-열량
- var kidney_prot = 0; //신장-단백질
- var kidney_sodium = 0; //신장-나트륨
- var kidney_potas = 0; //신장-칼륨
- var kidney_phos = 0; //신장-인
- var etrlfd_calr = 0; //경장-열량
- var etrlfd_prot = 0; //경장-단백질
- var etrlfd_lipo = 0; //경장-지질
- var etrlfd_gluco = 0; //경장-당질
- var etrlfd_sodium = 0; //경장-나트륨
- var etrlfd_potas = 0; //경장-칼륨
- var etrlfd_phos = 0; //경장-인
- var etrlfd_fiber = 0; //경장-식이섬유
- var etrlfd_iron = 0; //경장-철
- var etrlfd_calcium = 0; //경장-칼슘
- var varices_calr = 0; //정맥-열량
- var varices_prot = 0; //정맥-단백질
- var varices_lipo = 0; //정맥-지질
- var varices_gluco = 0; //정맥-당질
- var varices_sodium = 0; //정맥-나트륨
- var varices_potas = 0; //정맥-칼륨
- var varices_phos = 0; //정맥-인
- var varices_fiber = 0; //정맥-식이섬유
- var varices_iron = 0; //정맥-철
- var varices_calcium = 0; //정맥-칼슘
- var supply_calr = 0; //보충-열량
- var supply_prot = 0; //보충-단백질
- var supply_lipo = 0; //보충-지질
- var supply_gluco = 0; //보충-당질
- var supply_sodium = 0; //보충-나트륨
- var supply_potas = 0; //보충-칼륨
- var supply_phos = 0; //보충-인
- var supply_fiber = 0; //보충-식이섬유
- var supply_iron = 0; //보충-철
- var supply_calcium = 0; //보충-칼슘
- // 당뇨 교환기준 데이터를 조회해온다.
- model.setValue("/root/send/searchitem/sickcd", "1");
- submit("TRANC00105");
- for ( i=0; i<8; i++ ) {
- if ( i == 0 ) {
- var code = "1010"; //당뇨-곡류군의 교환기준코드
- var vol = model.getValue("/root/main/data/glycosuria/cerealgrup1");
- } else if ( i == 1 ) {
- var code = "1015"; //당뇨-어육류군-저지방의 교환기준코드
- var vol = model.getValue("/root/main/data/glycosuria/lipidlow1");
- } else if ( i == 2 ) {
- var code = "1016"; //당뇨-어육류군-중지방의 교환기준코드
- var vol = model.getValue("/root/main/data/glycosuria/lipidmid1");
- } else if ( i == 3 ) {
- var code = "1017"; //당뇨-어육류군-고지방의 교환기준코드
- var vol = model.getValue("/root/main/data/glycosuria/lipidhigh1");
- } else if ( i == 4 ) {
- var code = "1020"; //당뇨-채소군의 교환기준코드
- var vol = model.getValue("/root/main/data/glycosuria/vegtgrup");
- } else if ( i == 5 ) {
- var code = "1025"; //당뇨-지방군의 교환기준코드
- var vol = model.getValue("/root/main/data/glycosuria/lipidgrup1");
- } else if ( i == 6 ) {
- var code = "1030"; //당뇨-우유군의 교환기준코드
- var vol = model.getValue("/root/main/data/glycosuria/milkgrup1");
- } else if ( i == 7 ) {
- var code = "1035"; //당뇨-과일군의 교환기준코드
- var vol = model.getValue("/root/main/data/glycosuria/fruitgrup");
- }
-
- glycosuria_calr = glycosuria_calr + model.getValue("/root/main/exchbase/glycosuria[exchstndcd='"+code+"']/calr") * vol;
- glycosuria_prot = glycosuria_prot + model.getValue("/root/main/exchbase/glycosuria[exchstndcd='"+code+"']/prot") * vol;
- glycosuria_lipo = glycosuria_lipo + model.getValue("/root/main/exchbase/glycosuria[exchstndcd='"+code+"']/lipo") * vol;
- glycosuria_gluco = glycosuria_gluco + model.getValue("/root/main/exchbase/glycosuria[exchstndcd='"+code+"']/gluco") * vol;
- }
- // var val1 = model.getValue("/root/main/data/glycosuria/cerealgrup1");
- // var val2 = model.getValue("/root/main/data/glycosuria/lipidlow1");
- // var xpath1 = grd_common.nodeset + "[1]/" + grd_common.colAttribute(2, "ref");
- // var xpath2 = grd_common.nodeset + "[2]/" + grd_common.colAttribute(2, "ref");
- // model.setValue(xpath1, val1);
- // model.setValue(xpath2, val2);
-
- // 신장 교환기준 데이터를 조회해온다.
- model.setValue("/root/send/searchitem/sickcd", "2");
- submit("TRANC00105");
- for ( i=0; i<11; i++ ) {
- if ( i == 0 ) {
- var code = "2010"; //신장-곡류군의 교환기준코드
- var vol = model.getValue("/root/main/data/kidney/cerealgrup2");
- } else if ( i == 1 ) {
- var code = "2015"; //신장-어육류군의 교환기준코드
- var vol = model.getValue("/root/main/data/kidney/meatgrup2");
- } else if ( i == 2 ) {
- var code = "2020"; //신장-채소군-저칼륨의 교환기준코드
- var vol = model.getValue("/root/main/data/kidney/vegtlowk2");
- } else if ( i == 3 ) {
- var code = "2021"; //신장-채소군-중칼륨의 교환기준코드
- var vol = model.getValue("/root/main/data/kidney/vegtmidk2");
- } else if ( i == 4 ) {
- var code = "2022"; //신장-채소군-고칼륨의 교환기준코드
- var vol = model.getValue("/root/main/data/kidney/vegthighk2");
- } else if ( i == 5 ) {
- var code = "2025"; //신장-지방군의 교환기준코드
- var vol = model.getValue("/root/main/data/kidney/lipidgrup2");
- } else if ( i == 6 ) {
- var code = "2030"; //신장-우유군의 교환기준코드
- var vol = model.getValue("/root/main/data/kidney/milkgrup2");
- } else if ( i == 7 ) {
- var code = "2035"; //신장-과일군-저칼륨의 교환기준코드
- var vol = model.getValue("/root/main/data/kidney/fruitlowk2");
- } else if ( i == 8 ) {
- var code = "2036"; //신장-과일군-중칼륨의 교환기준코드
- var vol = model.getValue("/root/main/data/kidney/fruitmidk2");
- } else if ( i == 9 ) {
- var code = "2037"; //신장-과일군-고칼륨의 교환기준코드
- var vol = model.getValue("/root/main/data/kidney/fruithighk2");
- } else if ( i == 10 ) {
- var code = "2040"; //신장-열량보충군의 교환기준코드
- var vol = model.getValue("/root/main/data/kidney/calrsupply2");
- }
-
- kidney_calr = kidney_calr + model.getValue("/root/main/exchbase/kidney[exchstndcd='"+code+"']/calr") * vol;
- kidney_prot = kidney_prot + model.getValue("/root/main/exchbase/kidney[exchstndcd='"+code+"']/prot") * vol;
- kidney_sodium = kidney_sodium + model.getValue("/root/main/exchbase/kidney[exchstndcd='"+code+"']/sodium") * vol;
- kidney_potas = kidney_potas + model.getValue("/root/main/exchbase/kidney[exchstndcd='"+code+"']/potas") * vol;
- kidney_phos = kidney_phos + model.getValue("/root/main/exchbase/kidney[exchstndcd='"+code+"']/phos") * vol;
- }
-
- //경장
- // 경장 교환기준 데이터를 조회해온다.
- model.setValue("/root/send/searchitem/sickcd", "3");
- submit("TRANC00105");
- for ( i=1; i<grd_etrlfd.rows; i++ ) { //추가한 재료 목록
- var code = model.getValue("/root/main/data/etrlfd[" + i + "]/intknutrcd"); //섭취영양음료 코드
- var vol = model.getValue("/root/main/data/etrlfd[" + i + "]/intkqty"); //섭취영양음료 함량
- etrlfd_calr = etrlfd_calr + (model.getValue("/root/main/exchbase/etrlfd[exchstndcd='"+code+"']/calr") * vol / 100);
- etrlfd_prot = etrlfd_prot + (model.getValue("/root/main/exchbase/etrlfd[exchstndcd='"+code+"']/prot") * vol / 100);
- etrlfd_lipo = etrlfd_lipo + (model.getValue("/root/main/exchbase/etrlfd[exchstndcd='"+code+"']/lipo") * vol / 100);
- etrlfd_gluco = etrlfd_gluco + (model.getValue("/root/main/exchbase/etrlfd[exchstndcd='"+code+"']/gluco") * vol / 100);
- etrlfd_sodium = etrlfd_sodium + (model.getValue("/root/main/exchbase/etrlfd[exchstndcd='"+code+"']/sodium") * vol / 100);
- etrlfd_potas = etrlfd_potas + (model.getValue("/root/main/exchbase/etrlfd[exchstndcd='"+code+"']/potas") * vol / 100);
- etrlfd_phos = etrlfd_phos + (model.getValue("/root/main/exchbase/etrlfd[exchstndcd='"+code+"']/phos") * vol / 100);
- etrlfd_fiber = etrlfd_fiber + (model.getValue("/root/main/exchbase/etrlfd[exchstndcd='"+code+"']/fiber") * vol / 100);
- etrlfd_iron = etrlfd_iron + (model.getValue("/root/main/exchbase/etrlfd[exchstndcd='"+code+"']/iron") * vol / 100);
- etrlfd_calcium = etrlfd_calcium + (model.getValue("/root/main/exchbase/etrlfd[exchstndcd='"+code+"']/calcium") * vol / 100);
- }
- //정맥
- // 정맥 교환기준 데이터를 조회해온다.
- model.setValue("/root/send/searchitem/sickcd", "4");
- submit("TRANC00105");
- for ( i=1; i<grd_varices.rows; i++ ) { //추가한 재료 목록
- var code = model.getValue("/root/main/data/varices[" + i + "]/intknutrcd2"); //섭취영양음료 코드
- var vol = model.getValue("/root/main/data/varices[" + i + "]/intkqty2"); //섭취영양음료 함량
-
- varices_calr = varices_calr + model.getValue("/root/main/exchbase/varices[exchstndcd='"+code+"']/calr") * vol;
- varices_prot = varices_prot + model.getValue("/root/main/exchbase/varices[exchstndcd='"+code+"']/prot") * vol;
- varices_lipo = varices_lipo + model.getValue("/root/main/exchbase/varices[exchstndcd='"+code+"']/lipo") * vol;
- varices_gluco = varices_gluco + model.getValue("/root/main/exchbase/varices[exchstndcd='"+code+"']/gluco") * vol;
- varices_sodium = varices_sodium + model.getValue("/root/main/exchbase/varices[exchstndcd='"+code+"']/sodium") * vol;
- varices_potas = varices_potas + model.getValue("/root/main/exchbase/varices[exchstndcd='"+code+"']/potas") * vol;
- varices_phos = varices_phos + model.getValue("/root/main/exchbase/varices[exchstndcd='"+code+"']/phos") * vol;
- varices_fiber = varices_fiber + model.getValue("/root/main/exchbase/varices[exchstndcd='"+code+"']/fiber") * vol;
- varices_iron = varices_iron + model.getValue("/root/main/exchbase/varices[exchstndcd='"+code+"']/iron") * vol;
- varices_calcium = varices_calcium + model.getValue("/root/main/exchbase/varices[exchstndcd='"+code+"']/calcium") * vol;
- }
- //보충
- // 보충 교환기준 데이터를 조회해온다.
- model.setValue("/root/send/searchitem/sickcd", "5");
- submit("TRANC00105");
- for ( i=1; i<grd_supply.rows; i++ ) { //추가한 재료 목록
- var code = model.getValue("/root/main/data/supply[" + i + "]/intknutrcd3"); //섭취영양음료 코드
- var vol = model.getValue("/root/main/data/supply[" + i + "]/intkqty3"); //섭취영양음료 함량
-
- supply_calr = supply_calr + (model.getValue("/root/main/exchbase/supply[exchstndcd='"+code+"']/calr") * vol / 100);
- supply_prot = supply_prot + (model.getValue("/root/main/exchbase/supply[exchstndcd='"+code+"']/prot") * vol / 100);
- supply_lipo = supply_lipo + (model.getValue("/root/main/exchbase/supply[exchstndcd='"+code+"']/lipo") * vol / 100);
- supply_gluco = supply_gluco + (model.getValue("/root/main/exchbase/supply[exchstndcd='"+code+"']/gluco") * vol / 100);
- supply_sodium = supply_sodium + (model.getValue("/root/main/exchbase/supply[exchstndcd='"+code+"']/sodium") * vol / 100);
- supply_potas = supply_potas + (model.getValue("/root/main/exchbase/supply[exchstndcd='"+code+"']/potas") * vol / 100);
- supply_phos = supply_phos + (model.getValue("/root/main/exchbase/supply[exchstndcd='"+code+"']/phos") * vol / 100);
- supply_fiber = supply_fiber + (model.getValue("/root/main/exchbase/supply[exchstndcd='"+code+"']/fiber") * vol / 100);
- supply_iron = supply_iron + (model.getValue("/root/main/exchbase/supply[exchstndcd='"+code+"']/iron") * vol / 100);
- supply_calcium = supply_calcium + (model.getValue("/root/main/exchbase/supply[exchstndcd='"+code+"']/calcium") * vol / 100);
- }
- //C:P:F 계산
- //당뇨와 신장이 모두 입력된 경우 확인메세지창 띄워줌.
- if ((glycosuria_calr > 0) && (kidney_calr > 0)) {
- if ( messageBox("당뇨와 신장 섭취량이 모두 입력되었습니다.", "Q003") == 6 ) {
- } else {
- return;
- }
- }
- var C = parseInt((glycosuria_calr + supply_calr)==0?0:(glycosuria_gluco + supply_gluco)*4/(glycosuria_calr + supply_calr)*100); // (당뇨+보충) C=당질*4/열량*100
- var P = parseInt((glycosuria_calr + kidney_calr + supply_calr)==0?0:(glycosuria_prot + kidney_prot + supply_prot)*4/(glycosuria_calr + kidney_calr + supply_calr)*100); // (당뇨+신장+보충) P=단백질*4/열량*100
- var F = parseInt((glycosuria_calr + supply_calr)==0?0:(glycosuria_lipo + supply_lipo)*9/(glycosuria_calr + supply_calr)*100); // (당뇨+보충) F=지질*9/열량*100
- var C2 = parseInt(etrlfd_calr==0?0:etrlfd_gluco*4/etrlfd_calr*100); // 경장 C2=당질*4/열량*100
- var P2 = parseInt(etrlfd_calr==0?0:etrlfd_prot*4/etrlfd_calr*100); // 경장 P2=단백질*4/열량*100
- var F2 = parseInt(etrlfd_calr==0?0:etrlfd_lipo*9/etrlfd_calr*100); // 경장 F2=지질*9/열량*100
- var C3 = parseInt(varices_calr==0?0:varices_gluco*4/varices_calr*100); // 정맥 C3=당질*4/열량*100
- var P3 = parseInt(varices_calr==0?0:varices_prot*4/varices_calr*100); // 정맥 P3=단백질*4/열량*100
- var F3 = parseInt(varices_calr==0?0:varices_lipo*9/varices_calr*100); // 정맥 F3=지질*9/열량*100
- //영양소별 경구 계산 = (당뇨 or 신장) + 보충
- model.setValue(grd_common.nodeset + "[1]/" + grd_common.colAttribute(6, "ref"), C + ":" + P + ":" + F); //C:P:F
- model.setValue(grd_common.nodeset + "[2]/" + grd_common.colAttribute(6, "ref"), glycosuria_calr + kidney_calr + supply_calr); //열량
- model.setValue(grd_common.nodeset + "[3]/" + grd_common.colAttribute(6, "ref"), glycosuria_prot + kidney_prot + supply_prot); //단백질
- model.setValue(grd_common.nodeset + "[4]/" + grd_common.colAttribute(6, "ref"), glycosuria_lipo + supply_lipo); //지질
- model.setValue(grd_common.nodeset + "[5]/" + grd_common.colAttribute(6, "ref"), glycosuria_gluco + supply_gluco); //당질
- model.setValue(grd_common.nodeset + "[6]/" + grd_common.colAttribute(6, "ref"), kidney_sodium + supply_sodium); //나트륨
- model.setValue(grd_common.nodeset + "[7]/" + grd_common.colAttribute(6, "ref"), supply_calcium); //칼슘
- model.setValue(grd_common.nodeset + "[8]/" + grd_common.colAttribute(6, "ref"), kidney_phos + supply_phos); //인
- model.setValue(grd_common.nodeset + "[9]/" + grd_common.colAttribute(6, "ref"), supply_iron); //철
- model.setValue(grd_common.nodeset + "[10]/" + grd_common.colAttribute(6, "ref"), kidney_potas + supply_potas); //칼륨
- model.setValue(grd_common.nodeset + "[11]/" + grd_common.colAttribute(6, "ref"), supply_fiber); //식이섬유
-
- //영양소별 경장 계산
- model.setValue(grd_common.nodeset + "[1]/" + grd_common.colAttribute(7, "ref"), C2 + ":" + P2 + ":" + F2); //C:P:F
- model.setValue(grd_common.nodeset + "[2]/" + grd_common.colAttribute(7, "ref"), etrlfd_calr); //열량
- model.setValue(grd_common.nodeset + "[3]/" + grd_common.colAttribute(7, "ref"), etrlfd_prot); //단백질
- model.setValue(grd_common.nodeset + "[4]/" + grd_common.colAttribute(7, "ref"), etrlfd_lipo); //지질
- model.setValue(grd_common.nodeset + "[5]/" + grd_common.colAttribute(7, "ref"), etrlfd_gluco); //당질
- model.setValue(grd_common.nodeset + "[6]/" + grd_common.colAttribute(7, "ref"), etrlfd_sodium); //나트륨
- model.setValue(grd_common.nodeset + "[7]/" + grd_common.colAttribute(7, "ref"), etrlfd_calcium); //칼슘
- model.setValue(grd_common.nodeset + "[8]/" + grd_common.colAttribute(7, "ref"), etrlfd_phos); //인
- model.setValue(grd_common.nodeset + "[9]/" + grd_common.colAttribute(7, "ref"), etrlfd_iron); //철
- model.setValue(grd_common.nodeset + "[10]/" + grd_common.colAttribute(7, "ref"), etrlfd_potas); //칼륨
- model.setValue(grd_common.nodeset + "[11]/" + grd_common.colAttribute(7, "ref"), etrlfd_fiber); //식이섬유
-
- //영양소별 정맥 계산
- model.setValue(grd_common.nodeset + "[1]/" + grd_common.colAttribute(8, "ref"), C3 + ":" + P3 + ":" + F3); //C:P:F
- model.setValue(grd_common.nodeset + "[2]/" + grd_common.colAttribute(8, "ref"), varices_calr); //열량
- model.setValue(grd_common.nodeset + "[3]/" + grd_common.colAttribute(8, "ref"), varices_prot); //단백질
- model.setValue(grd_common.nodeset + "[4]/" + grd_common.colAttribute(8, "ref"), varices_lipo); //지질
- model.setValue(grd_common.nodeset + "[5]/" + grd_common.colAttribute(8, "ref"), varices_gluco); //당질
- model.setValue(grd_common.nodeset + "[6]/" + grd_common.colAttribute(8, "ref"), varices_sodium); //나트륨
- model.setValue(grd_common.nodeset + "[7]/" + grd_common.colAttribute(8, "ref"), varices_calcium); //칼슘
- model.setValue(grd_common.nodeset + "[8]/" + grd_common.colAttribute(8, "ref"), varices_phos); //인
- model.setValue(grd_common.nodeset + "[9]/" + grd_common.colAttribute(8, "ref"), varices_iron); //철
- model.setValue(grd_common.nodeset + "[10]/" + grd_common.colAttribute(8, "ref"), varices_potas); //칼륨
- model.setValue(grd_common.nodeset + "[11]/" + grd_common.colAttribute(8, "ref"), varices_fiber); //식이섬유
-
- //영양소별 총계 계산
- model.setValue(grd_common.nodeset + "[1]/" + grd_common.colAttribute(9, "ref"), (C+C2+C3)+ ":" + (P+P2+P3) + ":" + (F+F2+F3));
- for ( i=2; i<=11; i++ ) {
- var val = 0;
- var sum = 0;
- for ( j=6; j<=8; j++ ) {
- val = model.getValue(grd_common.nodeset + "[" + i + "]/" + grd_common.colAttribute(j, "ref"));
- if ( val != "") {
- sum = parseFloat(sum) + parseFloat(val);
- }
- }
- model.setValue(grd_common.nodeset + "[" + i + "]/" + grd_common.colAttribute(9, "ref"), sum);
- }
-
- //row status가 null이기 때문에 계산후에는 무조건 'insert'로 초기화한다.
- for ( i=1; i<grd_common.rows; i++) {
- grd_common.addStatus(i, "insert");
- }
-
- //화면 맨아래 섭취량 평가 부분에 열량, 단백질 setting
- var calrtotal = model.getValue(grd_common.nodeset + "[2]/" + grd_common.colAttribute(9, "ref"));
- var prottotal = model.getValue(grd_common.nodeset + "[3]/" + grd_common.colAttribute(9, "ref"));
-
- if ( calrtotal < 100 ) {
- model.setValue("/root/main/common/valu/calrintk", "1");
- } else if (( calrtotal >= 100 ) && ( calrtotal < 500 )) {
- model.setValue("/root/main/common/valu/calrintk", "2");
- } else if (( calrtotal >= 500 ) && ( calrtotal < 1000 )) {
- model.setValue("/root/main/common/valu/calrintk", "3");
- } else if ( calrtotal >= 1000 ) {
- model.setValue("/root/main/common/valu/calrintk", "4");
- }
-
- if ( prottotal < 100 ) {
- model.setValue("/root/main/common/valu/protintk", "1");
- } else if (( prottotal >= 100 ) && ( prottotal < 500 )) {
- model.setValue("/root/main/common/valu/protintk", "2");
- } else if (( prottotal >= 500 ) && ( prottotal < 1000 )) {
- model.setValue("/root/main/common/valu/protintk", "3");
- } else if ( prottotal >= 1000 ) {
- model.setValue("/root/main/common/valu/protintk", "4");
- }
- model.setValue("/root/main/common/valu/calr", calrtotal);
- model.setValue("/root/main/common/valu/prot", prottotal);
- model.refresh();
- ]]>
- </script>
- </button>
- <caption id="caption46" class="cell_1" style="left:424px; top:410px; width:71px; height:45px; vertical-align:middle; ">단백질섭취</caption>
- <caption id="caption47" style="left:322px; top:434px; width:63px; height:20px; vertical-align:middle; ">kcal/day</caption>
- <line id="line17" class="line_1" style="x1:0px; y1:27px; x2:895px; y2:27px; "/>
- <caption id="caption48" style="left:844px; top:435px; width:51px; height:20px; vertical-align:middle; ">g/day</caption>
- <button id="btn_exchbase" class="btn2_letter4" style="left:731px; top:37px; width:64px; height:19px; ">
- <caption>교환기준</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- //window.load("SMANB00500_교환기준관리.xrw","modal","code", "left:600px; top:50px; width:550px; height:540px;min:hidden;max:hidden;resize:false;");
- modal("SMANB00500");
- ]]>
- </script>
- </button>
- <switch id="switch2" style="left:0px; top:57px; width:895px; height:118px; border-color:#c0a8c8; border-width:1; border-style:solid; ">
- <case id="case1" selected="true">
- <datagrid id="grd_glycosuria" nodeset="/root/main/data/glycosuria" caption="곡류군^어육류군^어육류군^어육류군^채소군^지방군^우유군^과일군^열량보충군|곡류군^저지방^중지방^고지방^채소군^지방군^우유군^과일군^열량보충군" colsep="^" colwidth="110, 110, 110, 110, 110, 110, 110, 109" mergecellsfixedrows="bycolrec" rowsep="|" style="left:6px; top:31px; width:881px; height:79px; text-align:center; ">
- <col autonext="false" ref="cerealgrup1" type="input" format="##.9" maxlength="3"/>
- <col autonext="false" ref="lipidlow1" type="input" format="##.9" maxlength="3"/>
- <col autonext="false" ref="lipidmid1" type="input" format="##.9" maxlength="3"/>
- <col autonext="false" ref="lipidhigh1" type="input" format="##.9" maxlength="3"/>
- <col autonext="false" ref="vegtgrup" type="input" format="##.9" maxlength="3"/>
- <col autonext="false" ref="lipidgrup1" type="input" format="##.9" maxlength="3"/>
- <col autonext="false" ref="milkgrup1" type="input" format="##.9" maxlength="3"/>
- <col autonext="false" ref="fruitgrup" type="input" format="##.9" maxlength="3"/>
- <col ref="pid" visibility="hidden"/>
- <col ref="nutrmngtkind" visibility="hidden"/>
- <col ref="execdd" visibility="hidden"/>
- <col ref="cnstflag" visibility="hidden"/>
- </datagrid>
- <button id="btn_rowadd1" class="btn2_letter3" style="left:773px; top:5px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- grd_glycosuria.addRow();
- ]]>
- </script>
- </button>
- <button id="btn_rowdel1" class="btn2_letter3" style="left:830px; top:5px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- grd_glycosuria.deleteRow(grd_glycosuria.row);
- ]]>
- </script>
- </button>
- <line id="line18" class="line_1" style="x1:6px; y1:26px; x2:887px; y2:26px; "/>
- </case>
- <case id="case2">
- <line id="line1" class="line_1" style="x1:6px; y1:26px; x2:887px; y2:26px; "/>
- <datagrid id="grd_kidney" nodeset="/root/main/data/kidney" caption="곡류군^어육류군^채소군^채소군^채소군^지방군^우유군^과일군^과일군^과일군^열량보충군|곡류군^어육류군^저칼륨^중칼륨^고칼륨^지방군^우유군^저칼륨^중칼륨^고칼륨^열량보충군" colsep="^" colwidth="85, 85, 75, 75, 75, 85, 85, 77, 77, 77, 83" mergecellsfixedrows="bycolrec" rowsep="|" style="left:6px; top:31px; width:881px; height:79px; text-align:center; ">
- <col autonext="false" ref="cerealgrup2" type="input" format="##.9" maxlength="3"/>
- <col autonext="false" ref="meatgrup2" type="input" format="##.9" maxlength="3"/>
- <col autonext="false" ref="vegtlowk2" type="input" format="##.9" maxlength="3"/>
- <col autonext="false" ref="vegtmidk2" type="input" format="##.9" maxlength="3"/>
- <col autonext="false" ref="vegthighk2" type="input" format="##.9" maxlength="3"/>
- <col autonext="false" ref="lipidgrup2" type="input" format="##.9" maxlength="3"/>
- <col autonext="false" ref="milkgrup2" type="input" format="##.9" maxlength="3"/>
- <col autonext="false" ref="fruitlowk2" type="input" format="##.9" maxlength="3"/>
- <col autonext="false" ref="fruitmidk2" type="input" format="##.9" maxlength="3"/>
- <col autonext="false" ref="fruithighk2" type="input" format="##.9" maxlength="3"/>
- <col autonext="false" ref="calrsupply2" type="input" format="##.9" maxlength="3"/>
- <col ref="pid" visibility="hidden"/>
- <col ref="nutrmngtkind" visibility="hidden"/>
- <col ref="execdd" visibility="hidden"/>
- <col ref="cnstflag" visibility="hidden"/>
- </datagrid>
- <button id="btn_rowadd2" class="btn2_letter3" style="left:773px; top:5px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- grd_kidney.addRow();
- ]]>
- </script>
- </button>
- <button id="btn_rowdel2" class="btn2_letter3" style="left:830px; top:5px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- grd_kidney.deleteRow(grd_kidney.row);
- ]]>
- </script>
- </button>
- </case>
- <case id="case3">
- <datagrid id="grd_etrlfd" nodeset="/root/main/data/etrlfd" caption="제형^h_재료코드^단위^용량" colsep="^" colwidth="300, 0, 70, 75" mergecellsfixedrows="bycolrec" rowsep="|" style="left:6px; top:17px; width:467px; height:78px; ">
- <col ref="intknutrnm"/>
- <col ref="intknutrcd" visibility="hidden"/>
- <col ref="intkunit" style="text-align:center; "/>
- <col ref="intkqty" type="input" style="text-align:center; "/>
- <col ref="intkkind" visibility="hidden"/>
- <col ref="pid" visibility="hidden"/>
- <col ref="nutrmngtkind" visibility="hidden"/>
- <col ref="execdd" visibility="hidden"/>
- <col ref="cnstflag" visibility="hidden"/>
- </datagrid>
- <line id="line38" class="line_1" style="x1:6px; y1:12px; x2:885px; y2:12px; "/>
- <caption id="caption51" class="cell_1" style="left:477px; top:16px; width:65px; height:23px; vertical-align:middle; ">제형</caption>
- <input id="ipt_cnts1" ref="/root/main/common/valu/intkqty" class="input_search" style="left:546px; top:42px; width:294px; height:19px; "/>
- <caption id="caption52" class="cell_1" style="left:477px; top:41px; width:65px; height:23px; vertical-align:middle; ">용량</caption>
- <line id="line39" class="line_2" style="x1:477px; y1:39px; x2:886px; y2:39px; "/>
- <line id="line40" class="line_2" style="x1:477px; y1:64px; x2:886px; y2:64px; "/>
- <select1 id="cmb_matr1" ref="/root/main/common/valu/intknutr" class="combo_search" appearance="minimal" style="left:546px; top:17px; width:339px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/basecode/etcmatr/etrlfd">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- <button id="btn_add1" class="btn2_letter2" style="left:843px; top:42px; width:42px; height:19px; ">
- <caption>추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if ( (model.getValue("/root/main/common/valu/intknutr")=="") || (model.getValue("/root/main/common/valu/intkqty")=="") ) {
- messageBox("재료, 함량을", "C001");
- return;
- } else {
- var code = model.getValue("/root/main/common/valu/intknutr"); //섭취영양음료 코드
- grd_etrlfd.addRow();
- model.setValue("/root/main/data/etrlfd["+grd_etrlfd.row+"]/intknutrnm", model.getValue("/root/main/exchbase/etrlfd[exchstndcd="+code+"]/exchstndnm"));
- model.setValue("/root/main/data/etrlfd["+grd_etrlfd.row+"]/intknutrcd", code);
- model.setValue("/root/main/data/etrlfd["+grd_etrlfd.row+"]/intkunit", model.getValue("/root/main/exchbase/etrlfd[exchstndcd="+code+"]/exchstndunit"));
- model.setValue("/root/main/data/etrlfd["+grd_etrlfd.row+"]/intkqty", model.getValue("/root/main/common/valu/intkqty"));
- model.setValue("/root/main/data/etrlfd["+grd_etrlfd.row+"]/pid", model.getValue("/root/main/receivedata/pid"));
- model.setValue("/root/main/data/etrlfd["+grd_etrlfd.row+"]/nutrmngtkind", model.getValue("/root/main/receivedata/nutrmngtkind"));
- model.setValue("/root/main/data/etrlfd["+grd_etrlfd.row+"]/execdd", model.getValue("/root/main/receivedata/execdd"));
- model.setValue("/root/main/data/etrlfd["+grd_etrlfd.row+"]/cnstflag", model.getValue("/root/main/receivedata/cnstflag"));
- model.refresh();
- }
- ]]>
- </script>
- </button>
- </case>
- <case id="case4">
- <datagrid id="grd_varices" nodeset="/root/main/data/varices" caption="제형^h_재료코드^단위^용량" colsep="^" colwidth="300, 0, 70, 75" mergecellsfixedrows="bycolrec" rowsep="|" style="left:6px; top:17px; width:467px; height:78px; ">
- <col ref="intknutrnm2"/>
- <col ref="intknutrcd2" visibility="hidden"/>
- <col ref="intkunit2" style="text-align:center; "/>
- <col ref="intkqty2" type="input" style="text-align:center; "/>
- <col ref="intkkind2" visibility="hidden"/>
- <col ref="pid" visibility="hidden"/>
- <col ref="nutrmngtkind" visibility="hidden"/>
- <col ref="execdd" visibility="hidden"/>
- <col ref="cnstflag" visibility="hidden"/>
- </datagrid>
- <line id="line2" class="line_1" style="x1:6px; y1:12px; x2:885px; y2:12px; "/>
- <caption id="caption1" class="cell_1" style="left:477px; top:16px; width:65px; height:23px; vertical-align:middle; ">제형</caption>
- <input id="ipt_cnts2" ref="/root/main/common/valu/intkqty2" class="input_search" style="left:546px; top:42px; width:294px; height:19px; "/>
- <caption id="caption2" class="cell_1" style="left:477px; top:41px; width:65px; height:23px; vertical-align:middle; ">용량</caption>
- <line id="line3" class="line_2" style="x1:477px; y1:39px; x2:886px; y2:39px; "/>
- <line id="line4" class="line_2" style="x1:477px; y1:64px; x2:886px; y2:64px; "/>
- <select1 id="cmb_matr2" ref="/root/main/common/valu/intknutr2" class="combo_search" appearance="minimal" style="left:546px; top:17px; width:339px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/basecode/etcmatr/varices">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- <button id="btn_add2" class="btn2_letter2" style="left:843px; top:42px; width:42px; height:19px; ">
- <caption>추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if ( (model.getValue("/root/main/common/valu/intknutr2")=="") || (model.getValue("/root/main/common/valu/intkqty2")=="") ) {
- messageBox("재료, 함량을", "C001");
- return;
- } else {
- var code = model.getValue("/root/main/common/valu/intknutr2"); //섭취영양음료 코드
- grd_varices.addRow();
- model.setValue("/root/main/data/varices["+grd_varices.row+"]/intknutrnm2", model.getValue("/root/main/exchbase/varices[exchstndcd="+code+"]/exchstndnm"));
- model.setValue("/root/main/data/varices["+grd_varices.row+"]/intknutrcd2", code);
- model.setValue("/root/main/data/varices["+grd_varices.row+"]/intkunit2", model.getValue("/root/main/exchbase/varices[exchstndcd="+code+"]/exchstndunit"));
- model.setValue("/root/main/data/varices["+grd_varices.row+"]/intkqty2", model.getValue("/root/main/common/valu/intkqty2"));
- model.setValue("/root/main/data/varices["+grd_varices.row+"]/pid", model.getValue("/root/main/receivedata/pid"));
- model.setValue("/root/main/data/varices["+grd_varices.row+"]/nutrmngtkind", model.getValue("/root/main/receivedata/nutrmngtkind"));
- model.setValue("/root/main/data/varices["+grd_varices.row+"]/execdd", model.getValue("/root/main/receivedata/execdd"));
- model.setValue("/root/main/data/varices["+grd_varices.row+"]/cnstflag", model.getValue("/root/main/receivedata/cnstflag"));
- model.refresh();
- }
- ]]>
- </script>
- </button>
- </case>
- <case id="case5">
- <datagrid id="grd_supply" nodeset="/root/main/data/supply" caption="제형^h_재료코드^단위^용량" colsep="^" colwidth="300, 0, 70, 75" mergecellsfixedrows="bycolrec" rowsep="|" style="left:6px; top:17px; width:467px; height:78px; ">
- <col ref="intknutrnm3"/>
- <col ref="intknutrcd3" visibility="hidden"/>
- <col ref="intkunit3" style="text-align:center; "/>
- <col ref="intkqty3" type="input" style="text-align:center; "/>
- <col ref="intkkind3" visibility="hidden"/>
- <col ref="pid" visibility="hidden"/>
- <col ref="nutrmngtkind" visibility="hidden"/>
- <col ref="execdd" visibility="hidden"/>
- <col ref="cnstflag" visibility="hidden"/>
- </datagrid>
- <line id="line5" class="line_1" style="x1:6px; y1:12px; x2:885px; y2:12px; "/>
- <caption id="caption3" class="cell_1" style="left:477px; top:16px; width:65px; height:23px; vertical-align:middle; ">제형</caption>
- <input id="ipt_cnts3" ref="/root/main/common/valu/intkqty3" class="input_search" style="left:546px; top:42px; width:294px; height:19px; "/>
- <caption id="caption4" class="cell_1" style="left:477px; top:41px; width:65px; height:23px; vertical-align:middle; ">용량</caption>
- <line id="line6" class="line_2" style="x1:477px; y1:39px; x2:886px; y2:39px; "/>
- <line id="line7" class="line_2" style="x1:477px; y1:64px; x2:886px; y2:64px; "/>
- <select1 id="cmb_matr3" ref="/root/main/common/valu/intknutr3" class="combo_search" appearance="minimal" style="left:546px; top:17px; width:339px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/basecode/etcmatr/supply">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- <button id="btn_add3" class="btn2_letter2" style="left:843px; top:42px; width:42px; height:19px; ">
- <caption>추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if ( (model.getValue("/root/main/common/valu/intknutr3")=="") || (model.getValue("/root/main/common/valu/intkqty3")=="") ) {
- messageBox("재료, 함량을", "C001");
- return;
- } else {
- var code = model.getValue("/root/main/common/valu/intknutr3"); //섭취영양음료 코드
- grd_supply.addRow();
- model.setValue("/root/main/data/supply["+grd_supply.row+"]/intknutrnm3", model.getValue("/root/main/exchbase/supply[exchstndcd="+code+"]/exchstndnm"));
- model.setValue("/root/main/data/supply["+grd_supply.row+"]/intknutrcd3", code);
- model.setValue("/root/main/data/supply["+grd_supply.row+"]/intkunit3", model.getValue("/root/main/exchbase/supply[exchstndcd="+code+"]/exchstndunit"));
- model.setValue("/root/main/data/supply["+grd_supply.row+"]/intkqty3", model.getValue("/root/main/common/valu/intkqty3"));
- model.setValue("/root/main/data/supply["+grd_supply.row+"]/pid", model.getValue("/root/main/receivedata/pid"));
- model.setValue("/root/main/data/supply["+grd_supply.row+"]/nutrmngtkind", model.getValue("/root/main/receivedata/nutrmngtkind"));
- model.setValue("/root/main/data/supply["+grd_supply.row+"]/execdd", model.getValue("/root/main/receivedata/execdd"));
- model.setValue("/root/main/data/supply["+grd_supply.row+"]/cnstflag", model.getValue("/root/main/receivedata/cnstflag"));
- model.refresh();
- }
- ]]>
- </script>
- </button>
- </case>
- </switch>
- <select1 id="cmb_protflag" ref="/root/main/common/valu/protintk" class="combo_search" appearance="minimal" style="left:498px; top:410px; width:397px; height:19px; ">
- <choices>
- <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>4</value>
- </item>
- </choices>
- </select1>
- <line id="line19" class="line_3" style="x1:0px; y1:492px; x2:895px; y2:492px; "/>
- <caption id="caption38" class="tit_2" style="left:9px; top:11px; width:113px; height:13px; ">섭취량 분석</caption>
- <select1 id="cmb_calrflag" ref="/root/main/common/valu/calrintk" class="combo_search" appearance="minimal" style="left:68px; top:410px; width:353px; height:19px; ">
- <choices>
- <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>4</value>
- </item>
- </choices>
- </select1>
- <caption id="caption45" class="cell_1" style="left:0px; top:410px; width:65px; height:45px; vertical-align:middle; ">열량섭취</caption>
- <button id="btn_glycosuria" class="btn_sw" group="tab" selected="true" style="left:0px; top:36px; width:50px; height:22px; ">
- <caption>당뇨</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.toggle("case1");
- ]]>
- </script>
- </button>
- <button id="btn_kidney" class="btn_sw" group="tab" selected="false" style="left:49px; top:36px; width:50px; height:22px; ">
- <caption>신장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.toggle("case2");
- ]]>
- </script>
- </button>
- <button id="btn_etrlfd" class="btn_sw" group="tab" selected="false" style="left:98px; top:36px; width:50px; height:22px; ">
- <caption>경장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.toggle("case3");
- // 경장 교환기준 데이터를 조회해온다.
- model.setValue("/root/send/searchitem/sickcd", "3");
- submit("TRANC00105");
- if (grd_etrlfd.rows > 1) {
- for (i=1; i<grd_etrlfd.rows; i++) {
- var code = model.getValue("/root/main/data/etrlfd["+i+"]/intknutrcd");
- model.setValue("/root/main/data/etrlfd["+i+"]/intknutrnm", model.getValue("/root/main/exchbase/etrlfd[exchstndcd="+code+"]/exchstndnm"));
- }
- }
- ]]>
- </script>
- </button>
- <button id="btn_varices" class="btn_sw" group="tab" selected="false" style="left:147px; top:36px; width:50px; height:22px; ">
- <caption>정맥</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.toggle("case4");
- // 정맥 교환기준 데이터를 조회해온다.
- model.setValue("/root/send/searchitem/sickcd", "4");
- submit("TRANC00105");
- if (grd_varices.rows > 1) {
- for (i=1; i<grd_varices.rows; i++) {
- var code = model.getValue("/root/main/data/varices["+i+"]/intknutrcd2");
- model.setValue("/root/main/data/varices["+i+"]/intknutrnm2", model.getValue("/root/main/exchbase/varices[exchstndcd="+code+"]/exchstndnm"));
- }
- }
- ]]>
- </script>
- </button>
- <button id="btn_supply" class="btn_sw" group="tab" selected="false" style="left:196px; top:36px; width:50px; height:22px; ">
- <caption>보충</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.toggle("case5");
- // 보충 교환기준 데이터를 조회해온다.
- model.setValue("/root/send/searchitem/sickcd", "5");
- submit("TRANC00105");
- if (grd_supply.rows > 1) {
- for (i=1; i<grd_supply.rows; i++) {
- var code = model.getValue("/root/main/data/supply["+i+"]/intknutrcd3");
- model.setValue("/root/main/data/supply["+i+"]/intknutrnm3", model.getValue("/root/main/exchbase/supply[exchstndcd="+code+"]/exchstndnm"));
- }
- }
- ]]>
- </script>
- </button>
- <datagrid id="grd_common" nodeset="/root/main/data/comnutr" caption="선택^등록번호^영양관리유형^수행일자^협진추구구분^영양소^경구^경장^정맥^총계^권장량" colsep="^" colwidth="42, 10, 10, 10, 10, 165, 130, 130, 130, 140, 140" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:185px; width:895px; height:195px; ">
- <col checkvalue="Y,N" ref="check" type="checkbox"/>
- <col ref="pid" visibility="hidden"/>
- <col ref="nutrmngtkind" visibility="hidden"/>
- <col ref="execdd" visibility="hidden"/>
- <col ref="cnstflag" visibility="hidden"/>
- <col ref="nutrcd" type="combo">
- <choices>
- <itemset nodeset="/root/init/basecode/nutrcd/A0527">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="nutroral" style="text-align:center; "/>
- <col ref="nutroralints" style="text-align:center; "/>
- <col ref="nutrvein" style="text-align:center; "/>
- <col ref="nutrsum" type="input" style="text-align:center; "/>
- <col ref="recmqty" type="input" style="text-align:center; "/>
- </datagrid>
- <caption id="caption5" class="cell_1" style="left:0px; top:456px; width:65px; height:37px; vertical-align:middle; ">비고</caption>
- <textarea id="tar_intkqtyrem" ref="/root/main/common/valu/intkqtyetc" style="left:68px; top:458px; width:827px; height:32px; "/>
- <line id="line8" class="line_1" style="x1:0px; y1:515px; x2:895px; y2:515px; "/>
- <caption id="caption6" class="tit_2" style="left:9px; top:500px; width:206px; height:13px; ">영양사 의견</caption>
- <textarea id="tar_dietercmt" ref="/root/main/common/valu/dietercmt" style="left:0px; top:520px; width:895px; height:50px; "/>
- </group>
- <group id="grp_btn" scroll="auto" style="left:0px; top:575px; width:900px; height:27px; ">
- <button id="btn_confirm" class="btn4_letter2" style="left:775px; top:5px; width:56px; height:22px; ">
- <caption>확인</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if ( messageBox("", "Q002") == 6 ) {
- //그리드에 내용이 있는지 체크하여 저장 or 수정 수행
- if (grd_glycosuria.rows > 2) {
- model.setValue("/root/main/data/glycosuria/pid", model.getValue("/root/main/receivedata/pid"));
- model.setValue("/root/main/data/glycosuria/nutrmngtkind", model.getValue("/root/main/receivedata/nutrmngtkind"));
- model.setValue("/root/main/data/glycosuria/execdd", model.getValue("/root/main/receivedata/execdd"));
- model.setValue("/root/main/data/glycosuria/cnstflag", model.getValue("/root/main/receivedata/cnstflag"));
- }
- if (grd_kidney.rows > 2) {
- model.setValue("/root/main/data/kidney/pid", model.getValue("/root/main/receivedata/pid"));
- model.setValue("/root/main/data/kidney/nutrmngtkind", model.getValue("/root/main/receivedata/nutrmngtkind"));
- model.setValue("/root/main/data/kidney/execdd", model.getValue("/root/main/receivedata/execdd"));
- model.setValue("/root/main/data/kidney/cnstflag", model.getValue("/root/main/receivedata/cnstflag"));
- }
- if (grd_etrlfd.rows > 1) {
- for (i=1; i<grd_etrlfd.rows; i++) {
- model.setValue("/root/main/data/etrlfd[" + i + "]/pid", model.getValue("/root/main/receivedata/pid"));
- model.setValue("/root/main/data/etrlfd[" + i + "]/nutrmngtkind", model.getValue("/root/main/receivedata/nutrmngtkind"));
- model.setValue("/root/main/data/etrlfd[" + i + "]/execdd", model.getValue("/root/main/receivedata/execdd"));
- model.setValue("/root/main/data/etrlfd[" + i + "]/cnstflag", model.getValue("/root/main/receivedata/cnstflag"));
- }
- }
- if (grd_varices.rows > 1) {
- for (i=1; i<grd_varices.rows; i++) {
- model.setValue("/root/main/data/varices[" + i + "]/pid", model.getValue("/root/main/receivedata/pid"));
- model.setValue("/root/main/data/varices[" + i + "]/nutrmngtkind", model.getValue("/root/main/receivedata/nutrmngtkind"));
- model.setValue("/root/main/data/varices[" + i + "]/execdd", model.getValue("/root/main/receivedata/execdd"));
- model.setValue("/root/main/data/varices[" + i + "]/cnstflag", model.getValue("/root/main/receivedata/cnstflag"));
- }
- }
- if (grd_supply.rows > 1) {
- for (i=1; i<grd_supply.rows; i++) {
- model.setValue("/root/main/data/supply[" + i + "]/pid", model.getValue("/root/main/receivedata/pid"));
- model.setValue("/root/main/data/supply[" + i + "]/nutrmngtkind", model.getValue("/root/main/receivedata/nutrmngtkind"));
- model.setValue("/root/main/data/supply[" + i + "]/execdd", model.getValue("/root/main/receivedata/execdd"));
- model.setValue("/root/main/data/supply[" + i + "]/cnstflag", model.getValue("/root/main/receivedata/cnstflag"));
- }
- }
- if (model.getValue("/root/main/data/comnutr[1]/pid") == "") {
- for (i=1; i<grd_common.rows; i++) {
- grd_common.addStatus(i, "insert");
- model.setValue("/root/main/data/comnutr[" + i + "]/pid", model.getValue("/root/main/receivedata/pid"));
- model.setValue("/root/main/data/comnutr[" + i + "]/nutrmngtkind", model.getValue("/root/main/receivedata/nutrmngtkind"));
- model.setValue("/root/main/data/comnutr[" + i + "]/execdd", model.getValue("/root/main/receivedata/execdd"));
- model.setValue("/root/main/data/comnutr[" + i + "]/cnstflag", model.getValue("/root/main/receivedata/cnstflag"));
- }
- }
- model.setValue("/root/send/data/comnutr", grd_common.getUpdateData());
- model.setValue("/root/send/data/glycosuria", grd_glycosuria.getUpdateData());
- model.setValue("/root/send/data/kidney", grd_kidney.getUpdateData());
- model.setValue("/root/send/data/etrlfd", grd_etrlfd.getUpdateData());
- model.setValue("/root/send/data/varices", grd_varices.getUpdateData());
- model.setValue("/root/send/data/supply", grd_supply.getUpdateData());
- submit("TXANC00104");
- // 환자별영양관리 화면으로 데이터 보내기
- var cnstflag = model.getValue("/root/main/receivedata/cnstflag");
- if ( cnstflag == "C" ) { // 협진의뢰
- opener.model.setValue("/root/main/maindata/cnstreq/calrintk1", model.getValue("/root/main/common/valu/calrintk"));
- opener.model.setValue("/root/main/maindata/cnstreq/calrintkqty1", model.getValue("/root/main/common/valu/calr"));
- opener.model.setValue("/root/main/maindata/cnstreq/protintk1", model.getValue("/root/main/common/valu/protintk"));
- opener.model.setValue("/root/main/maindata/cnstreq/protintkqty1", model.getValue("/root/main/common/valu/prot"));
- opener.model.setValue("/root/main/maindata/cnstreq/intkqtyetc1", model.getValue("/root/main/common/valu/intkqtyetc"));
- opener.model.setValue("/root/main/maindata/cnstreq/dietercmt1", model.getValue("/root/main/common/valu/dietercmt"));
- }
- else if ( cnstflag == "P" ) { // 추구관리
- opener.model.setValue("/root/main/maindata/pursmngt/calrintk2", model.getValue("/root/main/common/valu/calrintk"));
- opener.model.setValue("/root/main/maindata/pursmngt/calrintkqty2", model.getValue("/root/main/common/valu/calr"));
- opener.model.setValue("/root/main/maindata/pursmngt/protintk2", model.getValue("/root/main/common/valu/protintk"));
- opener.model.setValue("/root/main/maindata/pursmngt/protintkqty2", model.getValue("/root/main/common/valu/prot"));
- opener.model.setValue("/root/main/maindata/pursmngt/intkqtyetc2", model.getValue("/root/main/common/valu/intkqtyetc"));
- opener.model.setValue("/root/main/maindata/pursmngt/dietercmt2", model.getValue("/root/main/common/valu/dietercmt"));
- }
- window.close();
- } else { return; }
- ]]>
- </script>
- </button>
- <button id="btn_cancel" class="btn4_letter2" style="left:834px; top:5px; width:56px; height:22px; ">
- <caption>취소</caption>
- <script type="javascript" ev:event="xforms-activate">
- <![CDATA[
- window.close();
- ]]>
- </script>
- </button>
- <button id="btn_print" class="btn3_letter5" style="left:1px; top:5px; width:56px; height:22px; ">
- <caption>결과지출력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //열량,단백질,지질,당질은 무조건 선택
- for ( i = 2; i <= 5; i++ ) {
- model.setValue("/root/main/data/comnutr[" + i + "]/check", "Y");
- }
-
- //C:P:F가 선택된 경우 원그래프 출력데이터 셋팅
- if (model.getValue("/root/main/data/comnutr[1]/check") == "Y") {
- model.makeValue("/root/temp/circleyn", "Y");
- var nutrsum = model.getValue("/root/main/data/comnutr[1]/nutrsum");
- var recmqty = model.getValue("/root/main/data/comnutr[1]/recmqty");
- var val = "";
- var seq = 1;
- //섭취량
- if (nutrsum != "") {
- for ( i = 0; i < nutrsum.length; i++ ) {
- if (nutrsum.substr(i, 1) != ":" && i != nutrsum.length-1) {
- val = val + nutrsum.substr(i, 1);
- } else {
- if (seq==1) {
- model.makeValue("/root/main/data/comnutr[" +seq+ "]/val1", val);
- model.makeValue("/root/main/data/comnutr[" +seq+ "]/nm1", "단백질");
- val = "";
- seq = seq + 1;
- } else if (seq==2) {
- model.makeValue("/root/main/data/comnutr[" +seq+ "]/val1", val);
- model.makeValue("/root/main/data/comnutr[" +seq+ "]/nm1", "지질");
- val = "";
- seq = seq + 1;
- } else if (seq==3) {
- val = val + nutrsum.substr(i, 1);
- model.makeValue("/root/main/data/comnutr[" +seq+ "]/val1", val);
- model.makeValue("/root/main/data/comnutr[" +seq+ "]/nm1", "당질");
- val = "";
- seq = 1;
- }
- }
- }
- }
- //권장량
- if (recmqty != "") {
- for ( i = 0; i < recmqty.length; i++ ) {
- if (recmqty.substr(i, 1) != ":" && i != recmqty.length-1) {
- val = val + recmqty.substr(i, 1);
- } else {
- if (seq==1) {
- model.makeValue("/root/main/data/comnutr[" +seq+ "]/val2", val);
- model.makeValue("/root/main/data/comnutr[" +seq+ "]/nm2", "단백질");
- val = "";
- seq = seq + 1;
- } else if (seq==2) {
- model.makeValue("/root/main/data/comnutr[" +seq+ "]/val2", val);
- model.makeValue("/root/main/data/comnutr[" +seq+ "]/nm2", "지질");
- val = "";
- seq = seq + 1;
- } else if (seq==3) {
- val = val + recmqty.substr(i, 1);
- model.makeValue("/root/main/data/comnutr[" +seq+ "]/val2", val);
- model.makeValue("/root/main/data/comnutr[" +seq+ "]/nm2", "당질");
- }
- }
- }
- }
- } else {
- model.makeValue("/root/temp/circleyn", "N");
- }
-
- model.resetInstanceNode("/root/temp/data");
- copyNodesetType("/root/temp/data", "/root/main/data/comnutr[check='Y']", "replace", model, model);
-
- exeReportPreview("RPANC00101", "XMLSTR", "/root");
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|