SPMMO26000_의사결정등록.xrw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <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">
  4. <xhtml:head>
  5. <xhtml:title>의사결정</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <pid/>
  11. <hngnm/>
  12. <orddd/>
  13. <cretno/>
  14. <instcd/>
  15. <decisionkind/>
  16. <reasonflag/>
  17. <cnt/>
  18. <etcreason/>
  19. </main>
  20. <hidden/>
  21. <temp/>
  22. <init>
  23. <pid/>
  24. <hngnm/>
  25. <orddd/>
  26. <cretno/>
  27. <instcd/>
  28. <decision/>
  29. <reasonflag/>
  30. <adrvyn/>
  31. </init>
  32. <send>
  33. <reqdata/>
  34. </send>
  35. </root>
  36. </instance>
  37. <submission id="TRZSD00109" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  38. <submission id="TRMMB04101" mediatype="application/x-www-form-urlencoded" method="post"/>
  39. <submission id="TRMMO26001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main"/>
  40. <submission id="TXMMO26001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/cnt"/>
  41. <submission id="TXMMO26002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/cnt"/>
  42. <script type="javascript" ev:event="xforms-ready">
  43. <![CDATA[
  44. zbcfGetCodeList(new Array("M0720", "M0730"), new Array("/root/init/decision", "/root/init/reasonflag")); // 의사종류 코드로 구해오기
  45. if(getUserInfo("dutplceinstcd") == "031") { // 2017.10.11 엄영만 양동헌 교수님 요청 본원 의사종류 에서 B:병실입원(EICU), C:병실입원(응급입원실) 항목 삭제
  46. //model.makeValue("/root/temp/infomsg", "EICU 입원 시 병실입원 선택후 입원의뢰서를 예약으로 작성 하시기 바랍니다.");
  47. if(getCurrentDate() < "20171014") {
  48. messageBox ( "eicu 또는 응급병동에 입원 해야 하는 경우,\n입원의뢰서에서 icu 또는 응급병동을 선택하여 주시기 바랍니다.", "I" );
  49. }
  50. var pParentNode = null;
  51. var node01 = instance1.selectSingleNode("/root/init/decision/M0720[cdid='B']");
  52. if(node01 != null){
  53. pParentNode = node01.parentNode;
  54. pParentNode.removeChild(node01);
  55. }
  56. var node02 = instance1.selectSingleNode("/root/init/decision/M0720[cdid='C']");
  57. if(node02 != null){
  58. pParentNode = node02.parentNode;
  59. pParentNode.removeChild(node02);
  60. }
  61. }
  62. var param = opener.javascript.getParameter("SSPMMO26000_Param");
  63. if(param!=""){
  64. param = param.split("▦");
  65. model.setValue("/root/init/pid", param[0]);
  66. model.setValue("/root/init/hngnm", param[1]);
  67. model.setValue("/root/init/orddd", param[2]);
  68. model.setValue("/root/init/cretno", param[3]);
  69. model.setValue("/root/init/instcd", param[4]);
  70. model.copyNode("/root/send/reqdata", "/root/init");
  71. submit("TRMMO26001");
  72. if(model.getValue("/root/main/orddd")==""){
  73. model.makeValue("/root/main/pid", param[0]);
  74. model.makeValue("/root/main/hngnm", param[1]);
  75. model.makeValue("/root/main/orddd", param[2]);
  76. model.makeValue("/root/main/cretno", param[3]);
  77. model.makeValue("/root/main/instcd", param[4]);
  78. model.makeNode("/root/main/decisionkind");
  79. model.makeNode("/root/main/etcreason");
  80. model.makeNode("/root/main/reasonflag");
  81. model.makeValue("/root/temp/text", "의사결정 미완료");
  82. button1.disabled="true";
  83. }else{
  84. model.makeValue("/root/temp/text", "의사결정 완료");
  85. model.makeValue("/root/temp/decisionkind", model.getValue("/root/main/decisionkind"));
  86. button1.disabled="false";
  87. }
  88. if(model.getValue("/root/main/decisionkind")!="E"){
  89. combo2.disabled="true";
  90. txt_reason.disabled="true";
  91. }
  92. }else{
  93. alert("잘못된 데이터입니다.");
  94. model.close();
  95. }
  96. model.refresh();
  97. ]]>
  98. </script>
  99. </model>
  100. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  101. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  102. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  103. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  104. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  105. </xhtml:head>
  106. <xhtml:body pagewidth="320" pageheight="240" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  107. <input id="ipt_pid" ref="/root/main/pid" disabled="true" disable.background-color="#ffffff" style="left:90px; top:22px; width:130px; height:19px; "/>
  108. <input id="ipt_hngnm" ref="/root/main/hngnm" disabled="true" disable.background-color="#ffffff" style="left:90px; top:47px; width:130px; height:19px; "/>
  109. <line id="line1" class="line_1" style="x1:0px; y1:15px; x2:300px; y2:15px; "/>
  110. <caption id="caption14" class="tit_2" style="left:0px; top:0px; width:152px; height:15px; vertical-align:middle; ">의사결정</caption>
  111. <caption id="caption26" class="cell_1" style="left:1px; top:20px; width:85px; height:23px; text-align:center; vertical-align:middle; ">등록번호</caption>
  112. <button id="btn_save" class="btn4_letter2" style="left:120px; top:210px; width:56px; height:22px; ">
  113. <caption>저장</caption>
  114. <script type="javascript" ev:event="DOMActivate">
  115. <![CDATA[
  116. if(model.getValue("/root/main/decisionkind")=="E"){
  117. if(model.getValue("/root/main/reasonflag")==""){
  118. alert("기타 선택시 사유선택은 필수입니다.");
  119. return;
  120. }
  121. }
  122. if(model.getValue("/root/main/decisionkind")==""){
  123. alert("의사종류 선택은 필수입니다.");
  124. return;
  125. }else{
  126. model.copyNode("/root/send/reqdata", "/root/main");
  127. if(model.getValue("/root/main/decisionkind")=="A" && model.getValue("/root/main/adrvyn")=="N"){ // 등록된 입원 의뢰서가 없는경우 2016.11.08 엄영만
  128. setParameter("opener_id", "SPMMO26000"); // 오픈아이디
  129. setParameter("SPMMO00100_indd", model.getValue("/root/main/orddd")); //입원일
  130. setParameter("SPMMO00100_incretno", model.getValue("/root/main/cretno")); //원무키
  131. setParameter("SPMMO00100_pid", model.getValue("/root/main/pid")); //환자번호
  132. setParameter("SPMMO00100_erreglyn", "E"); //응급 플래그
  133. setParameter("SPMMO00100_decisionkind", model.getValue("/root/main/decisionkind")); //의사종류
  134. modal("SPMMO00100");
  135. model.close();
  136. }else{
  137. var tmp_decisionkind=model.getValue("/root/temp/decisionkind");
  138. if(tmp_decisionkind=="A"){
  139. var answer=messageBox("기 결정된 입원의뢰서도 변경하시겠습니까?", "S001", "")
  140. if(answer=="6"){ // 예
  141. model.makeValue("/root/send/reqdata/answer", answer);
  142. if(submit("TXMMO26001")){
  143. opener.javascript.setParameter("adflag", model.getValue("/root/main/decisionkind"));
  144. alert("변경되었습니다.");
  145. model.close();
  146. }
  147. }else if(answer=="7"){ // 아니오
  148. model.makeValue("/root/send/reqdata/answer", answer);
  149. if(submit("TXMMO26001")){
  150. opener.javascript.setParameter("adflag", model.getValue("/root/main/decisionkind"));
  151. alert("변경되었습니다.");
  152. model.close();
  153. }
  154. }else{ //취소
  155. return;
  156. }
  157. }else{
  158. if(submit("TXMMO26001")){
  159. opener.javascript.setParameter("adflag", model.getValue("/root/main/decisionkind"));
  160. alert("저장되었습니다.");
  161. model.close();
  162. }
  163. }
  164. }
  165. }
  166. ]]>
  167. </script>
  168. </button>
  169. <button id="btn_exit" class="btn4_letter2" style="left:240px; top:210px; width:56px; height:22px; ">
  170. <caption>종료</caption>
  171. <script type="javascript" ev:event="DOMActivate">
  172. <![CDATA[
  173. model.close();
  174. ]]>
  175. </script>
  176. </button>
  177. <caption id="caption13" class="cell_1" style="left:1px; top:45px; width:85px; height:23px; text-align:center; vertical-align:middle; ">환자명</caption>
  178. <caption id="caption16" class="cell_1" style="left:0px; top:70px; width:85px; height:23px; text-align:center; vertical-align:middle; ">입원일</caption>
  179. <input id="ipt_indd" ref="/root/main/orddd" disabled="true" inputtype="date" format="yyyy-mm-dd" disable.background-color="#ffffff" style="left:89px; top:71px; width:130px; height:19px; "/>
  180. <caption id="caption5" class="cell_1" style="left:0px; top:95px; width:85px; height:23px; text-align:center; vertical-align:middle; ">의사종류</caption>
  181. <caption id="caption1" class="cell_1" style="left:0px; top:145px; width:85px; height:23px; text-align:center; vertical-align:middle; ">기타사유</caption>
  182. <textarea id="txt_reason" ref="/root/main/etcreason" maxlength="600" style="left:90px; top:145px; width:205px; height:60px; "/>
  183. <button id="button1" class="btn4_letter2" style="left:180px; top:210px; width:56px; height:22px; ">
  184. <caption>삭제</caption>
  185. <script type="javascript" ev:event="DOMActivate">
  186. <![CDATA[
  187. var answer=messageBox("기 결정된 입원의뢰서도 삭제하시겠습니까?", "S001", "")
  188. if(answer=="6"){ // 예
  189. model.makeValue("/root/send/reqdata/answer", answer);
  190. if(submit("TXMMO26002")){
  191. opener.javascript.setParameter("adflag", "-");
  192. alert("삭제되었습니다.");
  193. model.close();
  194. }
  195. }else if(answer=="7"){ // 아니오
  196. if(submit("TXMMO26002")){
  197. opener.javascript.setParameter("adflag", "-");
  198. alert("삭제되었습니다.");
  199. model.close();
  200. }
  201. }else{ //취소
  202. return;
  203. }
  204. ]]>
  205. </script>
  206. </button>
  207. <caption id="cap_text" ref="/root/temp/text" style="left:225px; top:22px; width:65px; height:33px; font-weight:bold; color:#ff0000; text-align:left; "/>
  208. <select1 id="combo1" ref="/root/main/decisionkind" appearance="minimal" style="left:89px; top:95px; width:145px; height:19px; ">
  209. <choices>
  210. <itemset nodeset="/root/init/decision/M0720">
  211. <label ref="cdnm"/>
  212. <value ref="cdid"/>
  213. </itemset>
  214. </choices>
  215. <script type="javascript" ev:event="xforms-value-changed">
  216. <![CDATA[
  217. if(model.getValue("/root/main/decisionkind")=="E"){
  218. combo2.disabled="false";
  219. txt_reason.disabled="false";
  220. }else{
  221. combo2.disabled="true";
  222. txt_reason.disabled="true";
  223. model.setValue("/root/main/reasonflag", "");
  224. model.setValue("/root/main/etcreason", "");
  225. }
  226. model.refresh();
  227. ]]>
  228. </script>
  229. </select1>
  230. <caption id="caption2" class="cell_1" style="left:0px; top:120px; width:85px; height:23px; text-align:center; vertical-align:middle; ">사유선택</caption>
  231. <select1 id="combo2" ref="/root/main/reasonflag" appearance="minimal" style="left:90px; top:120px; width:145px; height:19px; ">
  232. <choices>
  233. <itemset nodeset="/root/init/reasonflag/M0730">
  234. <label ref="cdnm"/>
  235. <value ref="cdid"/>
  236. </itemset>
  237. </choices>
  238. </select1>
  239. </xhtml:body>
  240. </xhtml:html>