SMLLJ00400_검체바코드재출력.xrw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMLLJ00400_검체바코드재출력.xrw
  4. * 설 명 : 검체바코드재출력
  5. * 설 계 자 : (주)에이씨케이 -
  6. * 작 성 자 : (주)에이씨케이 - 박정은
  7. * 작 성 일 : 2007.06.19
  8. * 수정이력 : 조회내역 1row 면 바로 출력되게 수정해야함
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  12. <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">
  13. <xhtml:head>
  14. <xhtml:title/>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root>
  18. <main>
  19. <!--
  20. <spcinfodetl>
  21. <chk/>
  22. <spcno>I20061129000010</spcno>
  23. <prcpdd>20061225</prcpdd>
  24. <regno>1234567890</regno>
  25. <nm>홍길동</nm>
  26. <sexage>20/M</sexage>
  27. <rregno>123456-1234567</rregno>
  28. <orddept>산부인과</orddept>
  29. <reqdr>나의사</reqdr>
  30. <wardroom>5A병동/5302호</wardroom>
  31. <testitem>검사항목1</testitem>
  32. <spcnm>WB</spcnm>
  33. <er/>
  34. <remark/>
  35. </spcinfodetl>
  36. -->
  37. <getspcinfolist>
  38. <chk/>
  39. <bcno/>
  40. <prcpdd/>
  41. <pid/>
  42. <patnm/>
  43. <sexage/>
  44. <rrgstno/>
  45. <orddeptcd/>
  46. <orddrid/>
  47. <wardroom/>
  48. <tclsnmlist/>
  49. <tsectnm/>
  50. <spcnm/>
  51. <erprcpflag/>
  52. <prcpremfact/>
  53. <tclscdlist/>
  54. </getspcinfolist>
  55. <barcdprntsetup/>
  56. </main>
  57. <send>
  58. <fromdd/>
  59. <todd/>
  60. <bcollflag/>
  61. <refflag/>
  62. <reftext/>
  63. <scrnid/>
  64. <bcdgbn/>
  65. <data1/>
  66. </send>
  67. <init>
  68. </init>
  69. <hidden>
  70. <ref>
  71. <prcpfromdd/>
  72. <prcptodd/>
  73. <bcollflag>0</bcollflag>
  74. <refflag>1</refflag>
  75. <reftext/>
  76. <bcdgbn>1</bcdgbn>
  77. </ref>
  78. <barcd/>
  79. <test>
  80. <startdt/>
  81. <enddt/>
  82. </test>
  83. </hidden>
  84. </root>
  85. </instance>
  86. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  87. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  88. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  89. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  90. <script type="javascript" src="../../../lis/commonweb/js/LLZ001.js"/>
  91. <script type="javascript" src="../../../lis/commonweb/js/LZZ001.js"/>
  92. <script type="javascript" src="../../../lis/commonweb/js/LPZ001.js"/>
  93. <script type="javascript" src="../../../lis/commonweb/js/HanFont24.js"/>
  94. <script type="javascript" ev:event="xforms-ready">
  95. <![CDATA[
  96. var today = getCurrentDate();
  97. var mDate = getCurrentDate().toDate("YYYYMMDD").getAddDate(-2);
  98. model.setValue("/root/hidden/ref/prcpfromdd", mDate.getDateFormat("YYYYMMDD"));
  99. model.setValue("/root/hidden/ref/prcptodd", today);
  100. grp_ref.refresh();
  101. // 그리드 전체 선택 기능
  102. grd_spclist.fixedcellcheckbox(0,1)=true;
  103. model.setValue("/root/send/scrnid", getScreenID());
  104. //lzzfMakeBrcdPrntObj("CommAX");//이전 OCX
  105. // body.createChild("xforms:object", "id:"+ "CommAX" +"; clsid:{AD952C59-FBD8-4EB9-8960-7CE23A898328}; visibility:hidden; left:0px; top:0px; width:0px; height:0px; ");
  106. submit("TRLLC90101");
  107. lzzfMakeBrcdPrntObjHanDo("CommAX");
  108. ]]>
  109. </script>
  110. <submission id="TRLLJ00401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/getspcinfolist"/>
  111. <submission id="TRLZZ00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/hidden/barcd"/>
  112. <submission id="TXLLJ00409" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
  113. <submission id="TRLLC90101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/barcdprntsetup"/>
  114. <submission id="TRLLJ00402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/hidden/barcode"/>
  115. <submission id="TRLZZ90101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data1" replace="instance" resultref="/root/hidden/PatNmBarCdPrint"/>
  116. </model>
  117. <script type="javascript">
  118. <![CDATA[
  119. // 초기화
  120. function fSetInit() {
  121. model.reset();
  122. }
  123. // 검체정보상세내역 조회
  124. function fGetSpcInfoDetlList(Ref){
  125. if(Ref =="ref"){
  126. model.setValue("/root/send/fromdd", model.getValue("/root/hidden/ref/prcpfromdd"));
  127. model.setValue("/root/send/todd", model.getValue("/root/hidden/ref/prcptodd"));
  128. model.setValue("/root/send/bcollflag", model.getValue("/root/hidden/ref/bcollflag"));
  129. model.setValue("/root/send/refflag", model.getValue("/root/hidden/ref/refflag"));
  130. model.setValue("/root/send/reftext", model.getValue("/root/hidden/ref/reftext"));
  131. model.makeValue("/root/send/ddflag", fSetRefFromdd());
  132. }else if(Ref=="enter"){
  133. if(model.getValue("/root/hidden/ref/reftext") == "") {
  134. messageBox(cmb_ref.label,"C001");
  135. return;
  136. }
  137. model.setValue("/root/send/fromdd", "");
  138. model.setValue("/root/send/todd", "");
  139. model.setValue("/root/send/bcollflag", "");
  140. model.setValue("/root/send/refflag", model.getValue("/root/hidden/ref/refflag"));
  141. model.makeValue("/root/send/ddflag", true);
  142. }
  143. if(model.getValue("/root/send/ddflag") == "True") {
  144. // 검체정보상세내역 조회
  145. submit("TRLLJ00401");
  146. }
  147. // 바코드번호 리딩시 또는 Sample보관바코드선택하고 등록번호 리딩시 바로 출력되게
  148. if(Ref=="enter"){
  149. if(model.getValue("/root/hidden/ref/refflag")=="1"
  150. || (model.getValue("/root/hidden/ref/refflag")=="2" && model.getValue("/root/hidden/ref/bcdgbn") == "4")){
  151. if(grd_spclist.rows > 1){
  152. model.setValue("/root/main/getspcinfolist/chk", "Y");
  153. grd_spclist.rebuild();
  154. fExeBarcdReprnt();
  155. }
  156. }
  157. }
  158. }
  159. // 바코드 재출력
  160. function fExeBarcdReprnt(){
  161. //model.removeNodeset("/root/hidden/barcode/barcodeinfo");
  162. var bcno = "";
  163. var pid = "";
  164. var bcollTF = false;
  165. var bcdgbn = model.getValue("/root/hidden/ref/bcdgbn");
  166. if(bcdgbn == "3"){
  167. bcdgbn = "1";
  168. }
  169. if(bcdgbn == "4"){
  170. pid = model.getvalue("/root/main/getspcinfolist[1]/pid");
  171. bcollTF = true;
  172. }else{
  173. for(i=1; i< grd_spclist.rows; i++){
  174. if(model.getValue("/root/main/getspcinfolist["+i+"]/chk")=="Y"){
  175. bcno = bcno + "'" + model.getvalue("/root/main/getspcinfolist["+i+"]/bcno") + "'" + ",";
  176. bcollTF = true;
  177. }
  178. }
  179. }
  180. if(bcollTF == false){
  181. messageBox("재출력할 검체를 선택하십시오. ", "I");
  182. return;
  183. }
  184. if(bcollTF) {
  185. if(bcdgbn == "4"){
  186. model.removeNodeset("/root/send/data1");
  187. model.makeValue("/root/send/data1" , pid);
  188. submit("TRLZZ90101");
  189. }else{
  190. bcno = bcno.substring( 0 ,bcno.length - 1);
  191. model.makeValue("/root/send/bcnolist" , bcno);
  192. model.setValue("/root/send/bcdgbn", bcdgbn);
  193. submit("TRLLJ00402");
  194. }
  195. copyNodeType("/root/hidden/barcode/barcodeinfo", "/root/main/barcdprntsetup/prntsetupinfo/setupinfo", "after");
  196. var prtkind = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/prntkind");
  197. var portnm = model.getvalue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/commkind");
  198. if(model.getValue("/root/hidden/ref/bcdgbn")=="1"){ // 채혈 바코드
  199. if((prtkind == "9" && portnm == "01") || (prtkind == "11" && portnm == "01") || prtkind == "10" ||prtkind == "2" || prtkind == "6" || prtkind == "7"){ // sato 바코드
  200. fLisSpcBarcodePrint2("/root/hidden/barcode/barcodeinfo");
  201. }else if(prtkind == "8" ){ // B472
  202. fLisSpcBarcodePrint3("/root/hidden/barcode/barcodeinfo");
  203. }else{ // ZEBRA & 기타
  204. fLisSpcBarcodePrint("/root/hidden/barcode/barcodeinfo");
  205. }
  206. }else if(model.getValue("/root/hidden/ref/bcdgbn")=="2"){ // 분주 바코드
  207. if( prtkind == "2" || prtkind == "6" || prtkind == "7"){
  208. fLisSpcBarcodePrintB2("/root/hidden/barcode/barcodeinfo"); // 분주 바뀐거
  209. }else{
  210. fLisSpcBarcodePrintB("/root/hidden/barcode/barcodeinfo"); // 분주 바뀐거
  211. }
  212. }else if(model.getValue("/root/hidden/ref/bcdgbn")=="3"){ // 분자배지 바코드
  213. if( prtkind == "2" || prtkind == "6" || prtkind == "7"){
  214. fLisSpcBarcodePrintD2("/root/hidden/barcode/barcodeinfo");
  215. }else{
  216. fLisSpcBarcodePrintD("/root/hidden/barcode/barcodeinfo");
  217. }
  218. }else if(model.getValue("/root/hidden/ref/bcdgbn")=="4"){ // sample 보관 바코드
  219. if( prtkind == "2" || prtkind == "6" || prtkind == "7"){
  220. fSampleKeepBarCdLabelSaTo("/root/hidden/PatNmBarCdPrint/printinfo");
  221. }else{
  222. fSampleKeepBarCdLabel("/root/hidden/PatNmBarCdPrint/printinfo");
  223. }
  224. }
  225. }
  226. //model.removeNodeset("/root/hidden/barcode/barcodeinfo");
  227. }
  228. // 조회일자 3일 이전으로 못가게 막기
  229. function fSetRefFromdd(){
  230. //var today = getCurrentDate();
  231. var todd = model.getValue("/root/hidden/ref/prcptodd");
  232. var mDate = todd.toDate("YYYYMMDD").getAddDate(-3);
  233. var fromdd = model.getValue("/root/hidden/ref/prcpfromdd");
  234. //alert("mDate= " +mDate);
  235. //alert("fromdd= " + fromdd);
  236. if( mDate.getDateFormat("YYYYMMDD") > fromdd){
  237. //model.alert("3일 이내의 기간으로 검색하세요.");
  238. messageBox("3일 이내의 기간만 검색","I006");
  239. //model.setValue("/root/hidden/spcref/reffromdd", mDate.getDateFormat("YYYYMMDD"));
  240. return false;
  241. }else if(todd < fromdd){
  242. //model.alert("기간설정이 잘못 되었습니다.");
  243. messageBox("기간설정이 잘못", "E005");
  244. return false;
  245. }else{
  246. return true;
  247. }
  248. }
  249. //키이벤트 엔터키 입력시
  250. function fKeyEvent(){
  251. if(event.keyCode == "13"){
  252. // 등록번호 바코드 리딩시
  253. if(event.target == "ipt_text"){
  254. model.setValue("/root/hidden/ref/reftext", (ipt_text.currentText).toUpperCase());
  255. model.setvalue("/root/send/reftext", (ipt_text.currentText).toUpperCase());
  256. fGetSpcInfoDetlList("enter");
  257. ipt_text.selBegin = 0;
  258. ipt_text.selEnd = ipt_text.currentText.length;
  259. }
  260. }
  261. }
  262. // test 삭제예정
  263. function fSetTest(){
  264. model.setValue("/root/send/reftext", grd_spclist.getUpdateData());
  265. submit("TXLLJ00409");
  266. }
  267. //프린터 설정
  268. function fSetPrint() {
  269. var count = getNodesetCount("/root/main/barcdprntsetup/prntsetupinfo/setupinfo");
  270. if(count == 0) {
  271. model.makeNode("/root/main/barcdprntsetup/prntsetupinfo/setupinfo");
  272. }
  273. open("SPLLC90100_바코드프린터설정.xrw", "", "", "", "", "/root/main/barcdprntsetup/prntsetupinfo/setupinfo", "/root/main/barcdprntsetup/prntsetupinfo/setupinfo");
  274. }
  275. ]]>
  276. </script>
  277. </xhtml:head>
  278. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  279. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744; ">
  280. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:70px; "/>
  281. <caption id="caption1" class="tit_2" style="left:5px; top:55px; width:131px; height:13px; ">검체정보상세내역</caption>
  282. <group id="grp_ref" style="left:0px; top:10px; width:1195px; height:35px; ">
  283. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  284. <line id="line3" class="line_4" style="x1:1123px; y1:7px; x2:1123px; y2:29px; "/>
  285. <caption id="caption2" class="search_name" style="left:5px; top:9px; width:90px; height:17px; ">처방일자 :</caption>
  286. <caption id="caption3" class="search_no_b" style="left:190px; top:10px; width:15px; height:17px; vertical-align:middle; ">~</caption>
  287. <caption id="caption5" class="search_name" style="left:780px; top:9px; width:90px; height:17px; ">조회구분 :</caption>
  288. <input id="ipt_text" ref="/root/hidden/ref/reftext" class="input_s_button" inputtype="button" style="left:978px; top:8px; width:135px; height:19px; ">
  289. <script type="javascript" ev:event="onbuttonclick">
  290. <![CDATA[
  291. model.setValue("/root/hidden/ref/reftext", (ipt_text.currentText).toUpperCase());
  292. model.setvalue("/root/send/reftext", (ipt_text.currentText).toUpperCase());
  293. fGetSpcInfoDetlList("enter");
  294. ]]>
  295. </script>
  296. </input>
  297. <select1 id="cmb_ref" ref="/root/hidden/ref/refflag" class="combo_search" appearance="minimal" style="left:875px; top:8px; width:100px; height:19px; ">
  298. <choices>
  299. <item>
  300. <label>바코드번호</label>
  301. <value>1</value>
  302. </item>
  303. <item>
  304. <label>등록번호</label>
  305. <value>2</value>
  306. </item>
  307. <item>
  308. <label>성명</label>
  309. <value>3</value>
  310. </item>
  311. </choices>
  312. </select1>
  313. <input id="ipt_from" ref="/root/hidden/ref/prcpfromdd" class="input_search" inputtype="date" style="left:100px; top:8px; width:85px; height:19px; "/>
  314. <input id="ipt_to" ref="/root/hidden/ref/prcptodd" class="input_search" inputtype="date" style="left:205px; top:8px; width:85px; height:19px; "/>
  315. <button id="btn_ref" class="btn1_letter2" style="left:1133px; top:7px; width:56px; height:22px; ">
  316. <caption>조회</caption>
  317. <script type="javascript" ev:event="DOMActivate">
  318. <![CDATA[
  319. fGetSpcInfoDetlList("ref");
  320. ]]>
  321. </script>
  322. </button>
  323. <caption id="caption4" class="search_name" style="left:300px; top:9px; width:80px; height:17px; ">구분 :</caption>
  324. <select1 id="rdo_bcdgbn" ref="/root/hidden/ref/bcdgbn" appearance="full" cellspacing="5" cols="4" overflow="visible" style="left:370px; top:10px; width:405px; height:15px; border-style:none; ">
  325. <choices>
  326. <item>
  327. <label>채혈바코드</label>
  328. <value>1</value>
  329. </item>
  330. <item>
  331. <label>분주바코드</label>
  332. <value>2</value>
  333. </item>
  334. <item>
  335. <label>분자배지바코드</label>
  336. <value>3</value>
  337. </item>
  338. <item>
  339. <label>Sample보관바코드</label>
  340. <value>4</value>
  341. </item>
  342. </choices>
  343. </select1>
  344. </group>
  345. <datagrid id="grd_spclist" nodeset="/root/main/getspcinfolist" caption="^바코드번호^처방일시^등록번호^성명^Sex/Age^주민등록번호^진료과^의뢰의사^병동/병실^검사항목^시행부서^검체명^응급^Remark" colsep="^" colwidth="30, 85, 85, 80, 70, 60, 100, 80, 80, 112, 160, 80, 103, 30, 100" dataheight="25" defaultrows="1" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:0px; top:75px; width:1194px; height:669px; ">
  346. <col checkvalue="Y,N" ref="chk" type="checkbox"/>
  347. <col ref="bcno" type="input"/>
  348. <col ref="prcpdd" format="yyyy-mm-dd"/>
  349. <col ref="pid"/>
  350. <col ref="patnm"/>
  351. <col ref="sexage"/>
  352. <col ref="rrgstno"/>
  353. <col ref="orddeptcd"/>
  354. <col ref="orddrid"/>
  355. <col ref="wardroom"/>
  356. <col ref="tclsnmlist"/>
  357. <col ref="tsectnm"/>
  358. <col ref="spcnm"/>
  359. <col ref="erprcpflag"/>
  360. <col ref="prcpremfact"/>
  361. </datagrid>
  362. <!-- <object id="CommAX" visibility="hidden" clsid="{AD952C59-FBD8-4EB9-8960-7CE23A898328}" style="left:145px; top:200px; width:45px; height:45px; "/>-->
  363. </group>
  364. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  365. <line id="line17" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  366. <button id="btn_barcdreprnt" class="btn4_letter6" style="left:1019px; top:3px; width:104px; height:22px; ">
  367. <caption>바코드재출력</caption>
  368. <script type="javascript" ev:event="DOMActivate">
  369. <![CDATA[
  370. fExeBarcdReprnt();
  371. ]]>
  372. </script>
  373. </button>
  374. <button id="btn_reset" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
  375. <caption>초기화</caption>
  376. <script type="javascript" ev:event="DOMActivate">
  377. <![CDATA[
  378. fSetInit();
  379. ]]>
  380. </script>
  381. </button>
  382. <button id="btn_prntset" class="btn3_letter5" style="left:0px; top:3px; width:92px; height:22px; ">
  383. <caption>프린터설정</caption>
  384. <script type="javascript" ev:event="DOMActivate">
  385. <![CDATA[
  386. fSetPrint();
  387. ]]>
  388. </script>
  389. </button>
  390. </group>
  391. <group id="group2" style="left:0px; top:0px; width:1195px; height:13px; ">
  392. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">검체바코드재출력</caption>
  393. </group>
  394. <script type="javascript" ev:event="onkeypress">
  395. <![CDATA[
  396. fKeyEvent();
  397. ]]>
  398. </script>
  399. </xhtml:body>
  400. </xhtml:html>