SPLBT90500_수혈혈액형입력.xrw 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SPLBT90500_수혈혈액형입력.xrw
  4. * 설 명 : 수혈혈액형입력
  5. * 설 계 자 :
  6. * 작 성 자 :
  7. * 작 성 일 :
  8. * 수정이력 :
  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 xmlns="">
  18. <main>
  19. <patinfo>
  20. <pid/>
  21. <hngnm/>
  22. <sexage/>
  23. <btype/>
  24. <abrnblodyn/>
  25. <abo/>
  26. </patinfo>
  27. <blodflag>
  28. <tnsblodchoiflag/>
  29. <abo/>
  30. <rh/>
  31. </blodflag>
  32. <tnsabolist>
  33. <tnsblodchoiflag/>
  34. <abo/>
  35. <rh/>
  36. <rgstrnm/>
  37. <rgstdt/>
  38. <pid/>
  39. <blodchoiseq/>
  40. </tnsabolist>
  41. </main>
  42. <send>
  43. <acceptid/>
  44. <pid/>
  45. <grid/>
  46. </send>
  47. <init>
  48. </init>
  49. <hidden>
  50. <getuserAnm>
  51. <acceptnm/>
  52. </getuserAnm>
  53. <userid>
  54. <updid/>
  55. <updnm/>
  56. <delid/>
  57. <delnm/>
  58. </userid>
  59. </hidden>
  60. </root>
  61. </instance>
  62. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  63. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  64. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  65. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  66. <script type="javascript" ev:event="xforms-ready">
  67. <![CDATA[
  68. //fSetInit();
  69. ]]>
  70. </script>
  71. <submission id="TRLBT10404" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/hidden/getuserAnm"/>
  72. <submission id="TRLBT90501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main"/>
  73. <submission id="TXLBT90501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
  74. </model>
  75. <script type="javascript">
  76. <![CDATA[
  77. //키이벤트 엔터키 입력시
  78. function fKeyEvent(pRef){
  79. if(event.keyCode == "13" || pRef == "B"){
  80. // 등록번호 입력시
  81. if(event.target == "ipt_pid"){
  82. model.setvalue("/root/send/pid", ipt_pid.currentText);
  83. fGetTnsABOList();
  84. ipt_pid.selBegin = 0;
  85. ipt_pid.selEnd = ipt_pid.currentText.length;
  86. }
  87. // 등록자 입력시
  88. if(event.target == "ipt_updid"){
  89. model.setvalue("/root/send/acceptid", ipt_updid.currentText);
  90. model.setvalue("/root/hidden/userid/updid", ipt_updid.currentText);
  91. fGetUsernm();
  92. model.setValue("/root/hidden/userid/updnm", model.getValue("/root/hidden/getuserAnm/acceptnm"));
  93. model.setFocus("ipt_updid");
  94. }
  95. // 삭제자 입력시
  96. if(event.target == "ipt_delid"){
  97. model.setvalue("/root/hidden/userid/delid", ipt_delid.currentText);
  98. model.setValue("/root/send/acceptid", ipt_delid.currentText);
  99. fGetUsernm();
  100. model.setValue("/root/hidden/userid/delnm", model.getValue("/root/hidden/getuserAnm/acceptnm"));
  101. model.setFocus("ipt_delid");
  102. }
  103. model.refresh();
  104. }
  105. }
  106. // 유저 정보
  107. function fGetUsernm(){
  108. submit("TRLBT10404", false);
  109. }
  110. // 조회
  111. function fGetTnsABOList(){
  112. if(submit("TRLBT90501", false)){
  113. if(model.getValue("/root/main/patinfo/abrnblodyn")=="N"){ // 이형아님
  114. if(model.getValue("/root/main/patinfo/abo")=="A"){
  115. opt_abo.attribute("class") = "font_a";
  116. opt_abo.attribute("font-size") = 48;
  117. }else if(model.getValue("/root/main/patinfo/abo")=="AB"){
  118. opt_abo.attribute("class") = "font_ab";
  119. opt_abo.attribute("font-size") = 48;
  120. }else if(model.getValue("/root/main/patinfo/abo")=="B"){
  121. opt_abo.attribute("class") = "font_b";
  122. opt_abo.attribute("font-size") = 48;
  123. }else if(model.getValue("/root/main/patinfo/abo")=="O"){
  124. opt_abo.attribute("class") = "font_o";
  125. opt_abo.attribute("font-size") = 48;
  126. }else{
  127. opt_abo.attribute("class") = "font_b"; //빨간색
  128. opt_abo.attribute("font-size") = 28;
  129. }
  130. }else if(model.getValue("/root/main/patinfo/abrnblodyn")=="Y"){ // 이형임
  131. opt_abo.attribute("class") = "font_b"; //빨간색
  132. opt_abo.attribute("font-size") = 28;
  133. }
  134. }
  135. }
  136. function fExeTnsABO(){
  137. //등록
  138. if(event.target == "btn_upd"){
  139. var strSave = "m▦pid▦tnsblodchoiflag▦abo▦rh▦rgstrid▩"
  140. var strPid = model.getValue("/root/main/patinfo/pid");
  141. var strTnsblodchoiflag = model.getValue("/root/main/blodflag/tnsblodchoiflag");
  142. var strABO = model.getValue("/root/main/blodflag/abo");
  143. var strRH = model.getValue("/root/main/blodflag/rh");
  144. var strUpdid = model.getValue("/root/hidden/userid/updid");
  145. var strBfABO = model.getValue("/root/main/patinfo/abo");
  146. if(model.getValue("/root/hidden/userid/updnm") == "" || model.getValue("/root/hidden/userid/updid") == ""){
  147. messageBox("등록자를", "C001");
  148. return;
  149. }
  150. if(strPid == ""){
  151. messageBox("등록번호를 입력하세요", "E999");
  152. return;
  153. }
  154. if(strTnsblodchoiflag == ""){
  155. messageBox("성분제제 구분을 선택하세요", "E999");
  156. return;
  157. }
  158. if(strABO == ""){
  159. messageBox("ABO를 선택하세요", "E999");
  160. return;
  161. }
  162. if(strRH == ""){
  163. messageBox("RH를 선택하세요", "E999");
  164. return;
  165. }
  166. if(model.getXPathValue('count(/root/main/tnsabolist[tnsblodchoiflag="' + strTnsblodchoiflag + '"])') > 0){
  167. messageBox("이미 등록된 성분제제는 다시 등록 할 수 없습니다\n등록된 내역 삭제 후 재등록 가능합니다.", "");
  168. return;
  169. }
  170. if(strABO != strBfABO){
  171. if(messageBox("조회된 ABO와 선택하신 ABO가 일치하지 않습니다. \n", "Q003") != 6){
  172. return;
  173. }
  174. }
  175. strSave += "i▦" + strPid + "▦" + strTnsblodchoiflag + "▦" + strABO + "▦"+ strRH +"▦" + strUpdid + "▩"
  176. model.setValue("/root/send/grid", strSave);
  177. //삭제
  178. }else if(event.target == "btn_del"){
  179. if(model.getValue("/root/hidden/userid/delnm") == "" || model.getValue("/root/hidden/userid/delid") == ""){
  180. messageBox("삭제자를", "C001");
  181. return;
  182. }
  183. grd_tnsabolist.addStatus(grd_tnsabolist.row, "delete");
  184. //삭제 확인 및 삭제 대상 Check
  185. if(messageBox("", "Q001")==6){
  186. if(!checkGridUpdate(grd_tnsabolist)){
  187. messageBox("삭제할 자료를 선택하지 않아 실행", "E001");
  188. return;
  189. }
  190. }else{
  191. grd_tnsabolist.clearStatus();
  192. return;
  193. }
  194. model.setValue("/root/send/acceptid", model.getValue("/root/hidden/userid/delid"));
  195. model.setValue("/root/send/grid", grd_tnsabolist.getUpdateData());
  196. }
  197. //등록 및 삭제처리
  198. submit("TXLBT90501", false);
  199. grd_tnsabolist.clearStatus();
  200. //재조회
  201. fGetTnsABOList();
  202. model.refresh();
  203. }
  204. //저장 데이터 확인
  205. function checkGridUpdate(grid){
  206. var iData = grid.getUpdateDataXml("insert");
  207. var uData = grid.getUpdateDataXml("update");
  208. var dData = grid.getUpdateDataXml("delete");
  209. if (iData=="" && uData=="" && dData==""){
  210. return false;
  211. }else{
  212. return true;
  213. }
  214. }
  215. ]]>
  216. </script>
  217. </xhtml:head>
  218. <xhtml:body pagewidth="440" pageheight="620" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  219. <group id="group1" style="left:0px; top:5px; width:420px; height:13px; ">
  220. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:420px; height:14px; ">수혈 혈액형 입력</caption>
  221. </group>
  222. <group id="group4" style="left:0px; top:25px; width:420px; height:540px; ">
  223. <caption id="caption11" class="tit_2" style="left:5px; top:10px; width:94px; height:14px; ">환자정보</caption>
  224. <line id="line7" class="line_1" style="x1:0px; y1:25px; x2:420px; y2:25px; "/>
  225. <output id="opt_patnm" ref="/root/main/patinfo/hngnm" class="output_fix" style="left:190px; top:31px; width:131px; height:19px; "/>
  226. <output id="opt_sexage" ref="/root/main/patinfo/sexage" class="output_fix" style="left:73px; top:56px; width:169px; height:19px; "/>
  227. <output id="opt_regno" ref="/root/main/patinfo/info/regno" class="output_fix" style="left:73px; top:81px; width:169px; height:19px; "/>
  228. <line id="line4" class="line_2" style="x1:0px; y1:77px; x2:420px; y2:77px; "/>
  229. <line id="line5" class="line_2" style="x1:0px; y1:102px; x2:242px; y2:102px; "/>
  230. <line id="line6" class="line_3" style="x1:0px; y1:235px; x2:420px; y2:235px; "/>
  231. <line id="line3" class="line_2" style="x1:0px; y1:52px; x2:420px; y2:52px; "/>
  232. <caption id="caption12" class="cell_1" style="left:0px; top:30px; width:70px; height:21px; ">등록번호</caption>
  233. <input id="ipt_pid" ref="/root/send/pid" accesskey="f1" class="input_button" inputtype="button" appearance="input" style="left:73px; top:31px; width:115px; height:19px; ">
  234. <script type="javascript" ev:event="onbuttonclick">
  235. <![CDATA[
  236. fKeyEvent("B");
  237. ]]>
  238. </script>
  239. <script type="javascript" ev:event="onkeypress">
  240. <![CDATA[
  241. fKeyEvent();
  242. ]]>
  243. </script>
  244. </input>
  245. <caption id="caption1" class="tit_2" style="left:5px; top:242px; width:162px; height:13px; ">수혈 혈액형 목록</caption>
  246. <line id="line10" class="line_1" style="x1:0px; y1:257px; x2:420px; y2:257px; "/>
  247. <case id="case4" selected="true"/>
  248. <line id="line16" class="line_2" style="x1:0px; y1:102px; x2:420px; y2:102px; "/>
  249. <line id="line17" class="line_3" style="x1:0px; y1:130px; x2:420px; y2:130px; "/>
  250. <caption id="caption7" class="cell_1" style="left:0px; top:55px; width:70px; height:21px; ">Sex/Age</caption>
  251. <caption id="caption15" class="cell_1" style="left:0px; top:80px; width:70px; height:21px; ">진료과</caption>
  252. <datagrid id="grd_tnsabolist" nodeset="/root/main/tnsabolist" caption="구분^ABO^RH^등록자^등록일^pid^blodchoiseq" colsep="^" colwidth="80, 50, 50, 80, 120, 80, 100" dataheight="23" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:0px; top:284px; width:420px; height:253px; text-align:center; ">
  253. <col disabled="true" ref="tnsblodchoiflag" type="combo">
  254. <choices>
  255. <item>
  256. <label>RBC</label>
  257. <value>01</value>
  258. </item>
  259. <item>
  260. <label>PLASMA</label>
  261. <value>02</value>
  262. </item>
  263. </choices>
  264. </col>
  265. <col disabled="true" ref="abo" type="combo">
  266. <choices>
  267. <item>
  268. <label>A</label>
  269. <value>A</value>
  270. </item>
  271. <item>
  272. <label>B</label>
  273. <value>B</value>
  274. </item>
  275. <item>
  276. <label>O</label>
  277. <value>O</value>
  278. </item>
  279. <item>
  280. <label>AB</label>
  281. <value>AB</value>
  282. </item>
  283. </choices>
  284. </col>
  285. <col disabled="true" ref="rh" type="combo">
  286. <choices>
  287. <item>
  288. <label>+</label>
  289. <value>+</value>
  290. </item>
  291. <item>
  292. <label>-</label>
  293. <value>-</value>
  294. </item>
  295. </choices>
  296. </col>
  297. <col ref="rgstrnm"/>
  298. <col ref="rgstdt" format="yyyy-mm-dd hh:nn:ss"/>
  299. <col ref="pid" visibility="hidden"/>
  300. <col ref="blodchoiseq" visibility="hidden"/>
  301. <script type="javascript" ev:event="onaftersort">
  302. <![CDATA[
  303. grd_tnsabolist.gridToInstance();
  304. ]]>
  305. </script>
  306. </datagrid>
  307. <input id="ipt_delid" ref="/root/hidden/userid/delid" class="input_button" inputtype="button" appearance="input" style="left:219px; top:263px; width:80px; height:19px; ">
  308. <script type="javascript" ev:event="onkeypress">
  309. <![CDATA[
  310. fKeyEvent();
  311. ]]>
  312. </script>
  313. <script type="javascript" ev:event="onbuttonclick">
  314. <![CDATA[
  315. fKeyEvent("B");
  316. ]]>
  317. </script>
  318. </input>
  319. <output id="output2" ref="/root/hidden/userid/delnm" class="output_search" appearance="output" style="left:300px; top:263px; width:62px; height:19px; "/>
  320. <caption id="caption23" class="cell_1" style="left:167px; top:263px; width:50px; height:19px; ">삭제자</caption>
  321. <line id="line12" class="line_3" style="x1:0px; y1:211px; x2:420px; y2:211px; "/>
  322. <caption id="caption10" class="cell_1" style="left:0px; top:187px; width:70px; height:21px; ">혈액형</caption>
  323. <line id="line14" class="line_2" style="x1:0px; y1:185px; x2:420px; y2:185px; "/>
  324. <line id="line15" class="line_2" style="x1:0px; y1:161px; x2:420px; y2:161px; "/>
  325. <caption id="caption4" class="cell_1" style="left:0px; top:163px; width:70px; height:21px; ">혈액형</caption>
  326. <select1 id="radio1" ref="/root/main/blodflag/abo" appearance="full" cellspacing="18" cols="4" overflow="visible" style="left:73px; top:166px; width:180px; height:15px; border-style:none; ">
  327. <choices>
  328. <item>
  329. <label>A</label>
  330. <value>A</value>
  331. </item>
  332. <item>
  333. <label>B</label>
  334. <value>B</value>
  335. </item>
  336. <item>
  337. <label>O</label>
  338. <value>O</value>
  339. </item>
  340. <item>
  341. <label>AB</label>
  342. <value>AB</value>
  343. </item>
  344. </choices>
  345. </select1>
  346. <select1 id="radio2" ref="/root/main/blodflag/rh" appearance="full" cellspacing="50" cols="2" overflow="visible" style="left:73px; top:190px; width:174px; height:15px; border-style:none; ">
  347. <choices>
  348. <item>
  349. <label>RH+</label>
  350. <value>+</value>
  351. </item>
  352. <item>
  353. <label>RH-</label>
  354. <value>-</value>
  355. </item>
  356. </choices>
  357. </select1>
  358. <caption id="caption3" class="cell_1" style="left:0px; top:139px; width:70px; height:21px; ">구 분</caption>
  359. <line id="line2" class="line_2" style="x1:0px; y1:137px; x2:420px; y2:137px; "/>
  360. <select1 id="radio3" ref="/root/main/blodflag/tnsblodchoiflag" appearance="full" cellspacing="47" cols="2" overflow="visible" style="left:73px; top:142px; width:174px; height:15px; border-style:none; ">
  361. <choices>
  362. <item>
  363. <label>RBC</label>
  364. <value>01</value>
  365. </item>
  366. <item>
  367. <label>PLASMA</label>
  368. <value>02</value>
  369. </item>
  370. </choices>
  371. </select1>
  372. <input id="ipt_updid" ref="/root/hidden/userid/updid" class="input_button" inputtype="button" appearance="input" style="left:219px; top:214px; width:80px; height:19px; ">
  373. <script type="javascript" ev:event="onkeypress">
  374. <![CDATA[
  375. fKeyEvent();
  376. ]]>
  377. </script>
  378. <script type="javascript" ev:event="onbuttonclick">
  379. <![CDATA[
  380. fKeyEvent("B");
  381. ]]>
  382. </script>
  383. </input>
  384. <caption id="caption5" class="cell_1" style="left:167px; top:214px; width:50px; height:19px; ">등록자</caption>
  385. <output id="output1" ref="/root/hidden/userid/updnm" class="output_search" appearance="output" style="left:300px; top:214px; width:62px; height:19px; "/>
  386. <button id="btn_del" class="btn4_letter2" style="left:364px; top:262px; width:56px; height:22px; ">
  387. <caption>삭제</caption>
  388. <script type="javascript" ev:event="DOMActivate">
  389. <![CDATA[
  390. fExeTnsABO();
  391. ]]>
  392. </script>
  393. </button>
  394. <button id="btn_upd" class="btn4_letter2" style="left:364px; top:213px; width:56px; height:22px; ">
  395. <caption>등록</caption>
  396. <script type="javascript" ev:event="DOMActivate">
  397. <![CDATA[
  398. fExeTnsABO();
  399. ]]>
  400. </script>
  401. </button>
  402. <output id="output3" ref="/root/main/patinfo/info/regno" class="output_fix" style="left:73px; top:107px; width:169px; height:19px; "/>
  403. <caption id="caption9" class="cell_1" style="left:0px; top:105px; width:70px; height:21px; ">병동/병실</caption>
  404. <line id="line8" class="line_2" style="x1:0px; y1:127px; x2:420px; y2:127px; "/>
  405. <line id="line9" class="line_1" style="x1:0px; y1:132px; x2:420px; y2:132px; "/>
  406. <line id="line11" class="line_2" style="x1:0px; y1:209px; x2:420px; y2:209px; "/>
  407. <caption id="opt_abo" ref="/root/main/patinfo/btype" class="font_ab" style="left:245px; top:55px; width:175px; height:67px; font-size:36pt; word-wrap:word; "/>
  408. </group>
  409. <group id="group2" style="left:0px; top:563px; width:420px; height:27px; ">
  410. <line id="line1" class="line_6" style="x1:0px; y1:0px; x2:420px; y2:0px; "/>
  411. <button id="button4" class="btn4_letter2" style="left:364px; top:2px; width:56px; height:22px; ">
  412. <caption>닫기</caption>
  413. <script type="javascript" ev:event="DOMActivate">
  414. <![CDATA[
  415. window.close();
  416. ]]>
  417. </script>
  418. </button>
  419. </group>
  420. </xhtml:body>
  421. </xhtml:html>