SPMMO00850_상병코드조회.xrw 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  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. <between/>
  40. <fromcd/>
  41. <tocd/>
  42. </send>
  43. <init>
  44. <basedd/>
  45. <diagcd/>
  46. <diagnm/>
  47. <selectedrdodiagkind/>
  48. <flag/>
  49. <between/>
  50. </init>
  51. <hidden>
  52. </hidden>
  53. </root>
  54. </instance>
  55. <script type="javascript" ev:event="xforms-ready">
  56. <![CDATA[
  57. fInitialize();
  58. ]]>
  59. </script>
  60. <submission id="TRPIZ00401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main"/>
  61. </model>
  62. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  63. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  64. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  65. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  66. <script type="javascript">
  67. <![CDATA[
  68. // 화면을 초기화한다.
  69. function fInitialize() {
  70. opener.javascript.setParameter( "SPMMO00800_rtn", "" );
  71. opener.javascript.setParameter( "SPMMO00800_rtn_useyn", "N");
  72. var cond1 = opener.javascript.getParameter ( "SPMMO00800_cond1" ); //검색구분(1:코드, 2:명)
  73. var cond3 = opener.javascript.getParameter ( "SPMMO00800_cond3" ); //한영구분(H: 한글, E:영문)
  74. var cond5 = opener.javascript.getParameter ( "SPMMO00800_cond5" ); //검색내용
  75. ipt_diagcd.attribute("_chartype") = "upper"; // (tfHelper.js) 대문자로 입력을 제한한다.
  76. model.removeNodeset("/root/main/list1/listdiag");
  77. model.resetInstanceNode("/root/send");
  78. model.resetInstanceNode("/root/init");
  79. if (cond1 == '1') {
  80. model.setValue("/root/send/diagcd",cond5);
  81. }
  82. else {
  83. model.setValue("/root/send/diagnm",cond5);
  84. }
  85. // 기본적으로 범위검색이 아님
  86. switch1.selectedIndex = 0;
  87. // 기본적으로 ICD10으로 초기화
  88. model.setValue("/root/send/selectedrdodiagkind","1");
  89. var today = new Date();
  90. var syear = today.getDateFormat("YYYY"); // (dateHelper.js)에서 제공하는 함수를 사용하여 해당 년를 구한다.
  91. var smonth = today.getDateFormat("MM");
  92. var sday = today.getDateFormat("DD");
  93. model.setValue("/root/send/basedd", syear + smonth + sday);
  94. model.refresh();
  95. fSearchDiag();
  96. }
  97. // 상병코드 또는 상병명을 조건으로 상병을 조회한다.
  98. function fSearchDiag() {
  99. submit("TRPIZ00401");
  100. grd_diagmast.colHidden(grd_diagmast.colRef("termcd")) = true;
  101. grd_diagmast.colHidden(grd_diagmast.colRef("diagcd")) = false;
  102. }
  103. function getDiagNodeListCSV(nodeList) {
  104. if( nodeList.length == 0 ){
  105. return;
  106. }
  107. var sColSep = "▦";
  108. var sRowSep = "▩";
  109. var rCSV = "";
  110. var childNodeList = nodeList.item(0).childNodes;
  111. var childNodeCnt = childNodeList.length;
  112. if( childNodeCnt == 0 ){
  113. return;
  114. }
  115. var i, j;
  116. for( i = 0; i < childNodeCnt - 1; i++) {
  117. rCSV += childNodeList.item(i).nodeName + sColSep;
  118. }
  119. rCSV += childNodeList.item(i).nodeName + sRowSep;
  120. var node;
  121. var cnt = 1;
  122. var selCnt = 0;
  123. while( node = nodeList.nextNode() ) {
  124. if (model.getValue ( "/root/main/list1/listdiag[" + cnt++ + "]/status" ) == "I" ) {
  125. childNodeList = node.childNodes;
  126. for( i = 0; i < childNodeCnt - 1; i++) {
  127. rCSV += childNodeList.item(i).text + sColSep;
  128. }
  129. rCSV += childNodeList.item(i).text + sRowSep;
  130. selCnt++;
  131. }
  132. }
  133. if ( selCnt == 0 ) {
  134. return "N"
  135. } else {
  136. return rCSV;
  137. }
  138. }
  139. ]]>
  140. </script>
  141. </xhtml:head>
  142. <xhtml:body pagewidth="900" pageheight="570" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  143. <group id="grp_biz" overflow="scroll" scroll="auto" style="left:0px; top:0px; width:869px; height:525px; ">
  144. <line id="line1" class="line_1" style="x1:0px; y1:45px; x2:867px; y2:45px; "/>
  145. <datagrid id="grd_diagmast" nodeset="/root/main/list1/listdiag" class="datagrid2" caption="S^시작일자^종료일자^ICD10^상병코드^영문명^한글명^특정기호" colsep="^" colwidth="25, 61, 61, 67, 78, 330, 331, 100" dataheight="25" ellipsis="true" mergecellsfixedcols="byrow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="32" rowsep="|" tooltip="true" style="left:1px; top:50px; width:864px; height:475px; ">
  146. <col checkvalue="I,N" ref="status" type="checkbox"/>
  147. <col ref="diagfromdd" type="output" visibility="hidden" format="yyyy-mm-dd"/>
  148. <col ref="diagtodd" type="output" visibility="hidden" format="yyyy-mm-dd"/>
  149. <col ref="diagcd"/>
  150. <col ref="termcd" visibility="hidden"/>
  151. <col ref="diagengnm"/>
  152. <col ref="diaghngnm"/>
  153. <script type="javascript" ev:event="ondblclick">
  154. <![CDATA[
  155. if(isDataCell()){
  156. model.setValue ( "/root/main/list1/listdiag[" + grd_diagmast.row + "]/status", "I" );
  157. var rtn1 = getDiagNodeListCSV ( model.instances(0).selectNodes( "/root/main/list1/listdiag" ));
  158. opener.javascript.setParameter( "SPMMO00800_rtn", rtn1 );
  159. opener.javascript.setParameter("SPMMO00800_rtn_useyn", "Y");
  160. window.close();
  161. }
  162. ]]>
  163. </script>
  164. <script type="javascript" ev:event="onclick">
  165. <![CDATA[
  166. if ( grd_diagmast.row == 0 ) {
  167. if (grd_diagmast.col != grd_diagmast.colRef("status"))
  168. return;
  169. var status = grd_diagmast.valueMatrix( 0, grd_diagmast.colRef("status"));
  170. var setstatus = "";
  171. var currentstatus = "";
  172. var statuscd = "";
  173. if (status == "S")
  174. {
  175. setstatus = "V";
  176. statuscd = "I";
  177. }
  178. else if( status == "V")
  179. {
  180. setstatus = "S";
  181. statuscd = "N";
  182. }
  183. grd_diagmast.valueMatrix( 0, grd_diagmast.colRef("status")) = setstatus;
  184. for( i=1; i<grd_diagmast.rows; i++ )
  185. {
  186. currentstatus = grd_diagmast.valueMatrix( i, grd_diagmast.colRef("status"));
  187. grd_diagmast.valueMatrix( i, grd_diagmast.colRef("status"))= statuscd;
  188. }
  189. }
  190. ]]>
  191. </script>
  192. </datagrid>
  193. <group id="group2" style="left:0px; top:0px; width:865px; height:45px; vertical-align:top; ">
  194. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:859px; height:44px; "/>
  195. <caption id="caption4" class="search_name" style="left:5px; top:9px; width:86px; height:17px; ">기준일자 :</caption>
  196. <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; "/>
  197. <line id="line13" class="line_4" style="x1:785px; y1:7px; x2:785px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  198. <button id="btn_search" class="btn1_letter2" style="left:795px; top:8px; width:56px; height:22px; ">
  199. <caption>조회</caption>
  200. <script type="javascript" ev:event="DOMActivate">
  201. <![CDATA[
  202. fSearchDiag();
  203. ]]>
  204. </script>
  205. </button>
  206. <caption id="caption2" class="search_name" visibility="hidden" style="left:145px; top:15px; width:42px; height:17px; ">유형 :</caption>
  207. <select1 id="rdo_diagkind" ref="/root/send/selectedrdodiagkind" visibility="hidden" appearance="full" cellspacing="5" cols="2" overflow="hidden" style="left:85px; top:5px; width:100px; height:20px; border-style:none; ">
  208. <choices>
  209. <item>
  210. <label>ICD10</label>
  211. <value>1</value>
  212. </item>
  213. <item>
  214. <label>확장</label>
  215. <value>2</value>
  216. </item>
  217. </choices>
  218. </select1>
  219. <bool id="bol_between" checkvalue="Y,N" ref="/root/send/between" style="left:215px; top:10px; width:30px; height:20px; ">
  220. <script type="javascript" ev:event="xforms-value-changed">
  221. <![CDATA[
  222. var code = bol_between.value
  223. if(code == "Y"){
  224. switch1.selectedIndex = 1;
  225. model.setValue("/root/send/diagcd","");
  226. model.setValue("/root/send/diagnm","");
  227. }
  228. else{
  229. switch1.selectedIndex = 0;
  230. }
  231. ]]>
  232. </script>
  233. </bool>
  234. <switch id="switch1" class="sw_no_border" style="left:330px; top:6px; width:445px; height:35px; ">
  235. <case id="case1" style="left:0px; top:0px; width:420px; height:30px; ">
  236. <caption id="caption1" class="search_name" style="left:10px; top:4px; width:86px; height:17px; ">상병코드 :</caption>
  237. <caption id="caption3" class="search_name" style="left:172px; top:4px; width:63px; height:17px; ">상병명 :</caption>
  238. <input id="ipt_diagcd" ref="/root/send/diagcd" class="input_search" style="left:95px; top:4px; width:70px; height:19px; "/>
  239. <input id="ipt_diagnm" ref="/root/send/diagnm" class="input_search" style="left:240px; top:4px; width:170px; height:19px; "/>
  240. </case>
  241. <case id="case2" selected="true" style="left:0px; top:0px; width:420px; height:30px; ">
  242. <caption id="caption5" class="search_name" style="left:10px; top:4px; width:86px; height:17px; ">상병코드 :</caption>
  243. <caption id="caption6" style="left:188px; top:5px; width:19px; height:20px; font-weight:bold; ">~</caption>
  244. <input id="ipt_from" ref="/root/send/fromcd" class="input_search" style="left:110px; top:5px; width:70px; height:19px; "/>
  245. <input id="ipt_to" ref="/root/send/tocd" class="input_search" style="left:205px; top:5px; width:75px; height:19px; "/>
  246. </case>
  247. </switch>
  248. <caption id="caption8" style="left:242px; top:11px; width:55px; height:20px; ">범위검색</caption>
  249. </group>
  250. </group>
  251. <group id="grp_btn" scroll="auto" style="left:0px; top:530px; width:865px; height:28px; ">
  252. <button id="btn_close" class="btn4_letter2" style="left:807px; top:3px; width:56px; height:22px; ">
  253. <caption>닫기</caption>
  254. <script type="javascript" ev:event="DOMActivate">
  255. <![CDATA[
  256. window.close(); // F5 실행시 IE를 종료시킨다.
  257. ]]>
  258. </script>
  259. </button>
  260. <button id="btn_init" class="btn4_letter3" visibility="hidden" style="left:545px; top:5px; width:68px; height:22px; ">
  261. <caption>초기화</caption>
  262. <script type="javascript" ev:event="DOMActivate">
  263. <![CDATA[
  264. fInitialize();
  265. ]]>
  266. </script>
  267. </button>
  268. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:851px; y2:0px; "/>
  269. <button id="button1" class="btn4_letter2" style="left:752px; top:3px; width:56px; height:22px; ">
  270. <caption>선택</caption>
  271. <script type="javascript" ev:event="DOMActivate">
  272. <![CDATA[
  273. var rtn1 = getDiagNodeListCSV ( model.instances(0).selectNodes( "/root/main/list1/listdiag" ));
  274. if ( rtn1 == "N" ) {
  275. messageBox ( "선택된 진단이", "I004" );
  276. } else {
  277. opener.javascript.setParameter( "SPMMO00800_rtn", rtn1 );
  278. opener.javascript.setParameter( "SPMMO00800_rtn_useyn", "Y");
  279. window.close();
  280. }
  281. ]]>
  282. </script>
  283. </button>
  284. </group>
  285. </xhtml:body>
  286. </xhtml:html>