SMLBT10100_수혈처방접수관리.xrw 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : 수혈처방접수관리.xrw
  4. * 설 명 : 수혈처방접수
  5. * 설 계 자 : (주)에이씨케이 -
  6. * 작 성 자 : (주)에이씨케이 - 조철형
  7. * 작 성 일 : 2007.05.31
  8. * 수정이력 :
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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. <tnsacptinfo>
  20. <tnsinfolist>
  21. <tree/>
  22. <level/>
  23. <chk/>
  24. <state/>
  25. <prcpdd/>
  26. <prcphopedd/>
  27. <dd/>
  28. <pid/>
  29. <hngnm/>
  30. <roomcd/>
  31. <tclsscrnnm/>
  32. <type/>
  33. <asttestflag/>
  34. <cnt/>
  35. <spcyn/>
  36. <acpt/>
  37. <comment/>
  38. <prcpcd/>
  39. <drugmthdspccd/>
  40. <tnsreqacptno/>
  41. <blodcomstat/>
  42. <execprcpuniqno/>
  43. <tnsreqseq/>
  44. <prcpgenrflag/>
  45. <instcd/>
  46. <blodno/>
  47. <erprcpflag/>
  48. </tnsinfolist>
  49. </tnsacptinfo>
  50. </main>
  51. <send>
  52. <data1/>
  53. <data2/>
  54. </send>
  55. <init/>
  56. <hidden>
  57. <refparam>
  58. <startdd/>
  59. <starttm/>
  60. <enddd/>
  61. <endtm/>
  62. <blodcomcd>00</blodcomcd>
  63. <refflag/>
  64. <acptflag>1</acptflag>
  65. <pid/>
  66. <autoflag/>
  67. <refgbn/>
  68. </refparam>
  69. <default/>
  70. </hidden>
  71. </root>
  72. </instance>
  73. <script type="javascript" ev:event="xforms-model-construct-done">
  74. <![CDATA[
  75. fBaseInfoRef("0604|");
  76. var mDate = getCurrentDate().toDate("YYYYMMDD").getAddDate(-6)
  77. model.setvalue("/root/hidden/refparam/startdd", mDate.getDateFormat("YYYYMMDD"));
  78. model.setvalue("/root/hidden/refparam/enddd",getCurrentDate());
  79. grd_tnsinfolist.removeRow();
  80. //grd_tnsinfolist.colHidden(2) = true;
  81. //grd_tnsinfolist.colHidden(1) = true;
  82. model.setvalue("/root/hidden/refparam/starttm",getCurrentTime());
  83. model.setvalue("/root/hidden/refparam/endtm",getCurrentTime());
  84. fSetblodnoview(); // blodno 그리드 숨기기 보여주기
  85. model.refresh();
  86. ]]>
  87. </script>
  88. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  89. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  90. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  91. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  92. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  93. <script type="javascript" src="../../../lis/commonweb/js/LLZ001.js"/>
  94. <submission id="TRLBT10101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/tnsacptinfo"/>
  95. <submission id="TXLBT10101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
  96. <submission id="TXLBT10102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
  97. <submission id="TRLZZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init"/>
  98. <submission id="TXLBT10103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
  99. </model>
  100. <script type="javascript">
  101. <![CDATA[
  102. function fSetClear(){
  103. model.removeNodeset("/root/main/tnsacptinfo/tnsinfolist");
  104. model.refresh();
  105. //grd_tnsinfolist.rebuild();
  106. }
  107. // 수혈접수 버튼 클릭
  108. function fSetTnsAcpt(){
  109. var acptTF = false;
  110. grd_tnsinfolist.clearStatus();
  111. if(model.getvalue("/root/hidden/refparam/acptflag") =="1"){ // 미접수일때
  112. for(i=1;i<grd_tnsinfolist.rows;i++){
  113. if(model.getvalue("/root/main/tnsacptinfo/tnsinfolist["+i+"]/chk") == "true"){
  114. acptTF = true;
  115. grd_tnsinfolist.addStatus(i , "insert");
  116. }
  117. }
  118. if(acptTF){
  119. model.setvalue("/root/send/data1" , grd_tnsinfolist.getUpdateData());
  120. submit("TXLBT10101", false);
  121. grd_tnsinfolist.clearStatus();
  122. model.copyNode("/root/send/data1" , "/root/hidden/default");
  123. fTnsRef("0");
  124. }
  125. }/*else if(model.getvalue("/root/hidden/refparam/acptflag") =="2"){ // 접수일때
  126. for(i=1;i<grd_tnsinfolist.rows;i++){
  127. if(model.getvalue("/root/main/tnsacptinfo/tnsinfolist["+i+"]/chk") == "true" &&
  128. model.getvalue("/root/main/tnsacptinfo/tnsinfolist["+i+"]/level") == "2") {
  129. acptTF = true;
  130. grd_tnsinfolist.addStatus(i , "insert");
  131. }
  132. }
  133. if(acptTF){
  134. model.setvalue("/root/send/data1" , grd_tnsinfolist.getUpdateData());
  135. submit("TXLBT10102", false);
  136. grd_tnsinfolist.clearStatus();
  137. model.copyNode("/root/send/data1" , "/root/hidden/default");
  138. fTnsRef("0");
  139. }
  140. }
  141. */else if(model.getvalue("/root/hidden/refparam/acptflag") =="4"){ // 접수취소된 것도 재접수 되도록
  142. for(i=1;i<grd_tnsinfolist.rows;i++){
  143. if(model.getvalue("/root/main/tnsacptinfo/tnsinfolist["+i+"]/chk") == "true"){
  144. acptTF = true;
  145. grd_tnsinfolist.addStatus(i , "insert");
  146. }
  147. }
  148. if(acptTF){
  149. model.setvalue("/root/send/data1" , grd_tnsinfolist.getUpdateData());
  150. submit("TXLBT10103", false);
  151. grd_tnsinfolist.clearStatus();
  152. model.copyNode("/root/send/data1" , "/root/hidden/default");
  153. fTnsRef("0");
  154. }
  155. }
  156. }
  157. function fTnsRef(gbn){
  158. fSetClear();
  159. if(model.getvalue("/root/hidden/refparam/pid") == "" && gbn == "1"){
  160. messageBox("등록번호를","C001","") ;
  161. return false;
  162. }
  163. model.setvalue("/root/hidden/refparam/refgbn" , gbn);
  164. model.copyNode("/root/send/data1" , "/root/hidden/refparam");
  165. submit("TRLBT10101" , false);
  166. model.copyNode("/root/send/data1" , "/root/hidden/default");
  167. model.refresh();
  168. //미접수이고 chk가 true가 아닐때..선택 disabled
  169. if(model.getValue("/root/hidden/refparam/acptflag") == "1"){
  170. for(iRow =1; iRow < grd_tnsinfolist.rows; iRow++){
  171. if(model.getValue("root/main/tnsacptinfo/tnsinfolist["+ iRow +"]/chk") != "true"){
  172. grd_tnsinfolist.isReadOnly(iRow, grd_tnsinfolist.colRef("chk")) = true;
  173. }
  174. }
  175. }
  176. if(model.getvalue("/root/hidden/refparam/acptflag") == "2") {
  177. setTree(grd_tnsinfolist, 2, 1, true);
  178. //fSetMakeTree();
  179. }
  180. }
  181. function fPidSearch(){
  182. if(event.keyCode == "13"){
  183. model.setvalue("/root/hidden/refparam/pid", input3.currentText);
  184. model.refresh();
  185. fTnsRef("1");
  186. input3.selBegin = 0;
  187. input3.selEnd = input3.currentText.length;
  188. }
  189. }
  190. function fAcptFlag(){
  191. fSetClear();
  192. if(model.getvalue("/root/hidden/refparam/acptflag") == "1"){
  193. button2.visible = true;
  194. button2.attribute("text") = "저 장";
  195. grd_tnsinfolist.colHidden(grd_tnsinfolist.colRef("tree")) = true;
  196. grd_tnsinfolist.colHidden(grd_tnsinfolist.colRef("chk")) = false;
  197. button2.disabled = false;
  198. }
  199. else if(model.getvalue("/root/hidden/refparam/acptflag") == "2"){
  200. //button2.attribute("text") = "접수취소";
  201. grd_tnsinfolist.colHidden(grd_tnsinfolist.colRef("tree")) = false;
  202. grd_tnsinfolist.colHidden(grd_tnsinfolist.colRef("chk")) = true;
  203. button2.visible = false;
  204. }
  205. else if(model.getvalue("/root/hidden/refparam/acptflag") == "4"){
  206. button2.visible = true;
  207. button2.attribute("text") = "저 장";
  208. grd_tnsinfolist.colHidden(grd_tnsinfolist.colRef("tree")) = true;
  209. grd_tnsinfolist.colHidden(grd_tnsinfolist.colRef("chk")) = false;
  210. button2.disabled = false;
  211. }else{
  212. button2.visible = true;
  213. button2.disabled = true;
  214. grd_tnsinfolist.colHidden(grd_tnsinfolist.colRef("tree")) = true;
  215. grd_tnsinfolist.colHidden(grd_tnsinfolist.colRef("state")) = true;
  216. grd_tnsinfolist.colHidden(grd_tnsinfolist.colRef("chk")) = true;
  217. }
  218. fSetblodnoview(); // blodno 그리드 숨기기 보여주기
  219. }
  220. function fSetMakeTree(){
  221. for(var i = 1; i < grd_tnsinfolist.rows; i++) {
  222. grd_tnsinfolist.IsSubtotal(i) = true;
  223. grd_tnsinfolist.outlinelevel(i) = grd_tnsinfolist.valueMatrix(i,2);
  224. }
  225. grd_tnsinfolist.OutlineCol = 1;
  226. grd_tnsinfolist.OutlineBar = 4;
  227. }
  228. function fGridClick(){
  229. var row = grd_tnsinfolist.row;
  230. var col = grd_tnsinfolist.col;
  231. if(col == 3){
  232. if(model.getvalue("/root/hidden/refparam/acptflag") == "2"){
  233. if(model.getvalue("/root/main/tnsacptinfo/tnsinfolist["+row+"]/level") == "1"){
  234. if(row < grd_tnsinfolist.rows-1){
  235. var value = model.getvalue("/root/main/tnsacptinfo/tnsinfolist["+row+"]/chk");
  236. var levl = "2"
  237. for( i =parseInt(row) + 1 ;; i++){
  238. if( i > grd_tnsinfolist.rows-1) break;
  239. levl = model.getvalue("/root/main/tnsacptinfo/tnsinfolist["+i+"]/level");
  240. if(levl == "1" ) break;
  241. if(value == "true"){
  242. if(model.getvalue("/root/main/tnsacptinfo/tnsinfolist["+i+"]/blodcomstat") == "1")
  243. model.setvalue("/root/main/tnsacptinfo/tnsinfolist["+i+"]/chk" ,"true");
  244. }
  245. else{
  246. model.setvalue("/root/main/tnsacptinfo/tnsinfolist["+i+"]/chk" ,"false");
  247. }
  248. }
  249. }
  250. }
  251. else{
  252. if(model.getvalue("/root/main/tnsacptinfo/tnsinfolist["+row+"]/chk") == "true" &&
  253. model.getvalue("/root/main/tnsacptinfo/tnsinfolist["+row+"]/blodcomstat") != "1"){
  254. model.setvalue("/root/main/tnsacptinfo/tnsinfolist["+row+"]/chk" ,"false");
  255. }
  256. }
  257. }else if(model.getvalue("/root/hidden/refparam/acptflag") == "4"){ // 접수취소 조회시
  258. if(model.getValue("/root/main/tnsacptinfo/tnsinfolist["+row+"]/state") =="처방취소"){
  259. model.setValue("/root/main/tnsacptinfo/tnsinfolist["+row+"]/chk", "false");
  260. }
  261. }
  262. }
  263. model.refresh();
  264. }
  265. // 혈액번호칸 숨기기
  266. function fSetblodnoview(){
  267. if(model.getValue("/root/hidden/refparam/acptflag")=="1"){ // 미접수
  268. grd_tnsinfolist.colHidden(grd_tnsinfolist.colRef("blodno")) = true;
  269. }else if(model.getValue("/root/hidden/refparam/acptflag")=="2"){ // 접수
  270. grd_tnsinfolist.colHidden(grd_tnsinfolist.colRef("blodno")) = false;
  271. }else if(model.getValue("/root/hidden/refparam/acptflag")=="4"){ // 접수취소
  272. grd_tnsinfolist.colHidden(grd_tnsinfolist.colRef("blodno")) = true;
  273. }
  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="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  280. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:224px; height:14px; background-image:../../../com/commonweb/images/tit_bullet1.gif; ">수혈접수 및 취소관리</caption>
  281. </group>
  282. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
  283. <group id="group2" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
  284. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  285. <caption id="caption2" class="search_name" style="left:16px; top:9px; width:86px; height:17px; background-image:../../../com/commonweb/images/search_bullet1.gif; ">신청일시 :</caption>
  286. <button id="button1" class="btn1_letter2" style="left:1123px; top:7px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  287. <caption>조회</caption>
  288. <script type="javascript" ev:event="DOMActivate">
  289. <![CDATA[
  290. fTnsRef("0");
  291. ]]>
  292. </script>
  293. </button>
  294. <line id="line13" class="line_4" style="x1:1108px; y1:7px; x2:1108px; y2:29px; "/>
  295. <input id="input26" ref="/root/hidden/refparam/startdd" class="input_s_essential" inputtype="date" style="left:105px; top:8px; width:90px; height:19px; background-image:../../../com/commonweb/images/input_s_essential.gif; "/>
  296. <input id="input27" ref="/root/hidden/refparam/starttm" class="input_search" format="hh:nn" style="left:194px; top:8px; width:36px; height:19px; "/>
  297. <input id="input1" ref="/root/hidden/refparam/enddd" class="input_s_essential" inputtype="date" style="left:251px; top:8px; width:90px; height:19px; background-image:../../../com/commonweb/images/input_s_essential.gif; "/>
  298. <input id="input2" ref="/root/hidden/refparam/endtm" class="input_search" format="hh:nn" style="left:340px; top:8px; width:36px; height:19px; "/>
  299. <caption id="caption4" class="search_name" style="left:381px; top:9px; width:95px; height:17px; background-image:../../../com/commonweb/images/search_bullet1.gif; ">혈액종류 :</caption>
  300. <select1 id="combo1" ref="/root/hidden/refparam/blodcomcd" class="combo_search" appearance="minimal" style="left:479px; top:8px; width:150px; height:19px; ">
  301. <choices>
  302. <itemset nodeset="/root/init/LB0604">
  303. <label ref="nm"/>
  304. <value ref="cd"/>
  305. </itemset>
  306. </choices>
  307. </select1>
  308. <caption id="caption5" class="search_name" style="left:924px; top:9px; width:90px; height:17px; background-image:../../../com/commonweb/images/search_bullet1.gif; ">등록번호 :</caption>
  309. <input id="input3" ref="/root/hidden/refparam/pid" class="input_s_button" navindex="1" inputtype="button" style="left:1017px; top:8px; width:76px; height:19px; ">
  310. <script type="javascript" ev:event="onkeypress">
  311. <![CDATA[
  312. fPidSearch();
  313. ]]>
  314. </script>
  315. <script type="javascript" ev:event="onbuttonclick">
  316. <![CDATA[
  317. fTnsRef("1");
  318. ]]>
  319. </script>
  320. <script type="javascript" ev:event="DOMFocusOut">
  321. <![CDATA[
  322. //model.setvalue("/root/hidden/refparam/pid" , "");
  323. //model.refresh();
  324. ]]>
  325. </script>
  326. </input>
  327. <caption id="caption3" class="search_no_b" style="left:235px; top:10px; width:15px; height:17px; ">~</caption>
  328. <caption id="caption9" class="search_name" style="left:636px; top:9px; width:95px; height:17px; background-image:../../../com/commonweb/images/search_bullet1.gif; ">구분 :</caption>
  329. <select1 id="radio1" ref="/root/hidden/refparam/acptflag" appearance="full" cols="4" overflow="visible" style="left:701px; top:9px; width:224px; height:20px; border-style:none; ">
  330. <choices>
  331. <item>
  332. <label>미접수</label>
  333. <value>1</value>
  334. </item>
  335. <item>
  336. <label>접수</label>
  337. <value>2</value>
  338. </item>
  339. <!--<item>
  340. <label>전체</label>
  341. <value>3</value>
  342. </item>-->
  343. <item>
  344. <label>접수취소</label>
  345. <value>4</value>
  346. </item>
  347. </choices>
  348. <script type="javascript" ev:event="xforms-value-changed">
  349. <![CDATA[
  350. fAcptFlag();
  351. ]]>
  352. </script>
  353. </select1>
  354. </group>
  355. <caption id="caption1" class="tit_2" style="left:5px; top:55px; width:131px; height:13px; background-image:../../../com/commonweb/images/tit_bullet2.gif; ">혈액은행 처방 목록</caption>
  356. <datagrid id="grd_tnsinfolist" nodeset="/root/main/tnsacptinfo/tnsinfolist" caption="^level^선택^상태^처방일자^신청일자^예약일시^등록번호^환자명^병실^혈액번호^처방^Type^I^수량^검체^접수^ER^NurComment^caption1^prcpcd^drugmthdspccd^tnsreqacptno^blodcomstat^execprcpuniqno^tnsreqseq^prcpgenrflag^instcd^의사전달사항^prcpno" colsep="^" colwidth="22, 0, 33, 60, 86, 90, 120, 89, 81, 63, 80, 140, 40, 30, 40, 40, 40, 30, 177, 0, 0, 0, 0, 0, 0, 0, 0, 0, 177, 0" dataheight="23" defaultrows="1" ellipsis="true" explorerbar="sortshow" fixedcols="0" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:0px; top:75px; width:1194px; height:665px; ">
  357. <col ref="tree"/>
  358. <col ref="level"/>
  359. <col checkvalue="true,false" ref="chk" type="checkbox"/>
  360. <col ref="state"/>
  361. <col ref="prcpdd" format="yyyy-mm-dd"/>
  362. <col ref="prcphopedd" format="yyyy-mm-dd"/>
  363. <col ref="dd" format="yyyy-mm-dd hh:nn"/>
  364. <col ref="pid"/>
  365. <col ref="hngnm"/>
  366. <col ref="roomcd"/>
  367. <col ref="blodno"/>
  368. <col ref="tclsscrnnm"/>
  369. <col ref="type"/>
  370. <col ref="asttestflag"/>
  371. <col ref="cnt"/>
  372. <col ref="spcyn"/>
  373. <col ref="acpt"/>
  374. <col ref="erprcpflag"/>
  375. <col ref="nursrem"/>
  376. <col ref="erprcpflag"/>
  377. <col ref="prcpcd"/>
  378. <col ref="drugmthdspccd"/>
  379. <col ref="tnsreqacptno"/>
  380. <col ref="blodcomstat"/>
  381. <col ref="execprcpuniqno"/>
  382. <col ref="tnsreqseq"/>
  383. <col ref="prcpgenrflag"/>
  384. <col ref="instcd"/>
  385. <col ref="prcpremfact"/>
  386. <col ref="prcpno"/>
  387. <script type="javascript" ev:event="onclick">
  388. <![CDATA[
  389. fGridClick();
  390. ]]>
  391. </script>
  392. </datagrid>
  393. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:70px; "/>
  394. </group>
  395. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  396. <button id="button8" class="btn3_letter5" style="left:0px; top:3px; width:92px; height:22px; background-image:../../../com/commonweb/images/btn3_letter5.gif; ">
  397. <caption>프린터선택</caption>
  398. <script type="javascript" ev:event="onclick">
  399. <![CDATA[
  400. // window.load("SPLLC90100.xrw","modeless","width:327px; height:128;min:hidden;max:hidden;align:center");
  401. window.load("SPLLC90100_바코드프린터설정.xrw","modeless","width:327px; height:128;min:hidden;max:hidden;align:center");
  402. ]]>
  403. </script>
  404. </button>
  405. <button id="button5" class="btn4_letter3" disable.background-image="../../../com/commonweb/images/dis_btn4_letter3.gif" style="left:1127px; top:3px; width:68px; height:22px; background-image:../../../com/commonweb/images/btn4_letter3.gif; ">
  406. <caption>초기화</caption>
  407. <script type="javascript" ev:event="onclick">
  408. <![CDATA[
  409. fSetClear();
  410. ]]>
  411. </script>
  412. </button>
  413. <button id="button2" class="btn4_letter4" disable.background-image="../../../com/commonweb/images/dis_btn4_letter4.gif" style="left:1044px; top:3px; width:80px; height:22px; background-image:../../../com/commonweb/images/btn4_letter4.gif; ">
  414. <caption>저 장</caption>
  415. <script type="javascript" ev:event="onclick">
  416. <![CDATA[
  417. fSetTnsAcpt();
  418. ]]>
  419. </script>
  420. </button>
  421. <line id="line7" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  422. </group>
  423. </xhtml:body>
  424. </xhtml:html>