SMLLJ00300_검체취소관리.xrw 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMLLJ00300_검체취소관리.xrw
  4. * 설 명 : 검체취소관리
  5. * 설 계 자 : (주)에이씨케이 - 박정은
  6. * 작 성 자 : (주)에이씨케이 - 박정은
  7. * 작 성 일 : 2006.12.22
  8. * 수정이력 : 2007-08-01 박정은 코드인스펙션
  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>검체취소관리</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root>
  18. <main>
  19. <cancelspc>
  20. <chk/>
  21. <tclscd/>
  22. <testcd/>
  23. <tclsnm/>
  24. <rsltstat/>
  25. <orddeptnm/>
  26. <orddrnm/>
  27. <bcno/>
  28. <spccd/>
  29. <spcnm/>
  30. <prcpgenrflag/>
  31. <sectcd/>
  32. <tsectcd/>
  33. <tclskind/>
  34. </cancelspc>
  35. <spcinfo>
  36. <bcno/>
  37. <prcpdd/>
  38. <patnm/>
  39. <pid/>
  40. <sexage/>
  41. <prgstno/>
  42. <wardroom/>
  43. <spccd/>
  44. <barcdprntdt/>
  45. <barcdprntid/>
  46. <bcolldt/>
  47. <bcollid/>
  48. <spcarvdt/>
  49. <spcarvid/>
  50. <spcacptdt/>
  51. <spcacptid/>
  52. <spcstat/>
  53. <rsltstat/>
  54. <orddrnm/>
  55. <returnnm/>
  56. </spcinfo>
  57. <newElement/>
  58. <getuserAnm>
  59. <acceptnm/>
  60. </getuserAnm>
  61. </main>
  62. <send>
  63. <Data1/>
  64. <Data2/>
  65. <bcno/>
  66. <cancelgbn/>
  67. <resncd/>
  68. <resndesc/>
  69. <cmt/>
  70. <pid/>
  71. <spcstat/>
  72. <cancelgrd/>
  73. <tclscd/>
  74. <resncdkind/>
  75. <codeflag/>
  76. <deptflag/>
  77. <rtnid/>
  78. </send>
  79. <init>
  80. <cancelresn>
  81. <resncd/>
  82. <resndesc/>
  83. <resncdkind/>
  84. <rtnid/>
  85. </cancelresn>
  86. </init>
  87. <hidden>
  88. <ref>
  89. <bcno/>
  90. <cnclkind>01</cnclkind>
  91. </ref>
  92. <cancel>
  93. <cancelgbn/>
  94. <resncd/>
  95. <resndesc/>
  96. <rtnid/>
  97. </cancel>
  98. <cmt/>
  99. <cancelcombo/>
  100. <truststat/>
  101. </hidden>
  102. </root>
  103. </instance>
  104. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  105. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  106. <!-- 기초정보 사유코드 조회-->
  107. <submission id="TRLLJ00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/cancelresn"/>
  108. <!-- 검체정보목록 조회 -->
  109. <submission id="TRLLJ00302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/cancelspc"/>
  110. <!-- 검체 정보 조회 -->
  111. <submission id="TRLLJ00303" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/spcinfo"/>
  112. <submission id="TXLLJ00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/MSG"/>
  113. <submission id="TRLZZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/LB0000"/>
  114. <submission id="TRLBT10404" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/getuserAnm"/>
  115. <script type="javascript" ev:event="xforms-ready">
  116. <![CDATA[
  117. model.removeNodeset("/root/main/cancelspc");
  118. model.removeNodeset("/root/main/spcinfo");
  119. model.refresh();
  120. // 체크박스 전체선택
  121. grd_spccancel.fixedcellcheckbox(0, 1) = true;
  122. grd_spccancel.fixedcellischeck(0, 1) = false;
  123. model.setValue("/root/send/codeflag", "0000|"); //0000 userdeptflagcd
  124. submit("TRLZZ00101");
  125. // 기초정보 사유코드 조회
  126. submit("TRLLJ00301");
  127. //취소사유별로 콤보내용변경..
  128. fSetCancelCombo("01");
  129. ]]>
  130. </script>
  131. <submission id="TRLLJ00304" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/hidden/truststat"/>
  132. </model>
  133. <script type="javascript">
  134. <![CDATA[
  135. // *사용* 키이벤트 엔터키 입력시 접수flow
  136. function fKeyEvent(){
  137. if(event.keyCode == "13"){
  138. if(event.target == "ipt_bcno"){
  139. model.setvalue("/root/hidden/ref/bcno", ipt_bcno.currentText);
  140. fGetCancelSpc();
  141. ipt_bcno.selBegin = 0;
  142. ipt_bcno.selEnd = ipt_bcno.currentText.length;
  143. }
  144. // 피통보자 id입력시 usernm 보이게
  145. if(event.target == "ipt_rtnnm"){
  146. model.setvalue("/root/hidden/cancel/rtnid", ipt_rtnnm.currentText.toUpperCase());
  147. model.refresh();
  148. if(model.getValue("/root/hidden/cancel/rtnid") != ""){
  149. model.makeValue("/root/send/acceptid", model.getvalue("/root/hidden/cancel/rtnid"));
  150. submit("TRLBT10404");
  151. ipt_rtnnm.selBegin = 0;
  152. ipt_rtnnm.selEnd = ipt_rtnnm.currentText.length;
  153. model.setFocus("ipt_rtnnm");
  154. output3.refresh();
  155. }
  156. }
  157. }
  158. /*
  159. inputEnterKey("ipt_bcno", "DOMActivate");
  160. model.setvalue("/root/hidden/ref/bcno", ipt_bcno.currentText);
  161. // 검체 정보 조회
  162. fGetCancelSpc();
  163. ipt_bcno.selBegin = 0;
  164. ipt_bcno.selEnd = ipt_bcno.currentText.length;
  165. */
  166. }
  167. function fSetInit() {
  168. //model.reset();
  169. model.removeNodeset("/root/main/cancelspc");
  170. model.removeNodeset("/root/main/spcinfo");
  171. model.setValue("/root/send/Data1", "");
  172. model.setValue("/root/send/Data2", "");
  173. model.setValue("/root/send/bcno", "");
  174. model.setValue("/root/send/cancelgbn", "");
  175. model.setValue("/root/send/resncd", "");
  176. model.setValue("/root/send/resndesc", "");
  177. model.setValue("/root/send/cmt", "");
  178. model.setValue("/root/send/pid", "");
  179. model.setValue("/root/send/spcstat", "");
  180. model.setValue("/root/send/cancelgrd", "");
  181. model.setValue("/root/send/tclscd", "");
  182. model.setValue("/root/send/resncdkind", "");
  183. model.refresh();
  184. }
  185. // 취소방법 RadioButton을 변경한 경우
  186. function fSetCancelGbn(){
  187. // 그리드 status상태 초기화
  188. grd_spccancel.clearStatus();
  189. for(i=1; i<grd_spccancel.rows; i++){
  190. model.setValue("/root/main/cancelspc["+i+"]/chk", "false");
  191. }
  192. var gbn = rdo_cancelgbn.value;
  193. var spcstat = model.getValue("/root/main/spcinfo/spcstat");
  194. var rsltstat = model.getValue("/root/main/spcinfo/rsltstat");
  195. switch (gbn){
  196. case "01" : // 채혈취소
  197. if((spcstat == "3") || (spcstat == "4")){
  198. messageBox("채혈 상태가 아닙니다. 채혈취소 ", "E001"); // 할 수 없습니다.
  199. return;
  200. }
  201. for(i=1; i<= getNodesetCount("/root/main/cancelspc"); i++){
  202. grd_spccancel.fixedcellischeck(0, i) = true;
  203. }
  204. grd_spccancel.colHidden(1) = false;
  205. break;
  206. //grd_spccancel.refresh();
  207. case "02": // 접수취소
  208. if((spcstat =="2" ) || ((spcstat == "4") &&(rsltstat != "-"))){
  209. messageBox("접수 상태가 아닙니다. 접수취소 ", "E001"); // 할 수 없습니다.
  210. return;
  211. }
  212. grd_spccancel.colHidden(1) = true;
  213. for(i=1; i<grd_spccancel.rows; i++){
  214. grd_spccancel.rowStatus(i) = 2;
  215. }
  216. break;
  217. case "03": // 채혈/접수취소
  218. if((spcstat =="2" ) || ((spcstat == "4") &&(rsltstat != "-"))){
  219. messageBox("접수 상태가 아닙니다. 접수취소 ", "E001"); // 할 수 없습니다.
  220. return;
  221. }
  222. grd_spccancel.colHidden(1) = true;
  223. for(i=1; i<grd_spccancel.rows; i++){
  224. grd_spccancel.rowStatus(i) = 2;
  225. }
  226. break;
  227. case "04": // 검사취소
  228. if((spcstat =="2") || (spcstat =="3")){
  229. messageBox("접수 상태가 아닙니다. 검사취소 ", "E001"); // 할 수 없습니다.
  230. return;
  231. }
  232. grd_spccancel.fixedcellischeck(0, 1) = true;
  233. grd_spccancel.colHidden(1) = false;
  234. break;
  235. case "05": // poct dc
  236. grd_spccancel.fixedcellischeck(0, 1) = true;
  237. grd_spccancel.colHidden(1) = false;
  238. break;
  239. }
  240. fSetCancelCombo(model.getValue("/root/hidden/ref/cnclkind"));
  241. }
  242. // 검체번호 또는 등록번호 입력 후 엔터를 쳤을 경우
  243. function fsearchtxt_validate()
  244. {
  245. var bcno = model.getvalue("/root/hidden/ref/bcno");
  246. if ( bcno != "" )
  247. {
  248. //alert("222");
  249. // 바코드에서 직접 입력하는 경우
  250. /* if ( bcno.length == 11 || bcno.length == 9 )
  251. {
  252. // 바코드번호(검체번호)를 표시형 검체번호로 변경
  253. }
  254. else if ( bcno.length == 14 || bcno.length == 15 )
  255. {
  256. }
  257. else
  258. {
  259. //TFGetMsgBox(1, "잘못된 검체번호 입니다");
  260. model.alert("잘못된 검체번호 입니다");
  261. return false;
  262. }*/
  263. }
  264. } // end of searchtxt_validate()
  265. // 검체정보목록 조회
  266. function fGetCancelSpc(){
  267. // 유효성 체크
  268. if ( fsearchtxt_validate() == false ){
  269. }else {
  270. // 검체번호를 이용하여 검색
  271. var bcno = model.getvalue("/root/hidden/ref/bcno");
  272. cap_label.attribute("background-color") = "#ffffff";
  273. cap_bcoll.attribute("background-color") = "#ffffff";
  274. cap_cnfm.attribute("background-color") = "#ffffff";
  275. cap_acpt.attribute("background-color") = "#ffffff";
  276. //검체번호 대문자만 추가
  277. var ubcno = bcno.toUpperCase();
  278. // SendData Set
  279. model.setValue("/root/send/bcno", ubcno);
  280. if(bcno == "" || bcno == null){
  281. messageBox("바코드번호를 입력해주십시오.", "I", "");
  282. return;
  283. }
  284. model.setValue("/root/send/deptflag", model.getValue("/root/init/LB0000/nm"));
  285. // Submit
  286. if(submit("TRLLJ00302")){
  287. //if(grd_spccancel.rows > 1){
  288. fGetSpcInfo("ref");
  289. //}
  290. }
  291. /* if ( model.submitInstance("reqGetChwiSoData") ) {
  292. // 취소방법 선택!!!
  293. //model.control("rdoChwiSoGbn");
  294. }
  295. model.resetInstanceNode("/root/SendData");
  296. */
  297. //TFSetMessage("/root/MainData");
  298. }
  299. //model.setValue("/root/hidden/ref/bcno", "");
  300. //model.refresh();
  301. //model.setfocus("input3");
  302. //fGetSpcInfo();
  303. }
  304. // 환자 검체 정보 조회
  305. function fGetSpcInfo(ref){
  306. cap_label.attribute("background-color") = "#ffffff";
  307. cap_bcoll.attribute("background-color") = "#ffffff";
  308. cap_cnfm.attribute("background-color") = "#ffffff";
  309. cap_acpt.attribute("background-color") = "#ffffff";
  310. var bcno = model.getValue("/root/hidden/ref/bcno");
  311. var ubcno = bcno.toUpperCase();
  312. model.setValue("/root/send/bcno", ubcno);
  313. if(ref == "ref"){
  314. grd_spccancel.row = 1;
  315. } else {
  316. model.setValue("/root/send/tclscd", model.getValue("/root/main/cancelspc["+grd_spccancel.row+"]/tclscd"));
  317. }
  318. submit("TRLLJ00303");
  319. var spcstat = model.getValue("/root/main/spcinfo/spcstat");
  320. if(spcstat == "1"){
  321. cap_label.attribute("background-color") = "#fec34d";
  322. }else if(spcstat == "2"){
  323. cap_bcoll.attribute("background-color") = "#fec34d";
  324. }else if(spcstat == "3"){
  325. cap_cnfm.attribute("background-color") = "#fec34d";
  326. }else if(spcstat == "4"){
  327. cap_acpt.attribute("background-color") = "#fec34d";
  328. }
  329. fSetSpcInfoRDOGbn();
  330. // cmc위수탁 의뢰된거 메세지 띄우기 -- 위탁병원용
  331. if(model.getValue("/root/main/spcinfo/spcflag")=="U"){
  332. model.makeValue("/root/send/reqbcno", ubcno);
  333. submit("TRLLJ00304");
  334. if(model.getValue("/root/hidden/truststat/acptstatcd")=="2"){ // 수탁병원에서 접수된 상태
  335. messageBox("cmc수탁접수된 검사입니다. 수탁병원과 협의후 진행하십시오.", "I");
  336. return;
  337. }else{ // 의뢰만 된거랑 기타상태
  338. messageBox("cmc위탁의뢰 된 검사 입니다. 취소 하시려면 CMC위탁 화면에서 의뢰취소 후 진행하십시오.", "I");
  339. return;
  340. }
  341. }
  342. // 수탁기관용 수탁접수된거는 cmc수탁에서만 취소되도록
  343. if(model.getValue("/root/main/spcinfo/trustbcno") != "-" && model.getValue("/root/main/spcinfo/trustbcno") != ""){
  344. messageBox("cmc수탁접수된 검사입니다. cmc수탁화면에서 접수취소 하십시오.", "I");
  345. return;
  346. }
  347. }
  348. // 검체상태별 라디오 버튼 상태 변경 2007.09.06
  349. function fSetSpcInfoRDOGbn(){
  350. var spcstat = model.getValue("/root/main/spcinfo/spcstat");
  351. var rsltstat = model.getValue("/root/main/spcinfo/rsltstat");
  352. if(spcstat == "0"){
  353. messageBox("취소된 검체 ", "E008");
  354. return;
  355. }
  356. if(spcstat =="1"){
  357. // 라벨출력
  358. model.setValue("/root/hidden/ref/cnclkind", "01");
  359. }else if(spcstat =="2"){
  360. // 채혈상태
  361. model.setValue("/root/hidden/ref/cnclkind", "01");
  362. }else if(spcstat =="3"){
  363. // 가접수 상태
  364. model.setValue("/root/hidden/ref/cnclkind", "02");
  365. }else if((spcstat =="4") && (rsltstat == "-")){
  366. // 접수 & 결과 미등록
  367. model.setValue("/root/hidden/ref/cnclkind", "02");
  368. }else if((spcstat =="4") && (rsltstat != "-")){
  369. // 접수 & 결과 등록
  370. model.setValue("/root/hidden/ref/cnclkind", "04");
  371. }
  372. rdo_cancelgbn.refresh();
  373. fSetCancelGbn();
  374. }
  375. // 취소 콤보 변경
  376. function fSetCancelCombo(value){
  377. model.resetInstanceNode("/root/hidden/cancelcombo");
  378. var cntCR = instance1.selectNodes("/root/init/cancelresn").length;
  379. NodeCnt = 1;
  380. for(i=1; i<= cntCR; i++){
  381. if(model.getValue("/root/init/cancelresn["+ i +"]/resncdkind") == value){
  382. model.makeNode("/root/hidden/cancelcombo["+ NodeCnt +"]/resncd");
  383. model.makeNode("/root/hidden/cancelcombo["+ NodeCnt +"]/resndesc");
  384. model.makeNode("/root/hidden/cancelcombo["+ NodeCnt +"]/resncdkind");
  385. model.setValue("/root/hidden/cancelcombo["+ NodeCnt +"]/resncd", model.getValue("/root/init/cancelresn["+ i +"]/resncd"));
  386. model.setValue("/root/hidden/cancelcombo["+ NodeCnt +"]/resndesc", model.getValue("/root/init/cancelresn["+ i +"]/resndesc"));
  387. model.setValue("/root/hidden/cancelcombo["+ NodeCnt +"]/resncdkind", model.getValue("/root/init/cancelresn["+ i +"]/resncdkind"));
  388. NodeCnt++;
  389. }
  390. }
  391. model.refresh();
  392. }
  393. // 검체 취소
  394. function fSetSpcCancel(){
  395. // 취소 구분
  396. var cancelGbn = rdo_cancelgbn.value;
  397. //alert("cancelGbn= " + cancelGbn);
  398. // 현장검사 취소
  399. /*if(cancelGbn == "05"){
  400. fPoctCancel();
  401. return;
  402. }*/
  403. if(grd_spccancel.rows < 2 ){
  404. //alert("취소할 검체가 없습니다.");
  405. messageBox("취소할 검체가 ", "I004");
  406. return;
  407. }
  408. if(cancelGbn == "02" || cancelGbn == "03"){
  409. for(i=1; i< grd_spccancel.rows; i++){
  410. //alert("i= " + i);
  411. model.setValue("/root/main/cancelspc["+i+"]/chk", "true");
  412. }
  413. }
  414. var bcno = model.getValue("/root/hidden/ref/bcno");
  415. // 채혈/접수취소 버튼을 눌렀을 경우의 처리!!
  416. if((grd_spccancel.rows >= 1) && (bcno.substr(0, 1) != "G")){
  417. grd_spccancel.clearStatus();
  418. var checkin = false;
  419. for(i=1; i<=grd_spccancel.rows; i++){
  420. var chk = model.getValue("/root/main/cancelspc["+i+"]/chk");
  421. if(chk == "true"){
  422. checkin = "true";
  423. grd_spccancel.rowStatus(i) = 2;
  424. }
  425. }
  426. // 현장검사 아닌데 취소코드 없을때
  427. if(cancelGbn != "05"){
  428. if(model.getValue("/root/hidden/cancel/resncd")==""){
  429. messageBox("취소 코드를 ", "C001");
  430. return;
  431. }
  432. }
  433. // 취소사유 없을때
  434. if(model.getValue("/root/hidden/cancel/resndesc")==""){
  435. messageBox("취소 사유를 ", "C001");
  436. return;
  437. }
  438. if(checkin == false && (cancelGbn=="01" || cancelGbn=="04")){
  439. // 아무것도 체크되지 않은 경우 -> 채혈취소만 해당?!!!
  440. messageBox("채혈/취소할 항목을 ", "C002");
  441. return;
  442. }else{
  443. // SendData Set
  444. var cancelgrd = grd_spccancel.getUpdateData();
  445. model.setValue("/root/send/cancelgrd", cancelgrd); // 그리드 업데이트 정보 (i,u,d 상관없이 다 넘어감)
  446. //alert("cancelgrd = \n" + cancelgrd);
  447. var spcstat = model.getValue("/root/main/spcinfo/spcstat");
  448. if(spcstat == "4" && cancelGbn == "01"){
  449. messageBox("접수상태 입니다. 채혈취소 하실 수 ", "I004");
  450. return;
  451. }
  452. var rsltstat = model.getValue("/root/main/spcinfo/rsltstat");
  453. if(rsltstat != "-"){
  454. if(cancelGbn != "04"){
  455. messageBox("결과 등록된 상태 입니다. 검사취소만 하실 수 있습니다. ", "I");
  456. return;
  457. }
  458. }
  459. // cmc위수탁 의뢰된거 메세지 띄우기
  460. if(model.getValue("/root/main/spcinfo/spcflag")=="U"){
  461. //model.makeValue("/root/send/reqbcno", ubcno);
  462. //submit("TRLLJ00304");
  463. if(model.getValue("/root/hidden/truststat/acptstatcd")=="2"){ // 수탁병원에서 접수된 상태
  464. messageBox("cmc수탁접수된 검사입니다. 수탁병원과 협의후 진행하십시오.", "I");
  465. return;
  466. }else{ // 의뢰만 된거랑 기타상태
  467. messageBox("cmc위탁의뢰 된 검사 입니다. 취소 하시려면 CMC위탁 화면에서 의뢰취소 후 진행하십시오.", "I");
  468. return;
  469. }
  470. }
  471. // 수탁기관용 수탁접수된거는 cmc수탁에서만 취소되도록
  472. if(model.getValue("/root/main/spcinfo/trustbcno") != "-"){
  473. messageBox("cmc수탁접수된 검사입니다. cmc수탁화면에서 접수취소 하십시오.", "I");
  474. return;
  475. }
  476. model.setValue("/root/send/bcno", model.getValue("/root/hidden/ref/bcno")); // bcno
  477. model.setValue("/root/send/cancelgbn", rdo_cancelgbn.value); // 취소구분
  478. model.setValue("/root/send/resncd", cmb_resn.value); // 취소 코드
  479. model.setValue("/root/send/resndesc", model.getValue("/root/hidden/cancel/resndesc")); // 취소 사유
  480. model.setValue("/root/send/cmt", chk_cmt.value); // comment 전달
  481. model.setValue("/root/send/pid", model.getValue("/root/main/spcinfo/pid")); // 등록번호
  482. model.setValue("/root/send/spcstat", spcstat); // 검체 상태
  483. // 사유코드종류(01: 채혈취소, 02 : 접수취소, 03 : 채혈접수취소... 사유코드관리마스터 참조)
  484. model.setValue("/root/send/resncdkind", model.getValue("/root/init/cancelresn[resncd = '"+ cmb_resn.value +"']/resncdkind"));
  485. model.setValue("/root/hidden/cancel/rtnid", ipt_rtnnm.currentText);
  486. if(model.getValue("/root/hidden/cancel/rtnid") == ""){
  487. model.setvalue("/root/send/rtnid","-");
  488. }else {
  489. model.setvalue("/root/send/rtnid",model.getValue("/root/hidden/cancel/rtnid"));
  490. }
  491. //alert(model.getValue("/root/send/rtnid"));
  492. // Submit
  493. if(submit("TXLLJ00301")==true){
  494. model.reset();
  495. }
  496. //model.resetInstanceNode("/root/hidden/cancel");
  497. //model.resetInstanceNode("/root/send");
  498. //model.resetInstanceNode("/root/hidden/ref/bcno");
  499. //model.refresh();
  500. //cap_label.attribute("background-color") = "#ffffff";
  501. cap_bcoll.attribute("background-color") = "#ffffff";
  502. cap_cnfm.attribute("background-color") = "#ffffff";
  503. cap_acpt.attribute("background-color") = "#ffffff";
  504. //그리드 상태 Flag Clear
  505. //grd_spccancel.clearStatus();
  506. model.setFocus("ipt_bcno");
  507. }
  508. }else{
  509. if(bcno.substr(0, 1) == "G") {
  510. messageBox("헌혈 검체는 취소", "E001"); //헌혈검체는 취소할 수 없습니다.
  511. } else {
  512. messageBox("채혈/접수취소 할 검체리스트가 존재하지 않습니다. ", "I");
  513. }
  514. }
  515. /*
  516. // 채혈/접수취소 버튼을 눌렀을 경우의 처리!!
  517. if ( model.vsgrid("grdChwiSo").rows >= 1) {
  518. model.clearGridUpdateCheck("grdChwiSo");
  519. var blnCheck = false;
  520. for(i=1; i<=TFGetGridCount("grdChwiSo"); i++ ) {
  521. var chk = model.getvalue("/root/MainData/ChwiSoData[" + i + "]/chk");
  522. if (chk == "true") { // true -> check 되어있음.
  523. model.setGridFlag ("grdChwiSo", i, 1 ); // Update Flag Setting
  524. blnCheck = true;
  525. }
  526. }
  527. */
  528. //model.resetInstanceNode("/root/main/cancelspc");
  529. //model.resetInstanceNode("/root/main/spcinfo");
  530. //model.reset();
  531. //grd_spccancel.rebuild();
  532. }
  533. // 사유코드 콤보 선택
  534. function fSetResnCombo(){
  535. var cntCR = instance1.selectNodes("/root/init/cancelresn").length;
  536. for(i=1; i< cntCR; i++){
  537. if(cmb_resn.value == model.getValue("/root/init/cancelresn["+i+"]/resncd")){
  538. model.setValue("/root/hidden/cancel/resndesc", model.getValue("/root/init/cancelresn["+i+"]/resndesc"));
  539. model.refresh();
  540. break;
  541. }
  542. }
  543. }
  544. // 부적합검체관리
  545. function fSetBadSpc(){
  546. //window.load("../../../lis/commonweb/xrw/SPLLJ90100_부적합검체등록.xrw","modeless", "SPLLJ90100_부적합검체등록", "width:360px; height:465;min:hidden;max:hidden;align:center", "/root/hidden/bcno", "/root/hidden/bcno");
  547. //open(id,monNo,xPos,yPos,wid,ref,resultref,userProp,prevPos)
  548. open("SPLLJ90100", 1 ,300, 400, "SPLLJ90100");
  549. }
  550. // 그리드 체크박스 선택시 row 상태 변경
  551. function fSetRowStatus(){
  552. if(grd_spccancel.isCell(event.target) && grd_spccancel.row >= grd_spccancel.fixedRows){
  553. if(model.getValue("/root/main/cancelspc["+grd_spccancel.row+"]/chk")=="true"){
  554. grd_spccancel.rowStatus(grd_spccancel.row) = 2;
  555. }else{
  556. grd_spccancel.rowStatus(grd_spccancel.row) = 0;
  557. }
  558. }
  559. }
  560. ]]>
  561. </script>
  562. </xhtml:head>
  563. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  564. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744; ">
  565. <line id="line1" class="line_1" style="x1:0px; y1:71px; x2:1195px; y2:71px; "/>
  566. <caption id="caption1" class="tit_2" style="left:5px; top:56px; width:95px; height:13px; ">검체정보목록</caption>
  567. <caption id="caption4" class="tit_2" style="left:5px; top:500px; width:70px; height:13px; ">검체상태</caption>
  568. <line id="line2" class="line_1" style="x1:0px; y1:515px; x2:375; y2:515px; "/>
  569. <caption id="caption3" class="tit_2" style="left:385px; top:500px; width:70px; height:13px; ">검체정보</caption>
  570. <line id="line3" class="line_1" style="x1:380px; y1:515px; x2:755px; y2:515px; "/>
  571. <caption id="caption5" class="tit_2" style="left:765px; top:500px; width:70px; height:13px; ">취소사유</caption>
  572. <line id="line5" class="line_2" style="x1:760px; y1:542px; x2:1195px; y2:542px; "/>
  573. <caption id="caption8" class="cell_1" style="left:760px; top:568px; width:125px; height:166px; ">사유내용</caption>
  574. <line id="line4" class="line_1" style="x1:760; y1:515px; x2:1195px; y2:515px; "/>
  575. <line id="line8" class="line_2" style="x1:380px; y1:566px; x2:755px; y2:566px; "/>
  576. <line id="line7" class="line_2" style="x1:380px; y1:542px; x2:755px; y2:542px; "/>
  577. <line id="line12" class="line_2" style="x1:0px; y1:619px; x2:375px; y2:619px; "/>
  578. <line id="line13" class="line_2" style="x1:0px; y1:643px; x2:325px; y2:643px; "/>
  579. <caption id="caption20" class="tit_2" style="left:5px; top:553px; width:125px; height:13px; ">환자기본신상정보</caption>
  580. <line id="line16" class="line_1" style="x1:0px; y1:568px; x2:375px; y2:568px; "/>
  581. <line id="line18" class="line_2" style="x1:0px; y1:595px; x2:375px; y2:595px; "/>
  582. <line id="line9" class="line_2" style="x1:380px; y1:590px; x2:755px; y2:590px; "/>
  583. <line id="line20" class="line_2" style="x1:380px; y1:662px; x2:755px; y2:662px; "/>
  584. <line id="line10" class="line_2" style="x1:380px; y1:614px; x2:755px; y2:614px; "/>
  585. <line id="line19" class="line_2" style="x1:380px; y1:638px; x2:755px; y2:638px; "/>
  586. <line id="line21" class="line_2" style="x1:380px; y1:686px; x2:755px; y2:686px; "/>
  587. <caption id="caption25" class="cell_1" style="left:380px; top:712px; width:125px; height:23px; ">접수자</caption>
  588. <line id="line22" class="line_2" style="x1:380px; y1:710px; x2:755px; y2:710px; "/>
  589. <line id="line11" class="line_3" style="x1:380px; y1:734px; x2:755px; y2:734px; "/>
  590. <line id="line23" class="line_2" style="x1:0px; y1:643px; x2:375px; y2:643px; "/>
  591. <line id="line25" class="line_2" style="x1:0px; y1:667px; x2:375px; y2:667px; "/>
  592. <line id="line26" class="line_2" style="x1:0px; y1:691px; x2:375px; y2:691px; "/>
  593. <line id="line27" class="line_2" style="x1:0px; y1:715px; x2:375px; y2:715px; "/>
  594. <line id="line6" class="line_3" style="x1:760px; y1:734px; x2:1195px; y2:734px; "/>
  595. <group id="group1" style="left:0px; top:10px; width:1195px; height:35px; ">
  596. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  597. <line id="line15" class="line_4" style="x1:1108px; y1:7px; x2:1108px; y2:29px; "/>
  598. <caption id="caption2" class="search_name" style="left:15px; top:9px; width:115px; height:17px; ">바코드번호 :</caption>
  599. <input id="ipt_bcno" ref="/root/hidden/ref/bcno" class="input_button" imemode="disabled" inputtype="button" _chartype="upper" style="left:118px; top:8px; width:162px; height:19px; ">
  600. <script type="javascript" ev:event="xforms-next">
  601. <![CDATA[
  602. // 바코드번호 리딩 검체정보목록 조회
  603. //fGetCancelSpc();
  604. ]]>
  605. </script>
  606. <script type="javascript" ev:event="onbuttonclick">
  607. <![CDATA[
  608. // 바코드번호 버튼 클릭 검체정보목록 조회
  609. fGetCancelSpc();
  610. ]]>
  611. </script>
  612. <script type="javascript" ev:event="onkeypress">
  613. <![CDATA[
  614. fKeyEvent();
  615. ]]>
  616. </script>
  617. </input>
  618. <button id="btn_ref" class="btn1_letter2" style="left:1123px; top:8px; width:56px; height:22px; ">
  619. <caption>조회</caption>
  620. <script type="javascript" ev:event="DOMActivate">
  621. <![CDATA[
  622. fGetCancelSpc();
  623. ]]>
  624. </script>
  625. </button>
  626. </group>
  627. <caption id="caption21" class="cell_1" style="left:0px; top:693px; width:125px; height:23px; ">주민등록번호</caption>
  628. <caption id="caption22" class="cell_1" style="left:0px; top:717px; width:125px; height:23px; ">병동/병실</caption>
  629. <caption id="caption24" class="cell_1" style="left:0px; top:573px; width:125px; height:23px; ">바코드번호</caption>
  630. <caption id="caption16" class="cell_1" style="left:0px; top:669px; width:125px; height:23px; ">Sex/Age</caption>
  631. <caption id="caption17" class="cell_1" style="left:0px; top:597px; width:125px; height:23px; ">처방일자</caption>
  632. <caption id="caption18" class="cell_1" style="left:0px; top:621px; width:125px; height:23px; ">등록번호</caption>
  633. <caption id="caption19" class="cell_1" style="left:0px; top:645px; width:125px; height:23px; ">성명</caption>
  634. <line id="line24" class="line_3" style="x1:0px; y1:739px; x2:375px; y2:739px; "/>
  635. <caption id="caption10" class="cell_1" style="left:380px; top:544px; width:125px; height:23px; ">라벨발행일시</caption>
  636. <caption id="caption11" class="cell_1" style="left:380px; top:568px; width:125px; height:23px; ">라벨발행자</caption>
  637. <caption id="caption23" class="cell_1" style="left:380px; top:688px; width:125px; height:23px; ">접수일시</caption>
  638. <caption id="caption12" class="cell_1" style="left:380px; top:592px; width:125px; height:23px; ">채혈일시</caption>
  639. <caption id="caption13" class="cell_1" style="left:380px; top:640px; width:125px; height:23px; ">확인일시</caption>
  640. <caption id="caption14" class="cell_1" style="left:380px; top:664px; width:125px; height:23px; ">확인자</caption>
  641. <caption id="caption15" class="cell_1" style="left:380px; top:616px; width:125px; height:23px; ">채혈자</caption>
  642. <caption id="caption9" class="cell_1" style="left:380px; top:520px; width:125px; height:23px; ">검체명</caption>
  643. <caption id="caption7" class="cell_1" style="left:760px; top:520px; width:80px; height:23px; ">처방의</caption>
  644. <line id="line14" class="line_3" style="x1:0px; y1:543px; x2:375px; y2:543px; "/>
  645. <select1 id="rdo_cancelgbn" ref="/root/hidden/ref/cnclkind" appearance="full" cellspacing="20" cols="5" overflow="visible" style="left:120px; top:54px; width:510px; height:15px; border-style:none; ">
  646. <choices>
  647. <item>
  648. <label>채혈취소</label>
  649. <value>01</value>
  650. </item>
  651. <item>
  652. <label>접수취소</label>
  653. <value>02</value>
  654. </item>
  655. <item>
  656. <label>채혈/접수취소</label>
  657. <value>03</value>
  658. </item>
  659. <item>
  660. <label>검사취소</label>
  661. <value>04</value>
  662. </item>
  663. <item>
  664. <label>POCT DC처방취소</label>
  665. <value>05</value>
  666. </item>
  667. </choices>
  668. <script type="javascript" ev:event="xforms-select">
  669. <![CDATA[
  670. // 취소방법 RadioButton을 변경한 경우
  671. fSetCancelGbn();
  672. //취소콤보 사유에 따라 변경...
  673. fSetCancelCombo(model.getValue("/root/hidden/ref/cnclkind"));
  674. ]]>
  675. </script>
  676. </select1>
  677. <datagrid id="grd_spccancel" nodeset="/root/main/cancelspc" caption="^검사코드^검사명^결과상태^진료과^의뢰의사^바코드번호^검체코드^검체명^IO구분^계코드^검사계코드^execprcpuniqno" colwidth="26, 90, 308, 100, 100, 90, 120, 60, 100, 50, 49, 80, 0" dataheight="23" defaultrows="1" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" style="left:0px; top:76px; width:1195; height:416; ">
  678. <col checkvalue="true,false" ref="chk" type="checkbox"/>
  679. <col ref="tclscd"/>
  680. <col ref="tclsnm"/>
  681. <col ref="rsltstat"/>
  682. <col ref="orddeptnm"/>
  683. <col ref="orddrnm"/>
  684. <col ref="bcno"/>
  685. <col ref="spccd"/>
  686. <col ref="spcnm"/>
  687. <col ref="prcpgenrflag"/>
  688. <col ref="sectcd"/>
  689. <col ref="tsectcd"/>
  690. <col ref="execprcpuniqno"/>
  691. <script type="javascript" ev:event="xforms-value-changed">
  692. <![CDATA[
  693. fSetRowStatus();
  694. ]]>
  695. </script>
  696. <script type="javascript" ev:event="onclick">
  697. <![CDATA[
  698. // 환자별 검체 정보 조회
  699. //alert(grd_spccancel.col ); //2008-06-18 윤재한 막음(한 검사만 결과저장된 경우 결과저장안된 검사 선택시 접수 취소가 된다. 그리 되믄 안되)
  700. //if(grd_spccancel.col >1){
  701. // fGetSpcInfo("select");
  702. //}
  703. ]]>
  704. </script>
  705. </datagrid>
  706. <caption id="cap_label" style="left:0px; top:521px; width:91px; height:20px; text-align:center; vertical-align:middle; background-color:#ffffff; border-color:#c0c0c0; border-width:1px; border-style:solid; ">라벨발행</caption>
  707. <caption id="cap_bcoll" style="left:95px; top:521px; width:91px; height:20px; text-align:center; vertical-align:middle; background-color:#ffffff; border-color:#c0c0c0; border-width:1px; border-style:solid; ">채혈</caption>
  708. <caption id="cap_cnfm" style="left:190px; top:521px; width:91px; height:20px; text-align:center; vertical-align:middle; background-color:#ffffff; border-color:#c0c0c0; border-width:1px; border-style:solid; ">확인</caption>
  709. <caption id="cap_acpt" style="left:285px; top:521px; width:90px; height:20px; text-align:center; vertical-align:middle; background-color:#ffffff; border-color:#c0c0c0; border-width:1px; border-style:solid; ">접수</caption>
  710. <caption id="caption26" visibility="hidden" style="left:275px; top:548px; width:58px; height:20px; vertical-align:middle; ">
  711. <![CDATA[숨길꺼 ->]]>
  712. </caption>
  713. <select1 id="cmb_resn" ref="/root/hidden/cancel/resncd" class="combo_default" appearance="minimal" style="left:888px; top:545px; width:307px; height:19px; ">
  714. <choices>
  715. <itemset nodeset="/root/hidden/cancelcombo">
  716. <label ref="resndesc"/>
  717. <value ref="resncd"/>
  718. </itemset>
  719. </choices>
  720. <script type="javascript" ev:event="xforms-select">
  721. <![CDATA[
  722. // 사유코드 콤보 선택
  723. fSetResnCombo();
  724. ]]>
  725. </script>
  726. </select1>
  727. <select id="chk_cmt" ref="/root/hidden/cmt" overflow="visible" appearance="full" style="left:855px; top:500px; width:100px; height:13px; border-style:none; ">
  728. <choices>
  729. <item>
  730. <label>comment 전달</label>
  731. <value>1</value>
  732. </item>
  733. </choices>
  734. </select>
  735. <output id="opt_bcno" ref="/root/main/spcinfo/bcno" class="output_fix" style="left:128px; top:574px; width:247px; height:19px; "/>
  736. <output id="opt_prcpdd" ref="/root/main/spcinfo/prcpdd" class="output_fix" format="yyyy-mm-dd" style="left:128px; top:598px; width:247px; height:19px; "/>
  737. <output id="opt_pid" ref="/root/main/spcinfo/pid" class="output_fix" style="left:128px; top:622px; width:247px; height:19px; "/>
  738. <output id="opt_patnm" ref="/root/main/spcinfo/patnm" class="output_fix" style="left:128px; top:646px; width:247px; height:19px; "/>
  739. <output id="opt_sexage" ref="/root/main/spcinfo/sexage" class="output_fix" style="left:128px; top:670px; width:247px; height:19px; "/>
  740. <output id="opt_prgstno" ref="/root/main/spcinfo/prgstno" class="output_fix" style="left:128px; top:694px; width:247px; height:19px; "/>
  741. <output id="opt_wardroom" ref="/root/main/spcinfo/wardroom" class="output_fix" style="left:128px; top:718px; width:247px; height:19px; "/>
  742. <output id="opt_spccd" ref="/root/main/spcinfo/spccd" class="output_fix" style="left:508px; top:521px; width:247px; height:19px; "/>
  743. <output id="opt_barcdprntdt" ref="/root/main/spcinfo/barcdprntdt" class="output_fix" format="yyyy-mm-dd" style="left:508px; top:545px; width:247px; height:19px; "/>
  744. <output id="opt_barcdprntid" ref="/root/main/spcinfo/barcdprntid" class="output_fix" style="left:508px; top:569px; width:247px; height:19px; "/>
  745. <output id="opt_bcolldt" ref="/root/main/spcinfo/bcolldt" class="output_fix" format="yyyy-mm-dd" style="left:508px; top:593px; width:247px; height:19px; "/>
  746. <output id="opt_bcollid" ref="/root/main/spcinfo/bcollid" class="output_fix" style="left:508px; top:617px; width:247px; height:19px; "/>
  747. <output id="opt_spcarvdt" ref="/root/main/spcinfo/spcarvdt" class="output_fix" format="yyyy-mm-dd" style="left:508px; top:641px; width:247px; height:19px; "/>
  748. <output id="opt_spcarvid" ref="/root/main/spcinfo/spcarvid" class="output_fix" style="left:508px; top:665px; width:247px; height:19px; "/>
  749. <output id="opt_spcacptdt" ref="/root/main/spcinfo/spcacptdt" class="output_fix" format="yyyy-mm-dd" style="left:508px; top:689px; width:247px; height:19px; "/>
  750. <output id="opt_spcacptid" ref="/root/main/spcinfo/spcacptid" class="output_fix" style="left:508px; top:713px; width:247px; height:19px; "/>
  751. <textarea id="tar_resn" ref="/root/hidden/cancel/resndesc" style="left:888px; top:569px; width:307px; height:162px; "/>
  752. <output id="opt_hidden" ref="/root/main/spcinfo/spcstat" visibility="hidden" style="left:335px; top:547px; width:40px; height:19px; border-style:dotted; "/>
  753. <line id="line17" class="line_2" style="x1:760px; y1:566px; x2:1195px; y2:566px; "/>
  754. <caption id="caption27" class="cell_1" style="left:760px; top:544px; width:125px; height:23px; ">사유코드</caption>
  755. <output id="output1" ref="/root/main/spcinfo/orddrnm" class="output_fix" style="left:843px; top:521px; width:90px; height:19px; "/>
  756. <caption id="caption28" class="cell_1" style="left:936px; top:520px; width:72px; height:23px; ">피통보자</caption>
  757. <output id="output3" ref="/root/main/getuserAnm/acceptnm" class="output_fix" style="left:1104px; top:521px; width:90px; height:19px; "/>
  758. <input id="ipt_rtnnm" ref="/root/hidden/cancel/rtnid" appearance="input" style="left:1011px; top:521px; width:90px; height:19px; ">
  759. <script type="javascript" ev:event="onkeypress">
  760. <![CDATA[
  761. fKeyEvent();
  762. ]]>
  763. </script>
  764. </input>
  765. </group>
  766. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  767. <line id="line32" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  768. <button id="btn_cancel" class="btn4_letter2" style="left:1068px; top:3px; width:56px; height:22px; ">
  769. <caption>취소</caption>
  770. <script type="javascript" ev:event="DOMActivate">
  771. <![CDATA[
  772. fSetSpcCancel();
  773. ]]>
  774. </script>
  775. </button>
  776. <button id="btn_reset" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
  777. <caption>초기화</caption>
  778. <script type="javascript" ev:event="DOMActivate">
  779. <![CDATA[
  780. fSetInit();
  781. ]]>
  782. </script>
  783. </button>
  784. <button id="btn_badspc" class="btn3_letter7" style="left:0px; top:3px; width:116px; height:22px; ">
  785. <caption>부적합검체관리</caption>
  786. <script type="javascript" ev:event="DOMActivate">
  787. <![CDATA[
  788. //window.load("SMLLJ90100_부적합검체등록.xrw","modeless","width:312px; height:415;min:hidden;max:hidden;align:center");
  789. //window.load("SPLLJ90100_부적합검체등록.xrw","modeless", "SPLLJ90100_부적합검체등록", "width:360px; height:465;min:hidden;max:hidden;align:center", "/root/hidden/bcno", "/root/hidden/bcno");
  790. fSetBadSpc();
  791. ]]>
  792. </script>
  793. </button>
  794. </group>
  795. <group id="group2" style="left:0px; top:0px; width:1195px; height:13px; ">
  796. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; background-repeat:no-repeat; ">검체취소관리</caption>
  797. </group>
  798. </xhtml:body>
  799. </xhtml:html>