SMMRS02100_동의서중분류조회.xrw 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510
  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. <main>
  10. <indxlist>
  11. <indxlist>
  12. <orddd/>
  13. <fstprntdt/>
  14. <inorddeptnm/>
  15. <pid/>
  16. <hngnm/>
  17. <formnm/>
  18. <statcd/>
  19. </indxlist>
  20. </indxlist>
  21. </main>
  22. <send>
  23. <fromdd/>
  24. <todd/>
  25. <itemindxseq/>
  26. <formcd/>
  27. <supitemindxseq/>
  28. <reqdata/>
  29. </send>
  30. <temp>
  31. <indxinfo>
  32. <indxnm/>
  33. <itemindxseq/>
  34. </indxinfo>
  35. </temp>
  36. <temp2>
  37. <forminfo>
  38. <itemlist>
  39. <formnm/>
  40. <formcd/>
  41. </itemlist>
  42. </forminfo>
  43. </temp2>
  44. <templer>
  45. </templer>
  46. <inputSelectValue/>
  47. <inputSelectValue2/>
  48. </root>
  49. </instance>
  50. <script type="javascript" ev:event="xforms-ready">
  51. <![CDATA[
  52. model.setValue("/root/send/fromdd", getCurrentDate());
  53. model.setValue("/root/send/todd", getCurrentDate());
  54. mmbfGetHardCodeInfo("/root/send/reqdata", "/root/templer", 5506);
  55. model.setValue("/root/send/supitemindxseq", model.getValue("/root/templer/hardcd/hardcd"));
  56. submit("TRMRS02101");
  57. fGetFormlist("root/send/reqdata", "/root/temp2/forminfo", "OCR,OCR(CODE),OCR(PROG)", getUserInfo("dutplceinstcd"));
  58. // 기본 콤보 데이터 셋을 그리드 데이터셋으로 노드 복사
  59. var comboNodeset = instance1.selectNodes("/root/temp2/forminfo/itemlist");
  60. for(var i=0;i<comboNodeset.length;i++){
  61. model.makeNode("/root/gridData/row["+(i+1)+"]/formnm");
  62. model.setValue("/root/gridData/row["+(i+1)+"]/formnm",model.getValue("/root/temp2/forminfo/itemlist["+(i+1)+"]/formnm"));
  63. model.makeNode("/root/gridData/row["+(i+1)+"]/formcd");
  64. model.setValue("/root/gridData/row["+(i+1)+"]/formcd",model.getValue("/root/temp2/forminfo/itemlist["+(i+1)+"]/formcd"));
  65. }
  66. // 검색 박스 위치 초기화
  67. ufn_doResizeGrid(gridObj, inputObj);
  68. grid.refresh();
  69. ]]>
  70. </script>
  71. <script type="javascript">
  72. <![CDATA[
  73. var inputObj = "iptSearch";
  74. var inputValueObj = "iptSearchValue";
  75. var inputValueObj2 = "iptSearchValue2";
  76. var gridObj = "gridSearchList";
  77. var clickchk="false";
  78. var grid = document.controls(gridObj);
  79. var input = document.controls(inputObj);
  80. var valueInput = document.controls(inputValueObj);
  81. var valueInput2 = document.controls(inputValueObj2);
  82. // 검색 xpath (환경에 맞게 세팅해주세요)
  83. var xpData = "/root/send/formcd";
  84. var xpValueData = "/root/inputSelectValue";
  85. var xpValueData2 = "/root/inputSelectDate";
  86. var xpOrgGridNodeSet = "/root/gridData/row";
  87. // input - xpath
  88. var ref = document.controls(inputObj).attribute("ref");
  89. var valueRef = document.controls(inputValueObj).attribute("ref");
  90. var valueRef2 = document.controls(inputValueObj2).attribute("ref");
  91. // 검색 박스 인덱스
  92. var gStartIdx = 0;
  93. // 검색 박스 위치 초기화 함수
  94. function ufn_doResizeGrid(gridId, inputId, idx) {
  95. if(idx == null || idx == "" || idx == "unddefined") {
  96. idx = 0;
  97. }
  98. if(gStartIdx <= 0) { // datagrid 위치, 크기 설정
  99. document.controls(gridId).rowheight(0) = document.controls(inputId).currentStyle.height;
  100. document.controls(gridId).rowhidden(0) = true;
  101. document.controls(gridId).attribute("left") = document.controls(inputId).currentStyle.left; // left
  102. document.controls(gridId).attribute("top") = document.controls(inputId).currentStyle.top; // top
  103. document.controls(gridId).colWidth(0) = document.controls(inputId).currentStyle.width // width
  104. gStartIdx++;
  105. }
  106. }
  107. function ChkDate(){
  108. var fromdd = model.getValue("/root/send/fromdd");
  109. var todd = model.getValue("/root/send/todd");
  110. if( fromdd > todd ){
  111. messageBox("시작일자가 종료일자보다 클 수","I004"); //없습니다.
  112. return false;
  113. }else if( todd > getCurrentDate() ){
  114. messageBox("종료일자가 현재일자("+getCurrentDate()+")보다 클 수","I004"); //없습니다.
  115. return false;
  116. }
  117. }
  118. function fGetFormlist(ref, rsltRef, queryflag, dutplceinstcd){
  119. if(queryflag != null)
  120. model.makeValue(ref + "/queryflag", queryflag);
  121. if(dutplceinstcd != null)
  122. model.makeValue(ref + "/dutplceinstcd", dutplceinstcd);
  123. submit("TRMRF02603", true, ref, rsltRef);
  124. }
  125. ]]>
  126. </script>
  127. <submission id="TRMRS02100" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/indxlist"/>
  128. <submission id="TRMRS02101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp/indxinfo"/>
  129. <submission id="TRMRS02102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp2/forminfo/itemlist"/>
  130. <submission id="TRMRF02603" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp2/forminfo/itemlist"/>
  131. <submission id="TRMMB04103" mediatype="application/x-www-form-urlencoded" method="post"/>
  132. </model>
  133. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  134. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  135. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  136. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  137. <script type="javascript" src="../../../emr/carecomweb/js/CareCom.js"/>
  138. <script type="javascript" src="../../../emr/prcpmngtweb/js/MMO001.js"/>
  139. <script type="javascript" src="../../../emr/commonweb/js/EMRCommon.js"/>
  140. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  141. </xhtml:head>
  142. <xhtml:body pagewidth="870" pageheight="750" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  143. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:399px; height:15px; background-image:../../../com/commonweb/images/tit_bullet1.gif; ">동의서 중분류별 통계</caption>
  144. <group id="group2" scroll="none" style="left:0px; top:21px; width:845px; height:65px; vertical-align:top; ">
  145. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:845px; height:65px; background-color:#fffbf2; border-color:#ffd799; "/>
  146. <button id="btn_search" class="btn1_letter2" style="left:770px; top:8px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  147. <caption>조회</caption>
  148. <script type="javascript" ev:event="onclick">
  149. <![CDATA[
  150. var rtn = ChkDate();
  151. if( rtn != "false" ){
  152. if( model.getValue("/root/send/itemindxseq") == "" ){
  153. messageBox("동의서 중분류선택은", "I003");
  154. return;
  155. }
  156. model.setValue("/root/send/fromdd", model.getValue("/root/send/fromdd"));
  157. model.setValue("/root/send/todd", model.getValue("/root/send/todd"));
  158. if (submit("TRMRS02100")){
  159. model.setValue("/root/send/fromdd", model.getValue("/root/send/fromdd"));
  160. model.setValue("/root/send/todd", model.getValue("/root/send/todd"));
  161. } else {
  162. messageBox("조회를","E009");
  163. }
  164. }else{
  165. return;
  166. }
  167. ]]>
  168. </script>
  169. </button>
  170. <line id="line13" style="x1:750px; y1:10px; x2:750px; y2:57px; border-color:#ffe4bb; border-left-style:solid; "/>
  171. <caption id="caption2" class="search_name" style="left:18px; top:9px; width:91px; height:17px; background-image:../../../com/commonweb/images/search_bullet1.gif; ">진료일자 :</caption>
  172. <input id="ipt_fromdd" ref="/root/send/fromdd" class="input_s_essential" inputtype="date" style="left:107px; top:8px; width:90px; height:19px; background-image:../../../com/commonweb/images/input_s_essential.gif; ">
  173. <script type="javascript" ev:event="xforms-value-changed">
  174. <![CDATA[
  175. ChkDate();
  176. ]]>
  177. </script>
  178. </input>
  179. <caption id="caption5" style="left:199px; top:12px; width:15px; height:13px; ">~</caption>
  180. <input id="ipt_todd" ref="/root/send/todd" class="input_s_essential" inputtype="date" style="left:213px; top:8px; width:90px; height:19px; background-image:../../../com/commonweb/images/input_s_essential.gif; ">
  181. <script type="javascript" ev:event="xforms-value-changed">
  182. <![CDATA[
  183. ChkDate();
  184. ]]>
  185. </script>
  186. </input>
  187. <button id="btn_excel" class="btn1_letter2" style="left:770px; top:35px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn2_letter2.gif; ">
  188. <caption>엑셀</caption>
  189. <script type="javascript" ev:event="onclick">
  190. <![CDATA[
  191. var fromdd = model.getValue("/root/send/fromdd");
  192. var todd = model.getValue("/root/send/todd");
  193. var dt = "";
  194. if(fromdd == todd) {
  195. dt = fromdd;
  196. } else {
  197. dt = fromdd + "~" + todd;
  198. }
  199. var fileName = window.fileDialog("save", ",", false, "기간별 환자 시술목록(" + dt + ")", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  200. grd_patlist.saveExcel(fileName, "SheetName", true, true, "", "", false);
  201. ]]>
  202. </script>
  203. </button>
  204. <caption id="caption1" class="search_name" style="left:323px; top:9px; width:111px; height:17px; background-image:../../../com/commonweb/images/search_bullet1.gif; ">동의서 중분류 :</caption>
  205. <select1 id="combo1" ref="/root/send/itemindxseq" class="combo_s_essential" appearance="minimal" style="left:440px; top:8px; width:195px; height:19px; ">
  206. <choices>
  207. <itemset nodeset="/root/temp/indxinfo">
  208. <label ref="indxnm"/>
  209. <value ref="itemindxseq"/>
  210. </itemset>
  211. </choices>
  212. <script type="javascript" ev:event="xforms-value-changed">
  213. <![CDATA[
  214. model.setValue("root/send/supitemindxseq",model.getValue("/root/send/itemindxseq"));
  215. submit("TRMRS02102");
  216. model.removenode("/root/gridData");
  217. model.makeNode("/root/gridData/row");
  218. // 기본 콤보 데이터 셋을 그리드 데이터셋으로 노드 복사
  219. var comboNodeset = instance1.selectNodes("/root/temp2/forminfo/itemlist");
  220. for(var i=0;i<comboNodeset.length;i++){
  221. model.makeNode("/root/gridData/row["+(i+1)+"]/formnm");
  222. model.setValue("/root/gridData/row["+(i+1)+"]/formnm",model.getValue("/root/temp2/forminfo/itemlist["+(i+1)+"]/formnm"));
  223. model.makeNode("/root/gridData/row["+(i+1)+"]/formcd");
  224. model.setValue("/root/gridData/row["+(i+1)+"]/formcd",model.getValue("/root/temp2/forminfo/itemlist["+(i+1)+"]/formcd"));
  225. }
  226. // 검색 박스 위치 초기화
  227. ufn_doResizeGrid(gridObj, inputObj);
  228. grid.refresh();
  229. ]]>
  230. </script>
  231. </select1>
  232. <caption id="caption3" class="search_name" style="left:18px; top:35px; width:76px; height:17px; background-image:../../../com/commonweb/images/search_bullet1.gif; ">서식명 :</caption>
  233. </group>
  234. <datagrid id="grd_patlist" nodeset="/root/main/indxlist/indxlist" class="datagrid4" caption="진료일자^출력일자^부서명^환자번호^환자명^서식명^출력상태" colsep="^" colwidth="84, 140, 75, 85, 70, 289, 70" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:95px; width:845px; height:625px; ">
  235. <col ref="orddd" format="yyyy-mm-dd" style="text-align:center; "/>
  236. <col ref="fstprntdt" format="yyyy-mm-dd hh:nn:ss" style="text-align:center; "/>
  237. <col ref="inorddeptnm" style="text-align:center; "/>
  238. <col ref="pid" style="text-align:center; "/>
  239. <col ref="hngnm" format="yyyy-mm-dd hh:nn:ss" style="text-align:center; "/>
  240. <col ref="formnm"/>
  241. <col ref="statcd" style="text-align:center; "/>
  242. <script type="javascript" ev:event="onaftersort">
  243. <![CDATA[
  244. grd_patlist.gridToInstance();
  245. ]]>
  246. </script>
  247. </datagrid>
  248. <line id="line8" class="line_1" style="x1:0px; y1:91px; x2:844px; y2:91px; "/>
  249. <group id="group3" scroll="none" style="left:107px; top:58px; width:548px; height:20px; ">
  250. <datagrid id="gridSearchList" nodeset="/root/gridData/row" visibility="hidden" overflow="scroll" scroll="auto" caption="동의서명^caption2^caption3" colsep="^" colwidth="516, -11, 0" mergecellsfixedrows="bycolrec" rowsep="|" selectionmode="byrow" style="left:0px; top:20px; width:542px; height:140px; ">
  251. <col ref="formnm"/>
  252. <col ref="formcd" visibility="hidden"/>
  253. <col ref="formfromdt" visibility="hidden"/>
  254. <script type="javascript" ev:event="onclick">
  255. <![CDATA[
  256. if(grid.isCell(event.target) == true && grid.row > grid.fixedRows-1)
  257. {
  258. var label = grid.valueMatrix(grid.row, 0);
  259. var value = grid.valueMatrix(grid.row, 1);
  260. var value2 = grid.valueMatrix(grid.row, 2);
  261. model.setValue(ref, label);
  262. model.setValue(valueRef, value);
  263. model.setValue(valueRef2, value2);
  264. input.refresh();
  265. valueInput.refresh();
  266. valueInput2.refresh();
  267. model.setFocus(inputObj);
  268. input.selBegin = 0;
  269. input.selEnd = label.length;
  270. input.caretPosition = label.length;
  271. grid.visible = false;
  272. }
  273. if(gridSearchList.col==0){
  274. group3.attribute("height")="20px";
  275. clickchk="false";
  276. }else{
  277. group3.attribute("height")="160px";
  278. clickchk="true";
  279. }
  280. ]]>
  281. </script>
  282. </datagrid>
  283. <input id="iptSearchValue" ref="/root/inputSelectValue" visibility="hidden" editable="false" style="left:431px; top:60px; width:35px; height:19px; color:#0000ff; background-color:#ffff99; border-style:none; "/>
  284. <input id="iptSearchValue2" ref="/root/inputSelectValue2" visibility="hidden" editable="false" style="left:430px; top:85px; width:35px; height:19px; color:#0000ff; background-color:#ffff99; border-style:none; "/>
  285. <input id="iptSearch" ref="/root/send/formcd" style="left:0px; top:0px; width:526px; height:19px; ">
  286. <script type="javascript" ev:event="onkeyup">
  287. <![CDATA[
  288. // datagrid 크기 리사이즈
  289. ufn_doResizeGrid(gridObj, inputObj);
  290. var tmp = input.currentText;
  291. var node = instance1.selectSingleNode(xpData);
  292. var currentRow = 0;
  293. var rowIdx = 0;
  294. var value = "";
  295. var label = "";
  296. // 입력한 값이 존재하고, 검색할 노드 데이터가 있는 경우 검색 수행
  297. if(tmp == "" || node == null)
  298. {
  299. grid.visible = false;
  300. group3.attribute("height")="20px";
  301. clickchk="false";
  302. return;
  303. }
  304. // <-, -> 버튼일 경우는 검색 기능 수행 안함
  305. if(event.keyCode == 37 || event.keyCode == 39) return;
  306. grid.visible = true;
  307. // up 버튼, down 버튼은 검색 결과 선택 기능 수행
  308. if(event.keyCode == 38 || event.keyCode == 40)
  309. {
  310. // up 버튼 - 검색 결과 위로 선택
  311. if(event.keyCode == 38)
  312. {
  313. // 선택되어 있는 행이 없을 경우
  314. if( grid.selectedRow(0) == -1 || grid.selectedRow(0) == 0 ){
  315. grid.visible = false;
  316. group3.attribute("height")="20px";
  317. clickchk="false";
  318. } else {
  319. currentRow = grid.selectedRow(0);
  320. rowIdx = currentRow-1;
  321. if(rowIdx >= grid.fixedRows) {
  322. grid.select(rowIdx, 0) = true;
  323. ref = input.attribute("ref");
  324. label = grid.valueMatrix(rowIdx, grid.colRef("formnm"));
  325. model.setValue(ref, label);
  326. input.refresh();
  327. input.selBegin = 0;
  328. input.selEnd = label.length;
  329. input.caretPosition = label.length;
  330. } else {
  331. grid.row = grid.fixedRows;
  332. }
  333. }
  334. // down 버튼 - 검색 결과 아래로 선택
  335. }
  336. if(event.keyCode == 40)
  337. {
  338. // 선택되어 있는 행이 없을 경우
  339. if(grid.selectedRow(0) == -1)
  340. {
  341. rowIdx = grid.fixedRows;
  342. grid.select(rowIdx, 0) = true;
  343. ref = input.attribute("ref");
  344. label = grid.valueMatrix( rowIdx, grid.colRef("formnm") )
  345. model.setValue(ref, label);
  346. input.refresh();
  347. input.selBegin = 0;
  348. input.selEnd = label.length;
  349. input.caretPosition = label.length;
  350. }
  351. else
  352. {
  353. currentRow = grid.selectedRow(0);
  354. rowIdx = currentRow+1;
  355. if(rowIdx <grid.rows)
  356. {
  357. grid.select(rowIdx, 0) = true;
  358. ref = input.attribute("ref");
  359. label = grid.valueMatrix(rowIdx, grid.colRef("formnm") )
  360. model.setValue(ref, label);
  361. input.refresh();
  362. input.selBegin = 0;
  363. input.selEnd = label.length;
  364. input.caretPosition = label.length;
  365. }
  366. }
  367. }
  368. } else if(event.keyCode == 27) {
  369. grid.visible = false;
  370. group3.attribute("height")="20px";
  371. clickchk="false";
  372. } else if(event.keyCode == 13) {
  373. if(model.getValue(ref) == "") {
  374. model.setValue(ref, tmp);
  375. }
  376. if(grid.rows == 2 && tmp.indexOf(grid.valueMatrix(1,0)) > -1){
  377. model.setValue(valueRef,grid.valueMatrix(1,1));
  378. } else {
  379. model.setValue(valueRef,grid.valueMatrix(grid.selectedRow(0),1));
  380. }
  381. valueInput.refresh();
  382. grid.visible = false;
  383. group3.attribute("height")="20px";
  384. clickchk="false";
  385. } else {
  386. grid.nodeset = "/root/gridData/row[contains(formnm, \""+ tmp +"\")]";
  387. }
  388. grid.attribute("overflow") = "";
  389. grid.attribute("scroll") = "vertical";
  390. if(tmp == ""){
  391. group3.attribute("height")="20px";
  392. clickchk="false";
  393. }
  394. if(event.keyCode != 13){
  395. if(clickchk=="false" && tmp != ""){
  396. group3.attribute("height")="160px";
  397. clickchk="true";
  398. }else if(clickchk=="true" && tmp == ""){
  399. group3.attribute("height")="20px";
  400. clickchk="false";
  401. }
  402. }
  403. ]]>
  404. </script>
  405. <script type="javascript" ev:event="DOMFocusIn">
  406. <![CDATA[
  407. var ref = input.attribute("ref");
  408. input.selBegin = 0;
  409. input.selEnd = model.getValue(ref).length;
  410. ]]>
  411. </script>
  412. </input>
  413. <button id="button3" style="left:512px; top:2px; width:13px; height:18px; focus-rect:hidden; ">
  414. <caption>▼</caption>
  415. <script type="javascript" ev:event="onclick">
  416. <![CDATA[
  417. if(clickchk=="false"){
  418. group3.attribute("height")="160px";
  419. clickchk="true";
  420. }else if(clickchk=="true"){
  421. group3.attribute("height")="20px";
  422. clickchk="false";
  423. }
  424. grid.attribute("overflow") = "";
  425. grid.attribute("scroll") = "vertical";
  426. var datagridVisible = grid.visible;
  427. if(datagridVisible==true)
  428. {
  429. grid.visible = false;
  430. }
  431. else
  432. {
  433. grid.visible = true;
  434. }
  435. model.setValue(ref,"");
  436. model.setValue(valueRef,"");
  437. model.setValue(valueRef2,"");
  438. input.refresh();
  439. valueInput.refresh();
  440. valueInput2.refresh();
  441. grid.nodeset = xpOrgGridNodeSet;
  442. ]]>
  443. </script>
  444. </button>
  445. </group>
  446. </xhtml:body>
  447. </xhtml:html>