SPADC62400_NutritionLab.xrw 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  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>Nutrition Lab</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. </main>
  11. <init>
  12. <chk1/>
  13. <chk2/>
  14. <chk3/>
  15. <chk4/>
  16. <chk5/>
  17. <chk6/>
  18. <chk7/>
  19. <text1/>
  20. <radio1/>
  21. <returnstr/>
  22. <text2/>
  23. </init>
  24. <hidden>
  25. <checkvalue>
  26. <label/>
  27. <value/>
  28. </checkvalue>
  29. <receiveref>
  30. <path/>
  31. <path2/>
  32. <nutritionlab/>
  33. <nutritionlabchk/>
  34. </receiveref>
  35. </hidden>
  36. </root>
  37. </instance>
  38. <script type="javascript" ev:event="xforms-ready">
  39. <![CDATA[
  40. model.setValue("/root/init/returnstr", model.getValue("/root/hidden/receiveref/nutritionlab"));
  41. var nutritionlabData5="" ;
  42. var nutritionlabData= model.getValue("/root/hidden/receiveref/nutritionlabchk").split(",")
  43. for(var i = 0; i <= nutritionlabData.length; ++i) {
  44. if (nutritionlabData[i] == "1" ) model.setValue("/root/init/chk1", nutritionlabData[i]);
  45. if (nutritionlabData[i] == "2" ) model.setValue("/root/init/chk2", nutritionlabData[i]);
  46. if (nutritionlabData[i] == "3" ) model.setValue("/root/init/chk3", nutritionlabData[i]);
  47. if (nutritionlabData[i] =="10") model.setValue("/root/init/chk4", nutritionlabData[i]);
  48. if (nutritionlabData[i] >= "4" && nutritionlabData[i] <= "9" ) {
  49. if (nutritionlabData5 =="") nutritionlabData5 += nutritionlabData[i];
  50. else nutritionlabData5 += "," + nutritionlabData[i];
  51. }
  52. }
  53. if (nutritionlabData5 !="") model.setValue("/root/init/chk5", nutritionlabData5);
  54. //makeReturnStr();
  55. model.refresh();
  56. ]]>
  57. </script>
  58. </model>
  59. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  60. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  61. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  62. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  63. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  64. <script type="javascript">
  65. <![CDATA[
  66. function makeReturnStr(){
  67. var cnt = "1";
  68. model.setValue("/root/init/returnstr", "");
  69. var returnstr = "";
  70. if(model.getValue("/root/init/chk1") == "1")
  71. {
  72. if(returnstr != "") {
  73. cnt++;
  74. returnstr += "\n";
  75. }
  76. returnstr += cnt+") ";
  77. returnstr = returnstr + caption2.value;
  78. }
  79. if(model.getValue("/root/init/chk2") == "2")
  80. {
  81. if(returnstr != "") {
  82. cnt++;
  83. returnstr += "\n";
  84. }
  85. returnstr += cnt+") ";
  86. returnstr = returnstr + caption3.value;
  87. }
  88. if(model.getValue("/root/init/chk3") == "3")
  89. {
  90. if(checkbox5.value != ""){
  91. if(returnstr != "") {
  92. cnt++;
  93. returnstr += "\n";
  94. }
  95. returnstr += cnt+") ";
  96. returnstr = returnstr + caption4.value + "\n";
  97. returnstr += checkbox5.label;
  98. }
  99. }
  100. if(model.getValue("/root/init/chk4") == "10")
  101. {
  102. if(returnstr != "") {
  103. cnt++;
  104. returnstr += "\n";
  105. }
  106. returnstr += cnt+") ";
  107. returnstr = returnstr + caption5.value;
  108. }
  109. model.setValue("/root/init/returnstr", returnstr);
  110. //2010-01-14 기존 Check된 내용을 그대로 check.
  111. var nutritionlabchk="";
  112. if (model.getValue("/root/init/chk1") !="") nutritionlabchk += model.getValue("/root/init/chk1") + ",";
  113. if (model.getValue("/root/init/chk2") !="") nutritionlabchk += model.getValue("/root/init/chk2") + ",";
  114. if (model.getValue("/root/init/chk3") !="") nutritionlabchk += model.getValue("/root/init/chk3") + ",";
  115. if (model.getValue("/root/init/chk4") !="") nutritionlabchk += model.getValue("/root/init/chk4") + ",";
  116. if (model.getValue("/root/init/chk5") !="") nutritionlabchk += model.getValue("/root/init/chk5") ;
  117. model.makeValue("/root/hidden/receiveref/nutritionlabchk", nutritionlabchk);
  118. model.refresh();
  119. }
  120. ]]>
  121. </script>
  122. </xhtml:head>
  123. <xhtml:body pagewidth="530" sep="," pageheight="380" guideline="1,1194;2,784;2,757;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  124. <group id="grp_biz" scroll="auto" style="left:0px; top:0px; width:501px; height:306px; ">
  125. <caption id="caption1" class="tit_2" style="left:5px; top:11px; width:110px; height:14px; ">Nutrition Lab</caption>
  126. <line id="line1" class="line_1" style="x1:0px; y1:26px; x2:500px; y2:26px; "/>
  127. <textarea id="textarea4" ref="/root/init/returnstr" appearance="textarea" style="left:5px; top:205px; width:490px; height:95px; "/>
  128. <select id="checkbox1" ref="/root/init/chk1" overflow="visible" appearance="full" style="left:5px; top:35px; width:20px; height:20px; border-style:none; ">
  129. <choices>
  130. <item>
  131. <label/>
  132. <value>1</value>
  133. </item>
  134. </choices>
  135. <script type="javascript" ev:event="xforms-value-changed">
  136. <![CDATA[
  137. makeReturnStr();
  138. ]]>
  139. </script>
  140. </select>
  141. <caption id="caption2" style="left:25px; top:35px; width:70px; height:20px; ">
  142. <![CDATA[체중 주 1회]]>
  143. <script type="javascript" ev:event="onclick">
  144. <![CDATA[
  145. if(checkbox1.value != ""){
  146. checkbox1.value = "";
  147. }else{
  148. checkbox1.value = 1;
  149. }
  150. checkbox1.dispatch("xforms-value-changed");
  151. ]]>
  152. </script>
  153. </caption>
  154. <select id="checkbox2" ref="/root/init/chk2" overflow="visible" appearance="full" style="left:5px; top:60px; width:20px; height:20px; border-style:none; ">
  155. <choices>
  156. <item>
  157. <label/>
  158. <value>2</value>
  159. </item>
  160. </choices>
  161. <script type="javascript" ev:event="xforms-value-changed">
  162. <![CDATA[
  163. makeReturnStr();
  164. ]]>
  165. </script>
  166. </select>
  167. <caption id="caption3" style="left:25px; top:60px; width:164px; height:20px; ">
  168. <![CDATA[Eyetone BS g 6hr (for 3days)]]>
  169. <script type="javascript" ev:event="onclick">
  170. <![CDATA[
  171. if(checkbox2.value != ""){
  172. checkbox2.value = "";
  173. }else{
  174. checkbox2.value = 2;
  175. }
  176. checkbox2.dispatch("xforms-value-changed");
  177. ]]>
  178. </script>
  179. </caption>
  180. <caption id="caption4" style="left:25px; top:87px; width:185px; height:15px; ">
  181. <![CDATA[주 2회(첫 2주동안), 주 1회(계속)]]>
  182. <script type="javascript" ev:event="onclick">
  183. <![CDATA[
  184. if(checkbox3.value != ""){
  185. checkbox3.value = "";
  186. }else{
  187. checkbox3.value = 3;
  188. }
  189. checkbox3.dispatch("xforms-value-changed");
  190. ]]>
  191. </script>
  192. </caption>
  193. <select id="checkbox4" ref="/root/init/chk4" overflow="visible" appearance="full" style="left:5px; top:180px; width:20px; height:20px; border-style:none; ">
  194. <choices>
  195. <item>
  196. <label/>
  197. <value>10</value>
  198. </item>
  199. </choices>
  200. <script type="javascript" ev:event="xforms-value-changed">
  201. <![CDATA[
  202. makeReturnStr();
  203. ]]>
  204. </script>
  205. </select>
  206. <caption id="caption5" style="left:25px; top:180px; width:130px; height:20px; ">
  207. <![CDATA[lsolator Culture 주 1회]]>
  208. <script type="javascript" ev:event="onclick">
  209. <![CDATA[
  210. if(checkbox4.value != ""){
  211. checkbox4.value = "";
  212. }else{
  213. checkbox4.value = 10;
  214. }
  215. checkbox4.dispatch("xforms-value-changed");
  216. ]]>
  217. </script>
  218. </caption>
  219. <select id="checkbox5" ref="/root/init/chk5" overflow="visible" appearance="full" cols="2" sep="," vcellspacing="5" style="left:30px; top:105px; width:455px; height:70px; border-style:none; ">
  220. <choices>
  221. <item>
  222. <label>CBC</label>
  223. <value>4</value>
  224. </item>
  225. <item>
  226. <label>FBS, BUN/Scr, OT/PT/Alk-P.cpk</label>
  227. <value>5</value>
  228. </item>
  229. <item>
  230. <label>Na/K/Cl, Ca/P/Mg</label>
  231. <value>6</value>
  232. </item>
  233. <item>
  234. <label>Pr/Alb, TRF, RBP, Prealbumine</label>
  235. <value>7</value>
  236. </item>
  237. <item>
  238. <label>Chol/TG</label>
  239. <value>8</value>
  240. </item>
  241. <item>
  242. <label>
  243. <![CDATA[24hr Urine Urea & Cr]]>
  244. </label>
  245. <value>9</value>
  246. </item>
  247. </choices>
  248. <script type="javascript" ev:event="xforms-value-changed">
  249. <![CDATA[
  250. if(checkbox5.value != ""){
  251. checkbox3.value = 3;
  252. }else{
  253. checkbox3.value = "";
  254. }
  255. makeReturnStr();
  256. ]]>
  257. </script>
  258. </select>
  259. <select id="checkbox3" ref="/root/init/chk3" overflow="visible" appearance="full" style="left:5px; top:85px; width:20px; height:20px; border-style:none; ">
  260. <choices>
  261. <item>
  262. <label/>
  263. <value>3</value>
  264. </item>
  265. </choices>
  266. <script type="javascript" ev:event="xforms-value-changed">
  267. <![CDATA[
  268. if(checkbox3.value == ""){
  269. checkbox5.value = "";
  270. }
  271. makeReturnStr();
  272. ]]>
  273. </script>
  274. </select>
  275. </group>
  276. <group id="grp_btn" scroll="auto" style="left:0px; top:306px; width:501px; height:27px; ">
  277. <button id="btn_cls" class="btn4_letter2" style="left:444px; top:5px; width:56px; height:22px; ">
  278. <caption>닫기</caption>
  279. <close ev:event="DOMActivate"/>
  280. </button>
  281. <button id="btn_cfm" class="btn4_letter2" style="left:385px; top:5px; width:56px; height:22px; ">
  282. <caption>확인</caption>
  283. <script type="javascript" ev:event="DOMActivate">
  284. <![CDATA[
  285. if ( checkOpener() ) {
  286. var receiveref = model.getValue("/root/hidden/receiveref/path");
  287. var receiveref2 = model.getValue("/root/hidden/receiveref/path2");
  288. opener.model.setValue(receiveref , textarea4.value);
  289. opener.model.setValue(receiveref2 , model.getValue("/root/hidden/receiveref/nutritionlabchk"));
  290. opener.model.refresh();
  291. window.close();
  292. } else {
  293. alert("상위화면이 변경되어 데이터를 전달할 수 없습니다.");
  294. }
  295. ]]>
  296. </script>
  297. </button>
  298. </group>
  299. </xhtml:body>
  300. </xhtml:html>