SPPID30000_유형변경대상자관리.xrw 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * @(#)SPPID28000_유형변경대상자관리.xrw
  4. * 수정이력
  5. * - 2013.01.19 / 최초작성 / 이경민
  6. -->
  7. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  8. <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">
  9. <xhtml:head>
  10. <xhtml:title>유형변경대상자관리</xhtml:title>
  11. <model id="model1">
  12. <instance id="instance1">
  13. <root xmlns="">
  14. <main>
  15. <drgclist>
  16. <drgc/>
  17. </drgclist>
  18. </main>
  19. <send>
  20. <cnstcdlist/>
  21. <pid/>
  22. <orddeptcd/>
  23. <instcd>031</instcd>
  24. <orddd/>
  25. </send>
  26. <init>
  27. <PAM>
  28. <PK110list/>
  29. </PAM>
  30. <COM>
  31. <P0008list/>
  32. <P0010list/>
  33. </COM>
  34. </init>
  35. <hidden>
  36. <popupmenu>
  37. <clcj>
  38. <item>
  39. <name>행 추가</name>
  40. <func>fSpclGridInsertRow</func>
  41. </item>
  42. <item>
  43. <name>-</name>
  44. <func/>
  45. </item>
  46. <item>
  47. <name>행 삭제</name>
  48. <func>fSpclGridDeleteRow</func>
  49. </item>
  50. </clcj>
  51. </popupmenu>
  52. </hidden>
  53. </root>
  54. </instance>
  55. <script type="javascript" ev:event="xforms-ready">
  56. <![CDATA[
  57. // 화면을 초기화한다.
  58. fInitialize();
  59. ]]>
  60. </script>
  61. <submission id="TRPAM00105" mediatype="application/x-www-form-urlencoded" method="post"/>
  62. <submission id="TRPID30000" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main"/>
  63. <submission id="TXPID30000" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main"/>
  64. <submission id="TRPIJ00203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/tmp"/>
  65. </model>
  66. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  67. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  68. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  69. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  70. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  71. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  72. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM001.js"/>
  73. <script type="javascript">
  74. <![CDATA[
  75. var gToday = new Date();
  76. var gBaseyear = gToday.getDateFormat("YYYY"); // (dateHelper.js)에서 제공하는 함수를 사용하여 해당 년를 구한다.
  77. var gBasemonth = gToday.getDateFormat("MM");
  78. var gBaseday = gToday.getDateFormat("DD");
  79. var gCurrentdd = gBaseyear + gBasemonth + gBaseday;
  80. var gCurrentym = gBaseyear + gBasemonth;
  81. // -----------------------
  82. // ▶ 화면초기화
  83. // -----------------------
  84. function fInitialize() {
  85. // 2013.02.19 - 부가코드 원무공통코드조회
  86. pamfGetCodeList(new Array(
  87. "PK110"
  88. ),
  89. new Array("/root/init/PAM/PK110list"
  90. ));
  91. zbcfGetCodeList(new Array("P0008","P0010") , new Array("/root/init/COM/P0008list" , "/root/init/COM/P0010list" ));
  92. //addComboItem("combo1", "-전체-", "", "above");
  93. //addComboItem("combo2", "-전체-", "", "above");
  94. submit("TRPIJ00203", false);
  95. fSetInit();
  96. }
  97. function fSetInit(){
  98. button1.disabled = !checkAuth("X") ;
  99. button3.disabled = !checkAuth("X") ;
  100. if (checkOpener()) {
  101. var vpid = opener.javascript.getParameter("sppid30000_pid");
  102. var vorddeptcd = opener.javascript.getParameter("sppid30000_orddeptcd");
  103. var vorddd = opener.javascript.getParameter("sppid30000_orddd");
  104. if(vpid != null) {
  105. model.setValue("/root/send/pid", vpid);
  106. model.setValue("/root/send/orddeptcd", vorddeptcd);
  107. model.setValue("/root/send/orddd", vorddd);
  108. }
  109. }
  110. fGetDocuList();
  111. }
  112. // ----------------------------------------------------------------------
  113. // ▶ 동일진료일 명세서조회
  114. // ----------------------------------------------------------------------
  115. function fGetDocuList() {
  116. var chk = true;
  117. // if (model.getValue("/root/send/orddd") == "") {
  118. // chk = false;
  119. // messageBox("기준년월은", "I003"); //I003=필수입력입니다.
  120. // model.setFocus("ipt_orddd");
  121. // }
  122. if (chk == true) {
  123. submit("TRPID30000");
  124. for (var i=grd_drgclist.fixedRows; i < grd_drgclist.rows; i++) {
  125. if (grd_drgclist.valueMatrix(i,grd_drgclist.colRef("einsukind")) == "") {
  126. grd_drgclist.rowStatus(i) = 1;
  127. }
  128. }
  129. }
  130. }
  131. // 화면을 초기화한다.
  132. function fSpclGridInsertRow(){
  133. grd_drgclist.AddRow();
  134. grd_drgclist.bottomRow = grd_drgclist.rows;
  135. }
  136. function fSpclGridDeleteRow(){
  137. for (var i = 0; i < grd_drgclist.selectedRows; i++) {
  138. var sel = grd_drgclist.selectedRow(i);
  139. grd_drgclist.rowstatus(sel) = "4";
  140. }
  141. }
  142. ]]>
  143. </script>
  144. </xhtml:head>
  145. <xhtml:body pagewidth="1200" pageheight="660" guideline="1,1043;2,727;2,739;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  146. <group id="grp_tle" style="left:0px; top:0px; width:1180px; height:13px; ">
  147. <caption id="cap_title" class="tit_1" style="left:0px; top:0px; width:216px; height:15px; ">유형변경대상자관리</caption>
  148. </group>
  149. <group id="grp_biz" scroll="auto" style="left:0px; top:28px; width:1181px; height:592px; ">
  150. <datagrid id="grd_drgclist" nodeset="/root/main/cnstcdlist/cnstcd" class="datagrid3" caption="환자번호^환자명^진료과^진료일자^실시일자^현재유형^현재유형^정산요청유형^정산요청유형^수납유형^수납유형^중증기간^산정특례기간^비고^등록자^등록일자^수정자^수정일자|환자번호^환자명^진료과^진료일자^실시일자^보험유형^보조유형^보험유형^보조유형^보험유형^보조유형^중증기간^산정특례기간^비고^등록자^등록일자^수정자^수정일자" colsep="^" colwidth="59, 73, 85, 85, 85, 70, 64, 71, 65, 70, 64, 167, 156, 219, 60, 100, 60, 100" dataheight="23" ellipsis="true" extendlastcol="scroll" mergecellsfixedcols="bycol" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="32" rowsep="|" tooltip="true" style="left:0px; top:77px; width:1180px; height:514px; ">
  151. <col autonext="true" disabled="true" ref="pid" type="input" maxlength="12" style="text-align:center; "/>
  152. <col autonext="true" disabled="true" ref="patnm" type="output" maxlength="2" style="text-align:center; "/>
  153. <col autonext="true" disabled="true" ref="orddeptcd" type="combo" maxlength="2" style="text-align:left; ">
  154. <choices>
  155. <itemset nodeset="/root/hidden/list1/deptlist">
  156. <label ref="depthngnm"/>
  157. <value ref="deptcd"/>
  158. </itemset>
  159. </choices>
  160. </col>
  161. <col autonext="true" disabled="true" ref="orddd" type="inputdate" format="yyyy-mm-dd" maxlength="8" style="text-align:center; "/>
  162. <col autonext="true" disabled="true" ref="execdd" type="inputdate" format="yyyy-mm-dd" maxlength="8" style="text-align:center; "/>
  163. <col disabled="true" ref="sinsukind" type="combo">
  164. <choices>
  165. <itemset nodeset="/root/init/COM/P0008list/P0008">
  166. <label ref="cdnm"/>
  167. <value ref="cdid"/>
  168. </itemset>
  169. </choices>
  170. </col>
  171. <col disabled="true" ref="ssuppkind" type="combo">
  172. <choices>
  173. <itemset nodeset="/root/init/COM/P0010list/P0010">
  174. <label ref="cdnm"/>
  175. <value ref="cdid"/>
  176. </itemset>
  177. </choices>
  178. </col>
  179. <col ref="einsukind" type="combo">
  180. <choices>
  181. <itemset nodeset="/root/init/COM/P0008list/P0008">
  182. <label ref="cdnm"/>
  183. <value ref="cdid"/>
  184. </itemset>
  185. </choices>
  186. </col>
  187. <col ref="esuppkind" type="combo">
  188. <choices>
  189. <itemset nodeset="/root/init/COM/P0010list/P0010">
  190. <label ref="cdnm"/>
  191. <value ref="cdid"/>
  192. </itemset>
  193. </choices>
  194. </col>
  195. <col ref="cinsukind" type="combo">
  196. <choices>
  197. <itemset nodeset="/root/init/COM/P0008list/P0008">
  198. <label ref="cdnm"/>
  199. <value ref="cdid"/>
  200. </itemset>
  201. </choices>
  202. </col>
  203. <col ref="csuppkind" type="combo">
  204. <choices>
  205. <itemset nodeset="/root/init/COM/P0010list/P0010">
  206. <label ref="cdnm"/>
  207. <value ref="cdid"/>
  208. </itemset>
  209. </choices>
  210. </col>
  211. <col ref="serdiagno"/>
  212. <col ref="rareobstno"/>
  213. <col ref="rem" type="input"/>
  214. <col ref="fstrgstrid" type="output" visibility="hidden" style="text-align:center; "/>
  215. <col ref="fstrgstdt" type="output" visibility="hidden" format="yyyy-mm-dd hh:nn"/>
  216. <col ref="lastupdtrid" visibility="hidden" style="text-align:center; "/>
  217. <col ref="lastupdtdt" visibility="hidden" format="yyyy-mm-dd hh:nn"/>
  218. <script type="javascript" ev:event="onmousedown">
  219. <![CDATA[
  220. if (event.button == 3) { // 3 : 오른쪽 버튼
  221. if (grd_drgclist.isCell(event.target) && grd_drgclist.mouseRow >= grd_drgclist.fixedrows) {
  222. window.setPopupMenu(true, "/root/hidden/popupmenu/clcj/item", "name", "func", false);
  223. } else {
  224. window.showPopupMenu(true);
  225. window.setPopupMenu(true, "/root/hidden/popupmenu/clcj/item", "name", "func", false);
  226. }
  227. }
  228. ]]>
  229. </script>
  230. <script type="javascript" ev:event="DOMFocusOut">
  231. <![CDATA[
  232. window.setPopupMenu(false);
  233. ]]>
  234. </script>
  235. </datagrid>
  236. <caption id="cap_judgtrgtman" class="tit_2" style="left:4px; top:56px; width:234px; height:15px; ">요양기관별가산율 리스트</caption>
  237. <line id="line1" class="line_1" style="x1:0px; y1:72px; x2:1180px; y2:72px; "/>
  238. <group id="group1" style="left:0px; top:5px; width:1180px; height:40px; vertical-align:top; ">
  239. <shape id="roundrect3" appearance="roundrect" style="left:0px; top:0px; width:1180px; height:40px; "/>
  240. <button id="btn_select" class="btn1_letter2" navindex="32" style="left:1095px; top:10px; width:56px; height:22px; ">
  241. <caption>조회</caption>
  242. <script type="javascript" ev:event="DOMActivate">
  243. <![CDATA[
  244. fGetDocuList();
  245. ]]>
  246. </script>
  247. </button>
  248. <line id="line3" class="line_4" style="x1:1080px; y1:5px; x2:1080px; y2:38px; "/>
  249. <caption id="caption30" class="search_name" style="left:8px; top:11px; width:95px; height:17px; ">환자번호 :</caption>
  250. <caption id="caption1" class="search_name" style="left:213px; top:11px; width:95px; height:17px; ">진료일자 :</caption>
  251. <caption id="caption2" class="search_name" style="left:445px; top:13px; width:95px; height:17px; ">진료과:</caption>
  252. <input id="input1" ref="/root/send/pid" style="left:95px; top:13px; width:100px; height:19px; "/>
  253. <input id="input2" ref="/root/send/orddd" inputtype="date" format="yyyy-mm-dd" style="left:300px; top:12px; width:100px; height:19px; "/>
  254. <select1 id="combo1" ref="/root/send/orddeptcd" appearance="minimal" style="left:519px; top:14px; width:100px; height:19px; ">
  255. <choices>
  256. <itemset nodeset="/root/hidden/list1/deptlist">
  257. <label ref="depthngnm"/>
  258. <value ref="deptcd"/>
  259. </itemset>
  260. </choices>
  261. </select1>
  262. </group>
  263. <button id="btn_excelsave" class="btn2_letter4" _auth="P" style="left:775px; top:52px; width:64px; height:19px; ">
  264. <caption>엑셀저장</caption>
  265. <script type="javascript" ev:event="DOMActivate">
  266. <![CDATA[
  267. grd_drgclist.gridToInstance();
  268. if (grd_drgclist.rows > 1) {
  269. var fileName = window.fileDialog("save", "", false, cap_title.value, "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  270. if (fileName != "") {
  271. grd_drgclist.saveExcel(fileName, "sheetname:;colhiddenextend:true;rowhiddenextend:false;col_3:label;col_4:label;col_5:label;col_6:label;", true, true, "", "", true);
  272. }
  273. } else {
  274. messageBox("엑셀저장할 내역이", "I004"); ///엑셀저장할 내역이 없습니다.
  275. }
  276. ]]>
  277. </script>
  278. </button>
  279. <button id="button1" class="btn5_letter2" _auth="X" style="left:1137px; top:52px; width:42px; height:19px; ">
  280. <caption>저장</caption>
  281. <script type="javascript" ev:event="DOMActivate">
  282. <![CDATA[
  283. var updtdata = getGridUpdateData(grd_drgclist);
  284. if (updtdata == "") {
  285. messageBox("변경된 데이터가","I004");
  286. return;
  287. }
  288. for (var i=1; i < grd_drgclist.rows; i++){
  289. if ((grd_drgclist.rowStatus(i) == 1 || grd_drgclist.rowStatus(i) == 2 || grd_drgclist.rowStatus(i) == 3) &&
  290. (grd_drgclist.valueMatrix(i,grd_drgclist.colRef("pid")).length == 0
  291. || grd_drgclist.valueMatrix(i,grd_drgclist.colRef("orddeptcd")).length ==0
  292. || grd_drgclist.valueMatrix(i,grd_drgclist.colRef("orddd")).length ==0
  293. || grd_drgclist.valueMatrix(i,grd_drgclist.colRef("execdd")).length ==0
  294. || grd_drgclist.valueMatrix(i,grd_drgclist.colRef("sinsukind")).length ==0
  295. || grd_drgclist.valueMatrix(i,grd_drgclist.colRef("ssuppkind")).length ==0
  296. || grd_drgclist.valueMatrix(i,grd_drgclist.colRef("einsukind")).length ==0
  297. || grd_drgclist.valueMatrix(i,grd_drgclist.colRef("esuppkind")).length ==0))
  298. {
  299. var errmsg = "";
  300. if (grd_drgclist.valueMatrix(i,grd_drgclist.colRef("esuppkind")).length ==0)
  301. {
  302. errmsg = grd_drgclist.labelMatrix(0,grd_drgclist.colRef("esuppkind"));
  303. }
  304. if (grd_drgclist.valueMatrix(i,grd_drgclist.colRef("einsukind")).length ==0)
  305. {
  306. errmsg = grd_drgclist.labelMatrix(0,grd_drgclist.colRef("einsukind"));
  307. }
  308. if (grd_drgclist.valueMatrix(i,grd_drgclist.colRef("ssuppkind")).length ==0)
  309. {
  310. errmsg = grd_drgclist.labelMatrix(0,grd_drgclist.colRef("ssuppkind"));
  311. }
  312. if (grd_drgclist.valueMatrix(i,grd_drgclist.colRef("sinsukind")).length == 0 )
  313. {
  314. errmsg = grd_drgclist.labelMatrix(0,grd_drgclist.colRef("sinsukind"));
  315. }
  316. if (grd_drgclist.valueMatrix(i,grd_drgclist.colRef("execdd")).length ==0)
  317. {
  318. errmsg = grd_drgclist.labelMatrix(0,grd_drgclist.colRef("execdd"));
  319. }
  320. if (grd_drgclist.valueMatrix(i,grd_drgclist.colRef("orddd")).length ==0)
  321. {
  322. errmsg = grd_drgclist.labelMatrix(0,grd_drgclist.colRef("orddd"));
  323. }
  324. if (grd_drgclist.valueMatrix(i,grd_drgclist.colRef("orddeptcd")).length ==0)
  325. {
  326. errmsg = grd_drgclist.labelMatrix(0,grd_drgclist.colRef("orddeptcd"));
  327. }
  328. if (grd_drgclist.valueMatrix(i,grd_drgclist.colRef("pid")).length ==0)
  329. {
  330. errmsg = grd_drgclist.labelMatrix(0,grd_drgclist.colRef("pid"));
  331. }
  332. messageBox(errmsg.split("\n").join("") +"는","I003");
  333. return false;
  334. }
  335. }
  336. if (messageBox("저장", "S001") == 6) {
  337. model.setValue("/root/send/cnstcdlist",grd_drgclist.getUpdateData());
  338. if ( submit("TXPID30000") ) {
  339. messageBox("저장이","I002");
  340. }
  341. }
  342. ]]>
  343. </script>
  344. </button>
  345. <button id="button2" class="btn2_letter3" visibility="hidden" _auth="X" style="left:1029px; top:52px; width:53px; height:19px; ">
  346. <caption>행종료</caption>
  347. <script type="javascript" ev:event="DOMActivate">
  348. <![CDATA[
  349. fSpclGridDeleteRow();
  350. ]]>
  351. </script>
  352. </button>
  353. <button id="button3" class="btn2_letter3" _auth="X" style="left:1083px; top:52px; width:53px; height:19px; ">
  354. <caption>행추가</caption>
  355. <script type="javascript" ev:event="DOMActivate">
  356. <![CDATA[
  357. fSpclGridInsertRow();
  358. ]]>
  359. </script>
  360. </button>
  361. </group>
  362. <button id="btn_cancel" class="btn4_letter2" style="left:1125px; top:621px; width:56px; height:22px; ">
  363. <caption>종료</caption>
  364. <close ev:event="DOMActivate"/>
  365. </button>
  366. </xhtml:body>
  367. </xhtml:html>