SMANT01100_환자조건별조회.xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  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. <patmeal>
  11. <patmeallist>
  12. <ward/>
  13. <room/>
  14. <pid/>
  15. <hngnm/>
  16. <sex/>
  17. <dietnm/>
  18. <remfactnm/>
  19. <remark/>
  20. <remark1/>
  21. <remark2/>
  22. <remark3/>
  23. <indd/>
  24. <incnt/>
  25. <intkcnt/>
  26. <fsexamflag/>
  27. </patmeallist>
  28. </patmeal>
  29. <popupendflag/>
  30. </main>
  31. <send>
  32. <reqdata>
  33. <dietlrgcd/>
  34. <dietmdlcd/>
  35. <dietnm/>
  36. <dietcd/>
  37. <holiday/>
  38. <holiday1/>
  39. <holiday2/>
  40. <holiday3/>
  41. <fage/>
  42. <tage/>
  43. <intkcnt/>
  44. <fromdd/>
  45. <todd/>
  46. <indd/>
  47. </reqdata>
  48. </send>
  49. <init>
  50. <cmb_info>
  51. </cmb_info>
  52. <baseinfo>
  53. <dietlrgcd/>
  54. <dietmdlcd/>
  55. <fsexamflag/>
  56. </baseinfo>
  57. </init>
  58. <hidden>
  59. <count/>
  60. </hidden>
  61. </root>
  62. </instance>
  63. <script type="javascript" ev:event="xforms-ready">
  64. <![CDATA[
  65. finit();
  66. //화면open시 공통코드 setting
  67. zbcfGetCodeList( new Array("A0046", "A0047", "P0021"), new Array("/root/init/baseinfo/dietlrgcd", "/root/init/baseinfo/dietmdlcd", "/root/init/baseinfo/fsexamflag"));
  68. submit("TRZBC00101");
  69. astfAddCombo("/root/init/baseinfo/dietmdlcd","A0047","cdid,cdnm",",");
  70. model.setValue("/root/send/reqdata/indd","");
  71. ]]>
  72. </script>
  73. <submission id="TRZBC00101"/>
  74. <submission id="TRANT01101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/patmeal"/>
  75. </model>
  76. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  77. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  78. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  79. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  80. <script type="javascript" src="../../../ast/examcureweb/js/AEZ0001.js"/>
  81. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  82. <script type="javascript">
  83. <![CDATA[
  84. // 화면 초기화
  85. function finit() {
  86. model.removeNodeset("/root/main/patmeal/patmeallist");
  87. //model.resetInstanceNode("/root/main/maindata");
  88. model.resetInstanceNode("/root/send/reqdata");
  89. model.setValue("/root/send/reqdata/fromdd", getCurrentDate());
  90. model.setValue("/root/send/reqdata/todd", getCurrentDate());
  91. model.refresh();
  92. }
  93. //조회
  94. function readfunc(){
  95. model.removeNodeset("/root/main/patmeal/patmeallist");
  96. submit("TRANT01101");
  97. //remark1,2,3의 내용을 ','로 연결하기
  98. for ( i=1; i<grd_patmeal.rows; i++) {
  99. var remark = "";
  100. var remark1 = model.getValue("/root/main/patmeal/patmeallist[" + i + "]/remark1");
  101. var remark2 = model.getValue("/root/main/patmeal/patmeallist[" + i + "]/remark2");
  102. var remark3 = model.getValue("/root/main/patmeal/patmeallist[" + i + "]/remark3");
  103. if ( remark1 != "" || remark2 != "" || remark3 != "" ) {
  104. if ( remark1 != "" ) {
  105. remark = remark + remark1 + ",";
  106. }
  107. if ( remark2 != "" ) {
  108. remark = remark + remark2 + ",";
  109. }
  110. if ( remark3 != "" ) {
  111. remark = remark + remark3 + ",";
  112. }
  113. remark = remark.substr(0, remark.length-1);
  114. model.setValue("/root/main/patmeal/patmeallist[" + i + "]/remark", remark);
  115. }
  116. }
  117. // if (model.getValue("/root/main/patmeal/patmeallist[" + 1 + "]/ward") == ""){
  118. // model.removeNodeset("/root/main/patmeal/patmeallist");
  119. // }
  120. model.refresh();
  121. }
  122. //조회조건 적합성 체크
  123. function datacheck() {
  124. if (model.getValue("/root/send/reqdata/dietlrgcd") == ""){
  125. messageBox("분류는 필수선택", "I009");
  126. return false;
  127. }
  128. var fromdd = model.getValue("/root/send/reqdata/fromdd");
  129. var todd = model.getValue("/root/send/reqdata/todd");
  130. if (getDateInterval(fromdd, todd) < 0) {
  131. messageBox("검색 시작일은 종료일보다 클 수", "I004");
  132. return;
  133. }
  134. if (model.getValue("/root/send/reqdata/fage") == "" || model.getValue("/root/send/reqdata/tage") == ""){
  135. }else{
  136. var iage1 = parseFloat(model.getValue("/root/send/reqdata/fage"));
  137. var iage2 = parseFloat(model.getValue("/root/send/reqdata/tage"));
  138. if (iage1 > iage2){
  139. messageBox("나이의 From~To 설정이", "E016");
  140. return false;
  141. }
  142. }
  143. }
  144. // 날짜 형식에 대한 적합여부 체크
  145. function isDate(str) {
  146. if (str == "") return true; // 빈건 체크안함
  147. if (trim(str) == "") return true; // 빈건 체크안함
  148. if (isNaN(parseInt(str))) return false; // 숫자가 아니면 false
  149. if (str.length != 8) return false; // 8자리(yyyymmdd)가 아니면 false
  150. var yy = new Number(str.substring(0, 4));
  151. var mm = new Number(str.substring(4, 6)) - 1;
  152. var dd = new Number(str.substring(6, 8));
  153. var date = new Date(yy, mm, dd);
  154. //alert(date.getFullYear() +"-" + (date.getMonth()+1) + "-" + date.getDate());
  155. if (yy != date.getFullYear() ||
  156. mm != date.getMonth() ||
  157. dd != date.getDate()) {
  158. return false; // 존재하지 않는 날짜
  159. }
  160. return true; // 존재하는 날짜
  161. }
  162. // 문자에 대한 TRIM 작업
  163. function trim(data){
  164. return data.replace(/(^\s*)|(\s*$)/g, "");
  165. }
  166. ]]>
  167. </script>
  168. </xhtml:head>
  169. <xhtml:body guideline="1,1194;2,748;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  170. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  171. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">환자조건별조회</caption>
  172. </group>
  173. <group id="group3" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  174. <group id="group2" style="left:0px; top:10px; width:1194px; height:60px; vertical-align:top; ">
  175. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:60px; background-color:#fffbf2; border-color:#ffd799; "/>
  176. <caption id="caption2" class="search_name" style="left:16px; top:8px; width:64px; height:17px; ">분류 :</caption>
  177. <button id="btn_search" class="btn1_letter2" navindex="7" style="left:1122px; top:7px; width:56px; height:22px; ">
  178. <caption>조회</caption>
  179. <script type="javascript" ev:event="DOMActivate">
  180. <![CDATA[
  181. if (datacheck() == false){
  182. return;
  183. }
  184. //휴일조건 분리하기
  185. if ( chk_holiday.value != "" ) {
  186. var temp = chk_holiday.value;
  187. for ( i = 0; i < temp.length; i+=2 ) {
  188. if ( temp.substr(i,1) == "1" ) {
  189. model.setValue("/root/send/reqdata/holiday1", "1");
  190. } else if ( temp.substr(i,1) == "2" ) {
  191. model.setValue("/root/send/reqdata/holiday2", "2");
  192. } else if ( temp.substr(i,1) == "3" ) {
  193. model.setValue("/root/send/reqdata/holiday3", "3");
  194. }
  195. }
  196. }
  197. readfunc(); //조회 함수
  198. model.setValue("/root/send/reqdata/holiday1", "");
  199. model.setValue("/root/send/reqdata/holiday2", "");
  200. model.setValue("/root/send/reqdata/holiday3", "");
  201. ]]>
  202. </script>
  203. </button>
  204. <line id="line13" style="x1:1106px; y1:7px; x2:1106px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  205. <caption id="caption7" class="search_name" style="left:560px; top:8px; width:74px; height:17px; ">식사명:</caption>
  206. <caption id="caption23" class="search_name" style="left:16px; top:35px; width:64px; height:17px; ">휴일 :</caption>
  207. <caption id="caption25" class="search_name" style="left:395px; top:35px; width:95px; height:17px; ">나 이 :</caption>
  208. <caption id="caption26" class="search_name" style="left:560px; top:35px; width:86px; height:17px; ">섭취일수 :</caption>
  209. <output id="opt_dietcd" ref="/root/send/reqdata/dietcd" class="output_search" style="left:627px; top:7px; width:68px; height:19px; "/>
  210. <button id="btn_dietcdpopup" class="icon_search" navindex="2" style="left:700px; top:7px; width:16px; height:16px; ">
  211. <caption/>
  212. <script type="javascript" ev:event="onclick">
  213. <![CDATA[
  214. modal("SPANT01100", "", "200", "200", "SPANT01100","/root/send/reqdata","/root/send/reqdata1");
  215. readfunc();
  216. ]]>
  217. </script>
  218. </button>
  219. <input id="ipt_fage" ref="/root/send/reqdata/fage" class="input_search" navindex="4" autonext="false" maxlength="3" format="999" style="left:465px; top:34px; width:30px; height:19px; text-align:center; "/>
  220. <caption id="caption28" style="left:499px; top:37px; width:22px; height:15px; ">~</caption>
  221. <input id="ipt_tage" ref="/root/send/reqdata/tage" class="input_search" navindex="5" autonext="false" maxlength="3" format="999" style="left:513px; top:34px; width:30px; height:19px; text-align:center; "/>
  222. <input id="ipt_intkcnt" ref="/root/send/reqdata/intkcnt" class="input_search" navindex="6" autonext="false" maxlength="3" format="999" style="left:646px; top:34px; width:39px; height:19px; text-align:center; "/>
  223. <select id="chk_dietlrgcd" ref="/root/send/reqdata/dietlrgcd" overflow="visible" appearance="full" cellspacing="7" cols="5" style="left:75px; top:9px; width:315px; height:19px; ">
  224. <choices>
  225. <item>
  226. <label>일반식</label>
  227. <value>Q1</value>
  228. </item>
  229. <item>
  230. <label>치료식</label>
  231. <value>Q2</value>
  232. </item>
  233. <item>
  234. <label>멸균식</label>
  235. <value>Q3</value>
  236. </item>
  237. <item>
  238. <label>비급여식</label>
  239. <value>Q4</value>
  240. </item>
  241. <item>
  242. <label>금식</label>
  243. <value>Q9</value>
  244. </item>
  245. </choices>
  246. <script type="javascript" ev:event="onclick">
  247. <![CDATA[
  248. model.resetInstanceNode("/root/send/reqdata/dietmdlcd");
  249. cmb_mdlcd.refresh();
  250. ]]>
  251. </script>
  252. </select>
  253. <select id="chk_holiday" ref="/root/send/reqdata/holiday" overflow="visible" appearance="full" cellspacing="7" cols="3" style="left:75px; top:34px; width:300px; height:19px; ">
  254. <choices>
  255. <item>
  256. <label>토요일제외</label>
  257. <value>1</value>
  258. </item>
  259. <item>
  260. <label>일요일제외</label>
  261. <value>2</value>
  262. </item>
  263. <item>
  264. <label>공휴일제외</label>
  265. <value>3</value>
  266. </item>
  267. </choices>
  268. </select>
  269. <output id="opt_dietnm" ref="/root/send/reqdata/dietnm" class="output_search" style="left:720px; top:7px; width:90px; height:19px; "/>
  270. <caption id="caption1" class="search_name" style="left:823px; top:8px; width:86px; height:17px; ">검색일자 :</caption>
  271. <input id="ipt_todd" ref="/root/send/reqdata/fromdd" class="input_default" inputtype="date" style="left:910px; top:7px; width:85px; height:19px; text-align:center; "/>
  272. <caption id="caption3" style="left:997px; top:10px; width:22px; height:15px; ">~</caption>
  273. <input id="ipt_fromdd" ref="/root/send/reqdata/todd" class="input_default" inputtype="date" style="left:1010px; top:7px; width:85px; height:19px; text-align:center; "/>
  274. <caption id="caption4" class="search_name" style="left:395px; top:8px; width:74px; height:17px; ">중분류:</caption>
  275. <select1 id="cmb_mdlcd" ref="/root/send/reqdata/dietmdlcd" class="combo_s_essential" appearance="minimal" style="left:465px; top:7px; width:85px; height:19px; ">
  276. <choices>
  277. <itemset nodeset="/root/init/baseinfo/dietmdlcd/A0047">
  278. <label ref="cdnm"/>
  279. <value ref="cdid"/>
  280. </itemset>
  281. </choices>
  282. </select1>
  283. <caption id="caption5" class="search_name" style="left:823px; top:35px; width:87px; height:17px; ">입원일자 :</caption>
  284. <input id="ipt_indd" ref="/root/send/reqdata/indd" class="input_default" inputtype="date" style="left:910px; top:35px; width:85px; height:19px; text-align:center; "/>
  285. </group>
  286. <line id="line1" class="line_1" style="x1:0px; y1:96px; x2:1194px; y2:96px; "/>
  287. <caption id="caption20" class="tit_2" style="left:0px; top:80px; width:120px; height:13px; ">환자조건별조회</caption>
  288. <button id="btn_excel" class="btn2_letter2" style="left:1146px; top:75px; width:42px; height:19px; ">
  289. <caption>엑셀</caption>
  290. <script type="javascript" ev:event="DOMActivate">
  291. <![CDATA[
  292. var filename = window.fileDialog("save", ",", false, "PatMeal_list", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  293. if (filename != "") {
  294. grd_patmeal.saveExcel(filename, "grd_patmeal", true, false, "", "", "");
  295. }
  296. ]]>
  297. </script>
  298. </button>
  299. </group>
  300. <group id="group4" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
  301. <button id="btn_reset" class="btn4_letter3" style="left:1124px; top:4px; width:68px; height:22px; ">
  302. <caption>초기화</caption>
  303. <script type="javascript" ev:event="DOMActivate">
  304. <![CDATA[
  305. finit();
  306. ]]>
  307. </script>
  308. </button>
  309. </group>
  310. <datagrid id="grd_patmeal" nodeset="/root/main/patmeal/patmeallist" caption="병동^병실^등록번호^환자명^성별/나이^식사명^특이사항^remark^remark1^remark2^remark3^입원일^재원일수^섭취일수^초/재" colsep="^" colwidth="0, 50, 70, 70, 80, 180, 190, 170, 0, 0, 0, 80, 60, 60, 60" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:114px; width:1194px; height:634px; ">
  311. <col ref="ward"/>
  312. <col ref="room"/>
  313. <col ref="pid"/>
  314. <col ref="hngnm"/>
  315. <col ref="sex" style="text-align:center; "/>
  316. <col ref="dietnm"/>
  317. <col ref="remfactnm"/>
  318. <col ref="remark"/>
  319. <col ref="remark1"/>
  320. <col ref="remark2"/>
  321. <col ref="remark3"/>
  322. <col ref="indd" format="yyyy-mm-dd" style="text-align:center; "/>
  323. <col ref="incnt" style="text-align:center; "/>
  324. <col ref="intkcnt" style="text-align:center; "/>
  325. <col disabled="true" ref="fsexamflag" type="combo">
  326. <choices>
  327. <itemset nodeset="/root/init/baseinfo/fsexamflag/P0021">
  328. <label ref="cdnm"/>
  329. <value ref="cdid"/>
  330. </itemset>
  331. </choices>
  332. </col>
  333. <script type="javascript" ev:event="onaftersort">
  334. <![CDATA[
  335. //grd_patmeal.gridToInstance();
  336. ]]>
  337. </script>
  338. </datagrid>
  339. </xhtml:body>
  340. </xhtml:html>