SPMMO16650_상병코드조회.xrw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * @(#)SPPIZ00400_상병코드조회.xrw
  4. * 수정이력
  5. * - 2007.05.01 / 최초작성 / 정주미
  6. * - opener 에서 전달받는 조건 경로
  7. /root/init
  8. * - opener 로 전달하는 결과값 경로
  9. opener.root.hidden.sppiz00400.rslt.diagcd
  10. opener.root.hidden.sppiz00400.rslt.diagnm
  11. * - 2007.05.10 /수정보완 / 박창원
  12. - 유형으로 검색가능하게 수정(ICD10,확장상병)
  13. -->
  14. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  15. <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">
  16. <xhtml:head>
  17. <xhtml:title>상병 코드 조회</xhtml:title>
  18. <model id="model1">
  19. <instance id="instance1">
  20. <root xmlns="">
  21. <main>
  22. <list1>
  23. <listdiag>
  24. <diagfromdd/>
  25. <diagtodd/>
  26. <diagcd/>
  27. <termcd/>
  28. <diaghngnm/>
  29. <diagengnm/>
  30. </listdiag>
  31. </list1>
  32. </main>
  33. <send>
  34. <basedd/>
  35. <diagcd/>
  36. <diagnm/>
  37. <selectedrdodiagkind/>
  38. <flag/>
  39. </send>
  40. <init>
  41. <basedd/>
  42. <diagcd/>
  43. <diagnm/>
  44. <selectedrdodiagkind/>
  45. <flag/>
  46. </init>
  47. <hidden>
  48. </hidden>
  49. </root>
  50. </instance>
  51. <script type="javascript" ev:event="xforms-ready">
  52. <![CDATA[
  53. if (checkOpener()) {
  54. fCheckOpener(); // 팝업용인 경우
  55. } else {
  56. fInitialize(); // 화면을 초기화한다.
  57. }
  58. //fCheckAuth(); // 화면 권한을 설정한다.
  59. ]]>
  60. </script>
  61. <submission id="TRPIZ00401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main"/>
  62. </model>
  63. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  64. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  65. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  66. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  67. <script type="javascript">
  68. <![CDATA[
  69. // 팝업용인 경우
  70. function fCheckOpener() {
  71. ipt_diagcd.attribute("_chartype") = "upper"; // (tfHelper.js) 대문자로 입력을 제한한다.
  72. model.copyNode("/root/send", "/root/init");
  73. model.removeNodeset("/root/main/list1/listdiag");
  74. if (model.getValue("/root/send/selectedrdodiagkind") == "3") { // 상병명이나 코드를 넘기지 않고 단순히 팝업만 호출한경우 submission 미수행
  75. model.setValue("/root/send/selectedrdodiagkind","1"); // submission을 수행하지 않기 위한 목적이기 때문에 유형을 ICD10으로 Set
  76. }
  77. model.refresh();
  78. if (checkOpener()) { // (common.js) 자신을 Open한 opener의 현재 UID가 자신을 open한 시점의 UID와 비교하여 변경되었는지 여부를 반환
  79. if (model.getValue("/root/init/diagcd") || model.getValue("/root/init/diagnm")) {
  80. submit("TRPIZ00401");
  81. }
  82. }
  83. }
  84. // 화면 권한을 설정한다.
  85. function fCheckAuth() {
  86. if (getAuth() == "") { // (common.js) 현재 화면의 권한 정보를 확인
  87. // 메뉴에서 열리는 화면이 아닌 경우 메뉴가 없는 Local Test를 위해 임시로 설정함
  88. model.setValue("/root/hidden/properties/auth", "10000000"); // R권한만 있는 경우
  89. }
  90. var xAuth = !checkAuth("X");
  91. btn_close.disabled = xAuth; // 닫기
  92. }
  93. // 화면을 초기화한다.
  94. function fInitialize() {
  95. ipt_diagcd.attribute("_chartype") = "upper"; // (tfHelper.js) 대문자로 입력을 제한한다.
  96. model.removeNodeset("/root/main/list1/listdiag");
  97. model.resetInstanceNode("/root/send");
  98. model.resetInstanceNode("/root/init");
  99. // 기본적으로 ICD10으로 초기화
  100. model.setValue("/root/send/selectedrdodiagkind","1");
  101. var today = new Date();
  102. var syear = today.getDateFormat("YYYY"); // (dateHelper.js)에서 제공하는 함수를 사용하여 해당 년를 구한다.
  103. var smonth = today.getDateFormat("MM");
  104. var sday = today.getDateFormat("DD");
  105. model.setValue("/root/send/basedd", syear + smonth + sday);
  106. model.refresh();
  107. }
  108. // // 상병명 한글 입력시 한글명 / 그외 영문명으로 검색한다.
  109. // function fCheckEngHngFlag() {
  110. // var diagnm = model.getValue("/root/send/diagnm").getTrim(); // (stringHelper.js) 문자열 앞뒤에 있는 공백 제거
  111. // var enghngflag = "eng"
  112. // for (var i=0; i < diagnm.length; i++) {
  113. // if (diagnm.charCodeAt(i) > 255) { // 한글이 들어오면 255보다 크다.
  114. // enghngflag = "hng";
  115. // }
  116. // }
  117. // model.setValue("/root/send/enghngflag", enghngflag);
  118. // model.refresh();
  119. // }
  120. // 상병코드 또는 상병명을 조건으로 상병을 조회한다.
  121. function fSearchDiag() {
  122. // 그리드 초기화
  123. model.removeNode("/root/main/list1");
  124. model.makeNode("/root/main/list1");
  125. if (model.getValue("/root/send/diagcd") || model.getValue("/root/send/diagnm")) {
  126. if (model.getValue("/root/send/selectedrdodiagkind") == "1" || model.getValue("/root/send/selectedrdodiagkind") == "2") {
  127. submit("TRPIZ00401");
  128. }
  129. else {
  130. messageBox("유형은","I003"); // 유형은 필수입력입니다.
  131. }
  132. } else {
  133. messageBox("상병코드 또는 상병명은", "I003"); ///상병코드 또는 상병명은 필수입력입니다.
  134. }
  135. // icd10이냐, 확장이냐에 따라 hidden 처리
  136. // icd10이면 확장상병코드 컬럼이 hidden
  137. // 확장이면 icd10 컬럼이 hidden
  138. var status = model.getValue("/root/send/selectedrdodiagkind");
  139. if (status == "1") {
  140. grd_diagmast.colHidden(grd_diagmast.colRef("termcd")) = true;
  141. grd_diagmast.colHidden(grd_diagmast.colRef("diagcd")) = false;
  142. } else {
  143. grd_diagmast.colHidden(grd_diagmast.colRef("diagcd")) = true;
  144. grd_diagmast.colHidden(grd_diagmast.colRef("termcd")) = false;
  145. }
  146. }
  147. ]]>
  148. </script>
  149. </xhtml:head>
  150. <xhtml:body pagewidth="1085" pageheight="552" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  151. <group id="grp_biz" overflow="scroll" scroll="auto" style="left:0px; top:0px; width:1067px; height:525px; ">
  152. <caption id="caption1" class="tit_2" style="left:5px; top:45px; width:74px; height:14px; ">상병 목록</caption>
  153. <line id="line1" class="line_1" style="x1:0px; y1:60px; x2:1066px; y2:60px; "/>
  154. <datagrid id="grd_diagmast" nodeset="/root/main/list1/listdiag" class="datagrid2" caption="시작일자^종료일자^ICD10^상병코드^영문명^한글명^특정기호" colsep="^" colwidth="61, 61, 67, 78, 330, 331, 100" dataheight="25" ellipsis="true" explorerbar="sortshowmove" mergecellsfixedcols="byrow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="32" rowsep="|" tooltip="true" style="left:0px; top:65px; width:1065px; height:460px; ">
  155. <col ref="diagfromdd" type="output" visibility="hidden" format="yyyy-mm-dd"/>
  156. <col ref="diagtodd" type="output" visibility="hidden" format="yyyy-mm-dd"/>
  157. <col ref="diagcd"/>
  158. <col ref="termcd"/>
  159. <col ref="diagengnm"/>
  160. <col ref="diaghngnm"/>
  161. <col ref="spclcd"/>
  162. <script type="javascript" ev:event="ondblclick">
  163. <![CDATA[
  164. if (grd_diagmast.isCell(event.target) && grd_diagmast.row >= grd_diagmast.fixedRows) {
  165. if (checkOpener()) { // (common.js) 자신을 Open한 opener의 현재 UID가 자신을 open한 시점의 UID와 비교하여 변경되었는지 여부를 반환
  166. var row = grd_diagmast.row;
  167. var diagcd = model.getValue("/root/main/list1/listdiag[" + row + "]/diagcd");
  168. var diaghngnm = model.getValue("/root/main/list1/listdiag[" + row + "]/diaghngnm");
  169. var diagengnm = model.getValue("/root/main/list1/listdiag[" + row + "]/diagengnm");
  170. var termcd = model.getValue("/root/main/list1/listdiag[" + row + "]/termcd");
  171. model.setValue(opener.root.hidden.sppiz00400.rslt.diagcd, diagcd);
  172. model.setValue(opener.root.hidden.sppiz00400.rslt.diaghngnm, diaghngnm);
  173. model.setValue(opener.root.hidden.sppiz00400.rslt.diagengnm, diagengnm);
  174. if (model.getValue("/root/send/flag") == "") {
  175. opener.javascript.fSetDiagCdNm();
  176. } else {
  177. model.setValue(opener.root.hidden.sppiz00400.rslt.termcd, termcd);
  178. }
  179. } else {
  180. messageBox("상위화면이 변경되어 데이터를 전달할 수", "I004"); ///상위화면이 변경되어 데이터를 전달할 수 없습니다.
  181. }
  182. window.close();
  183. }
  184. ]]>
  185. </script>
  186. </datagrid>
  187. <group id="group2" style="left:0px; top:0px; width:1065px; height:35px; vertical-align:top; ">
  188. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1065px; height:35px; "/>
  189. <caption id="caption4" class="search_name" style="left:5px; top:9px; width:86px; height:17px; ">기준일자 :</caption>
  190. <input id="ipt_basedd" ref="/root/send/basedd" class="input_search" inputtype="date" format="yyyy-mm-dd" style="left:94px; top:8px; width:85px; height:19px; "/>
  191. <caption id="caption5" class="search_name" style="left:349px; top:9px; width:86px; height:17px; ">상병코드 :</caption>
  192. <input id="ipt_diagcd" ref="/root/send/diagcd" class="input_search" imemode="disabled" _chartype="upper" style="left:438px; top:8px; width:77px; height:19px; ">
  193. <script type="javascript" ev:event="onkeypress">
  194. <![CDATA[
  195. if (event.keyCode == '13') { // Enter 입력 시에
  196. if (ipt_diagcd.currentText.length > 0) { // 1글자 이상이면
  197. setInputNodeCurText(); // (tfHelper.js) 현재 인풋값 노드 반영
  198. fSearchDiag();
  199. }
  200. }
  201. ]]>
  202. </script>
  203. </input>
  204. <caption id="caption6" class="search_name" style="left:518px; top:9px; width:73px; height:17px; ">상병명 :</caption>
  205. <input id="ipt_diagnm" ref="/root/send/diagnm" class="input_search" imemode="hangul" style="left:594px; top:8px; width:186px; height:19px; ">
  206. <script type="javascript" ev:event="onkeypress">
  207. <![CDATA[
  208. if (event.keyCode == '13') { // Enter 입력 시에
  209. if (ipt_diagnm.currentText.length > 1) { // 2글자 이상이면
  210. setInputNodeCurText(); // (tfHelper.js) 현재 인풋값 노드 반영
  211. fSearchDiag();
  212. }
  213. }
  214. ]]>
  215. </script>
  216. </input>
  217. <line id="line13" class="line_4" style="x1:990px; y1:7px; x2:990px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  218. <button id="btn_search" class="btn1_letter2" style="left:995px; top:8px; width:56px; height:22px; ">
  219. <caption>조회</caption>
  220. <script type="javascript" ev:event="DOMActivate">
  221. <![CDATA[
  222. fSearchDiag();
  223. ]]>
  224. </script>
  225. </button>
  226. <caption id="caption2" class="search_name" style="left:183px; top:9px; width:73px; height:19px; ">유형 :</caption>
  227. <select1 id="rdo_diagkind" ref="/root/send/selectedrdodiagkind" appearance="full" cellspacing="5" cols="2" overflow="visible" style="left:245px; top:10px; width:100px; height:20px; border-style:none; ">
  228. <choices>
  229. <item>
  230. <label>ICD10</label>
  231. <value>1</value>
  232. </item>
  233. <item>
  234. <label>확장</label>
  235. <value>2</value>
  236. </item>
  237. </choices>
  238. </select1>
  239. </group>
  240. </group>
  241. <group id="grp_btn" scroll="auto" style="left:0px; top:525px; width:1065px; height:27px; ">
  242. <button id="btn_close" class="btn4_letter2" style="left:1000px; top:3px; width:56px; height:22px; ">
  243. <caption>닫기</caption>
  244. <script type="javascript" ev:event="DOMActivate">
  245. <![CDATA[
  246. window.close(); // F5 실행시 IE를 종료시킨다.
  247. ]]>
  248. </script>
  249. </button>
  250. <button id="btn_init" class="btn4_letter3" style="left:929px; top:3px; width:68px; height:22px; ">
  251. <caption>초기화</caption>
  252. <script type="javascript" ev:event="DOMActivate">
  253. <![CDATA[
  254. fInitialize();
  255. ]]>
  256. </script>
  257. </button>
  258. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:851px; y2:0px; "/>
  259. </group>
  260. </xhtml:body>
  261. </xhtml:html>