SPANC00100_섭취량평가.xrw 58 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <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">
  4. <xhtml:head>
  5. <xhtml:title>섭취량분석</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <data>
  11. <glycosuria>
  12. <cerealgrup1/>
  13. <lipidlow1/>
  14. <lipidmid1/>
  15. <lipidhigh1/>
  16. <vegtgrup/>
  17. <lipidgrup1/>
  18. <milkgrup1/>
  19. <fruitgrup/>
  20. <pid/>
  21. <nutrmngtkind/>
  22. <execdd/>
  23. <cnstflag/>
  24. </glycosuria>
  25. <kidney>
  26. <cerealgrup2/>
  27. <meatgrup2/>
  28. <vegtlowk2/>
  29. <vegtmidk2/>
  30. <vegthighk2/>
  31. <lipidgrup2/>
  32. <milkgrup2/>
  33. <fruitlowk2/>
  34. <fruitmidk2/>
  35. <fruithighk2/>
  36. <calrsupply2/>
  37. <pid/>
  38. <nutrmngtkind/>
  39. <execdd/>
  40. <cnstflag/>
  41. </kidney>
  42. <etrlfd>
  43. <pid/>
  44. <nutrmngtkind/>
  45. <execdd/>
  46. <cnstflag/>
  47. <intkkind/>
  48. <intknutrcd/>
  49. <intknutrnm/>
  50. <intkunit/>
  51. <intkqty/>
  52. </etrlfd>
  53. <varices>
  54. <pid/>
  55. <nutrmngtkind/>
  56. <execdd/>
  57. <cnstflag/>
  58. <intkkind2/>
  59. <intknutrcd2/>
  60. <intknutrnm2/>
  61. <intkunit2/>
  62. <intkqty2/>
  63. </varices>
  64. <supply>
  65. <pid/>
  66. <nutrmngtkind/>
  67. <execdd/>
  68. <cnstflag/>
  69. <intkkind3/>
  70. <intknutrcd3/>
  71. <intknutrnm3/>
  72. <intkunit3/>
  73. <intkqty3/>
  74. </supply>
  75. <comnutr>
  76. <check/>
  77. <pid/>
  78. <nutrmngtkind/>
  79. <execdd/>
  80. <cnstflag/>
  81. <nutrcd/>
  82. <nutroral/>
  83. <nutroralints/>
  84. <nutrvein/>
  85. <nutrsum/>
  86. <recmqty/>
  87. </comnutr>
  88. </data>
  89. <common>
  90. <valu>
  91. <calrintk/>
  92. <calr/>
  93. <protintk/>
  94. <prot/>
  95. <intkqtyetc/>
  96. <dietercmt/>
  97. <intknutr/>
  98. <intkqty/>
  99. <intknutr2/>
  100. <intkqty2/>
  101. <intknutr3/>
  102. <intkqty3/>
  103. </valu>
  104. </common>
  105. <exchbase>
  106. <glycosuria>
  107. <exchstndcd/>
  108. <calr/>
  109. <prot/>
  110. <lipo/>
  111. <gluco/>
  112. </glycosuria>
  113. <kidney>
  114. <exchstndcd/>
  115. <calr/>
  116. <prot/>
  117. <sodium/>
  118. <potas/>
  119. <phos/>
  120. </kidney>
  121. <etrlfd>
  122. <exchstndcd/>
  123. <exchstndnm/>
  124. <exchstndunit/>
  125. <calr/>
  126. <prot/>
  127. <lipo/>
  128. <gluco/>
  129. <sodium/>
  130. <calcium/>
  131. <phos/>
  132. <iron/>
  133. <potas/>
  134. <fiber/>
  135. </etrlfd>
  136. <varices>
  137. <exchstndcd/>
  138. <exchstndnm/>
  139. <exchstndunit/>
  140. <calr/>
  141. <prot/>
  142. <lipo/>
  143. <gluco/>
  144. <sodium/>
  145. <calcium/>
  146. <phos/>
  147. <iron/>
  148. <potas/>
  149. <fiber/>
  150. </varices>
  151. <supply>
  152. <exchstndcd/>
  153. <exchstndnm/>
  154. <exchstndunit/>
  155. <calr/>
  156. <prot/>
  157. <lipo/>
  158. <gluco/>
  159. <sodium/>
  160. <calcium/>
  161. <phos/>
  162. <iron/>
  163. <potas/>
  164. <fiber/>
  165. </supply>
  166. </exchbase>
  167. <receivedata/>
  168. </main>
  169. <send>
  170. <searchitem>
  171. <sickcd/>
  172. </searchitem>
  173. <data>
  174. <comnutr/>
  175. <glycosuria/>
  176. <kidney/>
  177. <etrlfd/>
  178. <varices/>
  179. <supply/>
  180. </data>
  181. </send>
  182. <hidden/>
  183. <init>
  184. <basecode>
  185. <nutrcd>
  186. <A0527>
  187. <cdid/>
  188. <cdnm/>
  189. </A0527>
  190. </nutrcd>
  191. <etcmatr>
  192. <etrlfd>
  193. <cdid/>
  194. <cdnm/>
  195. </etrlfd>
  196. <varices>
  197. <cdid/>
  198. <cdnm/>
  199. </varices>
  200. <supply>
  201. <cdid/>
  202. <cdnm/>
  203. </supply>
  204. </etcmatr>
  205. </basecode>
  206. </init>
  207. <temp>
  208. <data/>
  209. </temp>
  210. </root>
  211. </instance>
  212. <script type="javascript" ev:event="xforms-ready">
  213. <![CDATA[
  214. finit();
  215. fopensearch();
  216. //btn_calc.dispatch("DOMActivate"); //화면 오픈시 계산 수행
  217. //model.setFocus("ipt_pid");
  218. ]]>
  219. </script>
  220. <script type="javascript">
  221. <![CDATA[
  222. function finit() {
  223. // 화면open시 공통코드 setting
  224. zbcfGetCodeList( new Array( "A0527" ), new Array( "/root/init/basecode/nutrcd" ) );
  225. model.resetInstanceNode("/root/main/data");
  226. model.resetInstanceNode("/root/send");
  227. //model.removeNodeset("/root/main/data/glycosuria");
  228. //model.refresh();
  229. }
  230. function fopensearch() {
  231. submit("TRANC00104");
  232. model.setValue("/root/main/common/valu/calrintk", model.getValue("/root/main/receivedata/calrintk"));
  233. model.setValue("/root/main/common/valu/calr", model.getValue("/root/main/receivedata/calrintkqty"));
  234. model.setValue("/root/main/common/valu/protintk", model.getValue("/root/main/receivedata/protintk"));
  235. model.setValue("/root/main/common/valu/prot", model.getValue("/root/main/receivedata/protintkqty"));
  236. model.setValue("/root/main/common/valu/intkqtyetc", model.getValue("/root/main/receivedata/intkqtyetc"));
  237. model.setValue("/root/main/common/valu/dietercmt", model.getValue("/root/main/receivedata/dietercmt"));
  238. //저장된 영양소별 데이터가 없을경우 환자별영양관리 화면의 열량 및 단백질 권장량 계산값을 자동셋팅
  239. if (model.getValue("/root/main/data/comnutr[1]/pid") == "") {
  240. model.setValue("/root/main/data/comnutr[" + 2 + "]/recmqty", model.getValue("/root/main/receivedata/calrrecmqty"));
  241. model.setValue("/root/main/data/comnutr[" + 3 + "]/recmqty", model.getValue("/root/main/receivedata/protrecmqty"));
  242. }
  243. //model.refresh();
  244. submit("TRANC00108"); //경장,정맥,보충 재료 조회
  245. }
  246. ]]>
  247. </script>
  248. <submission id="TRZBC00101"/>
  249. <submission id="TXANC00104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" resultref="/root/hidden"/>
  250. <submission id="TRANC00104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/receivedata" resultref="/root/main/data"/>
  251. <submission id="TRANC00105" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/main/exchbase"/>
  252. <submission id="TRANC00108" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/init/basecode/etcmatr"/>
  253. <bind id="bind_nutrcd" ref="/root/main/data/comnutr/nutrcd" readonly="../nutrcd!=''"/>
  254. </model>
  255. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  256. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  257. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  258. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  259. </xhtml:head>
  260. <xhtml:body pagewidth="950" pageheight="620" guideline="1,900;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  261. <group id="grp_biz" scroll="auto" style="left:0px; top:0px; width:900px; height:574px; ">
  262. <button id="btn_clear" class="btn2_letter3" style="left:797px; top:37px; width:53px; height:19px; ">
  263. <caption>Clear</caption>
  264. <script type="javascript" ev:event="DOMActivate">
  265. <![CDATA[
  266. if ( btn_glycosuria.selected ) {
  267. model.resetInstanceNode("/root/main/data/glycosuria");
  268. }
  269. else if ( btn_kidney.selected ) {
  270. model.resetInstanceNode("/root/main/data/kidney");
  271. }
  272. else if ( btn_etrlfd.selected ) {
  273. model.resetInstanceNode("/root/main/data/etrlfd");
  274. }
  275. else if ( btn_varices.selected ) {
  276. model.resetInstanceNode("/root/main/data/varices");
  277. }
  278. else if ( btn_supply.selected ) {
  279. model.resetInstanceNode("/root/main/data/supply");
  280. }
  281. //model.refresh();
  282. ]]>
  283. </script>
  284. </button>
  285. <line id="line20" class="line_1" style="x1:0px; y1:405px; x2:895px; y2:405px; "/>
  286. <line id="line21" class="line_2" style="x1:0px; y1:431px; x2:895px; y2:431px; "/>
  287. <caption id="caption41" class="tit_2" style="left:9px; top:389px; width:206px; height:13px; ">섭취량 평가</caption>
  288. <line id="line23" class="line_2" style="x1:0px; y1:454px; x2:895px; y2:454px; "/>
  289. <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; "/>
  290. <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; "/>
  291. <button id="btn_calc" class="btn2_letter2" style="left:852px; top:37px; width:42px; height:19px; ">
  292. <caption>계산</caption>
  293. <script type="javascript" ev:event="DOMActivate">
  294. <![CDATA[
  295. var glycosuria_calr = 0; //당뇨-열량
  296. var glycosuria_prot = 0; //당뇨-단백질
  297. var glycosuria_lipo = 0; //당뇨-지질
  298. var glycosuria_gluco = 0; //당뇨-당질
  299. var kidney_calr = 0; //신장-열량
  300. var kidney_prot = 0; //신장-단백질
  301. var kidney_sodium = 0; //신장-나트륨
  302. var kidney_potas = 0; //신장-칼륨
  303. var kidney_phos = 0; //신장-인
  304. var etrlfd_calr = 0; //경장-열량
  305. var etrlfd_prot = 0; //경장-단백질
  306. var etrlfd_lipo = 0; //경장-지질
  307. var etrlfd_gluco = 0; //경장-당질
  308. var etrlfd_sodium = 0; //경장-나트륨
  309. var etrlfd_potas = 0; //경장-칼륨
  310. var etrlfd_phos = 0; //경장-인
  311. var etrlfd_fiber = 0; //경장-식이섬유
  312. var etrlfd_iron = 0; //경장-철
  313. var etrlfd_calcium = 0; //경장-칼슘
  314. var varices_calr = 0; //정맥-열량
  315. var varices_prot = 0; //정맥-단백질
  316. var varices_lipo = 0; //정맥-지질
  317. var varices_gluco = 0; //정맥-당질
  318. var varices_sodium = 0; //정맥-나트륨
  319. var varices_potas = 0; //정맥-칼륨
  320. var varices_phos = 0; //정맥-인
  321. var varices_fiber = 0; //정맥-식이섬유
  322. var varices_iron = 0; //정맥-철
  323. var varices_calcium = 0; //정맥-칼슘
  324. var supply_calr = 0; //보충-열량
  325. var supply_prot = 0; //보충-단백질
  326. var supply_lipo = 0; //보충-지질
  327. var supply_gluco = 0; //보충-당질
  328. var supply_sodium = 0; //보충-나트륨
  329. var supply_potas = 0; //보충-칼륨
  330. var supply_phos = 0; //보충-인
  331. var supply_fiber = 0; //보충-식이섬유
  332. var supply_iron = 0; //보충-철
  333. var supply_calcium = 0; //보충-칼슘
  334. // 당뇨 교환기준 데이터를 조회해온다.
  335. model.setValue("/root/send/searchitem/sickcd", "1");
  336. submit("TRANC00105");
  337. for ( i=0; i<8; i++ ) {
  338. if ( i == 0 ) {
  339. var code = "1010"; //당뇨-곡류군의 교환기준코드
  340. var vol = model.getValue("/root/main/data/glycosuria/cerealgrup1");
  341. } else if ( i == 1 ) {
  342. var code = "1015"; //당뇨-어육류군-저지방의 교환기준코드
  343. var vol = model.getValue("/root/main/data/glycosuria/lipidlow1");
  344. } else if ( i == 2 ) {
  345. var code = "1016"; //당뇨-어육류군-중지방의 교환기준코드
  346. var vol = model.getValue("/root/main/data/glycosuria/lipidmid1");
  347. } else if ( i == 3 ) {
  348. var code = "1017"; //당뇨-어육류군-고지방의 교환기준코드
  349. var vol = model.getValue("/root/main/data/glycosuria/lipidhigh1");
  350. } else if ( i == 4 ) {
  351. var code = "1020"; //당뇨-채소군의 교환기준코드
  352. var vol = model.getValue("/root/main/data/glycosuria/vegtgrup");
  353. } else if ( i == 5 ) {
  354. var code = "1025"; //당뇨-지방군의 교환기준코드
  355. var vol = model.getValue("/root/main/data/glycosuria/lipidgrup1");
  356. } else if ( i == 6 ) {
  357. var code = "1030"; //당뇨-우유군의 교환기준코드
  358. var vol = model.getValue("/root/main/data/glycosuria/milkgrup1");
  359. } else if ( i == 7 ) {
  360. var code = "1035"; //당뇨-과일군의 교환기준코드
  361. var vol = model.getValue("/root/main/data/glycosuria/fruitgrup");
  362. }
  363. glycosuria_calr = glycosuria_calr + model.getValue("/root/main/exchbase/glycosuria[exchstndcd='"+code+"']/calr") * vol;
  364. glycosuria_prot = glycosuria_prot + model.getValue("/root/main/exchbase/glycosuria[exchstndcd='"+code+"']/prot") * vol;
  365. glycosuria_lipo = glycosuria_lipo + model.getValue("/root/main/exchbase/glycosuria[exchstndcd='"+code+"']/lipo") * vol;
  366. glycosuria_gluco = glycosuria_gluco + model.getValue("/root/main/exchbase/glycosuria[exchstndcd='"+code+"']/gluco") * vol;
  367. }
  368. // var val1 = model.getValue("/root/main/data/glycosuria/cerealgrup1");
  369. // var val2 = model.getValue("/root/main/data/glycosuria/lipidlow1");
  370. // var xpath1 = grd_common.nodeset + "[1]/" + grd_common.colAttribute(2, "ref");
  371. // var xpath2 = grd_common.nodeset + "[2]/" + grd_common.colAttribute(2, "ref");
  372. // model.setValue(xpath1, val1);
  373. // model.setValue(xpath2, val2);
  374. // 신장 교환기준 데이터를 조회해온다.
  375. model.setValue("/root/send/searchitem/sickcd", "2");
  376. submit("TRANC00105");
  377. for ( i=0; i<11; i++ ) {
  378. if ( i == 0 ) {
  379. var code = "2010"; //신장-곡류군의 교환기준코드
  380. var vol = model.getValue("/root/main/data/kidney/cerealgrup2");
  381. } else if ( i == 1 ) {
  382. var code = "2015"; //신장-어육류군의 교환기준코드
  383. var vol = model.getValue("/root/main/data/kidney/meatgrup2");
  384. } else if ( i == 2 ) {
  385. var code = "2020"; //신장-채소군-저칼륨의 교환기준코드
  386. var vol = model.getValue("/root/main/data/kidney/vegtlowk2");
  387. } else if ( i == 3 ) {
  388. var code = "2021"; //신장-채소군-중칼륨의 교환기준코드
  389. var vol = model.getValue("/root/main/data/kidney/vegtmidk2");
  390. } else if ( i == 4 ) {
  391. var code = "2022"; //신장-채소군-고칼륨의 교환기준코드
  392. var vol = model.getValue("/root/main/data/kidney/vegthighk2");
  393. } else if ( i == 5 ) {
  394. var code = "2025"; //신장-지방군의 교환기준코드
  395. var vol = model.getValue("/root/main/data/kidney/lipidgrup2");
  396. } else if ( i == 6 ) {
  397. var code = "2030"; //신장-우유군의 교환기준코드
  398. var vol = model.getValue("/root/main/data/kidney/milkgrup2");
  399. } else if ( i == 7 ) {
  400. var code = "2035"; //신장-과일군-저칼륨의 교환기준코드
  401. var vol = model.getValue("/root/main/data/kidney/fruitlowk2");
  402. } else if ( i == 8 ) {
  403. var code = "2036"; //신장-과일군-중칼륨의 교환기준코드
  404. var vol = model.getValue("/root/main/data/kidney/fruitmidk2");
  405. } else if ( i == 9 ) {
  406. var code = "2037"; //신장-과일군-고칼륨의 교환기준코드
  407. var vol = model.getValue("/root/main/data/kidney/fruithighk2");
  408. } else if ( i == 10 ) {
  409. var code = "2040"; //신장-열량보충군의 교환기준코드
  410. var vol = model.getValue("/root/main/data/kidney/calrsupply2");
  411. }
  412. kidney_calr = kidney_calr + model.getValue("/root/main/exchbase/kidney[exchstndcd='"+code+"']/calr") * vol;
  413. kidney_prot = kidney_prot + model.getValue("/root/main/exchbase/kidney[exchstndcd='"+code+"']/prot") * vol;
  414. kidney_sodium = kidney_sodium + model.getValue("/root/main/exchbase/kidney[exchstndcd='"+code+"']/sodium") * vol;
  415. kidney_potas = kidney_potas + model.getValue("/root/main/exchbase/kidney[exchstndcd='"+code+"']/potas") * vol;
  416. kidney_phos = kidney_phos + model.getValue("/root/main/exchbase/kidney[exchstndcd='"+code+"']/phos") * vol;
  417. }
  418. //경장
  419. // 경장 교환기준 데이터를 조회해온다.
  420. model.setValue("/root/send/searchitem/sickcd", "3");
  421. submit("TRANC00105");
  422. for ( i=1; i<grd_etrlfd.rows; i++ ) { //추가한 재료 목록
  423. var code = model.getValue("/root/main/data/etrlfd[" + i + "]/intknutrcd"); //섭취영양음료 코드
  424. var vol = model.getValue("/root/main/data/etrlfd[" + i + "]/intkqty"); //섭취영양음료 함량
  425. etrlfd_calr = etrlfd_calr + (model.getValue("/root/main/exchbase/etrlfd[exchstndcd='"+code+"']/calr") * vol / 100);
  426. etrlfd_prot = etrlfd_prot + (model.getValue("/root/main/exchbase/etrlfd[exchstndcd='"+code+"']/prot") * vol / 100);
  427. etrlfd_lipo = etrlfd_lipo + (model.getValue("/root/main/exchbase/etrlfd[exchstndcd='"+code+"']/lipo") * vol / 100);
  428. etrlfd_gluco = etrlfd_gluco + (model.getValue("/root/main/exchbase/etrlfd[exchstndcd='"+code+"']/gluco") * vol / 100);
  429. etrlfd_sodium = etrlfd_sodium + (model.getValue("/root/main/exchbase/etrlfd[exchstndcd='"+code+"']/sodium") * vol / 100);
  430. etrlfd_potas = etrlfd_potas + (model.getValue("/root/main/exchbase/etrlfd[exchstndcd='"+code+"']/potas") * vol / 100);
  431. etrlfd_phos = etrlfd_phos + (model.getValue("/root/main/exchbase/etrlfd[exchstndcd='"+code+"']/phos") * vol / 100);
  432. etrlfd_fiber = etrlfd_fiber + (model.getValue("/root/main/exchbase/etrlfd[exchstndcd='"+code+"']/fiber") * vol / 100);
  433. etrlfd_iron = etrlfd_iron + (model.getValue("/root/main/exchbase/etrlfd[exchstndcd='"+code+"']/iron") * vol / 100);
  434. etrlfd_calcium = etrlfd_calcium + (model.getValue("/root/main/exchbase/etrlfd[exchstndcd='"+code+"']/calcium") * vol / 100);
  435. }
  436. //정맥
  437. // 정맥 교환기준 데이터를 조회해온다.
  438. model.setValue("/root/send/searchitem/sickcd", "4");
  439. submit("TRANC00105");
  440. for ( i=1; i<grd_varices.rows; i++ ) { //추가한 재료 목록
  441. var code = model.getValue("/root/main/data/varices[" + i + "]/intknutrcd2"); //섭취영양음료 코드
  442. var vol = model.getValue("/root/main/data/varices[" + i + "]/intkqty2"); //섭취영양음료 함량
  443. varices_calr = varices_calr + model.getValue("/root/main/exchbase/varices[exchstndcd='"+code+"']/calr") * vol;
  444. varices_prot = varices_prot + model.getValue("/root/main/exchbase/varices[exchstndcd='"+code+"']/prot") * vol;
  445. varices_lipo = varices_lipo + model.getValue("/root/main/exchbase/varices[exchstndcd='"+code+"']/lipo") * vol;
  446. varices_gluco = varices_gluco + model.getValue("/root/main/exchbase/varices[exchstndcd='"+code+"']/gluco") * vol;
  447. varices_sodium = varices_sodium + model.getValue("/root/main/exchbase/varices[exchstndcd='"+code+"']/sodium") * vol;
  448. varices_potas = varices_potas + model.getValue("/root/main/exchbase/varices[exchstndcd='"+code+"']/potas") * vol;
  449. varices_phos = varices_phos + model.getValue("/root/main/exchbase/varices[exchstndcd='"+code+"']/phos") * vol;
  450. varices_fiber = varices_fiber + model.getValue("/root/main/exchbase/varices[exchstndcd='"+code+"']/fiber") * vol;
  451. varices_iron = varices_iron + model.getValue("/root/main/exchbase/varices[exchstndcd='"+code+"']/iron") * vol;
  452. varices_calcium = varices_calcium + model.getValue("/root/main/exchbase/varices[exchstndcd='"+code+"']/calcium") * vol;
  453. }
  454. //보충
  455. // 보충 교환기준 데이터를 조회해온다.
  456. model.setValue("/root/send/searchitem/sickcd", "5");
  457. submit("TRANC00105");
  458. for ( i=1; i<grd_supply.rows; i++ ) { //추가한 재료 목록
  459. var code = model.getValue("/root/main/data/supply[" + i + "]/intknutrcd3"); //섭취영양음료 코드
  460. var vol = model.getValue("/root/main/data/supply[" + i + "]/intkqty3"); //섭취영양음료 함량
  461. supply_calr = supply_calr + (model.getValue("/root/main/exchbase/supply[exchstndcd='"+code+"']/calr") * vol / 100);
  462. supply_prot = supply_prot + (model.getValue("/root/main/exchbase/supply[exchstndcd='"+code+"']/prot") * vol / 100);
  463. supply_lipo = supply_lipo + (model.getValue("/root/main/exchbase/supply[exchstndcd='"+code+"']/lipo") * vol / 100);
  464. supply_gluco = supply_gluco + (model.getValue("/root/main/exchbase/supply[exchstndcd='"+code+"']/gluco") * vol / 100);
  465. supply_sodium = supply_sodium + (model.getValue("/root/main/exchbase/supply[exchstndcd='"+code+"']/sodium") * vol / 100);
  466. supply_potas = supply_potas + (model.getValue("/root/main/exchbase/supply[exchstndcd='"+code+"']/potas") * vol / 100);
  467. supply_phos = supply_phos + (model.getValue("/root/main/exchbase/supply[exchstndcd='"+code+"']/phos") * vol / 100);
  468. supply_fiber = supply_fiber + (model.getValue("/root/main/exchbase/supply[exchstndcd='"+code+"']/fiber") * vol / 100);
  469. supply_iron = supply_iron + (model.getValue("/root/main/exchbase/supply[exchstndcd='"+code+"']/iron") * vol / 100);
  470. supply_calcium = supply_calcium + (model.getValue("/root/main/exchbase/supply[exchstndcd='"+code+"']/calcium") * vol / 100);
  471. }
  472. //C:P:F 계산
  473. //당뇨와 신장이 모두 입력된 경우 확인메세지창 띄워줌.
  474. if ((glycosuria_calr > 0) && (kidney_calr > 0)) {
  475. if ( messageBox("당뇨와 신장 섭취량이 모두 입력되었습니다.", "Q003") == 6 ) {
  476. } else {
  477. return;
  478. }
  479. }
  480. var C = parseInt((glycosuria_calr + supply_calr)==0?0:(glycosuria_gluco + supply_gluco)*4/(glycosuria_calr + supply_calr)*100); // (당뇨+보충) C=당질*4/열량*100
  481. 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
  482. var F = parseInt((glycosuria_calr + supply_calr)==0?0:(glycosuria_lipo + supply_lipo)*9/(glycosuria_calr + supply_calr)*100); // (당뇨+보충) F=지질*9/열량*100
  483. var C2 = parseInt(etrlfd_calr==0?0:etrlfd_gluco*4/etrlfd_calr*100); // 경장 C2=당질*4/열량*100
  484. var P2 = parseInt(etrlfd_calr==0?0:etrlfd_prot*4/etrlfd_calr*100); // 경장 P2=단백질*4/열량*100
  485. var F2 = parseInt(etrlfd_calr==0?0:etrlfd_lipo*9/etrlfd_calr*100); // 경장 F2=지질*9/열량*100
  486. var C3 = parseInt(varices_calr==0?0:varices_gluco*4/varices_calr*100); // 정맥 C3=당질*4/열량*100
  487. var P3 = parseInt(varices_calr==0?0:varices_prot*4/varices_calr*100); // 정맥 P3=단백질*4/열량*100
  488. var F3 = parseInt(varices_calr==0?0:varices_lipo*9/varices_calr*100); // 정맥 F3=지질*9/열량*100
  489. //영양소별 경구 계산 = (당뇨 or 신장) + 보충
  490. model.setValue(grd_common.nodeset + "[1]/" + grd_common.colAttribute(6, "ref"), C + ":" + P + ":" + F); //C:P:F
  491. model.setValue(grd_common.nodeset + "[2]/" + grd_common.colAttribute(6, "ref"), glycosuria_calr + kidney_calr + supply_calr); //열량
  492. model.setValue(grd_common.nodeset + "[3]/" + grd_common.colAttribute(6, "ref"), glycosuria_prot + kidney_prot + supply_prot); //단백질
  493. model.setValue(grd_common.nodeset + "[4]/" + grd_common.colAttribute(6, "ref"), glycosuria_lipo + supply_lipo); //지질
  494. model.setValue(grd_common.nodeset + "[5]/" + grd_common.colAttribute(6, "ref"), glycosuria_gluco + supply_gluco); //당질
  495. model.setValue(grd_common.nodeset + "[6]/" + grd_common.colAttribute(6, "ref"), kidney_sodium + supply_sodium); //나트륨
  496. model.setValue(grd_common.nodeset + "[7]/" + grd_common.colAttribute(6, "ref"), supply_calcium); //칼슘
  497. model.setValue(grd_common.nodeset + "[8]/" + grd_common.colAttribute(6, "ref"), kidney_phos + supply_phos); //인
  498. model.setValue(grd_common.nodeset + "[9]/" + grd_common.colAttribute(6, "ref"), supply_iron); //철
  499. model.setValue(grd_common.nodeset + "[10]/" + grd_common.colAttribute(6, "ref"), kidney_potas + supply_potas); //칼륨
  500. model.setValue(grd_common.nodeset + "[11]/" + grd_common.colAttribute(6, "ref"), supply_fiber); //식이섬유
  501. //영양소별 경장 계산
  502. model.setValue(grd_common.nodeset + "[1]/" + grd_common.colAttribute(7, "ref"), C2 + ":" + P2 + ":" + F2); //C:P:F
  503. model.setValue(grd_common.nodeset + "[2]/" + grd_common.colAttribute(7, "ref"), etrlfd_calr); //열량
  504. model.setValue(grd_common.nodeset + "[3]/" + grd_common.colAttribute(7, "ref"), etrlfd_prot); //단백질
  505. model.setValue(grd_common.nodeset + "[4]/" + grd_common.colAttribute(7, "ref"), etrlfd_lipo); //지질
  506. model.setValue(grd_common.nodeset + "[5]/" + grd_common.colAttribute(7, "ref"), etrlfd_gluco); //당질
  507. model.setValue(grd_common.nodeset + "[6]/" + grd_common.colAttribute(7, "ref"), etrlfd_sodium); //나트륨
  508. model.setValue(grd_common.nodeset + "[7]/" + grd_common.colAttribute(7, "ref"), etrlfd_calcium); //칼슘
  509. model.setValue(grd_common.nodeset + "[8]/" + grd_common.colAttribute(7, "ref"), etrlfd_phos); //인
  510. model.setValue(grd_common.nodeset + "[9]/" + grd_common.colAttribute(7, "ref"), etrlfd_iron); //철
  511. model.setValue(grd_common.nodeset + "[10]/" + grd_common.colAttribute(7, "ref"), etrlfd_potas); //칼륨
  512. model.setValue(grd_common.nodeset + "[11]/" + grd_common.colAttribute(7, "ref"), etrlfd_fiber); //식이섬유
  513. //영양소별 정맥 계산
  514. model.setValue(grd_common.nodeset + "[1]/" + grd_common.colAttribute(8, "ref"), C3 + ":" + P3 + ":" + F3); //C:P:F
  515. model.setValue(grd_common.nodeset + "[2]/" + grd_common.colAttribute(8, "ref"), varices_calr); //열량
  516. model.setValue(grd_common.nodeset + "[3]/" + grd_common.colAttribute(8, "ref"), varices_prot); //단백질
  517. model.setValue(grd_common.nodeset + "[4]/" + grd_common.colAttribute(8, "ref"), varices_lipo); //지질
  518. model.setValue(grd_common.nodeset + "[5]/" + grd_common.colAttribute(8, "ref"), varices_gluco); //당질
  519. model.setValue(grd_common.nodeset + "[6]/" + grd_common.colAttribute(8, "ref"), varices_sodium); //나트륨
  520. model.setValue(grd_common.nodeset + "[7]/" + grd_common.colAttribute(8, "ref"), varices_calcium); //칼슘
  521. model.setValue(grd_common.nodeset + "[8]/" + grd_common.colAttribute(8, "ref"), varices_phos); //인
  522. model.setValue(grd_common.nodeset + "[9]/" + grd_common.colAttribute(8, "ref"), varices_iron); //철
  523. model.setValue(grd_common.nodeset + "[10]/" + grd_common.colAttribute(8, "ref"), varices_potas); //칼륨
  524. model.setValue(grd_common.nodeset + "[11]/" + grd_common.colAttribute(8, "ref"), varices_fiber); //식이섬유
  525. //영양소별 총계 계산
  526. model.setValue(grd_common.nodeset + "[1]/" + grd_common.colAttribute(9, "ref"), (C+C2+C3)+ ":" + (P+P2+P3) + ":" + (F+F2+F3));
  527. for ( i=2; i<=11; i++ ) {
  528. var val = 0;
  529. var sum = 0;
  530. for ( j=6; j<=8; j++ ) {
  531. val = model.getValue(grd_common.nodeset + "[" + i + "]/" + grd_common.colAttribute(j, "ref"));
  532. if ( val != "") {
  533. sum = parseFloat(sum) + parseFloat(val);
  534. }
  535. }
  536. model.setValue(grd_common.nodeset + "[" + i + "]/" + grd_common.colAttribute(9, "ref"), sum);
  537. }
  538. //row status가 null이기 때문에 계산후에는 무조건 'insert'로 초기화한다.
  539. for ( i=1; i<grd_common.rows; i++) {
  540. grd_common.addStatus(i, "insert");
  541. }
  542. //화면 맨아래 섭취량 평가 부분에 열량, 단백질 setting
  543. var calrtotal = model.getValue(grd_common.nodeset + "[2]/" + grd_common.colAttribute(9, "ref"));
  544. var prottotal = model.getValue(grd_common.nodeset + "[3]/" + grd_common.colAttribute(9, "ref"));
  545. if ( calrtotal < 100 ) {
  546. model.setValue("/root/main/common/valu/calrintk", "1");
  547. } else if (( calrtotal >= 100 ) && ( calrtotal < 500 )) {
  548. model.setValue("/root/main/common/valu/calrintk", "2");
  549. } else if (( calrtotal >= 500 ) && ( calrtotal < 1000 )) {
  550. model.setValue("/root/main/common/valu/calrintk", "3");
  551. } else if ( calrtotal >= 1000 ) {
  552. model.setValue("/root/main/common/valu/calrintk", "4");
  553. }
  554. if ( prottotal < 100 ) {
  555. model.setValue("/root/main/common/valu/protintk", "1");
  556. } else if (( prottotal >= 100 ) && ( prottotal < 500 )) {
  557. model.setValue("/root/main/common/valu/protintk", "2");
  558. } else if (( prottotal >= 500 ) && ( prottotal < 1000 )) {
  559. model.setValue("/root/main/common/valu/protintk", "3");
  560. } else if ( prottotal >= 1000 ) {
  561. model.setValue("/root/main/common/valu/protintk", "4");
  562. }
  563. model.setValue("/root/main/common/valu/calr", calrtotal);
  564. model.setValue("/root/main/common/valu/prot", prottotal);
  565. model.refresh();
  566. ]]>
  567. </script>
  568. </button>
  569. <caption id="caption46" class="cell_1" style="left:424px; top:410px; width:71px; height:45px; vertical-align:middle; ">단백질섭취</caption>
  570. <caption id="caption47" style="left:322px; top:434px; width:63px; height:20px; vertical-align:middle; ">kcal/day</caption>
  571. <line id="line17" class="line_1" style="x1:0px; y1:27px; x2:895px; y2:27px; "/>
  572. <caption id="caption48" style="left:844px; top:435px; width:51px; height:20px; vertical-align:middle; ">g/day</caption>
  573. <button id="btn_exchbase" class="btn2_letter4" style="left:731px; top:37px; width:64px; height:19px; ">
  574. <caption>교환기준</caption>
  575. <script type="javascript" ev:event="onclick">
  576. <![CDATA[
  577. //window.load("SMANB00500_교환기준관리.xrw","modal","code", "left:600px; top:50px; width:550px; height:540px;min:hidden;max:hidden;resize:false;");
  578. modal("SMANB00500");
  579. ]]>
  580. </script>
  581. </button>
  582. <switch id="switch2" style="left:0px; top:57px; width:895px; height:118px; border-color:#c0a8c8; border-width:1; border-style:solid; ">
  583. <case id="case1" selected="true">
  584. <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; ">
  585. <col autonext="false" ref="cerealgrup1" type="input" format="##.9" maxlength="3"/>
  586. <col autonext="false" ref="lipidlow1" type="input" format="##.9" maxlength="3"/>
  587. <col autonext="false" ref="lipidmid1" type="input" format="##.9" maxlength="3"/>
  588. <col autonext="false" ref="lipidhigh1" type="input" format="##.9" maxlength="3"/>
  589. <col autonext="false" ref="vegtgrup" type="input" format="##.9" maxlength="3"/>
  590. <col autonext="false" ref="lipidgrup1" type="input" format="##.9" maxlength="3"/>
  591. <col autonext="false" ref="milkgrup1" type="input" format="##.9" maxlength="3"/>
  592. <col autonext="false" ref="fruitgrup" type="input" format="##.9" maxlength="3"/>
  593. <col ref="pid" visibility="hidden"/>
  594. <col ref="nutrmngtkind" visibility="hidden"/>
  595. <col ref="execdd" visibility="hidden"/>
  596. <col ref="cnstflag" visibility="hidden"/>
  597. </datagrid>
  598. <button id="btn_rowadd1" class="btn2_letter3" style="left:773px; top:5px; width:53px; height:19px; ">
  599. <caption>행추가</caption>
  600. <script type="javascript" ev:event="DOMActivate">
  601. <![CDATA[
  602. grd_glycosuria.addRow();
  603. ]]>
  604. </script>
  605. </button>
  606. <button id="btn_rowdel1" class="btn2_letter3" style="left:830px; top:5px; width:53px; height:19px; ">
  607. <caption>행삭제</caption>
  608. <script type="javascript" ev:event="DOMActivate">
  609. <![CDATA[
  610. grd_glycosuria.deleteRow(grd_glycosuria.row);
  611. ]]>
  612. </script>
  613. </button>
  614. <line id="line18" class="line_1" style="x1:6px; y1:26px; x2:887px; y2:26px; "/>
  615. </case>
  616. <case id="case2">
  617. <line id="line1" class="line_1" style="x1:6px; y1:26px; x2:887px; y2:26px; "/>
  618. <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; ">
  619. <col autonext="false" ref="cerealgrup2" type="input" format="##.9" maxlength="3"/>
  620. <col autonext="false" ref="meatgrup2" type="input" format="##.9" maxlength="3"/>
  621. <col autonext="false" ref="vegtlowk2" type="input" format="##.9" maxlength="3"/>
  622. <col autonext="false" ref="vegtmidk2" type="input" format="##.9" maxlength="3"/>
  623. <col autonext="false" ref="vegthighk2" type="input" format="##.9" maxlength="3"/>
  624. <col autonext="false" ref="lipidgrup2" type="input" format="##.9" maxlength="3"/>
  625. <col autonext="false" ref="milkgrup2" type="input" format="##.9" maxlength="3"/>
  626. <col autonext="false" ref="fruitlowk2" type="input" format="##.9" maxlength="3"/>
  627. <col autonext="false" ref="fruitmidk2" type="input" format="##.9" maxlength="3"/>
  628. <col autonext="false" ref="fruithighk2" type="input" format="##.9" maxlength="3"/>
  629. <col autonext="false" ref="calrsupply2" type="input" format="##.9" maxlength="3"/>
  630. <col ref="pid" visibility="hidden"/>
  631. <col ref="nutrmngtkind" visibility="hidden"/>
  632. <col ref="execdd" visibility="hidden"/>
  633. <col ref="cnstflag" visibility="hidden"/>
  634. </datagrid>
  635. <button id="btn_rowadd2" class="btn2_letter3" style="left:773px; top:5px; width:53px; height:19px; ">
  636. <caption>행추가</caption>
  637. <script type="javascript" ev:event="DOMActivate">
  638. <![CDATA[
  639. grd_kidney.addRow();
  640. ]]>
  641. </script>
  642. </button>
  643. <button id="btn_rowdel2" class="btn2_letter3" style="left:830px; top:5px; width:53px; height:19px; ">
  644. <caption>행삭제</caption>
  645. <script type="javascript" ev:event="DOMActivate">
  646. <![CDATA[
  647. grd_kidney.deleteRow(grd_kidney.row);
  648. ]]>
  649. </script>
  650. </button>
  651. </case>
  652. <case id="case3">
  653. <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; ">
  654. <col ref="intknutrnm"/>
  655. <col ref="intknutrcd" visibility="hidden"/>
  656. <col ref="intkunit" style="text-align:center; "/>
  657. <col ref="intkqty" type="input" style="text-align:center; "/>
  658. <col ref="intkkind" visibility="hidden"/>
  659. <col ref="pid" visibility="hidden"/>
  660. <col ref="nutrmngtkind" visibility="hidden"/>
  661. <col ref="execdd" visibility="hidden"/>
  662. <col ref="cnstflag" visibility="hidden"/>
  663. </datagrid>
  664. <line id="line38" class="line_1" style="x1:6px; y1:12px; x2:885px; y2:12px; "/>
  665. <caption id="caption51" class="cell_1" style="left:477px; top:16px; width:65px; height:23px; vertical-align:middle; ">제형</caption>
  666. <input id="ipt_cnts1" ref="/root/main/common/valu/intkqty" class="input_search" style="left:546px; top:42px; width:294px; height:19px; "/>
  667. <caption id="caption52" class="cell_1" style="left:477px; top:41px; width:65px; height:23px; vertical-align:middle; ">용량</caption>
  668. <line id="line39" class="line_2" style="x1:477px; y1:39px; x2:886px; y2:39px; "/>
  669. <line id="line40" class="line_2" style="x1:477px; y1:64px; x2:886px; y2:64px; "/>
  670. <select1 id="cmb_matr1" ref="/root/main/common/valu/intknutr" class="combo_search" appearance="minimal" style="left:546px; top:17px; width:339px; height:19px; ">
  671. <choices>
  672. <itemset nodeset="/root/init/basecode/etcmatr/etrlfd">
  673. <label ref="cdnm"/>
  674. <value ref="cdid"/>
  675. </itemset>
  676. </choices>
  677. </select1>
  678. <button id="btn_add1" class="btn2_letter2" style="left:843px; top:42px; width:42px; height:19px; ">
  679. <caption>추가</caption>
  680. <script type="javascript" ev:event="DOMActivate">
  681. <![CDATA[
  682. if ( (model.getValue("/root/main/common/valu/intknutr")=="") || (model.getValue("/root/main/common/valu/intkqty")=="") ) {
  683. messageBox("재료, 함량을", "C001");
  684. return;
  685. } else {
  686. var code = model.getValue("/root/main/common/valu/intknutr"); //섭취영양음료 코드
  687. grd_etrlfd.addRow();
  688. model.setValue("/root/main/data/etrlfd["+grd_etrlfd.row+"]/intknutrnm", model.getValue("/root/main/exchbase/etrlfd[exchstndcd="+code+"]/exchstndnm"));
  689. model.setValue("/root/main/data/etrlfd["+grd_etrlfd.row+"]/intknutrcd", code);
  690. model.setValue("/root/main/data/etrlfd["+grd_etrlfd.row+"]/intkunit", model.getValue("/root/main/exchbase/etrlfd[exchstndcd="+code+"]/exchstndunit"));
  691. model.setValue("/root/main/data/etrlfd["+grd_etrlfd.row+"]/intkqty", model.getValue("/root/main/common/valu/intkqty"));
  692. model.setValue("/root/main/data/etrlfd["+grd_etrlfd.row+"]/pid", model.getValue("/root/main/receivedata/pid"));
  693. model.setValue("/root/main/data/etrlfd["+grd_etrlfd.row+"]/nutrmngtkind", model.getValue("/root/main/receivedata/nutrmngtkind"));
  694. model.setValue("/root/main/data/etrlfd["+grd_etrlfd.row+"]/execdd", model.getValue("/root/main/receivedata/execdd"));
  695. model.setValue("/root/main/data/etrlfd["+grd_etrlfd.row+"]/cnstflag", model.getValue("/root/main/receivedata/cnstflag"));
  696. model.refresh();
  697. }
  698. ]]>
  699. </script>
  700. </button>
  701. </case>
  702. <case id="case4">
  703. <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; ">
  704. <col ref="intknutrnm2"/>
  705. <col ref="intknutrcd2" visibility="hidden"/>
  706. <col ref="intkunit2" style="text-align:center; "/>
  707. <col ref="intkqty2" type="input" style="text-align:center; "/>
  708. <col ref="intkkind2" visibility="hidden"/>
  709. <col ref="pid" visibility="hidden"/>
  710. <col ref="nutrmngtkind" visibility="hidden"/>
  711. <col ref="execdd" visibility="hidden"/>
  712. <col ref="cnstflag" visibility="hidden"/>
  713. </datagrid>
  714. <line id="line2" class="line_1" style="x1:6px; y1:12px; x2:885px; y2:12px; "/>
  715. <caption id="caption1" class="cell_1" style="left:477px; top:16px; width:65px; height:23px; vertical-align:middle; ">제형</caption>
  716. <input id="ipt_cnts2" ref="/root/main/common/valu/intkqty2" class="input_search" style="left:546px; top:42px; width:294px; height:19px; "/>
  717. <caption id="caption2" class="cell_1" style="left:477px; top:41px; width:65px; height:23px; vertical-align:middle; ">용량</caption>
  718. <line id="line3" class="line_2" style="x1:477px; y1:39px; x2:886px; y2:39px; "/>
  719. <line id="line4" class="line_2" style="x1:477px; y1:64px; x2:886px; y2:64px; "/>
  720. <select1 id="cmb_matr2" ref="/root/main/common/valu/intknutr2" class="combo_search" appearance="minimal" style="left:546px; top:17px; width:339px; height:19px; ">
  721. <choices>
  722. <itemset nodeset="/root/init/basecode/etcmatr/varices">
  723. <label ref="cdnm"/>
  724. <value ref="cdid"/>
  725. </itemset>
  726. </choices>
  727. </select1>
  728. <button id="btn_add2" class="btn2_letter2" style="left:843px; top:42px; width:42px; height:19px; ">
  729. <caption>추가</caption>
  730. <script type="javascript" ev:event="DOMActivate">
  731. <![CDATA[
  732. if ( (model.getValue("/root/main/common/valu/intknutr2")=="") || (model.getValue("/root/main/common/valu/intkqty2")=="") ) {
  733. messageBox("재료, 함량을", "C001");
  734. return;
  735. } else {
  736. var code = model.getValue("/root/main/common/valu/intknutr2"); //섭취영양음료 코드
  737. grd_varices.addRow();
  738. model.setValue("/root/main/data/varices["+grd_varices.row+"]/intknutrnm2", model.getValue("/root/main/exchbase/varices[exchstndcd="+code+"]/exchstndnm"));
  739. model.setValue("/root/main/data/varices["+grd_varices.row+"]/intknutrcd2", code);
  740. model.setValue("/root/main/data/varices["+grd_varices.row+"]/intkunit2", model.getValue("/root/main/exchbase/varices[exchstndcd="+code+"]/exchstndunit"));
  741. model.setValue("/root/main/data/varices["+grd_varices.row+"]/intkqty2", model.getValue("/root/main/common/valu/intkqty2"));
  742. model.setValue("/root/main/data/varices["+grd_varices.row+"]/pid", model.getValue("/root/main/receivedata/pid"));
  743. model.setValue("/root/main/data/varices["+grd_varices.row+"]/nutrmngtkind", model.getValue("/root/main/receivedata/nutrmngtkind"));
  744. model.setValue("/root/main/data/varices["+grd_varices.row+"]/execdd", model.getValue("/root/main/receivedata/execdd"));
  745. model.setValue("/root/main/data/varices["+grd_varices.row+"]/cnstflag", model.getValue("/root/main/receivedata/cnstflag"));
  746. model.refresh();
  747. }
  748. ]]>
  749. </script>
  750. </button>
  751. </case>
  752. <case id="case5">
  753. <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; ">
  754. <col ref="intknutrnm3"/>
  755. <col ref="intknutrcd3" visibility="hidden"/>
  756. <col ref="intkunit3" style="text-align:center; "/>
  757. <col ref="intkqty3" type="input" style="text-align:center; "/>
  758. <col ref="intkkind3" visibility="hidden"/>
  759. <col ref="pid" visibility="hidden"/>
  760. <col ref="nutrmngtkind" visibility="hidden"/>
  761. <col ref="execdd" visibility="hidden"/>
  762. <col ref="cnstflag" visibility="hidden"/>
  763. </datagrid>
  764. <line id="line5" class="line_1" style="x1:6px; y1:12px; x2:885px; y2:12px; "/>
  765. <caption id="caption3" class="cell_1" style="left:477px; top:16px; width:65px; height:23px; vertical-align:middle; ">제형</caption>
  766. <input id="ipt_cnts3" ref="/root/main/common/valu/intkqty3" class="input_search" style="left:546px; top:42px; width:294px; height:19px; "/>
  767. <caption id="caption4" class="cell_1" style="left:477px; top:41px; width:65px; height:23px; vertical-align:middle; ">용량</caption>
  768. <line id="line6" class="line_2" style="x1:477px; y1:39px; x2:886px; y2:39px; "/>
  769. <line id="line7" class="line_2" style="x1:477px; y1:64px; x2:886px; y2:64px; "/>
  770. <select1 id="cmb_matr3" ref="/root/main/common/valu/intknutr3" class="combo_search" appearance="minimal" style="left:546px; top:17px; width:339px; height:19px; ">
  771. <choices>
  772. <itemset nodeset="/root/init/basecode/etcmatr/supply">
  773. <label ref="cdnm"/>
  774. <value ref="cdid"/>
  775. </itemset>
  776. </choices>
  777. </select1>
  778. <button id="btn_add3" class="btn2_letter2" style="left:843px; top:42px; width:42px; height:19px; ">
  779. <caption>추가</caption>
  780. <script type="javascript" ev:event="DOMActivate">
  781. <![CDATA[
  782. if ( (model.getValue("/root/main/common/valu/intknutr3")=="") || (model.getValue("/root/main/common/valu/intkqty3")=="") ) {
  783. messageBox("재료, 함량을", "C001");
  784. return;
  785. } else {
  786. var code = model.getValue("/root/main/common/valu/intknutr3"); //섭취영양음료 코드
  787. grd_supply.addRow();
  788. model.setValue("/root/main/data/supply["+grd_supply.row+"]/intknutrnm3", model.getValue("/root/main/exchbase/supply[exchstndcd="+code+"]/exchstndnm"));
  789. model.setValue("/root/main/data/supply["+grd_supply.row+"]/intknutrcd3", code);
  790. model.setValue("/root/main/data/supply["+grd_supply.row+"]/intkunit3", model.getValue("/root/main/exchbase/supply[exchstndcd="+code+"]/exchstndunit"));
  791. model.setValue("/root/main/data/supply["+grd_supply.row+"]/intkqty3", model.getValue("/root/main/common/valu/intkqty3"));
  792. model.setValue("/root/main/data/supply["+grd_supply.row+"]/pid", model.getValue("/root/main/receivedata/pid"));
  793. model.setValue("/root/main/data/supply["+grd_supply.row+"]/nutrmngtkind", model.getValue("/root/main/receivedata/nutrmngtkind"));
  794. model.setValue("/root/main/data/supply["+grd_supply.row+"]/execdd", model.getValue("/root/main/receivedata/execdd"));
  795. model.setValue("/root/main/data/supply["+grd_supply.row+"]/cnstflag", model.getValue("/root/main/receivedata/cnstflag"));
  796. model.refresh();
  797. }
  798. ]]>
  799. </script>
  800. </button>
  801. </case>
  802. </switch>
  803. <select1 id="cmb_protflag" ref="/root/main/common/valu/protintk" class="combo_search" appearance="minimal" style="left:498px; top:410px; width:397px; height:19px; ">
  804. <choices>
  805. <item>
  806. <label>상당히 부족</label>
  807. <value>1</value>
  808. </item>
  809. <item>
  810. <label>약간 부족</label>
  811. <value>2</value>
  812. </item>
  813. <item>
  814. <label>양호</label>
  815. <value>3</value>
  816. </item>
  817. <item>
  818. <label>과다</label>
  819. <value>4</value>
  820. </item>
  821. </choices>
  822. </select1>
  823. <line id="line19" class="line_3" style="x1:0px; y1:492px; x2:895px; y2:492px; "/>
  824. <caption id="caption38" class="tit_2" style="left:9px; top:11px; width:113px; height:13px; ">섭취량 분석</caption>
  825. <select1 id="cmb_calrflag" ref="/root/main/common/valu/calrintk" class="combo_search" appearance="minimal" style="left:68px; top:410px; width:353px; height:19px; ">
  826. <choices>
  827. <item>
  828. <label>상당히 부족</label>
  829. <value>1</value>
  830. </item>
  831. <item>
  832. <label>약간 부족</label>
  833. <value>2</value>
  834. </item>
  835. <item>
  836. <label>양호</label>
  837. <value>3</value>
  838. </item>
  839. <item>
  840. <label>과다</label>
  841. <value>4</value>
  842. </item>
  843. </choices>
  844. </select1>
  845. <caption id="caption45" class="cell_1" style="left:0px; top:410px; width:65px; height:45px; vertical-align:middle; ">열량섭취</caption>
  846. <button id="btn_glycosuria" class="btn_sw" group="tab" selected="true" style="left:0px; top:36px; width:50px; height:22px; ">
  847. <caption>당뇨</caption>
  848. <script type="javascript" ev:event="DOMActivate">
  849. <![CDATA[
  850. model.toggle("case1");
  851. ]]>
  852. </script>
  853. </button>
  854. <button id="btn_kidney" class="btn_sw" group="tab" selected="false" style="left:49px; top:36px; width:50px; height:22px; ">
  855. <caption>신장</caption>
  856. <script type="javascript" ev:event="DOMActivate">
  857. <![CDATA[
  858. model.toggle("case2");
  859. ]]>
  860. </script>
  861. </button>
  862. <button id="btn_etrlfd" class="btn_sw" group="tab" selected="false" style="left:98px; top:36px; width:50px; height:22px; ">
  863. <caption>경장</caption>
  864. <script type="javascript" ev:event="DOMActivate">
  865. <![CDATA[
  866. model.toggle("case3");
  867. // 경장 교환기준 데이터를 조회해온다.
  868. model.setValue("/root/send/searchitem/sickcd", "3");
  869. submit("TRANC00105");
  870. if (grd_etrlfd.rows > 1) {
  871. for (i=1; i<grd_etrlfd.rows; i++) {
  872. var code = model.getValue("/root/main/data/etrlfd["+i+"]/intknutrcd");
  873. model.setValue("/root/main/data/etrlfd["+i+"]/intknutrnm", model.getValue("/root/main/exchbase/etrlfd[exchstndcd="+code+"]/exchstndnm"));
  874. }
  875. }
  876. ]]>
  877. </script>
  878. </button>
  879. <button id="btn_varices" class="btn_sw" group="tab" selected="false" style="left:147px; top:36px; width:50px; height:22px; ">
  880. <caption>정맥</caption>
  881. <script type="javascript" ev:event="DOMActivate">
  882. <![CDATA[
  883. model.toggle("case4");
  884. // 정맥 교환기준 데이터를 조회해온다.
  885. model.setValue("/root/send/searchitem/sickcd", "4");
  886. submit("TRANC00105");
  887. if (grd_varices.rows > 1) {
  888. for (i=1; i<grd_varices.rows; i++) {
  889. var code = model.getValue("/root/main/data/varices["+i+"]/intknutrcd2");
  890. model.setValue("/root/main/data/varices["+i+"]/intknutrnm2", model.getValue("/root/main/exchbase/varices[exchstndcd="+code+"]/exchstndnm"));
  891. }
  892. }
  893. ]]>
  894. </script>
  895. </button>
  896. <button id="btn_supply" class="btn_sw" group="tab" selected="false" style="left:196px; top:36px; width:50px; height:22px; ">
  897. <caption>보충</caption>
  898. <script type="javascript" ev:event="DOMActivate">
  899. <![CDATA[
  900. model.toggle("case5");
  901. // 보충 교환기준 데이터를 조회해온다.
  902. model.setValue("/root/send/searchitem/sickcd", "5");
  903. submit("TRANC00105");
  904. if (grd_supply.rows > 1) {
  905. for (i=1; i<grd_supply.rows; i++) {
  906. var code = model.getValue("/root/main/data/supply["+i+"]/intknutrcd3");
  907. model.setValue("/root/main/data/supply["+i+"]/intknutrnm3", model.getValue("/root/main/exchbase/supply[exchstndcd="+code+"]/exchstndnm"));
  908. }
  909. }
  910. ]]>
  911. </script>
  912. </button>
  913. <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; ">
  914. <col checkvalue="Y,N" ref="check" type="checkbox"/>
  915. <col ref="pid" visibility="hidden"/>
  916. <col ref="nutrmngtkind" visibility="hidden"/>
  917. <col ref="execdd" visibility="hidden"/>
  918. <col ref="cnstflag" visibility="hidden"/>
  919. <col ref="nutrcd" type="combo">
  920. <choices>
  921. <itemset nodeset="/root/init/basecode/nutrcd/A0527">
  922. <label ref="cdnm"/>
  923. <value ref="cdid"/>
  924. </itemset>
  925. </choices>
  926. </col>
  927. <col ref="nutroral" style="text-align:center; "/>
  928. <col ref="nutroralints" style="text-align:center; "/>
  929. <col ref="nutrvein" style="text-align:center; "/>
  930. <col ref="nutrsum" type="input" style="text-align:center; "/>
  931. <col ref="recmqty" type="input" style="text-align:center; "/>
  932. </datagrid>
  933. <caption id="caption5" class="cell_1" style="left:0px; top:456px; width:65px; height:37px; vertical-align:middle; ">비고</caption>
  934. <textarea id="tar_intkqtyrem" ref="/root/main/common/valu/intkqtyetc" style="left:68px; top:458px; width:827px; height:32px; "/>
  935. <line id="line8" class="line_1" style="x1:0px; y1:515px; x2:895px; y2:515px; "/>
  936. <caption id="caption6" class="tit_2" style="left:9px; top:500px; width:206px; height:13px; ">영양사 의견</caption>
  937. <textarea id="tar_dietercmt" ref="/root/main/common/valu/dietercmt" style="left:0px; top:520px; width:895px; height:50px; "/>
  938. </group>
  939. <group id="grp_btn" scroll="auto" style="left:0px; top:575px; width:900px; height:27px; ">
  940. <button id="btn_confirm" class="btn4_letter2" style="left:775px; top:5px; width:56px; height:22px; ">
  941. <caption>확인</caption>
  942. <script type="javascript" ev:event="DOMActivate">
  943. <![CDATA[
  944. if ( messageBox("", "Q002") == 6 ) {
  945. //그리드에 내용이 있는지 체크하여 저장 or 수정 수행
  946. if (grd_glycosuria.rows > 2) {
  947. model.setValue("/root/main/data/glycosuria/pid", model.getValue("/root/main/receivedata/pid"));
  948. model.setValue("/root/main/data/glycosuria/nutrmngtkind", model.getValue("/root/main/receivedata/nutrmngtkind"));
  949. model.setValue("/root/main/data/glycosuria/execdd", model.getValue("/root/main/receivedata/execdd"));
  950. model.setValue("/root/main/data/glycosuria/cnstflag", model.getValue("/root/main/receivedata/cnstflag"));
  951. }
  952. if (grd_kidney.rows > 2) {
  953. model.setValue("/root/main/data/kidney/pid", model.getValue("/root/main/receivedata/pid"));
  954. model.setValue("/root/main/data/kidney/nutrmngtkind", model.getValue("/root/main/receivedata/nutrmngtkind"));
  955. model.setValue("/root/main/data/kidney/execdd", model.getValue("/root/main/receivedata/execdd"));
  956. model.setValue("/root/main/data/kidney/cnstflag", model.getValue("/root/main/receivedata/cnstflag"));
  957. }
  958. if (grd_etrlfd.rows > 1) {
  959. for (i=1; i<grd_etrlfd.rows; i++) {
  960. model.setValue("/root/main/data/etrlfd[" + i + "]/pid", model.getValue("/root/main/receivedata/pid"));
  961. model.setValue("/root/main/data/etrlfd[" + i + "]/nutrmngtkind", model.getValue("/root/main/receivedata/nutrmngtkind"));
  962. model.setValue("/root/main/data/etrlfd[" + i + "]/execdd", model.getValue("/root/main/receivedata/execdd"));
  963. model.setValue("/root/main/data/etrlfd[" + i + "]/cnstflag", model.getValue("/root/main/receivedata/cnstflag"));
  964. }
  965. }
  966. if (grd_varices.rows > 1) {
  967. for (i=1; i<grd_varices.rows; i++) {
  968. model.setValue("/root/main/data/varices[" + i + "]/pid", model.getValue("/root/main/receivedata/pid"));
  969. model.setValue("/root/main/data/varices[" + i + "]/nutrmngtkind", model.getValue("/root/main/receivedata/nutrmngtkind"));
  970. model.setValue("/root/main/data/varices[" + i + "]/execdd", model.getValue("/root/main/receivedata/execdd"));
  971. model.setValue("/root/main/data/varices[" + i + "]/cnstflag", model.getValue("/root/main/receivedata/cnstflag"));
  972. }
  973. }
  974. if (grd_supply.rows > 1) {
  975. for (i=1; i<grd_supply.rows; i++) {
  976. model.setValue("/root/main/data/supply[" + i + "]/pid", model.getValue("/root/main/receivedata/pid"));
  977. model.setValue("/root/main/data/supply[" + i + "]/nutrmngtkind", model.getValue("/root/main/receivedata/nutrmngtkind"));
  978. model.setValue("/root/main/data/supply[" + i + "]/execdd", model.getValue("/root/main/receivedata/execdd"));
  979. model.setValue("/root/main/data/supply[" + i + "]/cnstflag", model.getValue("/root/main/receivedata/cnstflag"));
  980. }
  981. }
  982. if (model.getValue("/root/main/data/comnutr[1]/pid") == "") {
  983. for (i=1; i<grd_common.rows; i++) {
  984. grd_common.addStatus(i, "insert");
  985. model.setValue("/root/main/data/comnutr[" + i + "]/pid", model.getValue("/root/main/receivedata/pid"));
  986. model.setValue("/root/main/data/comnutr[" + i + "]/nutrmngtkind", model.getValue("/root/main/receivedata/nutrmngtkind"));
  987. model.setValue("/root/main/data/comnutr[" + i + "]/execdd", model.getValue("/root/main/receivedata/execdd"));
  988. model.setValue("/root/main/data/comnutr[" + i + "]/cnstflag", model.getValue("/root/main/receivedata/cnstflag"));
  989. }
  990. }
  991. model.setValue("/root/send/data/comnutr", grd_common.getUpdateData());
  992. model.setValue("/root/send/data/glycosuria", grd_glycosuria.getUpdateData());
  993. model.setValue("/root/send/data/kidney", grd_kidney.getUpdateData());
  994. model.setValue("/root/send/data/etrlfd", grd_etrlfd.getUpdateData());
  995. model.setValue("/root/send/data/varices", grd_varices.getUpdateData());
  996. model.setValue("/root/send/data/supply", grd_supply.getUpdateData());
  997. submit("TXANC00104");
  998. // 환자별영양관리 화면으로 데이터 보내기
  999. var cnstflag = model.getValue("/root/main/receivedata/cnstflag");
  1000. if ( cnstflag == "C" ) { // 협진의뢰
  1001. opener.model.setValue("/root/main/maindata/cnstreq/calrintk1", model.getValue("/root/main/common/valu/calrintk"));
  1002. opener.model.setValue("/root/main/maindata/cnstreq/calrintkqty1", model.getValue("/root/main/common/valu/calr"));
  1003. opener.model.setValue("/root/main/maindata/cnstreq/protintk1", model.getValue("/root/main/common/valu/protintk"));
  1004. opener.model.setValue("/root/main/maindata/cnstreq/protintkqty1", model.getValue("/root/main/common/valu/prot"));
  1005. opener.model.setValue("/root/main/maindata/cnstreq/intkqtyetc1", model.getValue("/root/main/common/valu/intkqtyetc"));
  1006. opener.model.setValue("/root/main/maindata/cnstreq/dietercmt1", model.getValue("/root/main/common/valu/dietercmt"));
  1007. }
  1008. else if ( cnstflag == "P" ) { // 추구관리
  1009. opener.model.setValue("/root/main/maindata/pursmngt/calrintk2", model.getValue("/root/main/common/valu/calrintk"));
  1010. opener.model.setValue("/root/main/maindata/pursmngt/calrintkqty2", model.getValue("/root/main/common/valu/calr"));
  1011. opener.model.setValue("/root/main/maindata/pursmngt/protintk2", model.getValue("/root/main/common/valu/protintk"));
  1012. opener.model.setValue("/root/main/maindata/pursmngt/protintkqty2", model.getValue("/root/main/common/valu/prot"));
  1013. opener.model.setValue("/root/main/maindata/pursmngt/intkqtyetc2", model.getValue("/root/main/common/valu/intkqtyetc"));
  1014. opener.model.setValue("/root/main/maindata/pursmngt/dietercmt2", model.getValue("/root/main/common/valu/dietercmt"));
  1015. }
  1016. window.close();
  1017. } else { return; }
  1018. ]]>
  1019. </script>
  1020. </button>
  1021. <button id="btn_cancel" class="btn4_letter2" style="left:834px; top:5px; width:56px; height:22px; ">
  1022. <caption>취소</caption>
  1023. <script type="javascript" ev:event="xforms-activate">
  1024. <![CDATA[
  1025. window.close();
  1026. ]]>
  1027. </script>
  1028. </button>
  1029. <button id="btn_print" class="btn3_letter5" style="left:1px; top:5px; width:56px; height:22px; ">
  1030. <caption>결과지출력</caption>
  1031. <script type="javascript" ev:event="DOMActivate">
  1032. <![CDATA[
  1033. //열량,단백질,지질,당질은 무조건 선택
  1034. for ( i = 2; i <= 5; i++ ) {
  1035. model.setValue("/root/main/data/comnutr[" + i + "]/check", "Y");
  1036. }
  1037. //C:P:F가 선택된 경우 원그래프 출력데이터 셋팅
  1038. if (model.getValue("/root/main/data/comnutr[1]/check") == "Y") {
  1039. model.makeValue("/root/temp/circleyn", "Y");
  1040. var nutrsum = model.getValue("/root/main/data/comnutr[1]/nutrsum");
  1041. var recmqty = model.getValue("/root/main/data/comnutr[1]/recmqty");
  1042. var val = "";
  1043. var seq = 1;
  1044. //섭취량
  1045. if (nutrsum != "") {
  1046. for ( i = 0; i < nutrsum.length; i++ ) {
  1047. if (nutrsum.substr(i, 1) != ":" && i != nutrsum.length-1) {
  1048. val = val + nutrsum.substr(i, 1);
  1049. } else {
  1050. if (seq==1) {
  1051. model.makeValue("/root/main/data/comnutr[" +seq+ "]/val1", val);
  1052. model.makeValue("/root/main/data/comnutr[" +seq+ "]/nm1", "단백질");
  1053. val = "";
  1054. seq = seq + 1;
  1055. } else if (seq==2) {
  1056. model.makeValue("/root/main/data/comnutr[" +seq+ "]/val1", val);
  1057. model.makeValue("/root/main/data/comnutr[" +seq+ "]/nm1", "지질");
  1058. val = "";
  1059. seq = seq + 1;
  1060. } else if (seq==3) {
  1061. val = val + nutrsum.substr(i, 1);
  1062. model.makeValue("/root/main/data/comnutr[" +seq+ "]/val1", val);
  1063. model.makeValue("/root/main/data/comnutr[" +seq+ "]/nm1", "당질");
  1064. val = "";
  1065. seq = 1;
  1066. }
  1067. }
  1068. }
  1069. }
  1070. //권장량
  1071. if (recmqty != "") {
  1072. for ( i = 0; i < recmqty.length; i++ ) {
  1073. if (recmqty.substr(i, 1) != ":" && i != recmqty.length-1) {
  1074. val = val + recmqty.substr(i, 1);
  1075. } else {
  1076. if (seq==1) {
  1077. model.makeValue("/root/main/data/comnutr[" +seq+ "]/val2", val);
  1078. model.makeValue("/root/main/data/comnutr[" +seq+ "]/nm2", "단백질");
  1079. val = "";
  1080. seq = seq + 1;
  1081. } else if (seq==2) {
  1082. model.makeValue("/root/main/data/comnutr[" +seq+ "]/val2", val);
  1083. model.makeValue("/root/main/data/comnutr[" +seq+ "]/nm2", "지질");
  1084. val = "";
  1085. seq = seq + 1;
  1086. } else if (seq==3) {
  1087. val = val + recmqty.substr(i, 1);
  1088. model.makeValue("/root/main/data/comnutr[" +seq+ "]/val2", val);
  1089. model.makeValue("/root/main/data/comnutr[" +seq+ "]/nm2", "당질");
  1090. }
  1091. }
  1092. }
  1093. }
  1094. } else {
  1095. model.makeValue("/root/temp/circleyn", "N");
  1096. }
  1097. model.resetInstanceNode("/root/temp/data");
  1098. copyNodesetType("/root/temp/data", "/root/main/data/comnutr[check='Y']", "replace", model, model);
  1099. exeReportPreview("RPANC00101", "XMLSTR", "/root");
  1100. ]]>
  1101. </script>
  1102. </button>
  1103. </group>
  1104. </xhtml:body>
  1105. </xhtml:html>