SMPMC05400_미숙아사산사태신고조회.xrw 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  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. <data1>
  11. <refcond>0</refcond>
  12. <cond_fromdd/>
  13. <cond_todd/>
  14. </data1>
  15. </send>
  16. <main>
  17. <immaturelist>
  18. <list/>
  19. </immaturelist>
  20. <stillbornlist>
  21. <list/>
  22. </stillbornlist>
  23. </main>
  24. <init>
  25. </init>
  26. <hidden>
  27. <allchk/>
  28. <allchk2/>
  29. <print>
  30. <immature/>
  31. <stillborn/>
  32. </print>
  33. </hidden>
  34. </root>
  35. </instance>
  36. <submission id="TRPMC05401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data1" resultref="/root/main/immaturelist"/>
  37. <submission id="TRPMC05402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data1" resultref="/root/main/sillbornlist"/>
  38. <script type="javascript" ev:event="xforms-ready">
  39. <![CDATA[
  40. makeReportPreview(0, 0, 10, 10, "grp_report");
  41. fInitialize();
  42. model.refresh();
  43. ]]>
  44. </script>
  45. </model>
  46. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  47. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  48. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  49. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  50. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  51. <script type="javascript">
  52. <![CDATA[
  53. function fInitialize() {
  54. //model.resetInstanceNode("/root/main/immaturelist");
  55. //model.resetInstanceNode("/root/main/stillbornlist");
  56. model.removeNodeset("/root/main/immaturelist");
  57. model.removeNodeset("/root/main/stillbornlist");
  58. model.resetInstanceNode("/root/send");
  59. model.setValue("/root/send/data1/refcond","0");
  60. model.setValue("/root/send/data1/cond_fromdd", getCurrentDate());
  61. model.setValue("/root/send/data1/cond_todd", getCurrentDate());
  62. fSelectRefItem();
  63. model.refresh();
  64. }
  65. function fSelectRefItem()
  66. {
  67. // 0. 미숙아신고 1. 사산, 사태신고
  68. var sRefCond = model.getValue("/root/send/data1/refcond");
  69. //model.resetInstanceNode("/root/main/immaturelist");
  70. //model.removeNodeset("/root/main/immaturelist");
  71. //model.removeNodeset("/root/main/stillbornlist");
  72. // 항목 선택에 따른 그리드 스위칭...
  73. // 미숙아
  74. if (sRefCond == "0") {
  75. model.toggle("case1");
  76. }
  77. // 사산, 사태
  78. if (sRefCond == "1") {
  79. model.toggle("case2");
  80. }
  81. model.refresh();
  82. }
  83. // 조회조건에 따른 값 체크
  84. function fCheckRefCondition() {
  85. // 1. 전체 2.환자번호 4.진료과 5.병동
  86. var sRefCond = model.getValue("/root/send/data1/refcond");
  87. var sCondFromdd = model.getValue("/root/send/data1/cond_fromdd");
  88. var sCondTodd = model.getValue("/root/send/data1/cond_todd");
  89. var bResult = false;
  90. // 조회날짜 체크
  91. if (isNull(sCondFromdd) || isNull(sCondTodd)) {
  92. bResult = false;
  93. messageBox("조회 시작일자 또는 종료일자를 확인하십시오!!", "I");
  94. } else {
  95. bResult = true;
  96. }
  97. return bResult;
  98. }
  99. function fPrint() {
  100. var sRefCond = model.getValue("/root/send/data1/refcond");
  101. // 미숙아신고서
  102. if (sRefCond == "0") {
  103. var iRows = grd_immature.rows;
  104. if (iRows >= 1) {
  105. for (var idx = 1 ; idx < iRows ; idx++) {
  106. var bIsChecked = model.getValue("/root/main/immaturelist/list[" + idx + "]/chkflag");
  107. if (bIsChecked == "Y") {
  108. //alert(idx);
  109. model.copyNode("/root/hidden/print/immature", "/root/main/immaturelist/list[" + idx + "]");
  110. model.makeValue("/root/hidden/print/immature/year", getCurrentDate().substr(0, 4));
  111. model.makeValue("/root/hidden/print/immature/month", getCurrentDate().substr(4, 2));
  112. model.makeValue("/root/hidden/print/immature/day", getCurrentDate().substr(6, 2));
  113. exeReportPreview("RPPMC05403", "XMLSTR" , "", "", "true", "", "", "", "", "true", "", ""); //grp_report
  114. //exeReportPreview("RPPMC05401", "XMLSTR" , "", "", "true", "", "", "", "", "true", "", ""); //grp_report
  115. model.resetInstanceNode("/root/hidden/print/immature");
  116. }
  117. }
  118. } else {
  119. messageBox("출력할 내용이 없습니다!!", "I");
  120. }
  121. }
  122. // 사산보고서
  123. if (sRefCond == "1") {
  124. var iRows = grd_stillborn.rows;
  125. if (iRows >= 1) {
  126. for (var idx = 1 ; idx < iRows ; idx++) {
  127. var bIsChecked = model.getValue("/root/main/stillbornlist/list[" + idx + "]/chkflag");
  128. if (bIsChecked == "Y") {
  129. //alert(idx);
  130. model.copyNode("/root/hidden/print/stillborn", "/root/main/stillbornlist/list[" + idx + "]");
  131. model.makeValue("/root/hidden/print/stillborn/year", getCurrentDate().substr(0, 4));
  132. model.makeValue("/root/hidden/print/stillborn/month", getCurrentDate().substr(4, 2));
  133. model.makeValue("/root/hidden/print/stillborn/day", getCurrentDate().substr(6, 2));
  134. exeReportPreview("RPPMC05402", "XMLSTR" , "", "", "true", "", "", "", "", "true", "", ""); //grp_report
  135. model.resetInstanceNode("/root/hidden/print/stillborn");
  136. }
  137. }
  138. } else {
  139. messageBox("출력할 내용이 없습니다!!", "I");
  140. }
  141. }
  142. }
  143. ]]>
  144. </script>
  145. </xhtml:head>
  146. <xhtml:body guideline="1,1193;1,1195;2,52;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  147. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  148. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:200px; height:14px; ">미숙아/사산/사태신고조회</caption>
  149. </group>
  150. <group id="group3" style="left:0px; top:13px; width:1195px; height:744px; ">
  151. <group id="group2" style="left:0px; top:10px; width:1194px; height:35px; ">
  152. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  153. <line id="line2" class="line_4" style="x1:1108px; y1:7px; x2:1108px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  154. <caption id="caption17" class="search_name" style="left:5px; top:8px; width:86px; height:17px; ">조회조건 :</caption>
  155. <button id="btn_ref" class="btn1_letter2" navindex="4" style="left:1123px; top:7px; width:56px; height:22px; ">
  156. <caption>조회</caption>
  157. <script type="javascript" ev:event="DOMActivate">
  158. <![CDATA[
  159. // 조회 구분별로 체크 로직 추가....
  160. var bOK = fCheckRefCondition();
  161. var sRefCond = model.getValue("/root/send/data1/refcond");
  162. if (bOK == true) {
  163. // 미숙아
  164. if (sRefCond == "0") {
  165. model.removeNodeset("/root/main/immaturelist");
  166. submit("TRPMC05401");
  167. var iCount = getNodesetCount("/root/main/immaturelist/list");
  168. if (iCount == 0) {
  169. messageBox("조회 결과가 없습니다.", "I");
  170. }
  171. }
  172. // 사산, 사태
  173. if (sRefCond == "1") {
  174. model.removeNodeset("/root/main/stillbornlist");
  175. submit("TRPMC05402");
  176. var iCount = getNodesetCount("/root/main/stillbornlist/list");
  177. if (iCount == 0) {
  178. messageBox("조회 결과가 없습니다.", "I");
  179. }
  180. }
  181. }
  182. ]]>
  183. </script>
  184. </button>
  185. <select1 id="cmb_cond" ref="/root/send/data1/refcond" navindex="1" appearance="minimal" style="left:95px; top:7px; width:110px; height:19px; ">
  186. <choices>
  187. <item>
  188. <label>미숙아신고</label>
  189. <value>0</value>
  190. </item>
  191. <item>
  192. <label>사산/사태신고</label>
  193. <value>1</value>
  194. </item>
  195. </choices>
  196. <script type="javascript" ev:event="xforms-select">
  197. <![CDATA[
  198. fSelectRefItem();
  199. ]]>
  200. </script>
  201. </select1>
  202. <input id="ipt_fromdd" ref="/root/send/data1/cond_fromdd" navindex="2" inputtype="date" style="left:311px; top:7px; width:100px; height:19px; "/>
  203. <caption id="caption1" class="search_name" style="left:220px; top:8px; width:86px; height:17px; ">조회기간 :</caption>
  204. <input id="ipt_todd" ref="/root/send/data1/cond_todd" navindex="3" inputtype="date" style="left:436px; top:7px; width:100px; height:19px; "/>
  205. <caption id="caption3" style="left:418px; top:7px; width:15px; height:20px; ">~</caption>
  206. </group>
  207. <caption id="caption2" class="tit_2" style="left:5px; top:55px; width:300px; height:14px; font-family:돋움; vertical-align:middle; ">조회 목록</caption>
  208. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:70px; "/>
  209. <group id="grp_report" visibility="hidden" style="left:865px; top:50px; width:65px; height:15px; "/>
  210. <button id="btn_print" class="btn2_letter2" navindex="5" visibility="visible" style="left:1085px; top:50px; width:42px; height:19px; ">
  211. <caption>출력</caption>
  212. <script type="javascript" ev:event="DOMActivate">
  213. <![CDATA[
  214. fPrint();
  215. ]]>
  216. </script>
  217. </button>
  218. <button id="btn_excel" class="btn2_letter4" navindex="6" style="left:1130px; top:50px; width:64px; height:19px; ">
  219. <caption>엑셀저장</caption>
  220. <script type="javascript" ev:event="DOMActivate">
  221. <![CDATA[
  222. var sRefCond = model.getValue("/root/send/data1/refcond");
  223. var fileName = window.fileDialog("save", ",", false, getCurrentDate(), "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  224. if (fileName != "")
  225. {
  226. if (sRefCond == "0") {
  227. grd_immature.saveExcel(fileName, "SheetName", true, true, "", "", false);
  228. }
  229. if (sRefCond == "1") {
  230. grd_stillborn.saveExcel(fileName, "SheetName", true, true, "", "", false);
  231. }
  232. }
  233. ]]>
  234. </script>
  235. </button>
  236. <switch id="switch1" style="left:1px; top:75px; width:1192px; height:665px; ">
  237. <case id="case1" selected="true" style="left:0px; top:0px; width:1190px; height:663px; ">
  238. <datagrid id="grd_immature" nodeset="/root/main/immaturelist/list" class="datagrid2" caption="^환자번호^산모성명^아기성명^산모주민번호^배우자성명^주소^전화번호^분만기관명^분만일자^체중^체중^임신기간^임신기간^임신기간" colsep="^" colwidth="18, 80, 80, 80, 100, 70, 300, 90, 100, 80, 50, 15, 40, 20, 20" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:0px; width:1190px; height:663px; ">
  239. <col checkvalue="Y,N" ref="chkflag" type="checkbox"/>
  240. <col ref="pid"/>
  241. <col ref="patnm"/>
  242. <col ref="babynm"/>
  243. <col ref="rrgstno" format="999999-9999999" style="text-align:center; "/>
  244. <col ref="partnernm"/>
  245. <col ref="addr"/>
  246. <col ref="tel"/>
  247. <col ref="bthplcenm"/>
  248. <col ref="bthdt"/>
  249. <col ref="weig" style="text-align:right; "/>
  250. <col ref="weigunit" style="text-align:center; "/>
  251. <col ref="prgweekcnt" style="text-align:right; "/>
  252. <col ref="termunit" style="text-align:center; "/>
  253. <col ref="prgadddaycnt" style="text-align:right; "/>
  254. </datagrid>
  255. <bool id="bool1" checkvalue="Y,N" ref="/root/hidden/allchk" style="left:20px; top:5px; width:20px; height:20px; ">
  256. <script type="javascript" ev:event="xforms-select">
  257. <![CDATA[
  258. var iRows = grd_immature.rows;
  259. if (iRows >= 1) {
  260. for (var idx = 1 ; idx < iRows ; idx++) {
  261. model.setValue("/root/main/immaturelist/list[" + idx + "]/chkflag", "Y");
  262. }
  263. grd_immature.refresh();
  264. }
  265. ]]>
  266. </script>
  267. <script type="javascript" ev:event="xforms-deselect">
  268. <![CDATA[
  269. var iRows = grd_immature.rows;
  270. if (iRows >= 1) {
  271. for (var idx = 1 ; idx < iRows ; idx++) {
  272. model.setValue("/root/main/immaturelist/list[" + idx + "]/chkflag", "N");
  273. }
  274. grd_immature.refresh();
  275. }
  276. ]]>
  277. </script>
  278. </bool>
  279. </case>
  280. <case id="case2">
  281. <datagrid id="grd_stillborn" nodeset="/root/main/stillbornlist/list" class="datagrid2" caption="^환자번호^성명^주민번호^주소^사망일자^임신기간^임신기간^임신기간^발생장소^원인" colsep="^" colwidth="18, 80, 80, 100, 300, 80, 40, 20, 20, 100, 200" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:0px; width:1190px; height:663px; ">
  282. <col checkvalue="Y,N" ref="chkflag" type="checkbox"/>
  283. <col ref="pid"/>
  284. <col ref="hngnm"/>
  285. <col ref="rrgstno" format="999999-9999999" style="text-align:center; "/>
  286. <col ref="addr"/>
  287. <col ref="deathdd" format="yyyy-mm-dd" style="left:0px; top:0px; width:0px; height:0px; text-align:center; "/>
  288. <col ref="prgweekcnt" style="text-align:right; "/>
  289. <col ref="termunit" style="text-align:center; "/>
  290. <col ref="prgadddaycnt" style="text-align:right; "/>
  291. <col disabled="true" ref="occurplce" type="combo">
  292. <choices>
  293. <item>
  294. <label>의료기관</label>
  295. <value>Y</value>
  296. </item>
  297. <item>
  298. <label>기타</label>
  299. <value>N</value>
  300. </item>
  301. </choices>
  302. </col>
  303. <col ref="reason"/>
  304. </datagrid>
  305. <bool id="bool2" checkvalue="Y,N" ref="/root/hidden/allchk2" style="left:20px; top:5px; width:20px; height:20px; ">
  306. <script type="javascript" ev:event="xforms-select">
  307. <![CDATA[
  308. var iRows = grd_stillborn.rows;
  309. if (iRows >= 1) {
  310. for (var idx = 1 ; idx < iRows ; idx++) {
  311. model.setValue("/root/main/stillbornlist/list[" + idx + "]/chkflag", "Y");
  312. }
  313. grd_stillborn.refresh();
  314. }
  315. ]]>
  316. </script>
  317. <script type="javascript" ev:event="xforms-deselect">
  318. <![CDATA[
  319. var iRows = grd_stillborn.rows;
  320. if (iRows >= 1) {
  321. for (var idx = 1 ; idx < iRows ; idx++) {
  322. model.setValue("/root/main/stillbornlist/list[" + idx + "]/chkflag", "N");
  323. }
  324. grd_stillborn.refresh();
  325. }
  326. ]]>
  327. </script>
  328. </bool>
  329. </case>
  330. </switch>
  331. </group>
  332. <group id="group5" style="left:0px; top:757px; width:1195px; height:27px; ">
  333. <button id="button2" class="btn4_letter3" style="left:1126px; top:5px; width:68px; height:22px; ">
  334. <caption>초기화</caption>
  335. <script type="javascript" ev:event="DOMActivate">
  336. <![CDATA[
  337. fInitialize();
  338. ]]>
  339. </script>
  340. </button>
  341. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  342. </group>
  343. </xhtml:body>
  344. </xhtml:html>