SMMMR02300_제증명리스트.xrw 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:my="http://www.comsquare.co.kr/example" xmlns:ms="urn:schemas-microsoft-com:xslt" 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" xmlns:cs="http://www.comsquare.co.kr/xforms">
  4. <xhtml:head>
  5. <xhtml:title>제증명리스트</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <paminfo/>
  11. <srchprofhist>
  12. <fromdd/>
  13. <todd/>
  14. <issflag>-</issflag>
  15. <pid/>
  16. <srchflag>rec</srchflag>
  17. <srchdata/>
  18. <patsrchflag>1</patsrchflag>
  19. <holograpflag>-</holograpflag>
  20. <formcd/>
  21. <ordtype/>
  22. <prntuserid/>
  23. <prntusernm/>
  24. </srchprofhist>
  25. <profhist>
  26. <list>
  27. </list>
  28. </profhist>
  29. <issusge>
  30. </issusge>
  31. <paminfo>
  32. <list/>
  33. </paminfo>
  34. <newprof>
  35. <formnm/>
  36. </newprof>
  37. <prcpinfo>
  38. <list/>
  39. </prcpinfo>
  40. <patinfo>
  41. <patinfolist/>
  42. </patinfo>
  43. </main>
  44. <send>
  45. <reqdata/>
  46. <savedata/>
  47. <userinfo/>
  48. </send>
  49. <hidden>
  50. <issusge/>
  51. </hidden>
  52. <temp>
  53. <popup/>
  54. <userinfo/>
  55. <profhist/>
  56. </temp>
  57. <tmp>
  58. <srchcond/>
  59. <pid/>
  60. <autoflag/>
  61. <hngnm/>
  62. <rrgstno1/>
  63. <rrgstno2/>
  64. </tmp>
  65. <init>
  66. <popupmenu>
  67. <menu>
  68. <item>
  69. <label>무료발급사유</label>
  70. <func>fInsFreeResn</func>
  71. </item>
  72. <item>
  73. <label/>
  74. <func/>
  75. </item>
  76. <item>
  77. <label>수령인</label>
  78. <func>fInsRecvNM</func>
  79. </item>
  80. <item>
  81. <label/>
  82. <func/>
  83. </item>
  84. <item>
  85. <label>반환</label>
  86. <func>fDCProf</func>
  87. </item>
  88. <item>
  89. <label/>
  90. <func/>
  91. </item>
  92. <item>
  93. <label>발행서식보기</label>
  94. <func>fOCRView</func>
  95. </item>
  96. </menu>
  97. </popupmenu>
  98. <iemr>
  99. <pid/>
  100. <docucd/>
  101. <ocmnum/>
  102. <cmc_spcid/>
  103. <cmc_orddate/>
  104. <cmc_orderseqno/>
  105. </iemr>
  106. </init>
  107. <result/>
  108. <memo>
  109. <hardcd/>
  110. </memo>
  111. </root>
  112. </instance>
  113. <script type="javascript" ev:event="xforms-ready">
  114. <![CDATA[
  115. fInitialize();
  116. fReqGetProfFormList();
  117. // 보험팀인 경우, 조회일자 기본은 발행일로 설정, 발행구분은 전체
  118. // 저장, 반환, 위임장뷰어 버튼 숨기기
  119. // 2008. 01. 02 오지훈
  120. //보험팀인 경우, 제증명리스트의 combo박스에
  121. if(getUserInfo("dutplcecd")=="4070300000"){
  122. model.setValue("/root/main/srchprofhist/srchflag", "pub");
  123. model.setValue("/root/main/srchprofhist/issflag" , "-");
  124. button3.visible = false;
  125. btn_dc.visible = false;
  126. button2.visible = false;
  127. button1.attribute("top") = 39;
  128. model.refresh();
  129. }
  130. ]]>
  131. </script>
  132. <submission id="TRMRF00708" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/main/formlist"/>
  133. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
  134. <submission id="TRMMR02301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/profhist"/>
  135. <submission id="TRMMR02302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/prcpinfo"/>
  136. <submission id="TXMMR02301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/result"/>
  137. <submission id="TRMMO02303" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/forminfo"/>
  138. <submission id="TRMMR02303" mediatype="application/x-www-form-urlencoded" ref="/root/send/reqdata" resultref="/root/main/forminfo"/>
  139. <submission id="TXMMR02907" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata"/>
  140. <submission id="TXMMR02909" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/temp"/>
  141. </model>
  142. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  143. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  144. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  145. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  146. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  147. <script type="javascript" src="../../../emr/prcpmngtweb/js/MMO001.js"/>
  148. <script type="javascript" src="../../../emr/medirecweb/js/SMMMR02300.js"/>
  149. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  150. <script type="javascript" src="../../../emr/commonweb/js/EMRCommon.js"/>
  151. <script type="javascript">
  152. <![CDATA[
  153. var sORDERBY = "asc";
  154. /**
  155. * @desc 제증명서식리스트 조회(자필포함)
  156. */
  157. function fReqGetProfFormList(){
  158. model.removeNodeset("/root/send/reqdata");
  159. model.makeValue("/root/send/reqdata/formprogflag", "all");
  160. //보험팀인 경우, 보험팀 용 서식만 조회하도록 처리
  161. if(getUserInfo("dutplcecd")=="4070300000"){
  162. model.makeValue("/root/send/reqdata/insuflag", "Y");
  163. }
  164. if(submit("TRMMR02303")){
  165. addComboItem("cmb_profformlist", "전체", "-", "above"); //combo에 '전체' item추가
  166. }
  167. model.refresh();
  168. }
  169. /**
  170. * @desc 무료제증명 반납
  171. */
  172. function fDCFreeProf(){
  173. var currow = grd_proflist.row;
  174. var prcpno = model.getValue(grd_proflist.nodeset + "[" + currow + "]/prcpno");
  175. var issflag = model.getValue(grd_proflist.nodeset + "[" + currow + "]/issflag");
  176. var profcertseq = model.getValue(grd_proflist.nodeset + "[" + currow + "]/profcertseq");
  177. var lastupdtrid = model.getValue(grd_proflist.nodeset + "[" + currow + "]/lastupdtrid");
  178. if(prcpno == 0){ //처방no가 0인 경우, 무료인 경우
  179. model.removeNodeset("/root/send/savedata");
  180. model.makeValue("/root/send/savedata/profcertseq", profcertseq);
  181. model.makeValue("/root/send/savedata/lastupdtrid", lastupdtrid);
  182. if(submit("TXMMR02301")){
  183. btn_profhist.dispatch("DOMActivate");
  184. }
  185. }else{
  186. messageBox("무료로 발급된 제증명을", "C002");
  187. return;
  188. }
  189. }
  190. /**
  191. * @desc : 숫자여부 판단
  192. */
  193. function isNumber(str) {
  194. str += ''; // 문자열로 변환
  195. str = str.replace(/^\s*|\s*$/g, ''); // 좌우 공백 제거
  196. if (str == '' || isNaN(str)) return false;
  197. return true;
  198. }
  199. /**
  200. * @desc : NodeList sorting
  201. * : node 구조를 변경하며 정렬을 수행
  202. */
  203. function nodeListSort( nodeset, trgRef, mode ){
  204. var nodesetCnt = model.getXPathValue("count(" + nodeset + ")");
  205. if(nodesetCnt == 0) return;
  206. var tmpVal1, tmpVal2;
  207. var tmpIndx;
  208. for(var i = 1; i <= nodesetCnt; i++){
  209. for(var j = i + 1 ; j <= nodesetCnt; j++){
  210. tmpVal1 = model.getValue(nodeset + "[" + i + "]/" + trgRef);
  211. tmpVal2 = model.getValue(nodeset + "[" + j + "]/" + trgRef);
  212. if(isNumber(tmpVal1)==true){tmpVal1 = Number(tmpVal1);}
  213. if(isNumber(tmpVal2)==true){tmpVal2 = Number(tmpVal2);}
  214. if(mode == "desc"){
  215. if(tmpVal1 < tmpVal2){
  216. model.duplicate(instance1.selectSingleNode(nodeset).parentNode, nodeset + "[" + j + "]", "*[" + i + "]");
  217. model.removenode(nodeset + "[" + (j + 1) + "]");
  218. model.duplicate(instance1.selectSingleNode(nodeset).parentNode, nodeset + "[" + (i + 1) + "]", "*[" + j + "]");
  219. model.removenode(nodeset + "[" + (i + 1) + "]");
  220. }
  221. }else if(mode == "asc"){
  222. if(tmpVal1 > tmpVal2){
  223. model.duplicate(instance1.selectSingleNode(nodeset).parentNode, nodeset + "[" + j + "]", "*[" + i + "]");
  224. model.removenode(nodeset + "[" + (j + 1) + "]");
  225. model.duplicate(instance1.selectSingleNode(nodeset).parentNode, nodeset + "[" + (i + 1) + "]", "*[" + j + "]");
  226. model.removenode(nodeset + "[" + (i + 1) + "]");
  227. }
  228. }
  229. }
  230. }
  231. }
  232. /**
  233. * @desc 반환
  234. */
  235. function fDCProf(){
  236. btn_dc.dispatch("DOMActivate");
  237. }
  238. /**
  239. * @desc 무료발급사유 입력
  240. */
  241. function fInsFreeResn(){
  242. if(grd_proflist.row > 0){
  243. var prcpno = model.getValue(grd_proflist.nodeset + "[" + grd_proflist.row + "]/prcpno");
  244. var issflag = model.getValue(grd_proflist.nodeset + "[" + grd_proflist.row + "]/issflag");
  245. if(issflag == 10){
  246. messageBox("미발행된 제증명 서식", "I009");
  247. return;
  248. }
  249. if(issflag == 50){
  250. messageBox("반납처리된 제증명 서식", "I009");
  251. return;
  252. }
  253. if(prcpno == 0){
  254. grd_proflist.col = grd_proflist.colRef("freeissresn");
  255. grd_proflist.colDisabled(grd_proflist.colRef("freeissresn")) = false;
  256. grd_proflist.editCell();
  257. }else{
  258. messageBox("무료로 발급된 서식만 입력", "I006");
  259. return;
  260. }
  261. }
  262. }
  263. /**
  264. * @desc 수령인 입력
  265. */
  266. function fInsRecvNM(){
  267. grd_proflist.col = grd_proflist.colRef("recvnm");
  268. grd_proflist.colDisabled(grd_proflist.colRef("recvnm")) = false;
  269. grd_proflist.editCell();
  270. }
  271. /**
  272. * @desc node value 비교
  273. */
  274. function compareNodeVal(desnode, srcnode, exceptcol){
  275. var node = instance1.selectSingleNode(desnode);
  276. var node2 = instance1.selectSingleNode(srcnode);
  277. var nodeList = node.childNodes;
  278. var nodeList2 = node2.childNodes;
  279. while(childNode = nodeList.nextNode()){
  280. childNode2 = nodeList2.nextNode();
  281. //node 비교 예외 컬럼인 경우 skip
  282. //값이 다른 경우 true
  283. if(childNode.NodeValue != childNode2.NodeValue){
  284. if(childNode2.nodeName == exceptcol){
  285. continue;
  286. }
  287. return true;
  288. }
  289. }
  290. //값이 같은 경우 false
  291. return false;
  292. }
  293. // 2013.12.20 CYW
  294. function fOCRView() {
  295. var row = grd_proflist.row;
  296. model.resetInstanceNode("/root/send/iemr");
  297. model.makeValue("/root/send/iemr/pid" , grd_proflist.textmatrix(row, grd_proflist.colRef("pid")));
  298. model.makeValue("/root/send/iemr/docucd" , grd_proflist.textmatrix(row, grd_proflist.colRef("formcd")));
  299. model.makeValue("/root/send/iemr/ocrcode" , grd_proflist.textmatrix(row, grd_proflist.colRef("ocrtag")));
  300. if( model.getValue("/root/send/iemr/ocrcode") != "" ){
  301. window.load("../../../emr/imgemrweb/xrw/SSMRC03130.xrw", "modeless", "imgemrviewer", "", "/root/send/iemr", "/root/hidden/temp");
  302. }else{
  303. messageBox("저장된 발행 이미지가 없습니다.", "I999");
  304. return;
  305. }
  306. model.refresh();
  307. }
  308. function fSetUserinfo(){
  309. setParameter("search_condition","usernm");
  310. setParameter("resultref","/root/send/userinfo");
  311. modal("SPZSU10100");
  312. var userinfo = model.getValue("/root/send/userinfo");
  313. userinfo = userinfo.split("|");
  314. var rshid = userinfo[2];
  315. var rshnm = userinfo[3];
  316. model.setValue("/root/main/srchprofhist/prntuserid" , rshid);
  317. model.setValue("/root/main/srchprofhist/prntusernm" , rshnm);
  318. model.resetInstanceNode("/root/send/userinfo");
  319. model.refresh();
  320. }
  321. ]]>
  322. </script>
  323. </xhtml:head>
  324. <xhtml:body guideline="1,1194;1,1183;2,784;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  325. <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:15px; width:1184px; height:85px; background-color:#fffbf2; border-color:#ffd799; "/>
  326. <datagrid id="grd_proflist" nodeset="/root/main/profhist/list" class="datagrid2" caption="구분^제증명^스캔^위임장^스캔^연번호^formcd^자필^제증명^기록^일련번호^등록번호^환자명^발행용도^생성번호^내원구분^일련번호^서식코드^출력종류^출력&#xA;매수^반납&#xA;매수^수납&#xA;여부^퇴원&#xA;수납^비고(무료발급사유)^수령인^작성일시^prcpno^발행부서코드^작성부서^작성자^작성자id^발행자id^발행자^발행일시^발급상태^삭제여부^삭제사용자ID^삭제사용자^최초등록자ID^최초등록자^최초등록일시^최종수정자ID^최종수정자^최종수정일시" colsep="^" colwidth="40, 46, 39, 46, 35, 95, 0, 40, 204, 40, 0, 62, 61, 88, 0, 0, 40, 0, 68, 38, 38, 36, 38, 112, 83, 100, 0, 100, 100, 62, 80, 80, 62, 100, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100" dataheight="25" frozencols="13" mergecells="never" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:129px; width:1184px; height:653px; ">
  327. <col ref="ordtype" style="text-align:center; "/>
  328. <col checkvalue="Y,N" ref="certtranflag" type="checkbox" visibility="hidden" style="text-align:center; "/>
  329. <col checkvalue="Y,N" ref="certscanflag" type="combo" visibility="hidden" style="text-align:center; ">
  330. <choices>
  331. <item>
  332. <label>Y</label>
  333. <value>Y</value>
  334. </item>
  335. <item>
  336. <label>N</label>
  337. <value>N</value>
  338. </item>
  339. </choices>
  340. </col>
  341. <col checkvalue="Y,N" ref="authtranflag" type="checkbox" visibility="hidden" style="text-align:center; "/>
  342. <col checkvalue="Y,N" disabled="true" ref="authscanflag" type="combo" style="text-align:center; ">
  343. <choices>
  344. <item>
  345. <label>Y</label>
  346. <value>Y</value>
  347. </item>
  348. <item>
  349. <label>N</label>
  350. <value>N</value>
  351. </item>
  352. </choices>
  353. </col>
  354. <col ref="yearseqno" style="text-align:center; "/>
  355. <col disabled="true" ref="formcd" type="output"/>
  356. <col disabled="true" ref="holograpflag" type="combo" style="text-align:center; ">
  357. <choices>
  358. <item>
  359. <label>자필</label>
  360. <value>A</value>
  361. </item>
  362. <item>
  363. <label>OCS</label>
  364. <value>O</value>
  365. </item>
  366. <item>
  367. <label/>
  368. <value>-</value>
  369. </item>
  370. </choices>
  371. </col>
  372. <col ref="formnm"/>
  373. <col ref="recyn" visibility="hidden"/>
  374. <col ref="profcertseq"/>
  375. <col ref="pid" style="text-align:center; "/>
  376. <col ref="hngnm" style="text-align:center; "/>
  377. <col disabled="true" ref="prstusge" type="combo">
  378. <choices>
  379. <itemset nodeset="/root/hidden/issusge/M0332">
  380. <label ref="cdnm"/>
  381. <value ref="cdid"/>
  382. </itemset>
  383. </choices>
  384. </col>
  385. <col ref="cretno"/>
  386. <col ref="ioflag"/>
  387. <col disabled="true" ref="formrecseq" visibility="hidden"/>
  388. <col ref="formcd"/>
  389. <col disabled="true" ref="issflag" type="combo" style="text-align:center; ">
  390. <choices>
  391. <item>
  392. <label>미발행</label>
  393. <value>10</value>
  394. </item>
  395. <item>
  396. <label>발행</label>
  397. <value>20</value>
  398. </item>
  399. <item>
  400. <label>재발행</label>
  401. <value>30</value>
  402. </item>
  403. <item>
  404. <label>재출력</label>
  405. <value>40</value>
  406. </item>
  407. <item>
  408. <label>반납</label>
  409. <value>50</value>
  410. </item>
  411. <item>
  412. <label>부분반납</label>
  413. <value>60</value>
  414. </item>
  415. </choices>
  416. </col>
  417. <col ref="prntcnt" style="text-align:center; "/>
  418. <col ref="dcprntcnt" style="text-align:center; "/>
  419. <col ref="calcyn" style="text-align:center; "/>
  420. <col ref="dschcalcyn" style="text-align:center; "/>
  421. <col disabled="true" ref="freeissresn" type="input" maxbyte="50"/>
  422. <col editmode="inputsearch" ref="recvnm" type="input"/>
  423. <col ref="issdt" format="yyyy-mm-dd hh:nn"/>
  424. <col ref="prcpno" visibility="hidden"/>
  425. <col ref="issdeptcd" visibility="hidden"/>
  426. <col ref="issdeptnm"/>
  427. <col ref="issnm" style="text-align:center; "/>
  428. <col ref="issid" visibility="hidden"/>
  429. <col ref="prntuserid" visibility="hidden"/>
  430. <col ref="prntusernm" style="text-align:center; "/>
  431. <col ref="prntdt" format="yyyy-mm-dd hh:nn"/>
  432. <col disabled="true" ref="issstat" type="combo" style="text-align:center; ">
  433. <choices>
  434. <item>
  435. <label>임시저장</label>
  436. <value>R</value>
  437. </item>
  438. <item>
  439. <label>인증저장</label>
  440. <value>I</value>
  441. </item>
  442. </choices>
  443. </col>
  444. <col ref="delyn" visibility="hidden"/>
  445. <col ref="deluserid" visibility="hidden"/>
  446. <col ref="delusernm" visibility="hidden"/>
  447. <col ref="fstrgstrid" visibility="hidden"/>
  448. <col ref="fstrgstrnm" visibility="hidden"/>
  449. <col ref="fstrgstdt" visibility="hidden"/>
  450. <col ref="lastupdtrid" visibility="hidden"/>
  451. <col ref="lastrgstrnm" visibility="hidden"/>
  452. <col ref="lastupdtdt" visibility="hidden"/>
  453. <col ref="ocrtag" visibility="hidden"/>
  454. <script type="javascript" ev:event="ondblclick">
  455. <![CDATA[
  456. if(isDataCell()){
  457. var curcol = grd_proflist.col;
  458. if(curcol != grd_proflist.colRef("authscanflag") &&
  459. curcol != grd_proflist.colRef("authtranflag") &&
  460. curcol != grd_proflist.colRef("certscanflag") &&
  461. curcol != grd_proflist.colRef("certtranflag")){
  462. fOpenProfMngt(); //제증명 관리화면 open
  463. }
  464. }
  465. ]]>
  466. </script>
  467. <script type="javascript" ev:event="onmousedown">
  468. <![CDATA[
  469. setPopupMenu("grd_proflist", false, "/root/init/popupmenu/menu/item", "label", "func");
  470. ]]>
  471. </script>
  472. <script type="javascript" ev:event="DOMFocusOut">
  473. <![CDATA[
  474. initPopupMenu();
  475. ]]>
  476. </script>
  477. <script type="javascript" ev:event="onclick">
  478. <![CDATA[
  479. var currow = grd_proflist.row;
  480. var curcol = grd_proflist.col;
  481. if(grd_proflist.isCell(event.target) == 1){ //grid의 cell이외를 클릭한 경우, 동작하지 않도록 처리
  482. if(currow == 0){
  483. nodeListSort(grd_proflist.nodeset, grd_proflist.colAttribute(curcol, "ref"), sORDERBY);
  484. nodeListSort("/root/temp2/profhist/list", grd_proflist.colAttribute(curcol, "ref"), sORDERBY);
  485. model.refresh();
  486. if(sORDERBY == "desc"){
  487. sORDERBY = "asc";
  488. }else{
  489. sORDERBY = "desc";
  490. }
  491. }
  492. }
  493. ]]>
  494. </script>
  495. <script type="javascript" ev:event="onendedit">
  496. <![CDATA[
  497. var curcol = grd_proflist.col;
  498. if(curcol == grd_proflist.colRef("freeissresn")){
  499. var freeissresn = grd_proflist.valueMatrix(grd_proflist.row, grd_proflist.colRef("freeissresn"));
  500. if(freeissresn != ""){
  501. var rtnval = messageBox("무료발급사유를", "Q002");
  502. if(rtnval == 6){
  503. var pid = model.getValue(grd_proflist.nodeset + "[" + grd_proflist.row + "]/pid");
  504. var orddd = model.getValue(grd_proflist.nodeset + "[" + grd_proflist.row + "]/orddd");
  505. var cretno = model.getValue(grd_proflist.nodeset + "[" + grd_proflist.row + "]/cretno");
  506. var profcertseq = model.getValue(grd_proflist.nodeset + "[" + grd_proflist.row + "]/profcertseq");
  507. var freeissresn = model.getValue(grd_proflist.nodeset + "[" + grd_proflist.row + "]/freeissresn");
  508. model.removeNodeset("/root/send/savedata");
  509. model.makeValue("/root/send/savedata/pid" , pid);
  510. model.makeValue("/root/send/savedata/orddd" , orddd);
  511. model.makeValue("/root/send/savedata/cretno", cretno);
  512. model.makeValue("/root/send/savedata/procflag", "F");
  513. model.makeValue("/root/send/savedata/profcertseq", profcertseq);
  514. model.makeValue("/root/send/savedata/freeissresn", freeissresn);
  515. if(submit("TXMMR02907")){
  516. fGetProfPrntHist();
  517. }
  518. }else{
  519. fGetProfPrntHist();
  520. }
  521. }
  522. }else if(curcol = grd_proflist.colRef("recvnm")){
  523. var recvnm = grd_proflist.valueMatrix(grd_proflist.row, grd_proflist.colRef("recvnm"));
  524. if(freeissresn != ""){
  525. var rtnval = messageBox("수령인을", "Q002");
  526. if(rtnval == 6){
  527. var pid = model.getValue(grd_proflist.nodeset + "[" + grd_proflist.row + "]/pid");
  528. var orddd = model.getValue(grd_proflist.nodeset + "[" + grd_proflist.row + "]/orddd");
  529. var cretno = model.getValue(grd_proflist.nodeset + "[" + grd_proflist.row + "]/cretno");
  530. var profcertseq = model.getValue(grd_proflist.nodeset + "[" + grd_proflist.row + "]/profcertseq");
  531. var recvnm = model.getValue(grd_proflist.nodeset + "[" + grd_proflist.row + "]/recvnm");
  532. model.removeNodeset("/root/send/savedata");
  533. model.makeValue("/root/send/savedata/pid" , pid);
  534. model.makeValue("/root/send/savedata/orddd" , orddd);
  535. model.makeValue("/root/send/savedata/cretno", cretno);
  536. model.makeValue("/root/send/savedata/procflag", "R");
  537. model.makeValue("/root/send/savedata/profcertseq", profcertseq);
  538. model.makeValue("/root/send/savedata/recvnm", recvnm);
  539. if(submit("TXMMR02907")){
  540. fGetProfPrntHist();
  541. }
  542. }else{
  543. fGetProfPrntHist();
  544. }
  545. }
  546. }
  547. ]]>
  548. </script>
  549. <script type="javascript" ev:event="xforms-value-changed">
  550. <![CDATA[
  551. var currow = grd_proflist.row;
  552. var curcol = grd_proflist.col;
  553. if(grd_proflist.col == grd_proflist.colRef("authscanflag") ||
  554. grd_proflist.col == grd_proflist.colRef("authtranflag") ||
  555. grd_proflist.col == grd_proflist.colRef("certscanflag") ||
  556. grd_proflist.col == grd_proflist.colRef("certtranflag")){
  557. if(compareNodeVal("/root/main/profhist/list[" + currow + "]", "/root/temp2/profhist/list[" + currow + "]", "status")){
  558. model.setValue(grd_proflist.nodeset + "[" + currow + "]/status", "u");
  559. }else{
  560. model.setValue(grd_proflist.nodeset + "[" + currow + "]/status", "");
  561. }
  562. }
  563. ]]>
  564. </script>
  565. </datagrid>
  566. <group id="grp_tle" style="left:0px; top:0px; width:1187px; height:13px; ">
  567. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:106px; height:14px; ">제증명리스트</caption>
  568. </group>
  569. <group id="grp_calcHist" visibility="hidden" style="left:619px; top:437px; width:555px; height:320px; ">
  570. <datagrid id="datagrid1" nodeset="/root/main/prcpinfo/list" caption="선택^영수일자^영수증번호^수가코드^수가명칭^처방일자^처방번호^기관코드^처방이력번호" colsep="^" colwidth="30, 100, 120, 100, 200, 100, 100, 100, 100" dataheight="25" mergecellsfixedrows="bycolrec" rowheader="25" rowsep="|" style="left:1px; top:30px; width:552px; height:288px; ">
  571. <col ref="check" type="checkbox"/>
  572. <col ref="rcptdd"/>
  573. <col ref="rcptno"/>
  574. <col ref="calcscorcd"/>
  575. <col ref="hngnm"/>
  576. <col ref="prcpdd" visibility="hidden"/>
  577. <col ref="prcpno" visibility="hidden"/>
  578. <col ref="instcd" visibility="hidden"/>
  579. <col ref="prcphistno" visibility="hidden"/>
  580. </datagrid>
  581. <caption id="caption20" class="tit_2" style="left:5px; top:9px; width:73px; height:13px; ">수가내역</caption>
  582. <button id="button41" class="btn4_letter2" style="left:437px; top:2px; width:56px; height:22px; ">
  583. <caption>반환</caption>
  584. <script type="javascript" ev:event="DOMActivate">
  585. <![CDATA[
  586. fDelCalcScor();
  587. ]]>
  588. </script>
  589. </button>
  590. <button id="button45" class="btn4_letter2" style="left:497px; top:2px; width:56px; height:22px; ">
  591. <caption>닫기</caption>
  592. <script type="javascript" ev:event="DOMActivate">
  593. <![CDATA[
  594. grp_calcHist.attribute("visibility")= "hidden";
  595. ]]>
  596. </script>
  597. </button>
  598. <line id="line1" class="line_1" style="x1:0px; y1:25px; x2:553px; y2:25px; "/>
  599. </group>
  600. <secret id="input4" ref="/root/tmp/rrgstno2" navindex="4" secretstartposition="1" appearance="secret" style="left:743px; top:49px; width:69px; height:19px; ">
  601. <script type="javascript" ev:event="onkeypress">
  602. <![CDATA[
  603. if(event.keyCode == 13){
  604. model.setFocus("radio1");
  605. model.refresh();
  606. model.setValue("/root/tmp/srchcond", 3);
  607. model.setValue("/root/tmp/rrgstno1", input3.currentText);
  608. model.setValue("/root/tmp/rrgstno2", input4.value);
  609. btn_usrsrch.dispatch("DOMActivate");
  610. model.refresh();
  611. }
  612. ]]>
  613. </script>
  614. </secret>
  615. <button id="button10" class="btn2_letter2" style="left:1139px; top:105px; width:42px; height:19px; ">
  616. <caption>엑셀</caption>
  617. <script type="javascript" ev:event="DOMActivate">
  618. <![CDATA[
  619. var selectValue1 = true;
  620. var selectValue2 = 1;
  621. var fileName = window.fileDialog("save", ",", false, "제증명이력", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  622. if (fileName != ""){
  623. //grd_proflist.saveExcel(fileName, "sheetname:sheet1;col_08:label;col_13:label;col_17:label;col_23:label;");
  624. //grd_proflist.saveExcel(fileName, "sheetname:sheet1;col_08:label;col_13:label;col_17:label;col_23:label;col_15:label;");
  625. grd_proflist.saveExcel(fileName, "SheetName", false, false, "", "", false);
  626. }
  627. ]]>
  628. </script>
  629. </button>
  630. <button id="btn_dc" class="btn2_letter2" style="left:1095px; top:105px; width:42px; height:19px; ">
  631. <caption>반환</caption>
  632. <script type="javascript" ev:event="DOMActivate">
  633. <![CDATA[
  634. var currow = grd_proflist.row;
  635. if(currow > 0){
  636. var prcpno = model.getValue(grd_proflist.nodeset + "[" + currow + "]/prcpno");
  637. var issflag = model.getValue(grd_proflist.nodeset + "[" + currow + "]/issflag");
  638. if(issflag == 10){
  639. messageBox("미발행 제증명은 반환", "C001");
  640. return;
  641. }
  642. if(issflag == 50){
  643. messageBox("이미 반환된 처방", "E008");
  644. return;
  645. }
  646. if(prcpno == 0){
  647. var rtnval = messageBox("무료로 발급된 제증명입니다. 반납을", "Q004");
  648. if(rtnval == 6){
  649. fDCFreeProf();
  650. }
  651. }else{
  652. fSrchCalcScor();
  653. }
  654. }else{
  655. messageBox("반납처리할 제증명을", "C001");
  656. return;
  657. }
  658. ]]>
  659. </script>
  660. </button>
  661. <button id="btn_profhist" class="btn1_letter3" style="left:1060px; top:22px; width:56px; height:22px; ">
  662. <caption>조 회</caption>
  663. <script type="javascript" ev:event="DOMActivate">
  664. <![CDATA[
  665. var ddInterval = getDateInterval(ipt_fromdd.value, ipt_todd.value);
  666. var pid = input1.value;
  667. var hngnm = input2.value;
  668. var formcd = cmb_profformlist.value;
  669. if(ddInterval > 31){
  670. if(pid == "" && hngnm =="" && formcd == "") {
  671. messageBox("시스템 부하 원인으로 등록번호,이름,서식명없이 31일까지만 조회", "I006");
  672. return;
  673. }
  674. }
  675. fGetProfPrntHist();
  676. ]]>
  677. </script>
  678. </button>
  679. <caption id="caption1" style="left:338px; top:24px; width:15px; height:20px; ">~</caption>
  680. <caption id="caption2" class="search_name" style="left:17px; top:23px; width:86px; height:17px; vertical-align:middle; ">조회일자 :</caption>
  681. <caption id="caption3" class="search_name" style="left:17px; top:49px; width:92px; height:17px; vertical-align:middle; ">등록번호 :</caption>
  682. <select1 id="radio1" ref="/root/main/srchprofhist/issflag" class="radio_search" appearance="full" cellspacing="5" cols="4" rows="1" overflow="visible" style="left:383px; top:75px; width:213px; height:20px; border-style:none; ">
  683. <choices>
  684. <item>
  685. <label>전체</label>
  686. <value>-</value>
  687. </item>
  688. <item>
  689. <label>미발행</label>
  690. <value>U</value>
  691. </item>
  692. <item>
  693. <label>발행</label>
  694. <value>I</value>
  695. </item>
  696. <item>
  697. <label>반납</label>
  698. <value>R</value>
  699. </item>
  700. </choices>
  701. <script type="javascript" ev:event="xforms-value-changed">
  702. <![CDATA[
  703. btn_profhist.dispatch("DOMActivate");
  704. ]]>
  705. </script>
  706. </select1>
  707. <input id="ipt_todd" ref="/root/main/srchprofhist/todd" inputtype="date" style="left:352px; top:24px; width:100px; height:19px; text-align:center; "/>
  708. <input id="input1" ref="/root/tmp/pid" class="input_search" navindex="1" style="left:107px; top:49px; width:100px; height:19px; ">
  709. <script type="javascript" ev:event="onkeypress">
  710. <![CDATA[
  711. if(event.keyCode == 13){
  712. model.setValue("/root/tmp/srchcond", 1);
  713. model.setValue("/root/tmp/pid", input1.currentText);
  714. btn_usrsrch.dispatch("DOMActivate");
  715. model.refresh();
  716. }
  717. ]]>
  718. </script>
  719. </input>
  720. <line id="line2" class="line_1" style="x1:0px; y1:126px; x2:1183px; y2:126px; "/>
  721. <caption id="caption7" class="search_name" style="left:545px; top:24px; width:88px; height:17px; vertical-align:middle; ">제 증 명 :</caption>
  722. <button id="btn_usrsrch" class="icon_search" style="left:213px; top:51px; width:16px; height:16px; ">
  723. <caption/>
  724. <script type="javascript" ev:event="DOMActivate">
  725. <![CDATA[
  726. model.setValue("/root/tmp/autoflag", "Y");
  727. modal("SPPMC02500", 1,10, 10, "SPPMC02500", "/root/tmp", "/root/send");
  728. model.setValue("/root/main/srchprofhist/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  729. model.setValue("/root/tmp/pid" , model.getValue("/root/main/patinfo/patinfolist/pid"));
  730. model.setValue("/root/tmp/hngnm" , model.getValue("/root/main/patinfo/patinfolist/hngnm"));
  731. model.setValue("/root/tmp/rrgstno1", model.getValue("/root/main/patinfo/patinfolist/rrgstno1"));
  732. model.setValue("/root/tmp/rrgstno2", model.getValue("/root/main/patinfo/patinfolist/rrgstno2"));
  733. btn_profhist.dispatch("DOMActivate");
  734. ]]>
  735. </script>
  736. </button>
  737. <select1 id="cmb_profformlist" ref="/root/main/srchprofhist/formcd" class="combo_search" appearance="minimal" editmode="inputsearch" itemcount="30" style="left:635px; top:24px; width:365px; height:19px; ">
  738. <choices>
  739. <itemset nodeset="/root/main/forminfo/formlist">
  740. <label ref="formnm"/>
  741. <value ref="formcd"/>
  742. </itemset>
  743. </choices>
  744. <script type="javascript" ev:event="onkeypress">
  745. <![CDATA[
  746. if (event.keyCode == 13){
  747. cmb_profformlist.select(cmb_profformlist.focusIndex);
  748. }
  749. ]]>
  750. </script>
  751. <script type="javascript" ev:event="xforms-value-changed">
  752. <![CDATA[
  753. //btn_profhist.dispatch("DOMActivate");
  754. ]]>
  755. </script>
  756. </select1>
  757. <input id="ipt_fromdd" ref="/root/main/srchprofhist/fromdd" inputtype="date" style="left:234px; top:24px; width:100px; height:19px; text-align:center; "/>
  758. <select1 id="radio2" ref="/root/main/srchprofhist/srchflag" appearance="full" cellspacing="10" cols="2" overflow="visible" style="left:105px; top:24px; width:125px; height:20px; border-style:none; ">
  759. <choices>
  760. <item>
  761. <label>작성일</label>
  762. <value>rec</value>
  763. </item>
  764. <item>
  765. <label>발행일</label>
  766. <value>pub</value>
  767. </item>
  768. </choices>
  769. </select1>
  770. <input id="input2" ref="/root/tmp/hngnm" class="input_search" navindex="2" style="left:383px; top:49px; width:117px; height:19px; ">
  771. <script type="javascript" ev:event="onkeypress">
  772. <![CDATA[
  773. if(event.keyCode == 13){
  774. model.setValue("/root/tmp/srchcond", 2);
  775. model.setValue("/root/tmp/hngnm", input2.currentText);
  776. btn_usrsrch.dispatch("DOMActivate");
  777. model.refresh();
  778. }
  779. ]]>
  780. </script>
  781. </input>
  782. <input id="input3" ref="/root/tmp/rrgstno1" class="input_search" navindex="3" maxlength="6" style="left:662px; top:49px; width:73px; height:19px; ">
  783. <script type="javascript" ev:event="onmaxlength">
  784. <![CDATA[
  785. model.setFocus("secret1");
  786. model.refresh();
  787. ]]>
  788. </script>
  789. </input>
  790. <caption id="caption5" class="search_name" style="left:294px; top:49px; width:92px; height:17px; vertical-align:middle; ">환 자 명 :</caption>
  791. <caption id="caption8" class="search_name" style="left:545px; top:49px; width:112px; height:17px; vertical-align:middle; ">주민등록번호 :</caption>
  792. <button id="button1" class="btn4_letter5" style="left:1060px; top:46px; width:92px; height:22px; ">
  793. <caption>이미지뷰어</caption>
  794. <script type="javascript" ev:event="DOMActivate">
  795. <![CDATA[
  796. var currow = grd_proflist.row;
  797. if(currow > 0){
  798. var formcd = model.getValue(grd_proflist.nodeset + "[" + currow + "]/formcd");
  799. var yearseqno = model.getValue(grd_proflist.nodeset + "[" + currow + "]/yearseqno");
  800. var pid = model.getValue(grd_proflist.nodeset + "[" + currow + "]/pid");
  801. model.setValue("/root/init/iemr/pid" , pid); //등록번호
  802. model.setValue("/root/init/iemr/docucd" , formcd); //서식코드
  803. model.setValue("/root/init/iemr/ocmnum" , ""); //연번호
  804. if(yearseqno != ""){
  805. model.setValue("/root/init/iemr/ocmnum" , yearseqno);
  806. }
  807. model.setValue("/root/init/iemr/cmc_spcid" , ""); //blocking null exception
  808. model.setValue("/root/init/iemr/cmc_orddate", ""); //blocking null exception
  809. model.setValue("/root/init/iemr/cmc_orderseqno", ""); //blocking null exception
  810. open("SPMMR06400", "", "", "", "", "/root/init/iemr", "/root/send/iemr");
  811. }else{
  812. messageBox("이미지뷰어에서 보여질 제증명을", "C001");
  813. return;
  814. }
  815. ]]>
  816. </script>
  817. </button>
  818. <button id="button2" class="btn4_letter5" style="left:1060px; top:70px; width:92px; height:22px; ">
  819. <caption>위임장뷰어</caption>
  820. <script type="javascript" ev:event="DOMActivate">
  821. <![CDATA[
  822. var currow = grd_proflist.row;
  823. if(currow > 0){
  824. var yearseqno = model.getValue(grd_proflist.nodeset + "[" + currow + "]/yearseqno");
  825. var pid = model.getValue(grd_proflist.nodeset + "[" + currow + "]/pid");
  826. if(yearseqno == "" || yearseqno == null){
  827. messageBox("발행된 연번호가", "I004");
  828. return;
  829. }
  830. model.setValue("/root/init/iemr/pid" , pid); //등록번호
  831. model.setValue("/root/init/iemr/docucd" , "0800004076"); //서식코드
  832. model.setValue("/root/init/iemr/ocmnum" , yearseqno); //연번호
  833. //if(yearseqno != ""){
  834. // model.setValue("/root/init/iemr/ocmnum" , yearseqno);
  835. //}
  836. model.makeValue("/root/init/iemr/cmc_spcid" , ""); //blocking null exception
  837. model.makeValue("/root/init/iemr/cmc_orddate", ""); //blocking null exception
  838. model.makeValue("/root/init/iemr/cmc_orderseqno", ""); //blocking null exception
  839. open("SPMMR06400", "", "", "", "", "/root/init/iemr", "/root/send/iemr");
  840. }else{
  841. messageBox("위임장뷰어에서 보여질 제증명을", "C001");
  842. return;
  843. }
  844. ]]>
  845. </script>
  846. </button>
  847. <button id="button3" class="btn5_letter2" style="left:1051px; top:104px; width:42px; height:19px; ">
  848. <caption>저장</caption>
  849. <script type="javascript" ev:event="DOMActivate">
  850. <![CDATA[
  851. var nodelist = model.instances(0).selectNodes("/root/main/profhist/list[status='u']");
  852. if(nodelist.length > 0){
  853. var savedata = getNodeListCSV(nodelist);
  854. model.removeNodeset("/root/send/savedata");
  855. model.makeNode("/root/send/savedata");
  856. model.makeValue("/root/send/savedata/procflag/procflag", "S");
  857. model.makeValue("/root/send/savedata/profcertinfo", savedata);
  858. if(submit("TXMMR02909")){
  859. fGetProfPrntHist();
  860. }
  861. }else{
  862. messageBox("저장할 데이터가", "I004");
  863. return;
  864. }
  865. ]]>
  866. </script>
  867. </button>
  868. <caption id="caption4" class="search_name" style="left:294px; top:75px; width:88px; height:17px; vertical-align:middle; ">발행구분 :</caption>
  869. <select1 id="radio3" ref="/root/main/srchprofhist/holograpflag" class="radio_search" appearance="full" cellspacing="5" cols="3" rows="1" overflow="visible" style="left:106px; top:75px; width:155px; height:20px; border-style:none; ">
  870. <choices>
  871. <item>
  872. <label>전체</label>
  873. <value>-</value>
  874. </item>
  875. <item>
  876. <label>OCS</label>
  877. <value>O</value>
  878. </item>
  879. <item>
  880. <label>자필</label>
  881. <value>A</value>
  882. </item>
  883. </choices>
  884. <script type="javascript" ev:event="xforms-value-changed">
  885. <![CDATA[
  886. //btn_profhist.dispatch("DOMActivate");
  887. ]]>
  888. </script>
  889. </select1>
  890. <caption id="caption9" class="search_name" style="left:17px; top:74px; width:88px; height:17px; vertical-align:middle; ">자필구분 :</caption>
  891. <caption id="caption10" class="search_name" style="left:855px; top:49px; width:83px; height:17px; vertical-align:middle; ">구 분 :</caption>
  892. <select1 id="combo1" ref="/root/main/srchprofhist/ordtype" class="combo_search" appearance="minimal" editmode="inputsearch" itemcount="30" style="left:925px; top:49px; width:75px; height:19px; text-align:center; ">
  893. <choices>
  894. <item>
  895. <label>전체</label>
  896. <value/>
  897. </item>
  898. <item>
  899. <label>DSC</label>
  900. <value>D</value>
  901. </item>
  902. <item>
  903. <label>응급</label>
  904. <value>E</value>
  905. </item>
  906. <item>
  907. <label>입원</label>
  908. <value>I</value>
  909. </item>
  910. <item>
  911. <label>외래</label>
  912. <value>O</value>
  913. </item>
  914. <item>
  915. <label>건진</label>
  916. <value>S</value>
  917. </item>
  918. </choices>
  919. <script type="javascript" ev:event="onkeypress">
  920. <![CDATA[
  921. if (event.keyCode == 13){
  922. cmb_profformlist.select(cmb_profformlist.focusIndex);
  923. }
  924. ]]>
  925. </script>
  926. <script type="javascript" ev:event="xforms-value-changed">
  927. <![CDATA[
  928. btn_profhist.dispatch("DOMActivate");
  929. ]]>
  930. </script>
  931. </select1>
  932. <caption id="caption11" class="search_name" style="left:645px; top:74px; width:92px; height:17px; vertical-align:middle; ">발 행 자 :</caption>
  933. <input id="ipt_prntuserid" ref="/root/main/srchprofhist/prntuserid" class="input_search" disabled="false" navindex="1" style="left:732px; top:74px; width:85px; height:19px; ">
  934. <script type="javascript" ev:event="onkeypress">
  935. <![CDATA[
  936. ]]>
  937. </script>
  938. <script type="javascript" ev:event="xforms-value-changed">
  939. <![CDATA[
  940. if( model.getValue("/root/main/srchprofhist/prntuserid") == "" ){
  941. model.setValue("/root/main/srchprofhist/prntusernm", "");
  942. }
  943. model.refresh();
  944. ]]>
  945. </script>
  946. </input>
  947. <input id="ipt_prntusernm" ref="/root/main/srchprofhist/prntusernm" class="input_search" disabled="true" navindex="2" style="left:840px; top:74px; width:102px; height:19px; ">
  948. <script type="javascript" ev:event="onkeypress">
  949. <![CDATA[
  950. ]]>
  951. </script>
  952. </input>
  953. <button id="btn_useid" class="icon_search" navindex="5" style="left:820px; top:74px; width:16px; height:16px; ">
  954. <caption/>
  955. <script type="javascript" ev:event="DOMActivate">
  956. <![CDATA[
  957. fSetUserinfo();
  958. ]]>
  959. </script>
  960. </button>
  961. <line id="line30" class="line_4" style="x1:1025px; y1:25px; x2:1025px; y2:91px; "/>
  962. </xhtml:body>
  963. </xhtml:html>