SMAEA03400_미예약자 조회(통합예약).xrw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  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. <send>
  10. <data>
  11. <pid/>
  12. <deptcd/>
  13. <fromDate/>
  14. <toDate/>
  15. <suppdeptcd/>
  16. <rcpt/>
  17. <inptflag>A</inptflag>
  18. </data>
  19. <globalinstance>
  20. <instance1/>
  21. </globalinstance>
  22. </send>
  23. <init>
  24. <cmb_info>
  25. <suppdept>
  26. <suppdeptcd/>
  27. <depthngnm/>
  28. </suppdept>
  29. </cmb_info>
  30. <baseinfo>
  31. <initinptflag/>
  32. </baseinfo>
  33. </init>
  34. <hidden>
  35. <source>
  36. <hngnm/>
  37. </source>
  38. </hidden>
  39. <main>
  40. <send/>
  41. <patinfo>
  42. <patinfolist/>
  43. </patinfo>
  44. <booklist>
  45. <detail>
  46. <pid/>
  47. <hngnm/>
  48. <hometel/>
  49. <mpphontel/>
  50. <prcpgenrflag/>
  51. <roomcd/>
  52. <prcpdd/>
  53. <prcpcd/>
  54. <prcpnm/>
  55. <rgstrid/>
  56. <orddepthngnm/>
  57. <gigan/>
  58. </detail>
  59. </booklist>
  60. </main>
  61. </root>
  62. </instance>
  63. <!-- 예약조회-->
  64. <submission id="TRAEA03401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="root/main/booklist"/>
  65. <submission id="TRAEA01301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/globalinstance" replace="instance" resultref="/root/init/cmb_info"/>
  66. <submission id="TRAAA00001"/>
  67. </model>
  68. <script type="javascript" ev:event="xforms-ready">
  69. <![CDATA[
  70. aezfSetSuppDeptcd();
  71. if( instance1.selectSingleNode("/root/init/cmb_info/suppdept[suppdeptcd='" + model.getValue("/root/send/globalinstance/instance1") + "']") == null ){
  72. model.setValue("/root/send/data/suppdeptcd", "");
  73. }else{
  74. model.setValue("/root/send/data/suppdeptcd", model.getValue("/root/send/globalinstance/instance1"));
  75. }
  76. //2010.09.29 통합예약 미예약자 조회시 입원조회여부 체크 - 박재영
  77. astGetComboList( new Array("A660"), new Array("/root/init/baseinfo/initinptflag") );
  78. //submit("TRAAA00001", false);
  79. model.removeNodeset("/root/init/baseinfo/initinptflag/A660[" + 1 + "]");
  80. model.setValue("/root/send/data/inptflag",model.getValue("/root/init/baseinfo/initinptflag/A660[" + 1 + "]/cdid") );
  81. //검사실코드 갖고오기
  82. submit("TRAEA01301", false);
  83. ipt_date1.value = getCurrentDate().toDate().getAddDate(-1,"D").getDateFormat("YYYYMMDD");
  84. ipt_date2.value = getCurrentDate().toDate().getAddDate(-1,"D").getDateFormat("YYYYMMDD");
  85. model.resetInstanceNode("/root/main/booklist/detail");
  86. model.refresh();
  87. ]]>
  88. </script>
  89. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  90. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  91. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  92. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  93. <script type="javascript" src="../../../ast/examcureweb/js/AEZ0001.js"/>
  94. <script type="javascript" src="../../../ast/examcureweb/js/combolist.js"/>
  95. <script type="javascript">
  96. <![CDATA[
  97. function readfunc(){ // 해당 조건에 대한 검사내역을 조회한다.
  98. if (model.getValue("/root/send/data/fromDate") == ""){
  99. messageBox("처방 시작일자는 필수 입력 또는 선택 항목", "E008");
  100. model.setFocus("ipt_date1");
  101. return;
  102. }
  103. if (model.getValue("/root/send/data/toDate") == ""){
  104. messageBox("처방 종료일자는 필수 입력 또는 선택 항목", "E008");
  105. model.setFocus("ipt_date2");
  106. return;
  107. }
  108. if (isDate(model.getValue("/root/send/data/fromDate")) == false){
  109. messageBox("처방 시작일자의 날짜 형식이 잘못 입력되어 처리", "E001");
  110. model.setFocus("ipt_date1");
  111. return;
  112. }
  113. if (isDate(model.getValue("/root/send/data/toDate")) == false){
  114. messageBox("처방 종료일자의 날짜 형식이 잘못 입력되어 처리", "E001");
  115. model.setFocus("ipt_date2");
  116. return;
  117. }
  118. if (model.getValue("/root/send/data/fromDate") > model.getValue("/root/send/data/toDate")){
  119. messageBox("처방 시작일자가 종료일자 보다 커서 처리", "E001");
  120. model.setFocus("ipt_date2");
  121. return;
  122. }
  123. if (model.getValue("/root/send/data/pid") == ""){
  124. var date = model.getValue("/root/send/data/fromDate").toDate().getAddDate(-1,"M").getDateFormat("YYYYMMDD");
  125. if (model.getValue("/root/send/data/fromDate") < date){
  126. messageBox("처방 조회기간은 최대 한달 기간만 조회가 가능합니다.", "E999", "");
  127. model.setFocus("ipt_date1");
  128. return;
  129. }
  130. }
  131. model.resetInstanceNode("/root/main/booklist/detail");
  132. if (submit("TRAEA03401")){
  133. }
  134. if (model.getValue("/root/main/booklist/detail[" + 1 + "]/pid") == ""){
  135. model.resetInstanceNode("/root/main/booklist/detail");
  136. }
  137. model.refresh();
  138. }
  139. function isDate(str) { // 날짜 형식에 대한 적합여부 체크
  140. if (str == "") return true; // 빈건 체크안함
  141. if (trim(str) == "") return true; // 빈건 체크안함
  142. if (isNaN(parseInt(str))) return false; // 숫자가 아니면 false
  143. if (str.length != 8) return false; // 8자리(yyyymmdd)가 아니면 false
  144. var yy = new Number(str.substring(0, 4));
  145. var mm = new Number(str.substring(4, 6)) - 1;
  146. var dd = new Number(str.substring(6, 8));
  147. var date = new Date(yy, mm, dd);
  148. //alert(date.getFullYear() +"-" + (date.getMonth()+1) + "-" + date.getDate());
  149. if (yy != date.getFullYear() ||
  150. mm != date.getMonth() ||
  151. dd != date.getDate()) {
  152. return false; // 존재하지 않는 날짜
  153. }
  154. return true; // 존재하는 날짜
  155. }
  156. function trim(data){ // 문자에 대한 TRIM 작업
  157. return data.replace(/(^\s*)|(\s*$)/g, "");
  158. }
  159. ]]>
  160. </script>
  161. </xhtml:head>
  162. <xhtml:body pagewidth="1211" pageheight="784" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  163. <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
  164. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:137px; height:14px; ">미예약자조회</caption>
  165. </group>
  166. <group id="group3" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  167. <group id="grp_sea" style="left:0px; top:10px; width:1194px; height:55px; vertical-align:top; ">
  168. <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:55px; background-color:#fffbf2; border-color:#ffd799; "/>
  169. <caption id="caption2" class="search_name" style="left:10px; top:7px; width:94px; height:17px; ">처방일자 :</caption>
  170. <input id="ipt_date1" ref="/root/send/data/fromDate" class="input_default" inputtype="date" style="left:102px; top:6px; width:95px; height:19px; text-align:center; "/>
  171. <input id="ipt_date2" ref="/root/send/data/toDate" class="input_default" inputtype="date" style="left:230px; top:6px; width:95px; height:19px; text-align:center; "/>
  172. <line id="line13" class="line_4" style="x1:1111px; y1:6px; x2:1111px; y2:48px; "/>
  173. <caption id="caption1" style="left:201px; top:6px; width:25px; height:19px; text-align:center; ">~</caption>
  174. <button id="btn_sea" class="btn1_letter2" style="left:1125px; top:17px; width:56px; height:22px; ">
  175. <caption>조회</caption>
  176. <script type="javascript" ev:event="DOMActivate">
  177. <![CDATA[
  178. if (model.getValue("/root/send/data/pid") == ""){
  179. model.setValue("/root/hidden/source/hngnm", "");
  180. }
  181. readfunc();
  182. ]]>
  183. </script>
  184. </button>
  185. <input id="ipt_pid" ref="/root/send/data/pid" class="input_search" style="left:433px; top:6px; width:80px; height:19px; ">
  186. <script type="javascript" ev:event="onkeyup">
  187. <![CDATA[
  188. if(event.keyCode == "13") {
  189. inputEnterKey("btn_sea", "DOMActivate");
  190. }
  191. ]]>
  192. </script>
  193. </input>
  194. <output id="opt_patnm" ref="/root/hidden/source/hngnm" class="output_fix" style="left:535px; top:6px; width:105px; height:19px; "/>
  195. <button id="button61" class="icon_search" style="left:517px; top:6px; width:16px; height:16px; ">
  196. <caption/>
  197. <script type="javascript" ev:event="DOMActivate">
  198. <![CDATA[
  199. // 환자조회
  200. modal("SPPMC02500", "", "200", "200", "SPPMC02500","/root/send/data/pid","/root/main/send");
  201. model.setValue("/root/hidden/source/hngnm", model.getValue("/root/main/patinfo/patinfolist/hngnm"));
  202. model.setValue("/root/send/data/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  203. model.refresh();
  204. ]]>
  205. </script>
  206. </button>
  207. <caption id="caption3" class="search_name" style="left:340px; top:7px; width:94px; height:17px; ">등록번호</caption>
  208. <select1 id="cmb_deptcd" ref="/root/send/data/suppdeptcd" navindex="2" appearance="minimal" editmode="inputsearch" style="left:745px; top:6px; width:150px; height:19px; ">
  209. <choices>
  210. <itemset nodeset="/root/init/cmb_info/suppdept">
  211. <label ref="depthngnm"/>
  212. <value ref="suppdeptcd"/>
  213. </itemset>
  214. </choices>
  215. </select1>
  216. <caption id="caption15" class="search_name" style="left:655px; top:7px; width:86px; height:17px; ">지원부서 :</caption>
  217. <select1 id="radio1" ref="/root/send/data/rcpt" appearance="full" cols="3" overflow="visible" style="left:102px; top:31px; width:175px; height:18px; font-weight:bold; border-style:none; ">
  218. <choices>
  219. <item>
  220. <label>전체</label>
  221. <value/>
  222. </item>
  223. <item>
  224. <label>수납</label>
  225. <value>Y</value>
  226. </item>
  227. <item>
  228. <label>미수납</label>
  229. <value>N</value>
  230. </item>
  231. </choices>
  232. </select1>
  233. <caption id="caption5" class="search_name" style="left:10px; top:32px; width:86px; height:17px; ">수납여부 :</caption>
  234. <caption id="caption4" class="search_name" style="left:340px; top:30px; width:86px; height:17px; ">입원/외래</caption>
  235. <select1 id="radio2" ref="/root/send/data/inptflag" appearance="full" cols="3" overflow="visible" style="left:435px; top:30px; width:135px; height:18px; font-weight:bold; border-style:none; ">
  236. <choices>
  237. <item>
  238. <label>전체</label>
  239. <value>Y</value>
  240. </item>
  241. <item>
  242. <label>외래만</label>
  243. <value>N</value>
  244. </item>
  245. </choices>
  246. </select1>
  247. </group>
  248. <datagrid id="datagrid1" nodeset="/root/main/booklist/detail" caption="등록번호^성명^집전화^이동전화^입/외^병실^처방일자^수납^처방코드^처방명^처방과^처방의^caption3" colsep="^" colwidth="70, 70, 90, 90, 45, 45, 80, 55, 80, 360, 100, 80, 100" explorerbar="sort" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:95px; width:1195px; height:645px; ">
  249. <col ref="pid"/>
  250. <col ref="hngnm"/>
  251. <col ref="hometel"/>
  252. <col ref="mpphontel"/>
  253. <col ref="prcpgenrflag" style="text-align:center; "/>
  254. <col ref="roomcd" style="text-align:center; "/>
  255. <col ref="prcpdd" format="yyyy-mm-dd" style="text-align:center; "/>
  256. <col ref="rcptyn" style="text-align:center; "/>
  257. <col ref="prcpcd"/>
  258. <col ref="prcpnm"/>
  259. <col ref="orddepthngnm"/>
  260. <col ref="rgstrid"/>
  261. <col ref="gigan" visibility="hidden"/>
  262. <script type="javascript" ev:event="ondblclick">
  263. <![CDATA[
  264. var main = getMainViewer();
  265. var pid = model.getValue("/root/main/booklist/detail[" + datagrid1.row + "]/pid");
  266. if (main != null) {
  267. if (main.document.title == "검사예약") {
  268. main.window.model.setValue("/root/send/data/pid", pid);
  269. setGlobalVariable("menuparam", "T");
  270. main.window.javascript.navigate("SMPEA00100", "", "", "", "SMPEA00100", "root/send/data/pid", "root/send/data/pid");
  271. } else {
  272. main.window.model.makeValue("/root/send/data/srchpid", pid);
  273. main.window.javascript.navigate("SMAEA02000", "", "", "", "SMAEA02000", "/root/send/data/srchpid", "/root/send/data/srchpid");
  274. }
  275. } else {
  276. main.window.model.makeValue("/root/send/data/srchpid", pid);
  277. main.window.javascript.navigate("SMAEA02000", "", "", "", "SMAEA02000", "/root/send/data/srchpid", "/root/send/data/srchpid");
  278. }
  279. ]]>
  280. </script>
  281. <script type="javascript" ev:event="onaftersort">
  282. <![CDATA[
  283. datagrid1.gridToInstance();
  284. ]]>
  285. </script>
  286. </datagrid>
  287. <caption id="caption10" class="tit_2" style="left:5px; top:75px; width:130px; height:13px; ">미예약자 현황</caption>
  288. <line id="line3" class="line_1" style="x1:0px; y1:90px; x2:1194px; y2:90px; "/>
  289. <button id="button12" class="btn2_letter4" style="left:1126px; top:69px; width:64px; height:19px; ">
  290. <caption>엑셀저장</caption>
  291. <script type="javascript" ev:event="DOMActivate">
  292. <![CDATA[
  293. var file = window.fileDialog("save","","false","","xls","Excel Files(*.xls)|*.xls");
  294. datagrid1.saveExcel(file);
  295. ]]>
  296. </script>
  297. </button>
  298. </group>
  299. <button id="button89" class="btn6_letter2" style="left:0px; top:762px; width:56px; height:22px; ">
  300. <caption>출력</caption>
  301. <script type="javascript" ev:event="DOMActivate">
  302. <![CDATA[
  303. exeReportPreview("RPAEA03400", "XMLSTR", "/root/main/booklist/detail");
  304. ]]>
  305. </script>
  306. </button>
  307. </xhtml:body>
  308. </xhtml:html>