SMMNB00400_내환자 Setting 등록.xrw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  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>내 환자 Setting</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <cond>
  11. <wardcd/>
  12. <userid/>
  13. <usernm/>
  14. <multicheck/>
  15. </cond>
  16. <mypatinfo>
  17. <mypatlist>
  18. <mysetting/>
  19. <roomcd/>
  20. <bedcd/>
  21. <patnm/>
  22. <sexage/>
  23. <orddeptnm/>
  24. <wardcd/>
  25. <pid/>
  26. <bfsetting/>
  27. </mypatlist>
  28. </mypatinfo>
  29. <settinginfo>
  30. <settingtime/>
  31. </settinginfo>
  32. <saveinfo>
  33. <message/>
  34. </saveinfo>
  35. </main>
  36. <send/>
  37. <init>
  38. <ward>
  39. <dept>
  40. <deptcd/>
  41. <depthngnm/>
  42. </dept>
  43. </ward>
  44. </init>
  45. <hidden>
  46. </hidden>
  47. </root>
  48. </instance>
  49. <script type="javascript">
  50. <![CDATA[
  51. // 환자리스트 조회
  52. function fGetPatList(pFlag){
  53. model.setValue("/root/main/cond/multicheck", "N");
  54. grd_mypatlist.attribute("height") = "663";
  55. tar_settinginfo.visible = false;
  56. grd_mypatlist.rebuildStyle();
  57. model.removenode("/root/send");
  58. model.makeValue("/root/send/wardcd", model.getValue("root/main/cond/wardcd"));
  59. model.makeValue("/root/send/srchflag" ,pFlag);
  60. submit("TRMNB00402");
  61. grd_mypatlist.rebuildStyle(0, 0, grd_mypatlist.rows-1, grd_mypatlist.cols-1);
  62. setRowStyle("grd_mypatlist", "0", "true", "mysetting", "equal");
  63. }
  64. ]]>
  65. </script>
  66. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  67. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  68. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  69. <script type="javascript" ev:event="xforms-ready">
  70. <![CDATA[
  71. //20070726 1530
  72. var instcd = getUserInfo("dutplceinstcd");
  73. var standard_yn = "orduseyn";
  74. var ord_deptflag = "W";
  75. var rslt_ref = "/root/init/ward";
  76. zbcfGetDeptCodeList(instcd, standard_yn, ord_deptflag, rslt_ref, "depthngnm", "asc" );
  77. sct_wardlist.refresh();
  78. grd_mypatlist.mergeCol(0) = false;
  79. grd_mypatlist.mergeCol(2) = false;
  80. grd_mypatlist.mergeCol(3) = false;
  81. grd_mypatlist.mergeCol(4) = false;
  82. grd_mypatlist.mergeCol(5) = false;
  83. grd_mypatlist.mergeCol(6) = false;
  84. grd_mypatlist.mergeCol(7) = false;
  85. grd_mypatlist.mergeCol(8) = false;
  86. grd_mypatlist.mergeCol(9) = false;
  87. grd_mypatlist.mergeCol(10) = false;
  88. model.removeNodeset("/root/main/mypatinfo/mypatlist");
  89. if (checkOpener()) {
  90. var wardcd = opener.javascript.getParameter("wardcd");
  91. model.setValue("root/main/cond/userid", getUserId());
  92. model.setValue("root/main/cond/usernm", getUserName());
  93. if(wardcd != null) {
  94. model.setValue("root/main/cond/wardcd", wardcd);
  95. } else {
  96. model.setValue("root/main/cond/wardcd", getUserInfo("dutplcecd"));
  97. }
  98. } else {
  99. model.setValue("root/main/cond/userid", getUserId());
  100. model.setValue("root/main/cond/usernm", getUserName());
  101. model.setValue("root/main/cond/wardcd", getUserInfo("dutplcecd"));
  102. }
  103. model.removenode("/root/send");
  104. model.makeValue("/root/send/wardcd", model.getValue("root/main/cond/wardcd"));
  105. model.makeValue("/root/send/userid", model.getValue("root/main/cond/userid"));
  106. // submit("TRMNW00101", false);
  107. submit("TRMNB00402");
  108. setRowStyle("grd_mypatlist", "0", "true", "mysetting", "equal");
  109. ]]>
  110. </script>
  111. <submission id="TXMNB00401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/settinginfo"/>
  112. <submission id="TRZSD00109" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  113. <submission id="TRMNW00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init"/>
  114. <submission id="TRMNB00402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/mypatinfo"/>
  115. <submission id="TXMNB00402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send"/>
  116. </model>
  117. </xhtml:head>
  118. <xhtml:body pagewidth="380" pageheight="754" guideline="1,359;1,1157;1,361;2,784;" style="font-size:11pt; margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  119. <group id="group1" style="left:0px; top:0px; width:360px; height:13px; ">
  120. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:109px; height:14px; ">내 환자 Setting</caption>
  121. </group>
  122. <group id="group2" scroll="auto" style="left:0px; top:13px; width:360px; height:732px; ">
  123. <datagrid id="grd_mypatlist" nodeset="/root/main/mypatinfo/mypatlist" allowselection="false" caption="^병실^병상^환자명^S/A^진료과^병동^환자번호^전세팅" colsep="^" colwidth="20, 64, 0, 79, 50, 125, 0, 0, 0" dataheight="25" defaultrows="0" frozencols="7" mergecells="bycol" multitotal="false" rowheader="25" rowheight="32" rowsep="|" style="left:0px; top:67px; width:357px; height:643px; ">
  124. <col ref="mysetting" type="checkbox"/>
  125. <col ref="roomcd"/>
  126. <col ref="bedcd"/>
  127. <col ref="patnm"/>
  128. <col ref="sexage"/>
  129. <col ref="orddeptnm"/>
  130. <col ref="wardcd"/>
  131. <col ref="pid"/>
  132. <col ref="bfsetting"/>
  133. <script type="javascript" ev:event="onclick">
  134. <![CDATA[
  135. if( grd_mypatlist.col != 0 && isDataCell()) {
  136. if (grd_mypatlist.mergeCol(grd_mypatlist.col) == true) {
  137. var arrRows = grd_mypatlist.mergeArea(grd_mypatlist.row, grd_mypatlist.col).split(",");
  138. var currentMysetting = model.getValue("/root/main/mypatinfo/mypatlist["+arrRows[0]+"]/mysetting")
  139. if(currentMysetting == "true" ) {
  140. currentMysetting = "false";
  141. } else {
  142. currentMysetting = "true";
  143. }
  144. for (var i=parseInt(arrRows[0]); i<=parseInt(arrRows[2]); i++) {
  145. model.setValue("/root/main/mypatinfo/mypatlist["+i+"]/mysetting", currentMysetting);
  146. }
  147. } else {
  148. var currentMysetting = model.getValue("/root/main/mypatinfo/mypatlist["+grd_mypatlist.selectedRow(0)+"]/mysetting")
  149. if (currentMysetting == "true") {
  150. model.setValue("/root/main/mypatinfo/mypatlist["+grd_mypatlist.selectedRow(0)+"]/mysetting","false");
  151. } else {
  152. model.setValue("/root/main/mypatinfo/mypatlist["+grd_mypatlist.selectedRow(0)+"]/mysetting","true");
  153. }
  154. }
  155. }
  156. grd_mypatlist.rebuildStyle(0, 0, grd_mypatlist.rows-1, grd_mypatlist.cols-1);
  157. setRowStyle("grd_mypatlist", "0", "true", "mysetting", "equal");
  158. ]]>
  159. </script>
  160. </datagrid>
  161. <line id="line1" class="line_1" style="x1:0px; y1:62px; x2:357px; y2:62px; "/>
  162. <caption id="caption8" class="tit_2" style="left:5px; top:47px; width:95px; height:13px; ">내환자리스트</caption>
  163. <button id="btn_save" class="btn2_letter2" style="left:264px; top:40px; width:42px; height:19px; ">
  164. <caption>저장</caption>
  165. <script type="javascript" ev:event="DOMActivate">
  166. <![CDATA[
  167. model.removenode("/root/send");
  168. model.makeValue("/root/send/mypatlist", grd_mypatlist.getUpdateDataAll("u"));
  169. if(grd_mypatlist.rows > 1){
  170. if (submit("TXMNB00401") ) {
  171. grd_mypatlist.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  172. /*
  173. for(var i=1; i < grd_mypatlist.rows; i++) {
  174. if(grd_mypatlist.valueMatrix(i,0) != "true") {
  175. grd_mypatlist.rowHidden(i) = true;
  176. }
  177. }
  178. */
  179. fGetPatList("setting"); // 환자리스트 조회
  180. model.setValue("/root/main/saveinfo/message", " " + model.getValue("/root/main/settinginfo/settingtime") + "\n ["+ getUserName() + "]간호사의 \n 내환자가 Setting 되었습니다.");
  181. grd_mypatlist.attribute("height") = "405";
  182. tar_settinginfo.visible = true;
  183. tar_settinginfo.refresh();
  184. }
  185. } else {
  186. messageBox("저장할 내역이 ", "I004")
  187. }
  188. ]]>
  189. </script>
  190. </button>
  191. <caption id="caption1" class="cell_1" style="left:0px; top:15px; width:70px; height:23px; ">사원번호</caption>
  192. <caption id="caption2" class="cell_1" style="left:179px; top:15px; width:70px; height:23px; ">간호사명</caption>
  193. <output id="opt_empno" ref="/root/main/cond/userid" class="output_fix" style="left:73px; top:16px; width:102px; height:19px; "/>
  194. <output id="opt_nursnm" ref="/root/main/cond/usernm" class="output_fix" style="left:252px; top:16px; width:102px; height:19px; "/>
  195. <line id="line2" class="line_1" style="x1:0px; y1:10px; x2:357px; y2:10px; "/>
  196. <line id="line3" class="line_3" style="x1:0px; y1:37px; x2:357px; y2:37px; "/>
  197. <select1 id="sct_wardlist" ref="/root/main/cond/wardcd" class="combo_default" appearance="minimal" style="left:100px; top:41px; width:121px; height:19px; ">
  198. <choices>
  199. <itemset nodeset="/root/init/ward/dept">
  200. <label ref="depthngnm"/>
  201. <value ref="deptcd"/>
  202. </itemset>
  203. </choices>
  204. <script type="javascript" ev:event="xforms-value-changed">
  205. <![CDATA[
  206. model.removenode("/root/send");
  207. model.makeValue("/root/send/wardcd", model.getValue("root/main/cond/wardcd"));
  208. submit("TRMNB00402");
  209. grd_mypatlist.rebuildStyle(0, 0, grd_mypatlist.rows-1, grd_mypatlist.cols-1);
  210. setRowStyle("grd_mypatlist", "0", "true", "mysetting", "equal");
  211. ]]>
  212. </script>
  213. </select1>
  214. <button id="btn_ref" class="btn2_letter2" style="left:222px; top:40px; width:42px; height:19px; ">
  215. <caption>조회</caption>
  216. <script type="javascript" ev:event="DOMActivate">
  217. <![CDATA[
  218. fGetPatList(); // 환자리스트 조회
  219. ]]>
  220. </script>
  221. </button>
  222. <textarea id="tar_settinginfo" ref="/root/main/saveinfo/message" visibility="hidden" scroll="auto" editable="false" style="left:0px; top:520px; width:357px; height:115px; font-family:돋움체; font-size:13pt; font-weight:bold; vertical-align:middle; background-color:#ffffcc; "/>
  223. <button id="button1" class="btn2_letter3" style="left:306px; top:40px; width:53px; height:19px; ">
  224. <caption>초기화</caption>
  225. <script type="javascript" ev:event="DOMActivate">
  226. <![CDATA[
  227. var btn = messageBox("초기화를 ", "Q004");
  228. if (btn == '6') {
  229. model.removenode("/root/send");
  230. model.makeValue("/root/send/userid", model.getValue("/root/main/cond/userid"));
  231. model.makeValue("/root/send/flag", "Y");
  232. submit("TXMNB00402");
  233. fGetPatList("setting"); // 환자리스트 조회
  234. model.setValue("/root/main/saveinfo/message", " " + model.getValue("/root/main/settinginfo/settingtime") + "\n ["+ getUserName() + "]간호사의 \n 내환자가 초기화 되었습니다.");
  235. grd_mypatlist.attribute("height") = "405";
  236. tar_settinginfo.visible = true;
  237. tar_settinginfo.refresh();
  238. model.refresh();
  239. } else if (btn == '7') {
  240. return;
  241. }
  242. ]]>
  243. </script>
  244. </button>
  245. <caption id="caption3" style="left:331px; top:715px; width:28px; height:15px; ">[표]</caption>
  246. <bool id="bool1" ref="/root/main/cond/multicheck" style="left:1px; top:70px; width:20px; height:20px; ">
  247. <script type="javascript" ev:event="xforms-value-changed">
  248. <![CDATA[
  249. var multicheck = model.getValue("/root/main/cond/multicheck");
  250. var xMyPatListPath = "/root/main/mypatinfo/mypatlist";
  251. var nodeCnt = getNodesetCount(xMyPatListPath);
  252. for(var i = 1; i <= nodeCnt; i++){
  253. if(multicheck == "true"){
  254. model.setValue(xMyPatListPath + "[" + i + "]/mysetting", "true");
  255. }else{
  256. model.setValue(xMyPatListPath + "[" + i + "]/mysetting", "false");
  257. }
  258. }
  259. ]]>
  260. </script>
  261. </bool>
  262. </group>
  263. <img id="img1" src="../../../emr/commonweb/images/icon_btn.gif" style="left:325px; top:8px; width:15px; height:15px; background-stretch:stretch; ">
  264. <script type="javascript" ev:event="onmousemove">
  265. <![CDATA[
  266. cap_key.visible =true;
  267. ]]>
  268. </script>
  269. <script type="javascript" ev:event="onmouseout">
  270. <![CDATA[
  271. cap_key.visible =false;
  272. ]]>
  273. </script>
  274. </img>
  275. <caption id="cap_key" class="text_essential" visibility="hidden" appearance="caption" style="left:20px; top:210px; width:300px; height:65px; text-align:left; ">
  276. <![CDATA[내환자 SETTING은 입원, 전실된 환자가
  277. 자동으로 설정되지 않으므로
  278. 내환자가 추가된 경우에는 재설정해주시기 바랍니다.
  279. 설정된 내환자 정보는 24시간 저장됩니다.
  280. ]]>
  281. </caption>
  282. </xhtml:body>
  283. </xhtml:html>