SPMNR08300_기본간호추가시행등록.xrw 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  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. <patinfo>
  11. <info>
  12. <pid/>
  13. <cretno/>
  14. <orddd/>
  15. <hngnm/>
  16. <orddeptcd/>
  17. <orddeptnm/>
  18. <wardcd/>
  19. <wardnm/>
  20. <roomcd/>
  21. <sexage/>
  22. <age/>
  23. <hd/>
  24. <diagcd/>
  25. <diaghngnm/>
  26. <diagengnm/>
  27. </info>
  28. <patinfolist>
  29. <pid/>
  30. <hngnm/>
  31. </patinfolist>
  32. </patinfo>
  33. <patsrchinfo/>
  34. <patforminfo>
  35. <info>
  36. <pid/>
  37. <cretno/>
  38. <orddd/>
  39. <hngnm/>
  40. <orddeptcd/>
  41. <orddeptnm/>
  42. <wardcd/>
  43. <wardnm/>
  44. <roomcd/>
  45. <sexage/>
  46. <age/>
  47. <hd/>
  48. <diagcd/>
  49. <diaghngnm/>
  50. <diagengnm/>
  51. </info>
  52. <patinfolist>
  53. <pid/>
  54. <hngnm/>
  55. </patinfolist>
  56. </patforminfo>
  57. <nursebasicitem>
  58. <info>
  59. <itemnm>세발간호</itemnm>
  60. <execyn>N</execyn>
  61. <remcnts/>
  62. <status>-</status>
  63. </info>
  64. <info>
  65. <itemnm>목욕(전신)간호</itemnm>
  66. <execyn>N</execyn>
  67. <remcnts/>
  68. <status>-</status>
  69. </info>
  70. </nursebasicitem>
  71. <nursebasicinfo>
  72. <info/>
  73. </nursebasicinfo>
  74. </main>
  75. <send>
  76. <reqdata/>
  77. </send>
  78. </root>
  79. </instance>
  80. <script type="javascript" ev:event="xforms-ready">
  81. <![CDATA[
  82. finit();
  83. ]]>
  84. </script>
  85. <submission id="TRMNR08301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/patinfo"/>
  86. </model>
  87. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  88. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  89. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  90. <script type="javascript" src="../../../emr/carecomweb/js/CareCom.js"/>
  91. <script type="javascript">
  92. <![CDATA[
  93. var oRow = 0;
  94. var oSaveFlag = "";
  95. function finit(){
  96. oRow = opener.grd_nursebasic.row - opener.grd_nursebasic.fixedRows + 1;
  97. oSaveFlag = opener.window.javascript.saveFlag;
  98. if( oSaveFlag == "A" ){
  99. //grd_nursebaseitem.disabled = true;
  100. btn_save.disabled = true;
  101. }
  102. if( oRow >= 1 ){
  103. //기본간호 수행 유무 및 기타정보 셋팅
  104. if( opener.model.getValue("/root/main/forminfo/info/status") == "U" ){
  105. model.setValue( "/root/main/nursebasicitem/info[1]/execyn", opener.model.getValue("/root/main/nursebasicinfo/info[" + oRow + "]/hrwshexecstat") );
  106. model.setValue( "/root/main/nursebasicitem/info[2]/execyn", opener.model.getValue("/root/main/nursebasicinfo/info[" + oRow + "]/bathexecstat") );
  107. model.setValue( "/root/main/nursebasicitem/info[1]/remcnts", opener.model.getValue("/root/main/nursebasicinfo/info[" + oRow + "]/hrwshremcnts") );
  108. model.setValue( "/root/main/nursebasicitem/info[2]/remcnts", opener.model.getValue("/root/main/nursebasicinfo/info[" + oRow + "]/bathremcnts") );
  109. }
  110. //환자정보 조회
  111. fGetPatInfo( opener.model.getValue("/root/main/nursebasicinfo/info[" + oRow + "]/pid"), "N" );
  112. }
  113. }
  114. function fGetPatInfo(pid, refreshyn){
  115. if( isNull(refreshyn) ) refreshyn = "Y";
  116. model.removeNodeset("/root/send/reqdata");
  117. model.makeValue("/root/send/reqdata/pid", pid);
  118. if(submit("TRMNR08301", true)){
  119. if( refreshyn == "Y" ){
  120. model.setValue( "/root/main/nursebasicitem/info[1]/execyn", "N" );
  121. model.setValue( "/root/main/nursebasicitem/info[2]/execyn", "N" );
  122. model.setValue( "/root/main/nursebasicitem/info[1]/remcnts", "" );
  123. model.setValue( "/root/main/nursebasicitem/info[2]/remcnts", "" );
  124. }
  125. }
  126. var nodelist = model.instances(0).selectNodes("/root/main/patinfo/info/pid");
  127. if(nodelist.length <= 0){
  128. var trgtpid = model.getValue("/root/send/reqdata/pid");
  129. messageBox("등록번호[" + trgtpid + "]로 환자를 조회", "E001");
  130. copyNodeListType("/root/main/patinfo", "/root/main/patforminfo/info", "replace", model, model);
  131. return;
  132. }
  133. }
  134. function fSaveAddExecInfo(flag){
  135. var saveDataNodes = instance1.selectNodes("/root/main/nursebasicitem/info[status!='-']");
  136. if( saveDataNodes.length <= 0 ){
  137. messageBox( "저장할 데이터가", "I004"); //없습니다
  138. return false;
  139. }
  140. var patRef = "/root/main/patinfo/info";
  141. var itemRef = "/root/main/nursebasicitem/info";
  142. var ref = "/root/main/forminfo/info"; //"/root/main/nursebasicinfo/info";
  143. opener.model.setValue( ref + "/pid", model.getValue(patRef + "/pid") );
  144. opener.model.setValue( ref + "/cretno", model.getValue(patRef + "/cretno") );
  145. opener.model.setValue( ref + "/indd", model.getValue(patRef + "/indd") );
  146. opener.model.setValue( ref + "/hrwshexecstat", model.getValue(itemRef + "[" + 1 + "]/execyn") );
  147. opener.model.setValue( ref + "/hrwshremcnts", model.getValue(itemRef + "[" + 1 + "]/remcnts") );
  148. opener.model.setValue( ref + "/bathexecstat", model.getValue(itemRef + "[" + 2 + "]/execyn") );
  149. opener.model.setValue( ref + "/bathremcnts", model.getValue(itemRef + "[" + 2 + "]/remcnts") );
  150. //opener.model.setValue( ref + "/status", "I" ); //오프너에서 화면을 호출할때 값이 셋팅됨.
  151. if( opener.model.getValue( ref + "/status") == "U" ){
  152. opener.model.setValue( ref + "/rgstdd", opener.model.getValue("/root/main/nursebasicinfo/info[" + oRow + "]/rgstdd") );
  153. opener.model.setValue( ref + "/rgstno", opener.model.getValue("/root/main/nursebasicinfo/info[" + oRow + "]/rgstno") );
  154. opener.model.setValue( ref + "/rgsthistno", opener.model.getValue("/root/main/nursebasicinfo/info[" + oRow + "]/rgstno") );
  155. if( model.getValue(itemRef + "[" + 1 + "]/execyn") == "N" && model.getValue(itemRef + "[" + 2 + "]/execyn") == "N" ){
  156. //opener.model.setValue( ref + "/status", "D" ); //수행취소
  157. }
  158. }else{
  159. if( model.getValue(itemRef + "[" + 1 + "]/execyn") == "N" && model.getValue(itemRef + "[" + 2 + "]/execyn") == "N" ){
  160. messageBox( "시행 유무를 ", "C002"); //선택
  161. return false;
  162. }
  163. }
  164. copyNodeType("/root/main/nursebasicinfo", "/root/main/forminfo", "after", opener.model, opener.model);
  165. return opener.window.javascript.fSaveInfo("E", "N");
  166. }
  167. ]]>
  168. </script>
  169. </xhtml:head>
  170. <xhtml:body pagewidth="616" pageheight="216" guideline="1,1190;1,200;1,295;1,597;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  171. <caption id="caption6" class="tit_2" style="left:0px; top:0px; width:257px; height:14px; ">추가시행 등록</caption>
  172. <group id="group1" style="left:0px; top:20px; width:600px; height:163px; ">
  173. <input id="ipt_pid" ref="/root/main/patinfo/info/pid" class="input_s_essential" navindex="1" autonext="false" imemode="disabled" style="left:97px; top:6px; width:80px; height:19px; ">
  174. <script type="javascript" ev:event="onkeypress">
  175. <![CDATA[
  176. if(event.keyCode == 13){
  177. pid = ipt_pid.currentText; //model.getValue("/root/main/patinfo/info/pid");
  178. model.setValue("/root/main/patinfo/info/pid", pid);
  179. fGetPatInfo(pid, "Y");
  180. }
  181. ]]>
  182. </script>
  183. </input>
  184. <caption id="caption1" class="cell_1" style="left:200px; top:5px; width:95px; height:23px; ">환자명</caption>
  185. <caption id="caption2" class="cell_1" style="left:400px; top:5px; width:95px; height:23px; ">병실</caption>
  186. <button id="button61" class="icon_search" style="left:180px; top:7px; width:16px; height:16px; ">
  187. <caption/>
  188. <script type="javascript" ev:event="DOMActivate">
  189. <![CDATA[
  190. modal("SPPMC02500");
  191. var pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  192. var hngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  193. model.setValue("/root/main/patinfo/info/pid", pid);
  194. model.setValue("/root/main/patinfo/info/hngnm", hngnm);
  195. //submit("");
  196. ]]>
  197. </script>
  198. </button>
  199. <caption id="caption3" class="cell_1" style="left:200px; top:29px; width:95px; height:23px; ">진료과</caption>
  200. <caption id="caption4" class="cell_1" style="left:400px; top:29px; width:95px; height:23px; ">HD</caption>
  201. <line id="line1" class="line_2" style="x1:0px; y1:27px; x2:600px; y2:27px; "/>
  202. <line id="line17" class="line_1" style="x1:0px; y1:0px; x2:600px; y2:0px; "/>
  203. <caption id="caption5" class="cell_1" style="left:0px; top:5px; width:95px; height:23px; ">등록번호</caption>
  204. <line id="line2" class="line_2" style="x1:0px; y1:51px; x2:600px; y2:51px; "/>
  205. <input id="input1" ref="/root/main/patinfo/info/hngnm" class="input_s_essential" navindex="1" autonext="false" imemode="disabled" style="left:297px; top:6px; width:100px; height:19px; "/>
  206. <line id="line3" class="line_2" style="x1:0px; y1:85px; x2:600px; y2:85px; "/>
  207. <caption id="caption7" class="cell_1" style="left:0px; top:29px; width:95px; height:23px; ">성별/연령</caption>
  208. <input id="input2" ref="/root/main/patinfo/info/roomcd" class="input_s_essential" navindex="1" autonext="false" imemode="disabled" style="left:497px; top:6px; width:100px; height:19px; "/>
  209. <line id="line4" class="line_3" style="x1:0px; y1:160px; x2:600px; y2:160px; "/>
  210. <caption id="caption8" class="cell_1" style="left:0px; top:53px; width:95px; height:33px; ">진단명</caption>
  211. <input id="input3" ref="/root/main/patinfo/info/sexage" class="input_s_essential" navindex="1" autonext="false" imemode="disabled" style="left:97px; top:30px; width:100px; height:19px; "/>
  212. <input id="input5" ref="/root/main/patinfo/info/hd" class="input_s_essential" navindex="1" autonext="false" imemode="disabled" style="left:497px; top:30px; width:100px; height:19px; "/>
  213. <input id="input4" ref="/root/main/patinfo/info/orddeptnm" class="input_s_essential" navindex="1" autonext="false" imemode="disabled" style="left:297px; top:30px; width:100px; height:19px; "/>
  214. <textarea id="textarea1" ref="/root/main/patinfo/info/diagengnm" editable="false" style="left:97px; top:54px; width:500px; height:30px; "/>
  215. <datagrid id="grd_nursebaseitem" nodeset="/root/main/nursebasicitem/info" caption="기본간호 업무^시행유무^기타" colsep="^" colwidth="200, 94, 300" fixedcols="1" frozencols="1" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:87px; width:597px; height:71px; ">
  216. <col ref="itemnm" type="output"/>
  217. <col ref="execyn" type="combo" style="text-align:center; ">
  218. <choices>
  219. <item>
  220. <label>Y</label>
  221. <value>Y</value>
  222. </item>
  223. <item>
  224. <label>N</label>
  225. <value>N</value>
  226. </item>
  227. </choices>
  228. </col>
  229. <col ref="remcnts" type="input"/>
  230. <script type="javascript" ev:event="xforms-value-changed">
  231. <![CDATA[
  232. var iRow = grd_nursebaseitem.row;
  233. if( iRow > 0 && iRow <= grd_nursebaseitem.rows ){
  234. model.setValue("/root/main/nursebasicitem/info[" + iRow + "]/status", "I");
  235. }
  236. ]]>
  237. </script>
  238. </datagrid>
  239. </group>
  240. <group id="group2" style="left:0px; top:185px; width:600px; height:25px; ">
  241. <button id="btn_save" class="btn2_letter2" style="left:509px; top:3px; width:42px; height:19px; ">
  242. <caption>저장</caption>
  243. <script type="javascript" ev:event="DOMActivate">
  244. <![CDATA[
  245. if( fSaveAddExecInfo("E") ){
  246. model.resetInstanceNode("/root/main/forminfo/info");
  247. window.close();
  248. }else{
  249. model.resetInstanceNode("/root/main/forminfo/info");
  250. }
  251. ]]>
  252. </script>
  253. </button>
  254. <button id="btn_close" class="btn2_letter2" style="left:554px; top:3px; width:42px; height:19px; ">
  255. <caption>닫기</caption>
  256. <script type="javascript" ev:event="DOMActivate">
  257. <![CDATA[
  258. window.close();
  259. ]]>
  260. </script>
  261. </button>
  262. </group>
  263. </xhtml:body>
  264. </xhtml:html>