SMANT02800_야식처방출력.xrw 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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. <bfroom/>
  12. <room/>
  13. <pid/>
  14. <hngnm2/>
  15. <prcpnm/>
  16. <prcpdelivefact/>
  17. <fstrgstrid/>
  18. <fstrgstdt/>
  19. <wardcd/>
  20. <prcpdd/>
  21. </data>
  22. <printlist>
  23. <bfroom/>
  24. <room/>
  25. <pid/>
  26. <hngnm2/>
  27. <prcpnm/>
  28. <prcpdelivefact/>
  29. <fstrgstrid/>
  30. <fstrgstdt/>
  31. </printlist>
  32. <patinfo>
  33. <patinfolist/>
  34. </patinfo>
  35. </main>
  36. <printinfo>
  37. <printlist>
  38. <ward/>
  39. <wardnm/>
  40. <bfroom/>
  41. <room/>
  42. <pid/>
  43. <hngnm/>
  44. <disp1/>
  45. <disp2/>
  46. <disp3/>
  47. <dietnm2/>
  48. <clinccmtcnts/>
  49. <prcpdelivefact/>
  50. <tfdtlcd/>
  51. <remark/>
  52. <room1/>
  53. <dietnm1/>
  54. <bfremfactcd/>
  55. <bfremfactnm/>
  56. <room2/>
  57. <choidietyn/>
  58. <iptpsn/>
  59. <iptdt/>
  60. <prcpdd/>
  61. <dietmeal/>
  62. <calr/>
  63. <mealcnt/>
  64. <procermealyn/>
  65. <dietcd/>
  66. <dietmdlnm/>
  67. <dietsmlnm/>
  68. <calrunit/>
  69. <remark1/>
  70. <remark2/>
  71. <remark3/>
  72. <dietnm/>
  73. </printlist>
  74. </printinfo>
  75. <send>
  76. <searchitem>
  77. <prcpdd/>
  78. <pid/>
  79. <hngnm/>
  80. </searchitem>
  81. </send>
  82. <temp>
  83. <ret>
  84. <retmsg/>
  85. </ret>
  86. </temp>
  87. </root>
  88. </instance>
  89. <script type="javascript" ev:event="xforms-ready">
  90. <![CDATA[
  91. finit();
  92. ]]>
  93. </script>
  94. <script type="javascript">
  95. <![CDATA[
  96. //초기화
  97. function finit() {
  98. //화면open시 공통코드 setting
  99. // zbcfGetCodeList( new Array( "A0047", "M0042", "A0054" ), new Array( "/root/init/basecode/meal", "/root/init/basecode/dietmeal", "/root/init/basecode/endflag" ) );
  100. //zbcfGetDeptCodeList(getUserInfo("dutplceinstcd"), 'orduseyn', 'W', '/root/init/code/ward', 'depthngnm', 'asc', new Date().getDateFormat("YYYYMMDD"), "", 'after');
  101. // zsdfGetWardDeptList(getUserInfo("dutplceinstcd"), '/root/init/code/ward', 'depthngnm', 'asc', new Date().getDateFormat("YYYYMMDD"), 'after');
  102. // submit("TRANT00102"); //조절코드 조회
  103. // submit("TRANB00208"); //영양팀병동 조회
  104. // astfAddCombo("/root/init/basecode/wardcls","data","wardcd,wardnm",",");
  105. model.resetInstanceNode("/root/main/data");
  106. //model.resetInstanceNode("/root/send");
  107. model.setValue("/root/send/searchitem/prcpdd", getCurrentDate());
  108. //화면open시 현재시간을 계산하여 끼니와 마감구분 자동setting
  109. //각 끼니별 2차 마감시간으로부터 2시간후까지는 이전끼니로 setting
  110. // model.setValue("/root/send/searchitem/nmcardflag", "0");
  111. //model.setValue("", "-");
  112. model.refresh();
  113. }
  114. //경장영양식라벨 출력
  115. function ftflabel(meal, mealtm) {
  116. model.copyNode("/root/send/tflabel", "/root/main");
  117. var lastrow = grd_data.rows;
  118. //cc계산 및 횟수가 4회 이상인 환자의 라벨 추가생성
  119. for ( i=1; i<grd_data.rows; i++) {
  120. //cc계산
  121. if (getUserInfo("dutplceinstcd") == "012"){
  122. model.makeNode("/root/send/tflabel/printlist[" + i + "]/cc");
  123. var calr = model.getValue("/root/send/tflabel/printlist[" + i + "]/calr");
  124. var mealcnt = model.getValue("/root/send/tflabel/printlist[" + i + "]/mealcnt");
  125. var cc = Math.round(calr/mealcnt);
  126. model.setValue("/root/send/tflabel/printlist[" + i + "]/cc", cc);
  127. model.setValue("/root/send/tflabel/printlist[" + i + "]/dietmeal", mealtm);
  128. //횟수가 4회 이상인 환자의 라벨 추가생성
  129. if ( (meal == '조식') && (mealcnt > 4) ) {
  130. var mealnm = model.getValue("/root/send2/timelist[cntlcd1='11']/cdid");
  131. if (mealnm != ""){
  132. copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
  133. //model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", '10:00');
  134. model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
  135. lastrow = lastrow + 1;
  136. }
  137. }
  138. else if ( (meal == '중식') && (mealcnt > 3) ) {
  139. var mealnm = model.getValue("/root/send2/timelist[cntlcd1='21']/cdid");
  140. if (mealnm != ""){
  141. copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
  142. //model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", '15:00');
  143. model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
  144. lastrow = lastrow + 1;
  145. }
  146. }
  147. else if ( (meal == '석식') && (mealcnt > 5) ) {
  148. var mealnm = model.getValue("/root/send2/timelist[cntlcd1='31']/cdid");
  149. var mcount = parseInt(model.getValue("/root/send2/timelist[cntlcd1='31']/dispseq"));
  150. if (mealnm != ""){
  151. for (var k = 0; k < mcount; k ++){
  152. copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
  153. //model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", '20:30');
  154. model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
  155. lastrow = lastrow + 1;
  156. }
  157. }
  158. }
  159. }else if (getUserInfo("dutplceinstcd") == "013"){
  160. //횟수가 4회 이상인 환자의 라벨 추가생성
  161. //alert("1==> " + mealtm + "==" + meal);
  162. model.makeNode("/root/send/tflabel/printlist[" + i + "]/cc");
  163. var calr = model.getValue("/root/send/tflabel/printlist[" + i + "]/calr");
  164. var mealcnt = model.getValue("/root/send/tflabel/printlist[" + i + "]/mealcnt");
  165. var cc = Math.round(calr/mealcnt);
  166. model.makeValue("/root/send/tflabel/printlist[" + i + "]/cc", cc);
  167. model.makeValue("/root/send/tflabel/printlist[" + i + "]/dietmeal", mealtm);
  168. if ( meal == '조식'){
  169. if (mealcnt > 4) {
  170. var mealnm = model.getValue("/root/send2/timelist[cntlcd1='11']/cdid");
  171. if (mealnm != ""){
  172. copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
  173. //model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", '10:00');
  174. model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
  175. lastrow = lastrow + 1;
  176. }
  177. }
  178. }
  179. else if (meal == '중식') {
  180. if (mealcnt > 4){
  181. var mealnm = model.getValue("/root/send2/timelist[cntlcd1='21']/cdid");
  182. if (mealnm != ""){
  183. //copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
  184. //model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", '15:00');
  185. model.setValue("/root/send/tflabel/printlist[" + i + "]/dietmeal", mealnm);
  186. lastrow = lastrow + 1;
  187. }
  188. }else{
  189. model.makeNode("/root/send/tflabel/printlist[" + i + "]/cc");
  190. var calr = model.getValue("/root/send/tflabel/printlist[" + i + "]/calr");
  191. var cc = Math.round(calr/mealcnt);
  192. model.makeValue("/root/send/tflabel/printlist[" + i + "]/cc", cc);
  193. model.makeValue("/root/send/tflabel/printlist[" + i + "]/dietmeal", mealtm);
  194. }
  195. }
  196. else if (meal == '석식') {
  197. model.makeNode("/root/send/tflabel/printlist[" + i + "]/cc");
  198. var calr = model.getValue("/root/send/tflabel/printlist[" + i + "]/calr");
  199. var cc = Math.round(calr/mealcnt);
  200. model.setValue("/root/send/tflabel/printlist[" + i + "]/cc", cc);
  201. model.setValue("/root/send/tflabel/printlist[" + i + "]/dietmeal", mealtm);
  202. if (mealcnt == 4){
  203. var mealnm = model.getValue("/root/send2/timelist[cntlcd1='31']/cdid");
  204. if (mealnm != ""){
  205. copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
  206. //model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", '15:00');
  207. model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
  208. lastrow = lastrow + 1;
  209. }
  210. }else if (mealcnt == 5){
  211. var mealnm = model.getValue("/root/send2/timelist[cntlcd1='31']/cdid");
  212. if (mealnm != ""){
  213. copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
  214. //model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", '15:00');
  215. model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
  216. lastrow = lastrow + 1;
  217. }
  218. }else if (mealcnt == 6){
  219. var mealnm = model.getValue("/root/send2/timelist[cntlcd1='31']/cdid");
  220. var mcount = parseInt(model.getValue("/root/send2/timelist[cntlcd1='31']/dispseq"));
  221. if (mealnm != ""){
  222. for (var k = 0; k < mcount; k ++){
  223. copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
  224. //model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", '20:30');
  225. model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
  226. lastrow = lastrow + 1;
  227. }
  228. }
  229. }
  230. }
  231. }else if (getUserInfo("dutplceinstcd") == "011"){
  232. //횟수가 4회 이상인 환자의 라벨 추가생성
  233. //alert("1==> " + mealtm + "==" + meal);
  234. model.makeNode("/root/send/tflabel/printlist[" + i + "]/cc");
  235. var calr = model.getValue("/root/send/tflabel/printlist[" + i + "]/calr");
  236. var mealcnt = model.getValue("/root/send/tflabel/printlist[" + i + "]/mealcnt");
  237. var cc = Math.round(calr/mealcnt);
  238. model.makeValue("/root/send/tflabel/printlist[" + i + "]/cc", cc);
  239. model.makeValue("/root/send/tflabel/printlist[" + i + "]/dietmeal", mealtm);
  240. if ( meal == '조식'){
  241. if (mealcnt > 4){
  242. var mealnm = model.getValue("/root/send2/timelist[cntlcd1='11']/cdid");
  243. if (mealnm != ""){
  244. copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
  245. model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
  246. lastrow = lastrow + 1;
  247. }
  248. }
  249. }
  250. else if (meal == '중식') {
  251. model.makeNode("/root/send/tflabel/printlist[" + i + "]/cc");
  252. var calr = model.getValue("/root/send/tflabel/printlist[" + i + "]/calr");
  253. var cc = Math.round(calr/mealcnt);
  254. model.makeValue("/root/send/tflabel/printlist[" + i + "]/cc", cc);
  255. model.makeValue("/root/send/tflabel/printlist[" + i + "]/dietmeal", mealtm);
  256. if (mealcnt > 4){
  257. var mealnm = model.getValue("/root/send2/timelist[cntlcd1='21']/cdid");
  258. if (mealnm != ""){
  259. copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
  260. model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
  261. lastrow = lastrow + 1;
  262. }
  263. }
  264. }
  265. else if (meal == '석식') {
  266. model.makeNode("/root/send/tflabel/printlist[" + i + "]/cc");
  267. var calr = model.getValue("/root/send/tflabel/printlist[" + i + "]/calr");
  268. var cc = Math.round(calr/mealcnt);
  269. model.setValue("/root/send/tflabel/printlist[" + i + "]/cc", cc);
  270. model.setValue("/root/send/tflabel/printlist[" + i + "]/dietmeal", mealtm);
  271. if (mealcnt == 4){
  272. var mealnm = model.getValue("/root/send2/timelist[cntlcd1='31']/cdid");
  273. if (mealnm != ""){
  274. copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
  275. model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
  276. lastrow = lastrow + 1;
  277. }
  278. }else if (mealcnt == 5){
  279. var mealnm = model.getValue("/root/send2/timelist[cntlcd1='31']/cdid");
  280. if (mealnm != ""){
  281. copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
  282. model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
  283. lastrow = lastrow + 1;
  284. }
  285. }else if (mealcnt == 6){
  286. var mealnm = model.getValue("/root/send2/timelist[cntlcd1='31']/cdid");
  287. var mcount = parseInt(model.getValue("/root/send2/timelist[cntlcd1='31']/dispseq"));
  288. if (mealnm != ""){
  289. for (var k = 0; k < mcount; k ++){
  290. copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
  291. //model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", '20:30');
  292. model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
  293. lastrow = lastrow + 1;
  294. }
  295. }
  296. }
  297. }
  298. }else{
  299. //횟수가 4회 이상인 환자의 라벨 추가생성
  300. //alert("1==> " + mealtm + "==" + meal);
  301. model.makeNode("/root/send/tflabel/printlist[" + i + "]/cc");
  302. var calr = model.getValue("/root/send/tflabel/printlist[" + i + "]/calr");
  303. var mealcnt = model.getValue("/root/send/tflabel/printlist[" + i + "]/mealcnt");
  304. //var cc = Math.round(calr/mealcnt); // 2011.02.16 CYW
  305. var cc = calr;
  306. model.makeValue("/root/send/tflabel/printlist[" + i + "]/cc", cc);
  307. model.makeValue("/root/send/tflabel/printlist[" + i + "]/dietmeal", mealtm);
  308. if ( meal == '조식'){
  309. }
  310. else if (meal == '중식') {
  311. model.makeNode("/root/send/tflabel/printlist[" + i + "]/cc");
  312. var calr = model.getValue("/root/send/tflabel/printlist[" + i + "]/calr");
  313. //var cc = Math.round(calr/mealcnt); // 2011.02.16 CYW
  314. var cc = calr;
  315. model.makeValue("/root/send/tflabel/printlist[" + i + "]/cc", cc);
  316. model.makeValue("/root/send/tflabel/printlist[" + i + "]/dietmeal", mealtm);
  317. }
  318. else if (meal == '석식') {
  319. model.makeNode("/root/send/tflabel/printlist[" + i + "]/cc");
  320. var calr = model.getValue("/root/send/tflabel/printlist[" + i + "]/calr");
  321. //var cc = Math.round(calr/mealcnt); // 2011.02.16 CYW
  322. var cc = calr;
  323. model.setValue("/root/send/tflabel/printlist[" + i + "]/cc", cc);
  324. model.setValue("/root/send/tflabel/printlist[" + i + "]/dietmeal", mealtm);
  325. if (mealcnt == 4){
  326. var mealnm = model.getValue("/root/send2/timelist[cntlcd1='31']/cdid");
  327. if (mealnm != ""){
  328. copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
  329. //model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", '15:00');
  330. model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
  331. lastrow = lastrow + 1;
  332. }
  333. }else if (mealcnt == 5){
  334. var mealnm = model.getValue("/root/send2/timelist[cntlcd1='31']/cdid");
  335. var mcount = parseInt(model.getValue("/root/send2/timelist[cntlcd1='31']/dispseq"));
  336. if (mealnm != ""){
  337. for (var k = 0; k < mcount; k ++){
  338. copyNodesetType("/root/send/tflabel/printlist", "/root/send/tflabel/printlist[" + i + "]", "after", model, model);
  339. //model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", '20:30');
  340. model.setValue("/root/send/tflabel/printlist[" + lastrow + "]/dietmeal", mealnm);
  341. lastrow = lastrow + 1;
  342. }
  343. }
  344. }
  345. }
  346. }
  347. }
  348. exeReportPreview("RPANT00104", "XMLSTR", "/root/send/tflabel");
  349. }
  350. //간식전료 출력
  351. function ganlabel(meal, mealtm) {
  352. var lastrow = grd_data.rows;
  353. //cc계산 및 횟수가 4회 이상인 환자의 라벨 추가생성
  354. for ( i=1; i<grd_data.rows; i++) {
  355. //cc계산
  356. if (getUserInfo("dutplceinstcd") == "012"){
  357. model.makeNode("/root/send/bmealslip/printlist[" + i + "]/cc");
  358. var calr = model.getValue("/root/send/bmealslip/printlist[" + i + "]/calr");
  359. var mealcnt = model.getValue("/root/send/bmealslip/printlist[" + i + "]/mealcnt");
  360. var cc = Math.round(calr/mealcnt);
  361. model.setValue("/root/send/bmealslip/printlist[" + i + "]/cc", cc);
  362. model.setValue("/root/send/bmealslip/printlist[" + i + "]/dietmeal", mealtm);
  363. //횟수가 4회 이상인 환자의 라벨 추가생성
  364. if ( (meal == '조식') && (mealcnt > 4) ) {
  365. var mealnm = model.getValue("/root/send2/timelist[cntlcd1='11']/cdid");
  366. if (mealnm != ""){
  367. copyNodesetType("/root/send/bmealslip/printlist", "/root/send/bmealslip/printlist[" + i + "]", "after", model, model);
  368. //model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", '10:00');
  369. model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", mealnm);
  370. lastrow = lastrow + 1;
  371. }
  372. }
  373. else if ( (meal == '중식') && (mealcnt > 3) ) {
  374. var mealnm = model.getValue("/root/send2/timelist[cntlcd1='21']/cdid");
  375. if (mealnm != ""){
  376. copyNodesetType("/root/send/bmealslip/printlist", "/root/send/bmealslip/printlist[" + i + "]", "after", model, model);
  377. //model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", '15:00');
  378. model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", mealnm);
  379. lastrow = lastrow + 1;
  380. }
  381. }
  382. else if ( (meal == '석식') && (mealcnt > 5) ) {
  383. var mealnm = model.getValue("/root/send2/timelist[cntlcd1='31']/cdid");
  384. var mcount = parseInt(model.getValue("/root/send2/timelist[cntlcd1='31']/dispseq"));
  385. if (mealnm != ""){
  386. for (var k = 0; k < mcount; k ++){
  387. copyNodesetType("/root/send/bmealslip/printlist", "/root/send/bmealslip/printlist[" + i + "]", "after", model, model);
  388. //model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", '20:30');
  389. model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", mealnm);
  390. lastrow = lastrow + 1;
  391. }
  392. }
  393. }
  394. }else{
  395. //횟수가 4회 이상인 환자의 라벨 추가생성
  396. //alert("1==> " + mealtm + "==" + meal);
  397. var mealcnt = model.getValue("/root/send/bmealslip/printlist[" + i + "]/mealcnt");
  398. alert("==" + meal + "==" + mealcnt);
  399. if ( (meal == '조식') && (mealcnt > 4) ) {
  400. model.makeNode("/root/send/bmealslip/printlist[" + i + "]/cc");
  401. var calr = model.getValue("/root/send/bmealslip/printlist[" + i + "]/calr");
  402. var mealcnt = model.getValue("/root/send/bmealslip/printlist[" + i + "]/mealcnt");
  403. var cc = Math.round(calr/mealcnt);
  404. model.makeValue("/root/send/bmealslip/printlist[" + i + "]/cc", cc);
  405. model.makeValue("/root/send/bmealslip/printlist[" + i + "]/dietmeal", mealtm);
  406. var mealnm = model.getValue("/root/send2/timelist[cntlcd1='11']/cdid");
  407. if (mealnm != ""){
  408. copyNodesetType("/root/send/bmealslip/printlist", "/root/send/bmealslip/printlist[" + i + "]", "after", model, model);
  409. //model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", '10:00');
  410. model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", mealnm);
  411. lastrow = lastrow + 1;
  412. }
  413. }
  414. else if (meal == '중식') {
  415. if (mealcnt > 4){
  416. var mealnm = model.getValue("/root/send2/timelist[cntlcd1='21']/cdid");
  417. if (mealnm != ""){
  418. //copyNodesetType("/root/send/bmealslip/printlist", "/root/send/bmealslip/printlist[" + i + "]", "after", model, model);
  419. //model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", '15:00');
  420. model.setValue("/root/send/bmealslip/printlist[" + i + "]/dietmeal", mealnm);
  421. lastrow = lastrow + 1;
  422. }
  423. }else{
  424. model.makeNode("/root/send/bmealslip/printlist[" + i + "]/cc");
  425. var calr = model.getValue("/root/send/bmealslip/printlist[" + i + "]/calr");
  426. var cc = Math.round(calr/mealcnt);
  427. model.makeValue("/root/send/bmealslip/printlist[" + i + "]/cc", cc);
  428. model.makeValue("/root/send/bmealslip/printlist[" + i + "]/dietmeal", mealtm);
  429. }
  430. }
  431. else if (meal == '석식') {
  432. model.makeNode("/root/send/bmealslip/printlist[" + i + "]/cc");
  433. var calr = model.getValue("/root/send/bmealslip/printlist[" + i + "]/calr");
  434. var cc = Math.round(calr/mealcnt);
  435. model.setValue("/root/send/bmealslip/printlist[" + i + "]/cc", cc);
  436. model.setValue("/root/send/bmealslip/printlist[" + i + "]/dietmeal", mealtm);
  437. if (mealcnt == 4){
  438. var mealnm = model.getValue("/root/send2/timelist[cntlcd1='31']/cdid");
  439. if (mealnm != ""){
  440. copyNodesetType("/root/send/bmealslip/printlist", "/root/send/bmealslip/printlist[" + i + "]", "after", model, model);
  441. //model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", '15:00');
  442. model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", mealnm);
  443. lastrow = lastrow + 1;
  444. }
  445. }else if (mealcnt == 5){
  446. var mealnm = model.getValue("/root/send2/timelist[cntlcd1='31']/cdid");
  447. if (mealnm != ""){
  448. copyNodesetType("/root/send/bmealslip/printlist", "/root/send/bmealslip/printlist[" + i + "]", "after", model, model);
  449. //model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", '15:00');
  450. model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", mealnm);
  451. lastrow = lastrow + 1;
  452. }
  453. }else if (mealcnt == 6){
  454. var mealnm = model.getValue("/root/send2/timelist[cntlcd1='31']/cdid");
  455. var mcount = parseInt(model.getValue("/root/send2/timelist[cntlcd1='31']/dispseq"));
  456. if (mealnm != ""){
  457. for (var k = 0; k < mcount; k ++){
  458. copyNodesetType("/root/send/bmealslip/printlist", "/root/send/bmealslip/printlist[" + i + "]", "after", model, model);
  459. //model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", '20:30');
  460. model.setValue("/root/send/bmealslip/printlist[" + lastrow + "]/dietmeal", mealnm);
  461. lastrow = lastrow + 1;
  462. }
  463. }
  464. }
  465. }
  466. }
  467. }
  468. }
  469. function fdevifact(){
  470. var nmcardcnt = 0;
  471. //전달사항을 코드별로 나누고 코드명으로 전환하여 remfactnm1~4 인스턴스에 분리하여 담기
  472. //전달사항에 '끓인물(14)'이 있으면 추가로 boiledwater 노드 생성후 Y 셋팅
  473. for ( i=1; i<grd_data.rows; i++) {
  474. var clinccmtcnts = model.getValue("/root/main/printlist[" + i + "]/clinccmtcnts");
  475. if (isSearchString(clinccmtcnts,'14')) {
  476. model.makeValue("/root/main/printlist[" + i + "]/boiledwater", "Y");
  477. }
  478. // *********************** 특이사항의 모든 항목을 ',' 단위로 분리함.***************************
  479. var prntprcpdelivefact = model.getValue("/root/main/printlist["+i+"]/prntprcpdelivefact");
  480. var temp = "";
  481. if(prntprcpdelivefact != "" && prntprcpdelivefact != null){
  482. temp = prntprcpdelivefact.split(",");
  483. prntprcpdelivefact = "";
  484. for(var j = 0; j < temp.length; j++){
  485. tmp = prntprcpdelivefact.split("\n");
  486. if((tmp[tmp.length-1].length+temp[j].length)/50 >= 1 ){ // 저장된 특이사항의 맨 마지막 행을 값을 비교
  487. prntprcpdelivefact += "\n"; // 각 사항을 \n로 구분
  488. }
  489. prntprcpdelivefact += temp[j];
  490. if(j != temp.length-1){
  491. prntprcpdelivefact += ", "; // ',' 삽입
  492. }
  493. }
  494. if(prntprcpdelivefact != ""){
  495. model.makeNode("/root/main/printlist[" + i + "]/remfactnm");
  496. model.setValue("/root/main/printlist[" + i + "]/remfactnm", prntprcpdelivefact);
  497. }
  498. }
  499. var etcgb = model.getValue("/root/main/printlist[" + i + "]/etcgb");
  500. if (etcgb == "1"){
  501. nmcardcnt = nmcardcnt + 1 ;
  502. }
  503. }
  504. }
  505. ]]>
  506. </script>
  507. <submission id="TRANT02801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/main"/>
  508. </model>
  509. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  510. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  511. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  512. </xhtml:head>
  513. <xhtml:body guideline="1,1194;1,0;2,784;2,756;2,715;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  514. <group id="group1" style="left:0px; top:0px; width:1195px; height:15px; ">
  515. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:100px; height:15px; ">야식처방출력</caption>
  516. </group>
  517. <group id="group3" scroll="auto" style="left:0px; top:15px; width:1195px; height:741px; ">
  518. <group id="group2" style="left:0px; top:10px; width:1195px; height:35px; vertical-align:top; ">
  519. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:35px; background-color:#fffbf2; "/>
  520. <caption id="caption1" class="search_name" style="left:15px; top:9px; width:86px; height:17px; ">일자 :</caption>
  521. <input id="ipt_prcpdd" ref="/root/send/searchitem/prcpdd" class="input_s_essential" inputtype="date" style="left:79px; top:8px; width:100px; height:19px; "/>
  522. <button id="btn_search" class="btn1_letter2" style="left:1118px; top:6px; width:56px; height:22px; ">
  523. <caption>조회</caption>
  524. <script type="javascript" ev:event="DOMActivate">
  525. <![CDATA[
  526. submit("TRANT02801");
  527. model.refresh();
  528. ]]>
  529. </script>
  530. </button>
  531. <line id="line1" style="x1:1099px; y1:6px; x2:1099px; y2:30px; "/>
  532. <button id="btn_before" class="icon_pre" style="left:183px; top:10px; width:13px; height:15px; ">
  533. <caption/>
  534. <script type="javascript" ev:event="onclick">
  535. <![CDATA[
  536. var dd = model.getValue("/root/send/searchitem/dietdd");
  537. dd = dd.toDate().getAddDate(-1, "D");
  538. dd = dd.getDateFormat();
  539. model.setValue("/root/send/searchitem/dietdd", dd);
  540. model.refresh();
  541. ]]>
  542. </script>
  543. </button>
  544. <button id="button1" class="icon_next" style="left:196px; top:10px; width:13px; height:15px; ">
  545. <caption/>
  546. <script type="javascript" ev:event="onclick">
  547. <![CDATA[
  548. var dd = model.getValue("/root/send/searchitem/dietdd");
  549. dd = dd.toDate().getAddDate(1, "D");
  550. dd = dd.getDateFormat();
  551. model.setValue("/root/send/searchitem/dietdd", dd);
  552. model.refresh();
  553. ]]>
  554. </script>
  555. </button>
  556. <caption id="caption8" class="search_name" style="left:293px; top:5px; width:134px; height:17px; ">등록번호/환자명 :</caption>
  557. <caption id="caption9" style="left:497px; top:5px; width:24px; height:17px; ">/</caption>
  558. <input id="ipt_pid" ref="/root/send/searchitem/pid" class="input_search" autonext="false" maxlength="10" format="9999999999" style="left:425px; top:5px; width:70px; height:19px; ">
  559. <script type="javascript" ev:event="onkeydown">
  560. <![CDATA[
  561. inputEnterKey("btn_search", "DOMActivate");
  562. ]]>
  563. </script>
  564. </input>
  565. <input id="ipt_hngnm" ref="/root/send/searchitem/hngnm" class="input_search" style="left:505px; top:5px; width:65px; height:19px; ">
  566. <script type="javascript" ev:event="onkeydown">
  567. <![CDATA[
  568. inputEnterKey("btn_search", "DOMActivate");
  569. ]]>
  570. </script>
  571. </input>
  572. <button id="btn_hngnm" class="icon_search" style="left:575px; top:7px; width:16px; height:16px; ">
  573. <caption/>
  574. <script type="javascript" ev:event="DOMActivate">
  575. <![CDATA[
  576. modal("SPPMC02500", "", "200", "200", "SPPMC02500", "/root/temp", "/root/main/patinfo/patinfolist");
  577. model.setValue("/root/send/searchitem/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  578. model.setValue("/root/send/searchitem/hngnm", model.getValue("/root/main/patinfo/patinfolist/hngnm"));
  579. model.refresh();
  580. ]]>
  581. </script>
  582. </button>
  583. </group>
  584. <button id="btn_excel" class="btn2_letter2" style="left:1146px; top:47px; width:42px; height:19px; ">
  585. <caption>엑셀</caption>
  586. <script type="javascript" ev:event="DOMActivate">
  587. <![CDATA[
  588. if ( grd_data.rows-1 > 0 ) {
  589. var filename = window.fileDialog("save", ",", false, "식사처방출력", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  590. if (filename != "") {
  591. grd_data.saveExcel(filename, "grd_data", true, false, "", "", "");
  592. }
  593. } else {
  594. messageBox("엑셀로 저장할 데이터가", "I004")
  595. return;
  596. }
  597. ]]>
  598. </script>
  599. </button>
  600. <datagrid id="grd_data" nodeset="/root/main/data" caption="변경전병실^병실^등록번호^환자명^식사명^Comment^입력자^입력일시^병동^처방일자" colsep="^" colwidth="70, 60, 65, 85, 210, 220, 75, 110,100,100" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:73px; width:1195px; height:627px; text-align:center; ">
  601. <col ref="bfroom" style="text-align:center; "/>
  602. <col ref="room" style="text-align:center; "/>
  603. <col ref="pid" style="text-align:center; "/>
  604. <col ref="hngnm2" style="text-align:center; "/>
  605. <col ref="prcpnm" style="text-align:center; "/>
  606. <col ref="prcpdelivefact" style="text-align:center; "/>
  607. <col ref="fstrgstrid" style="text-align:center; "/>
  608. <col ref="fstrgstdt" format="yyyy-mm-dd hh:nn" style="text-align:center; "/>
  609. <col ref="wardcd" style="text-align:center; "/>
  610. <col ref="prcpdd" style="text-align:center; "/>
  611. <script type="javascript" ev:event="onaftersort">
  612. <![CDATA[
  613. grd_data.gridToInstance();
  614. ]]>
  615. </script>
  616. </datagrid>
  617. <line id="line6" class="line_3" style="x1:984px; y1:741px; x2:1194px; y2:741px; "/>
  618. <line id="line5" class="line_1" style="x1:0px; y1:68px; x2:1195px; y2:68px; "/>
  619. <datagrid id="datagrid1" nodeset="/root/main/printlist2" visibility="hidden" caption="병동^병동명^변경전병실^병실^등록번호^환자명^식사명^특이사항^remark^보호자식^입력자^입력일시^caption1" colsep="^" colwidth="0, 0, 70, 60, 65, 85, 210, 220, 192, 70, 75, 110, 100" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:680px; top:350px; width:435px; height:290px; text-align:center; ">
  620. <col ref="ward" type="combo">
  621. <choices>
  622. <itemset nodeset="/root/init/code/ward/dept">
  623. <label ref="depthngnm"/>
  624. <value ref="deptcd"/>
  625. </itemset>
  626. </choices>
  627. </col>
  628. <col ref="wardnm"/>
  629. <col ref="bfroom"/>
  630. <col ref="room"/>
  631. <col ref="pid"/>
  632. <col ref="hngnm"/>
  633. <col ref="dietnm2" style="text-align:left; "/>
  634. <col ref="prcpdelivefact" style="text-align:left; "/>
  635. <col ref="remark" style="text-align:left; "/>
  636. <col ref="procermealyn"/>
  637. <col ref="iptpsn"/>
  638. <col ref="iptdt" format="yyyy-mm-dd hh:nn"/>
  639. <col ref="etcgb" visibility="hidden"/>
  640. <script type="javascript" ev:event="ondblclick">
  641. <![CDATA[
  642. //환자별식사력조회 화면으로 연결
  643. if ( grd_data.isCell(event.target) && grd_data.row >= grd_data.fixedRows ) {
  644. // 'P'는 식사처방출력 화면임을 뜻하는 구분자임.
  645. model.setValue("/root/send/popup/flag", "P");
  646. model.setValue("/root/send/popup/pid", model.getValue("/root/main/printlist["+grd_data.row+"]/pid"));
  647. model.setValue("/root/send/popup/prcpdd", model.getValue("/root/main/printlist["+grd_data.row+"]/prcpdd"));
  648. open("SMANT01000", "", "", "", "popup", "/root/send/popup", "/root/main/receivedata");
  649. }
  650. ]]>
  651. </script>
  652. </datagrid>
  653. </group>
  654. <group id="grp_btn" scroll="auto" style="left:0px; top:721px; width:1195px; height:23px; ">
  655. <button id="btn_nmcard" class="btn4_letter6" style="left:991px; top:0px; width:104px; height:22px; ">
  656. <caption>NameCard</caption>
  657. <script type="javascript" ev:event="DOMActivate">
  658. <![CDATA[
  659. var instcd = getUserInfo("dutplceinstcd");
  660. // if (model.getValue("/root/send/searchitem/endflag") == "2"){
  661. // openLoadingBar("2차 NameCard 작업중입니다.") ;
  662. // //model.removeNodeset("/root/main/printlist3");
  663. // var kk = 0;
  664. // var chk = "";
  665. // for (var i = 1; i < grd_data.rows; i ++){
  666. // chk = "N";
  667. // var spid = model.getValue("/root/main/printlist[" + i + "]/pid");
  668. // var sdietcd = model.getValue("/root/main/printlist[" + i + "]/dietcd");
  669. // var slrgcd = model.getValue("/root/main/printlist[" + i + "]/dietlrgcd");
  670. // var smeal = model.getValue("/root/main/printlist[" + i + "]//procermealyn");
  671. // var setc = model.getValue("/root/main/printlist[" + i + "]/etcgb");
  672. // var setc2 = "";
  673. // for (var j = 1; j < datagrid1.rows; j ++){
  674. // var spid1 = model.getValue("/root/main/printlist2[" + j + "]/pid");
  675. // var sdietcd1 = model.getValue("/root/main/printlist2[" + j + "]/dietcd");
  676. // setc2 = model.getValue("/root/main/printlist2[" + j + "]/etcgb");
  677. // if (spid == spid1 && sdietcd == sdietcd1){
  678. // chk = "Y";
  679. // //break;
  680. // }
  681. // }
  682. //
  683. // if (chk == "N"){
  684. // if (slrgcd == "Q9"){
  685. // if (smeal != " " && smeal != ""){
  686. // kk = parseInt(kk) + 1;
  687. // if (kk == 1){
  688. // copyNodesetType("/root/main1/printlist3", "/root/main/printlist[" + i + "]", "replace", model, model);
  689. // model.setValue("/root/main1/printlist3[" + kk + "]/dietnm2", smeal);
  690. // model.setValue("/root/main1/printlist3[" + kk + "]/remfactnm", "");
  691. // model.setValue("/root/main1/printlist3[" + kk + "]/bmealdrnknm", "");
  692. // model.setValue("/root/main1/printlist3[" + kk + "]/remark", "");
  693. // }else{
  694. // copyNodesetType("/root/main1/printlist3", "/root/main/printlist[" + i + "]", "after", model, model);
  695. // model.setValue("/root/main1/printlist3[" + kk + "]/dietnm2", smeal);
  696. // model.setValue("/root/main1/printlist3[" + kk + "]/remfactnm", "");
  697. // model.setValue("/root/main1/printlist3[" + kk + "]/bmealdrnknm", "");
  698. // model.setValue("/root/main1/printlist3[" + kk + "]/remark", "");
  699. // }
  700. // }
  701. // }else{
  702. // kk = parseInt(kk) + 1;
  703. // if (kk == 1){
  704. // copyNodesetType("/root/main1/printlist3", "/root/main/printlist[" + i + "]", "replace", model, model);
  705. // }else{
  706. // copyNodesetType("/root/main1/printlist3", "/root/main/printlist[" + i + "]", "after", model, model);
  707. // }
  708. // if (smeal != " " && smeal != ""){
  709. // kk = parseInt(kk) + 1;
  710. // if (kk == 1){
  711. // copyNodesetType("/root/main1/printlist3", "/root/main/printlist[" + i + "]", "replace", model, model);
  712. // model.setValue("/root/main1/printlist3[" + kk + "]/dietnm2", smeal);
  713. // model.setValue("/root/main1/printlist3[" + kk + "]/remfactnm", "");
  714. // model.setValue("/root/main1/printlist3[" + kk + "]/bmealdrnknm", "");
  715. // model.setValue("/root/main1/printlist3[" + kk + "]/remark", "");
  716. // }else{
  717. // copyNodesetType("/root/main1/printlist3", "/root/main/printlist[" + i + "]", "after", model, model);
  718. // model.setValue("/root/main1/printlist3[" + kk + "]/dietnm2", smeal);
  719. // model.setValue("/root/main1/printlist3[" + kk + "]/remfactnm", "");
  720. // model.setValue("/root/main1/printlist3[" + kk + "]/bmealdrnknm", "");
  721. // model.setValue("/root/main1/printlist3[" + kk + "]/remark", "");
  722. // }
  723. // }
  724. // }
  725. // }else{
  726. // if (setc == "2"){
  727. // if (slrgcd == "Q9"){
  728. // if (smeal != " " && smeal != ""){
  729. // kk = parseInt(kk) + 1;
  730. // if (kk == 1){
  731. // copyNodesetType("/root/main1/printlist3", "/root/main/printlist[" + i + "]", "replace", model, model);
  732. // model.setValue("/root/main1/printlist3[" + kk + "]/dietnm2", smeal);
  733. // model.setValue("/root/main1/printlist3[" + kk + "]/remfactnm", "");
  734. // model.setValue("/root/main1/printlist3[" + kk + "]/bmealdrnknm", "");
  735. // model.setValue("/root/main1/printlist3[" + kk + "]/remark", "");
  736. // }else{
  737. // copyNodesetType("/root/main1/printlist3", "/root/main/printlist[" + i + "]", "after", model, model);
  738. // model.setValue("/root/main1/printlist3[" + kk + "]/dietnm2", smeal);
  739. // model.setValue("/root/main1/printlist3[" + kk + "]/remfactnm", "");
  740. // model.setValue("/root/main1/printlist3[" + kk + "]/bmealdrnknm", "");
  741. // model.setValue("/root/main1/printlist3[" + kk + "]/remark", "");
  742. // }
  743. // }
  744. // }else{
  745. // if (smeal != " " && smeal != ""){
  746. // kk = parseInt(kk) + 1;
  747. // if (kk == 1){
  748. // copyNodesetType("/root/main1/printlist3", "/root/main/printlist[" + i + "]", "replace", model, model);
  749. // model.setValue("/root/main1/printlist3[" + kk + "]/dietnm2", smeal);
  750. // model.setValue("/root/main1/printlist3[" + kk + "]/remfactnm", "");
  751. // model.setValue("/root/main1/printlist3[" + kk + "]/bmealdrnknm", "");
  752. // model.setValue("/root/main1/printlist3[" + kk + "]/remark", "");
  753. // }else{
  754. // copyNodesetType("/root/main1/printlist3", "/root/main/printlist[" + i + "]", "after", model, model);
  755. // model.setValue("/root/main1/printlist3[" + kk + "]/dietnm2", smeal);
  756. // model.setValue("/root/main1/printlist3[" + kk + "]/remfactnm", "");
  757. // model.setValue("/root/main1/printlist3[" + kk + "]/bmealdrnknm", "");
  758. // model.setValue("/root/main1/printlist3[" + kk + "]/remark", "");
  759. // }
  760. // }
  761. // }
  762. // }else{
  763. // if (smeal != " " && smeal != ""){
  764. // kk = parseInt(kk) + 1;
  765. // if (kk == 1){
  766. // copyNodesetType("/root/main1/printlist3", "/root/main/printlist[" + i + "]", "replace", model, model);
  767. // model.setValue("/root/main1/printlist3[" + kk + "]/dietnm2", smeal);
  768. // model.setValue("/root/main1/printlist3[" + kk + "]/remfactnm", "");
  769. // model.setValue("/root/main1/printlist3[" + kk + "]/bmealdrnknm", "");
  770. // model.setValue("/root/main1/printlist3[" + kk + "]/remark", "");
  771. // }else{
  772. // copyNodesetType("/root/main1/printlist3", "/root/main/printlist[" + i + "]", "after", model, model);
  773. // model.setValue("/root/main1/printlist3[" + kk + "]/dietnm2", smeal);
  774. // model.setValue("/root/main1/printlist3[" + kk + "]/remfactnm", "");
  775. // model.setValue("/root/main1/printlist3[" + kk + "]/bmealdrnknm", "");
  776. // model.setValue("/root/main1/printlist3[" + kk + "]/remark", "");
  777. // }
  778. // }
  779. // }
  780. // }
  781. // }
  782. // closeLoadingBar() ;
  783. // }
  784. // fdevifact();
  785. // model.refresh();
  786. if ( grd_data.rows-1 > 0 ) {
  787. exeReportPreview("RPANT02801", "XMLSTR");
  788. // if ( messageBox(model.getValue("/root/send/searchitem/endmsg"), "Q003") == 6 ) {
  789. // if (model.getValue("/root/send/searchitem/endflag") == "2"){
  790. // copyNodesetType("/root/send1/printlist", "/root/main1/printlist3", "replace", model, model);
  791. // exeReportPreview("RPANT00110", "XMLSTR", "/root/send1/printlist");
  792. // }else{
  793. // copyNodesetType("/root/send1/printlist", "/root/main/printlist[etcgb='1']", "replace", model, model);
  794. // exeReportPreview("RPANT00109", "XMLSTR", "/root/send1/printlist");
  795. // }
  796. // } else { return; }
  797. } else {
  798. messageBox("출력할 데이터가", "I004")
  799. return;
  800. }
  801. ]]>
  802. </script>
  803. </button>
  804. <button id="btn_patdietslip" class="btn4_letter5" style="left:1100px; top:0px; width:92px; height:22px; ">
  805. <caption>환자식전표</caption>
  806. <script type="javascript" ev:event="DOMActivate">
  807. <![CDATA[
  808. if ( grd_data.rows-1 > 0 ) {
  809. //환자식전표에서 동일 병실은 첫번째 행에만 병실을 표시하기 위함.
  810. // model.makeValue("/root/main/printlist[1]/roomhiddenyn", "N");
  811. // for (var i = 2; i < grd_data.rows; i ++) {
  812. // var room1 = model.getValue("/root/main/printlist[" + i + "]/room");
  813. // var room2 = model.getValue("/root/main/printlist[" + (i-1) + "]/room");
  814. // if ( room1 != room2 ) {
  815. // model.makeValue("/root/main/printlist[" + i + "]/roomhiddenyn", "N");
  816. // } else {
  817. // model.makeValue("/root/main/printlist[" + i + "]/roomhiddenyn", "Y");
  818. // }
  819. // }
  820. // if ( messageBox(model.getValue("/root/send/searchitem/endmsg"), "Q003") == 6 ) {
  821. // var kk = 0;
  822. // for (var i = 0; i < grd_data.rows; i ++) {
  823. // kk = parseFloat(kk) + 1;
  824. // model.makeValue("/root/printinfo/printlist[" + kk + "]/ward", model.getValue("/root/main/printlist[" + i + "]/ward"));
  825. // model.makeValue("/root/printinfo/printlist[" + kk + "]/wardnm", model.getValue("/root/main/printlist[" + i + "]/wardnm"));
  826. // model.makeValue("/root/printinfo/printlist[" + kk + "]/room", model.getValue("/root/main/printlist[" + i + "]/room"));
  827. // model.makeValue("/root/printinfo/printlist[" + kk + "]/pid", model.getValue("/root/main/printlist[" + i + "]/pid"));
  828. // model.makeValue("/root/printinfo/printlist[" + kk + "]/hngnm", model.getValue("/root/main/printlist[" + i + "]/hngnm"));
  829. // model.makeValue("/root/printinfo/printlist[" + kk + "]/dietnm2", model.getValue("/root/main/printlist[" + i + "]/dietnm2"));
  830. // if (model.getValue("/root/main/printlist[" + i + "]/prcpdelivefact") != "-") {
  831. // kk = parseFloat(kk) + 1;
  832. // model.makeValue("/root/printinfo/printlist[" + kk + "]/wardnm", model.getValue("/root/main/printlist[" + i + "]/wardnm"));
  833. // model.makeValue("/root/printinfo/printlist[" + kk + "]/room", model.getValue("/root/main/printlist[" + i + "]/room"));
  834. // model.makeValue("/root/printinfo/printlist[" + kk + "]/dietnm2", model.getValue("/root/main/printlist[" + i + "]/prcpdelivefact"));
  835. // }
  836. // }
  837. // model.copyNode("/root/send/patdietslip", "/root/main");
  838. // model.copyNode("/root/send/patdietslip", "/root/printinfo");
  839. exeReportPreview("RPANT02802", "XMLSTR");
  840. // } else { return; }
  841. } else {
  842. messageBox("출력할 데이터가", "I004")
  843. return;
  844. }
  845. ]]>
  846. </script>
  847. </button>
  848. </group>
  849. </xhtml:body>
  850. </xhtml:html>