SMASB00100_병동재원환자조회.xrw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMASB00100.xrw
  4. * 설 명 : 병동재원환자조회
  5. * 수정이력 : 조회함수생성 및 자격공통코드내역조회추가/2007-11-13 /손주연
  6. * 기 타 :
  7. -->
  8. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  9. <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">
  10. <xhtml:head>
  11. <xhtml:title>병동재원환자조회</xhtml:title>
  12. <model id="model1">
  13. <instance id="instance1">
  14. <root xmlns="">
  15. <main>
  16. <inhosppatinfo>
  17. </inhosppatinfo>
  18. <cond>
  19. <indd/>
  20. <wardcd/>
  21. <offset/>
  22. <pagesize>200</pagesize>
  23. </cond>
  24. <ipatinfo/>
  25. <dschpatinfo/>
  26. <inrminfo/>
  27. <chngroominfo/>
  28. </main>
  29. <send>
  30. <reqdata/>
  31. </send>
  32. <hidden>
  33. </hidden>
  34. <init>
  35. <initdate>
  36. <today/>
  37. </initdate>
  38. <warddeptlist>
  39. </warddeptlist>
  40. <deptlist>
  41. </deptlist>
  42. <insukind>
  43. <P0008/>
  44. </insukind>
  45. </init>
  46. </root>
  47. </instance>
  48. <script type="javascript" ev:event="xforms-ready">
  49. <![CDATA[
  50. fInitialize();
  51. model.removeNodeset("/root/main/inhosppatinfo");
  52. model.setValue("/root/main/cond/indd", getCurrentDate());
  53. model.refresh();
  54. ]]>
  55. </script>
  56. <submission id="TRASB00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" add="bottom" resultref="/root/main/inhosppatinfo"/>
  57. <submission id="TRZSD00109" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  58. <submission id="TRZBC00101"/>
  59. <submission id="TRASB00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/ipatinfo"/>
  60. <submission id="TRASB00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/dschpatinfo"/>
  61. <submission id="TRASB00104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/inrminfo"/>
  62. <submission id="TRASB00105" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/chngroominfo"/>
  63. </model>
  64. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  65. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  66. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  67. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  68. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  69. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  70. <script type="javascript">
  71. <![CDATA[
  72. function fInitialize() {
  73. // 공통코드를 조회한다.
  74. zbcfGetCodeList( new Array( "P0008" )
  75. , new Array("/root/init/insukind" ));
  76. submit("TRZBC00101");
  77. // 진료과
  78. var instcd = getUserInfo("dutplceinstcd");
  79. var standard_yn = "orduseyn";
  80. var ord_deptflag = 'D';
  81. var rslt_ref = "/root/init/deptlist";
  82. var sort_field = "depthngnm";
  83. var sort_method = "asc";
  84. zbcfGetDeptCodeList(instcd, standard_yn, ord_deptflag, rslt_ref, sort_method);
  85. //병동
  86. standard_yn = "orduseyn";
  87. ord_deptflag = "W";
  88. rslt_ref = "/root/init/warddeptlist";
  89. sort_field = "deptcd";
  90. sort_method = "asc";
  91. zbcfGetDeptCodeList(instcd, standard_yn, ord_deptflag, rslt_ref, sort_field, sort_method);
  92. addComboItem("cmb_ward","","","above");
  93. model.refresh();
  94. }
  95. /*===========================================================================
  96. @desc : 병동별/일자별 재원환자조회
  97. ===========================================================================*/
  98. function fGetInPatList(){
  99. model.removeNodeset(grd_inhosppatlist.nodeset);
  100. model.removeNodeset(grd_ipatlist.nodeset);
  101. model.removeNodeset(grd_dschpatlist.nodeset);
  102. model.removeNodeset(grd_inrmlist.nodeset);
  103. model.removeNodeset(grd_chngroomlist.nodeset);
  104. if( !isRequiredControls("ipt_indd") ){
  105. return;
  106. }
  107. model.setValue("/root/main/cond/offset", "0");
  108. model.copyNode("/root/send/reqdata", "/root/main/cond");
  109. openLoadingBar("병동재원환자정보 ") ;//처리중 화면을 오픈한다.
  110. submit("TRASB00101"); //재원
  111. submit("TRASB00102"); //입원
  112. submit("TRASB00103"); //퇴원
  113. submit("TRASB00104"); //입실
  114. submit("TRASB00105"); //전실
  115. closeLoadingBar() ;//처리중 화면을 close한다.
  116. }
  117. function fSubmitOnScroll() {
  118. if(grd_inhosppatlist.vscroll.attribute("max") == grd_inhosppatlist.vscroll.attribute("pos")) {
  119. model.setValue("/root/send/reqdata/offset", grd_inhosppatlist.rows-grd_inhosppatlist.fixedRows);
  120. submit("TRASB00101"); //재원
  121. grd_inhosppatlist.dispatch("onmouseup");
  122. }
  123. }
  124. ]]>
  125. </script>
  126. </xhtml:head>
  127. <xhtml:body guideline="2,23;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  128. <group id="group3" scroll="auto" style="left:0px; top:0px; width:1195px; height:784px; ">
  129. <group id="group2" style="left:0px; top:0px; width:1195px; height:784px; vertical-align:top; ">
  130. <line id="line4" class="line_3" style="x1:0px; y1:781px; x2:1194px; y2:781px; "/>
  131. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  132. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:162px; height:14px; ">병동재원환자조회</caption>
  133. </group>
  134. </group>
  135. </group>
  136. <group id="grp_btn" style="left:0px; top:757px; width:1195px; height:27px; ">
  137. <button id="btn_print" class="btn6_letter2" style="left:3px; top:3px; width:56px; height:22px; ">
  138. <caption>출력</caption>
  139. </button>
  140. <button id="btn_init" class="btn4_letter3" style="left:1123px; top:3px; width:68px; height:22px; ">
  141. <caption>초기화</caption>
  142. <script type="javascript" ev:event="DOMActivate">
  143. <![CDATA[
  144. model.removeNodeset("/root/main/inhosppatinfo");
  145. model.refresh();
  146. ]]>
  147. </script>
  148. </button>
  149. </group>
  150. <group id="grp_biz" scroll="auto" style="left:0px; top:23px; width:1195px; height:737px; ">
  151. <line id="line6" class="line_3" style="x1:430px; y1:379px; x2:805px; y2:379px; "/>
  152. <line id="line5" class="line_1" style="x1:0px; y1:69px; x2:400px; y2:69px; "/>
  153. <group id="group6" style="left:1px; top:0px; width:1194px; height:39; vertical-align:top; ">
  154. <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:39px; "/>
  155. <line id="line8" class="line_4" style="x1:1110px; y1:10px; x2:1110px; y2:33px; "/>
  156. <input id="ipt_indd" ref="/root/main/cond/indd" class="input_s_essential" inputtype="date" style="left:95px; top:10px; width:135px; height:19px; "/>
  157. <select1 id="cmb_ward" ref="/root/main/cond/wardcd" class="combo_s_essential" navindex="10" appearance="minimal" style="left:395px; top:10px; width:127px; height:19px; ">
  158. <choices>
  159. <itemset nodeset="/root/init/warddeptlist/dept">
  160. <label ref="depthngnm"/>
  161. <value ref="deptcd"/>
  162. </itemset>
  163. </choices>
  164. <script type="javascript" ev:event="xforms-value-changed">
  165. <![CDATA[
  166. fGetInPatList();
  167. ]]>
  168. </script>
  169. </select1>
  170. <button id="btn_search" class="btn1_letter2" style="left:1126px; top:10px; width:56px; height:22px; ">
  171. <caption>조회</caption>
  172. <script type="javascript" ev:event="DOMActivate">
  173. <![CDATA[
  174. fGetInPatList();
  175. ]]>
  176. </script>
  177. </button>
  178. <caption id="cap_indd" class="search_name" style="left:15px; top:9px; width:86px; height:17px; ">진료일 :</caption>
  179. <caption id="cap_ward" class="search_name" style="left:330px; top:9px; width:61px; height:17px; ">병동 :</caption>
  180. </group>
  181. <line id="line1" class="line_1" style="x1:0px; y1:69px; x2:420px; y2:69px; "/>
  182. <caption id="caption35" class="tit_2" style="left:5px; top:54px; width:111px; height:13px; ">재원환자</caption>
  183. <caption id="caption1" class="tit_2" style="left:435px; top:54px; width:111px; height:13px; ">입원환자</caption>
  184. <line id="line2" class="line_1" style="x1:430px; y1:69px; x2:805px; y2:69px; "/>
  185. <caption id="caption3" class="tit_2" style="left:820px; top:54px; width:111px; height:14px; ">퇴원환자</caption>
  186. <line id="line3" class="line_1" style="x1:817px; y1:69px; x2:1192px; y2:69px; "/>
  187. <caption id="caption4" class="tit_2" style="left:435px; top:394px; width:122px; height:14px; ">입실</caption>
  188. <line id="line7" class="line_1" style="x1:430px; y1:409px; x2:805px; y2:409px; "/>
  189. <caption id="caption5" class="tit_2" style="left:820px; top:394px; width:122px; height:14px; ">전실</caption>
  190. <line id="line9" class="line_1" style="x1:817px; y1:409px; x2:1192px; y2:409px; "/>
  191. <line id="line10" class="line_3" style="x1:430px; y1:735px; x2:805px; y2:735px; "/>
  192. <line id="line11" class="line_3" style="x1:815px; y1:379px; x2:1190px; y2:379px; "/>
  193. <line id="line12" class="line_3" style="x1:815px; y1:735px; x2:1190px; y2:735px; "/>
  194. <line id="line13" class="line_3" style="x1:0px; y1:735px; x2:420px; y2:735px; "/>
  195. <datagrid id="grd_inhosppatlist" nodeset="/root/main/inhosppatinfo/inhosppatlist" class="datagrid2" caption="등록번호^성명^S/A^성별^나이^진료과^주치의^병동^병실^진단코드^진단명^재원기간^입원일자^수술일자^퇴원&#xA;통보^보험유형" colsep="^" colwidth="63, 70, 45, 35, 50, 50, 81, 110, 80, 70, 350, 64, 84, 87, 37, 118" dataheight="25" defaultrows="0" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="32" rowsep="|" tooltip="true" style="left:0px; top:74px; width:420px; height:661px; ">
  196. <col ref="pid"/>
  197. <col ref="name"/>
  198. <col ref="sa"/>
  199. <col ref="sex" visibility="hidden"/>
  200. <col ref="age" visibility="hidden"/>
  201. <col ref="orddeptcd"/>
  202. <col ref="orddr"/>
  203. <col ref="wardcd"/>
  204. <col ref="roomcd"/>
  205. <col ref="diagcd" visibility="hidden"/>
  206. <col ref="diagnm"/>
  207. <col ref="inhospterm"/>
  208. <col ref="indd" format="yyyy-mm-dd"/>
  209. <col ref="opdd" format="yyyy-mm-dd"/>
  210. <col ref="dschnotiyn" style="text-align:center; "/>
  211. <col disabled="true" ref="insukind" type="combo">
  212. <choices>
  213. <itemset nodeset="/root/init/insukind/P0008">
  214. <label ref="cdnm"/>
  215. <value ref="cdid"/>
  216. </itemset>
  217. </choices>
  218. </col>
  219. <script type="javascript" ev:event="onaftersort">
  220. <![CDATA[
  221. grd_inhosppatlist.gridToInstance();
  222. ]]>
  223. </script>
  224. <script type="javascript" ev:event="onscroll">
  225. <![CDATA[
  226. /*fSubmitOnScroll();*/
  227. ]]>
  228. </script>
  229. </datagrid>
  230. <datagrid id="grd_ipatlist" nodeset="/root/main/ipatinfo/ipatlist" class="datagrid2" caption="등록번호^성명^S/A^성별^나이^병동^병실^진료과^주치의^진단코드^진단명^재원기간^입원일자^수술일자^퇴원&#xA;통보^보험유형" colsep="^" colwidth="63, 70, 45, 35, 50, 110, 80, 50, 80, 70, 350, 64, 84, 87, 37, 118" dataheight="25" defaultrows="0" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="32" rowsep="|" tooltip="true" style="left:430px; top:74px; width:375px; height:305px; ">
  231. <col ref="pid"/>
  232. <col ref="name"/>
  233. <col ref="sa"/>
  234. <col ref="sex" visibility="hidden"/>
  235. <col ref="age" visibility="hidden"/>
  236. <col ref="wardcd"/>
  237. <col ref="roomcd"/>
  238. <col ref="orddeptcd"/>
  239. <col ref="orddr"/>
  240. <col ref="diagcd" visibility="hidden"/>
  241. <col ref="diagnm"/>
  242. <col ref="inhospterm"/>
  243. <col ref="indd" format="yyyy-mm-dd"/>
  244. <col ref="opdd" format="yyyy-mm-dd"/>
  245. <col ref="dschnotiyn" style="text-align:center; "/>
  246. <col disabled="true" ref="insukind" type="combo">
  247. <choices>
  248. <itemset nodeset="/root/init/insukind/P0008">
  249. <label ref="cdnm"/>
  250. <value ref="cdid"/>
  251. </itemset>
  252. </choices>
  253. </col>
  254. <script type="javascript" ev:event="onaftersort">
  255. <![CDATA[
  256. grd_ipatlist.gridToInstance();
  257. ]]>
  258. </script>
  259. </datagrid>
  260. <datagrid id="grd_dschpatlist" nodeset="/root/main/dschpatinfo/dschpatlist" class="datagrid2" caption="등록번호^성명^S/A^성별^나이^병동^병실^진료과^주치의^진단코드^진단명^재원기간^입원일자^수술일자^퇴원&#xA;통보^사망&#xA;유무^보험유형^협진&#xA;의뢰^퇴원&#xA;처방^퇴원&#xA;통보^회신&#xA;존재^보험유형" colsep="^" colwidth="63, 70, 45, 35, 50, 110, 80, 50, 80, 70, 350, 64, 84, 87, 36, 36, 100" dataheight="25" defaultrows="0" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="32" rowsep="|" tooltip="true" style="left:816px; top:74px; width:375px; height:305px; ">
  261. <col ref="pid"/>
  262. <col ref="name"/>
  263. <col ref="sa"/>
  264. <col ref="sex" visibility="hidden"/>
  265. <col ref="age" visibility="hidden"/>
  266. <col ref="wardcd"/>
  267. <col ref="roomcd"/>
  268. <col ref="orddeptcd"/>
  269. <col ref="orddr"/>
  270. <col ref="diagcd" visibility="hidden"/>
  271. <col ref="diagnm"/>
  272. <col ref="inhospterm"/>
  273. <col ref="indd" format="yyyy-mm-dd"/>
  274. <col ref="opdd" format="yyyy-mm-dd"/>
  275. <col ref="dschnotiyn" style="text-align:center; "/>
  276. <col ref="dethyn" style="text-align:center; "/>
  277. <col disabled="true" ref="insukind" type="combo">
  278. <choices>
  279. <itemset nodeset="/root/init/insukind/P0008">
  280. <label ref="cdnm"/>
  281. <value ref="cdid"/>
  282. </itemset>
  283. </choices>
  284. </col>
  285. <script type="javascript" ev:event="onaftersort">
  286. <![CDATA[
  287. grd_dschpatlist.gridToInstance();
  288. ]]>
  289. </script>
  290. </datagrid>
  291. <datagrid id="grd_inrmlist" nodeset="/root/main/inrminfo/inrmlist" class="datagrid2" caption="등록번호^성명^S/A^FROM^TO^진료과^주치의^진단코드^진단명^재원기간^입원일자^수술일자^퇴원&#xA;통보^보험유형" colsep="^" colwidth="63, 70, 45, 87, 87, 50, 80, 70, 350, 64, 84, 87, 37, 118" dataheight="25" defaultrows="0" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="32" rowsep="|" tooltip="true" style="left:430px; top:414px; width:375px; height:321px; ">
  292. <col ref="pid"/>
  293. <col ref="name"/>
  294. <col ref="sa"/>
  295. <col ref="prestroomcd"/>
  296. <col ref="roomcd"/>
  297. <col ref="orddeptcd"/>
  298. <col ref="orddr"/>
  299. <col ref="diagcd" visibility="hidden"/>
  300. <col ref="diagnm"/>
  301. <col ref="inhospterm"/>
  302. <col ref="indd" format="yyyy-mm-dd"/>
  303. <col ref="opdd" format="yyyy-mm-dd"/>
  304. <col ref="dschnotiyn" style="text-align:center; "/>
  305. <col disabled="true" ref="insukind" type="combo">
  306. <choices>
  307. <itemset nodeset="/root/init/insukind/P0008">
  308. <label ref="cdnm"/>
  309. <value ref="cdid"/>
  310. </itemset>
  311. </choices>
  312. </col>
  313. <script type="javascript" ev:event="onaftersort">
  314. <![CDATA[
  315. grd_inrmlist.gridToInstance();
  316. ]]>
  317. </script>
  318. </datagrid>
  319. <datagrid id="grd_chngroomlist" nodeset="/root/main/chngroominfo/chngroomlist" class="datagrid2" caption="등록번호^성명^S/A^FROM^TO^진료과^주치의^진단코드^진단명^재원기간^입원일자^수술일자^퇴원&#xA;통보^보험유형" colsep="^" colwidth="63, 70, 45, 87, 87, 50, 80, 70, 350, 64, 84, 87, 37, 118" dataheight="25" defaultrows="0" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="32" rowsep="|" tooltip="true" style="left:816px; top:414px; width:375px; height:321px; ">
  320. <col ref="pid"/>
  321. <col ref="name"/>
  322. <col ref="sa"/>
  323. <col ref="roomcd"/>
  324. <col ref="chngroomcd"/>
  325. <col ref="orddeptcd"/>
  326. <col ref="orddr"/>
  327. <col ref="diagcd" visibility="hidden"/>
  328. <col ref="diagnm"/>
  329. <col ref="inhospterm"/>
  330. <col ref="indd" format="yyyy-mm-dd"/>
  331. <col ref="opdd" format="yyyy-mm-dd"/>
  332. <col ref="dschnotiyn" style="text-align:center; "/>
  333. <col disabled="true" ref="insukind" type="combo">
  334. <choices>
  335. <itemset nodeset="/root/init/insukind/P0008">
  336. <label ref="cdnm"/>
  337. <value ref="cdid"/>
  338. </itemset>
  339. </choices>
  340. </col>
  341. <script type="javascript" ev:event="onaftersort">
  342. <![CDATA[
  343. grd_chngroomlist.gridToInstance();
  344. ]]>
  345. </script>
  346. </datagrid>
  347. <button id="btn_excel" class="btn2_letter2" style="left:1148px; top:49px; width:42px; height:19px; ">
  348. <caption>엑셀</caption>
  349. <script type="javascript" ev:event="DOMActivate">
  350. <![CDATA[
  351. var fileName = window.fileDialog("save", "", false, "CMC_Excel", "xls", "Excel File(*.xls)|*.xls");
  352. if( fileName == "" )
  353. return;
  354. // excel application 실행함
  355. tfexcel.launchnewinstance(0);
  356. //실행된 excel application에서 새로운 workbook을 생성
  357. tfexcel.createworkbook();
  358. var sheetArray = new Array("grd_inhosppatlist|재원환자", "grd_ipatlist|입원환자", "grd_dschpatlist|퇴원환자", "grd_inrmlist|입실", "grd_dschpatlist|전실");
  359. var sheetArrayLen = sheetArray.length;
  360. var gridId;
  361. var gridObj;
  362. var sheetName;
  363. var nResult;
  364. for( var i = 0; i < sheetArrayLen; i++ ) {
  365. gridId = sheetArray[i].split("|")[0];
  366. gridObj = document.all.item(gridId);
  367. sheetName = sheetArray[i].split("|")[1];
  368. if( i > 1 ) {
  369. nResult = tfexcel.activatesheet(i+1);
  370. tfexcel.sheetname(i+1) = sheetName;
  371. }
  372. else {
  373. nResult = tfexcel.addsheet(i+1, sheetName);
  374. }
  375. if( nResult < 0 ) {
  376. messageBox(sheetName + " 저장을", "E009");
  377. // alert(sheetName + " 오류발생");
  378. return;
  379. }
  380. gridObj.saveText("C:\\Temp\\tmp_TFExcel.csv", "\n", ",", '\:', true);
  381. tfexcel.loadCSV("C:\\Temp\\tmp_TFExcel.csv");
  382. }
  383. //workbook을 저장.
  384. tfexcel.save(fileName);
  385. //excel application을 종료. excel application 생성 후 반드시 close해야함.
  386. tfexcel.close();
  387. // CSV File 삭제
  388. var fso = new ActiveXObject("Scripting.FileSystemObject");
  389. fso.DeleteFile("C:\\Temp\\tmp_TFExcel.csv");
  390. var rmsg = messageBox("저장된 Excel을", "Q004");
  391. if( rmsg == 6 )
  392. window.exec("excel.exe", '\"' + fileName + '\"');
  393. ]]>
  394. </script>
  395. </button>
  396. </group>
  397. <object id="tfexcel" clsid="{fe8d1001-6a9d-424d-ae2a-301493bb12da}" visibility="hidden" style="left:860px; top:30px; width:210px; height:25px; "/>
  398. </xhtml:body>
  399. </xhtml:html>