SMMMR08200_수술기록조회.xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  1. <?xml version="1.0" encoding="UTF-8"?>
  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. <cond/>
  11. <opinfo>
  12. <list>
  13. <pid/>
  14. <patnm/>
  15. <sexflag/>
  16. <rrgstno/>
  17. <indd/>
  18. <orddeptcd/>
  19. <opdd/>
  20. <dschdd/>
  21. <opdeptcd/>
  22. <surgeon/>
  23. <fstasst/>
  24. <sndasst/>
  25. <trdasst/>
  26. <bfopdiagnm/>
  27. <aftopdiagnm/>
  28. <opnm/>
  29. <biopsyyn/>
  30. <drains/>
  31. <wrtedr/>
  32. </list>
  33. </opinfo>
  34. <patinfo>
  35. <patinfolist/>
  36. </patinfo>
  37. </main>
  38. <send>
  39. <dschfrdd/>
  40. <dschtodd/>
  41. <opfrdd/>
  42. <optodd/>
  43. <pid/>
  44. <orddeptcd/>
  45. <opdeptcd/>
  46. <patnm/>
  47. <offset/>
  48. <pagesize>1000</pagesize>
  49. </send>
  50. <init>
  51. <dept>
  52. <dept/>
  53. </dept>
  54. </init>
  55. <tmp>
  56. <autoflag/>
  57. <srchcond/>
  58. <pid/>
  59. </tmp>
  60. </root>
  61. </instance>
  62. <script type="javascript">
  63. <![CDATA[
  64. function listInit()
  65. {
  66. cmb_orddeptcd.deselect();
  67. cmb_opdeptcd.deselect();
  68. //진료과 리스트를 불러온다.
  69. var instcd = getUserInfo("dutplceinstcd");
  70. var standard_yn = "rcptuseyn";
  71. var ord_deptflag = 'D';
  72. var rslt_ref = "/root/init/dept";
  73. var sort_method = "depthngnm";
  74. var sort_field = "depthngnm";
  75. var base_dd ="";
  76. if(ipt_dsch2.value =="")
  77. base_dd = ipt_opdd2.value;
  78. else
  79. base_dd = ipt_dsch2.value;
  80. zsdfGetInOutOrdDeptList(instcd, rslt_ref, sort_field, sort_method,base_dd);
  81. // 진료과 리스트 add
  82. addComboItem("cmb_orddeptcd", "", "", "above");
  83. //zsdfGetInOutOrdDeptList(instcd, rslt_ref, sort_field, sort_method,base_dd);
  84. addComboItem("cmb_opdeptcd", "", "", "below");
  85. }
  86. // 조회 submit 함수
  87. function formsubmit()
  88. {
  89. model.removeNodeset("/root/main/opinfo/list");
  90. model.setValue("/root/send/offset",0);
  91. submit("TRMMR08201");
  92. model1.refresh();
  93. }
  94. ]]>
  95. </script>
  96. <script type="javascript" ev:event="xforms-ready">
  97. <![CDATA[
  98. // 현재 날자를 퇴원일자에 셋팅한다.
  99. var tmpday, today = ""; //today = 오늘날자
  100. tmpday = new Date();
  101. today += tmpday.getYear() + "";
  102. if(tmpday.getMonth() <10)
  103. today += "0" + (tmpday.getMonth() + 1);
  104. else
  105. today += (tmpday.getMonth() + 1) + "";
  106. if(tmpday.getDate() < 10)
  107. today += "0" + tmpday.getDate();
  108. else
  109. today += tmpday.getDate();
  110. //ipt_dsch2.value = today;
  111. ipt_dsch2.value = getCurrentDate();
  112. //일주일전 날자를 퇴원일자에 셋팅한다
  113. var a, makeday= ""; //makeday = 일주일전 날자
  114. a= new Date();
  115. var c=a.valueOf()+1000*60*60*24*(-7);
  116. var tempday=new Date(c);
  117. makeday += tempday.getYear() + "";
  118. if(tempday.getMonth() <10)
  119. makeday += "0" + (tempday.getMonth() + 1);
  120. else
  121. makeday += (tempday.getMonth() + 1) + "";
  122. if(tempday.getDate() < 10)
  123. makeday += "0" + tempday.getDate();
  124. else
  125. makeday += tempday.getDate();
  126. ipt_dsch1.value = makeday;
  127. listInit();
  128. ]]>
  129. </script>
  130. <submission id="TRZSD00109" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  131. <submission id="TRMMR08201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" add="bottom" resultref="/root/main/opinfo"/>
  132. </model>
  133. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  134. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  135. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  136. <script type="javascript" src="../../../com/departmentcodeweb/js/common.js"/>
  137. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  138. </xhtml:head>
  139. <xhtml:body guideline="1,1194;1,1184;2,784;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  140. <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:15px; width:1184px; height:80px; background-color:#fffbf2; border-color:#ffd799; "/>
  141. <group id="grp_tle" style="left:0px; top:0px; width:1187px; height:13px; ">
  142. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:106px; height:14px; ">수술 기록 검색</caption>
  143. </group>
  144. <button id="button10" class="btn2_letter4" style="left:1114px; top:99px; width:64px; height:19px; ">
  145. <caption>엑셀저장</caption>
  146. <script type="javascript" ev:event="DOMActivate">
  147. <![CDATA[
  148. var selectValue1 = true;
  149. var selectValue2 = 1;
  150. var today = getCurrentDate();
  151. var fileName = window.fileDialog("save", ",", false, "수술기록지_"+today, "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  152. if (fileName != ""){
  153. grd_opinfo.saveExcel(fileName, "sheetname:sheet1;col_08:label;col_13:label;col_17:label;col_23:label;");
  154. }
  155. ]]>
  156. </script>
  157. </button>
  158. <button id="btn_srchinfo" class="btn1_letter2" style="left:1121px; top:39px; width:56px; height:22px; ">
  159. <caption>조회</caption>
  160. <script type="javascript" ev:event="DOMActivate">
  161. <![CDATA[
  162. //조건 조회 전 유효한 값이 입력되었는지 체크해 준다.
  163. if(ipt_dsch1.value =="" && ipt_dsch2.value =="" && ipt_opdd1.value =="" && ipt_opdd2.value =="")
  164. {
  165. formsubmit();
  166. }
  167. else if(ipt_dsch1.value =="" && ipt_dsch2.value =="")
  168. {
  169. if(ipt_opdd1.value =="" || ipt_opdd2.value =="")
  170. {
  171. messageBox("시작/종료 기간을 정확히","C001");
  172. }
  173. else
  174. formsubmit();
  175. }
  176. else if(ipt_opdd1.value =="" && ipt_opdd2.value =="")
  177. {
  178. if(ipt_dsch1.value =="" || ipt_dsch2.value =="")
  179. {
  180. messageBox("시작/종료 기간을 정확히","C001");
  181. }
  182. else
  183. formsubmit();
  184. }else if(ipt_dsch1.value !="" && ipt_dsch2.value !="" && ipt_opdd1.value !="" && ipt_opdd2.value !="")
  185. {
  186. formsubmit();
  187. }else
  188. messageBox("시작/종료 기간을 정확히","C001");
  189. ]]>
  190. </script>
  191. </button>
  192. <caption id="caption2" class="search_name" style="left:15px; top:19px; width:86px; height:17px; vertical-align:middle; ">퇴원일자 :</caption>
  193. <line id="line4" style="x1:1115px; y1:22px; x2:1115px; y2:77px; border-color:#ffe4bb; border-left-style:solid; "/>
  194. <line id="line2" class="line_1" style="x1:0px; y1:120px; x2:1183px; y2:120px; "/>
  195. <datagrid id="grd_opinfo" nodeset="/root/main/opinfo/list" caption="등록번호^환자명^성별^주민등록번호^입원일^진료과^수술일^퇴원일^수술과^Surgeon^1st Ass't^2nd Ass't^3rd Ass't^수술전진단명^수술후진단명^수술명^조직검사여부^Drains^작성의사^Drains^작성의사^Drains^작성의사" colsep="^" colwidth="80, 70, 60, 100, 80, 80, 80, 80, 80, 140, 80, 80, 80, 240, 240, 240, 100, 60, 80" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:125px; width:1183px; height:654px; ">
  196. <col ref="pid"/>
  197. <col ref="patnm"/>
  198. <col ref="sexflag"/>
  199. <col ref="rrgstno" format="999999"/>
  200. <col ref="indd" format="yyyy-mm-dd"/>
  201. <col ref="orddeptcd"/>
  202. <col ref="opdd" format="yyyy-mm-dd"/>
  203. <col ref="dschdd" format="yyyy-mm-dd"/>
  204. <col ref="opdeptcd"/>
  205. <col ref="surgeon"/>
  206. <col ref="fstasst"/>
  207. <col ref="sndasst"/>
  208. <col ref="trdasst"/>
  209. <col ref="bfopdiagnm"/>
  210. <col ref="aftopdiagnm"/>
  211. <col ref="opnm"/>
  212. <col ref="biopsyyn"/>
  213. <col ref="drains"/>
  214. <col ref="wrtedr"/>
  215. <script type="javascript" ev:event="onscrolldown">
  216. <![CDATA[
  217. if(grd_opinfo.vscroll.attribute("max") == grd_opinfo.vscroll.attribute("pos")) {
  218. model.setValue("/root/send/offset", grd_opinfo.rows-grd_opinfo.fixedRows); // grid의 header row는 제외
  219. submit("TRMMR08201");
  220. grd_opinfo.dispatch("onmouseup"); // 스크롤바 처리를 위한 이벤트 발생
  221. }
  222. ]]>
  223. </script>
  224. </datagrid>
  225. <input id="ipt_dsch1" ref="/root/send/dschfrdd" class="input_s_essential" inputtype="date" style="left:110px; top:20px; width:100px; height:19px; ">
  226. <script type="javascript" ev:event="xforms-value-changed">
  227. <![CDATA[
  228. // 시작일 > 종료일 에러 처리
  229. if(ipt_opdd2.value !="")
  230. {
  231. if(ipt_dsch1.value > ipt_dsch2.value)
  232. {
  233. messageBox("종료일 이전 날자만 입력","I006");
  234. ipt_dsch1.value = "";
  235. }
  236. }
  237. ]]>
  238. </script>
  239. </input>
  240. <input id="ipt_dsch2" ref="/root/send/dschtodd" class="input_s_essential" inputtype="date" format="yyyy-mm-dd" style="left:255px; top:20px; width:100px; height:19px; ">
  241. <script type="javascript" ev:event="xforms-value-changed">
  242. <![CDATA[
  243. listInit();
  244. //퇴원일자 값이 변하면 진료과 와 수술과의 리스트를 갱신한다.
  245. if(ipt_dsch2.value< ipt_dsch1.value)
  246. {
  247. messageBox("시작일 이후 날자만 입력","I006");
  248. ipt_dsch2.value ="";
  249. }
  250. ]]>
  251. </script>
  252. </input>
  253. <caption id="caption1" style="left:226px; top:24px; width:15px; height:15px; font-weight:bold; ">~</caption>
  254. <caption id="caption3" style="left:226px; top:49px; width:15px; height:15px; font-weight:bold; ">~</caption>
  255. <caption id="caption4" class="search_name" style="left:15px; top:45px; width:86px; height:17px; vertical-align:middle; ">수술일자 :</caption>
  256. <input id="ipt_opdd1" ref="/root/send/opfrdd" class="input_s_essential" inputtype="date" style="left:110px; top:45px; width:100px; height:19px; ">
  257. <script type="javascript" ev:event="xforms-value-changed">
  258. <![CDATA[
  259. //시작일 > 종료일 에러 처리
  260. if(ipt_opdd2.value !="")
  261. {
  262. if(ipt_opdd1.value > ipt_opdd2.value)
  263. {
  264. messageBox("종료일 이전 날자만 입력","I006");
  265. ipt_opdd1.value = "";
  266. }
  267. }
  268. ]]>
  269. </script>
  270. </input>
  271. <input id="ipt_opdd2" ref="/root/send/optodd" class="input_s_essential" inputtype="date" style="left:255px; top:45px; width:100px; height:19px; ">
  272. <script type="javascript" ev:event="xforms-value-changed">
  273. <![CDATA[
  274. if(model.getValue("/root/send/dschtodd")=="")
  275. {
  276. listInit(); // 퇴원일자 값이 없는경우 수술일자에 의거하여 리스트를 갱신한다.
  277. }
  278. //종료일 < 시작일 에러 처리
  279. if(ipt_opdd2.value< ipt_opdd1.value)
  280. {
  281. messageBox("시작일 이후 날자만 입력","I006");
  282. ipt_opdd2.value = "";
  283. }
  284. ]]>
  285. </script>
  286. </input>
  287. <caption id="caption7" class="search_name" style="left:15px; top:70px; width:86px; height:17px; vertical-align:middle; ">등록번호 :</caption>
  288. <input id="ipt_pid" ref="/root/send/pid" class="input_s_essential" style="left:110px; top:70px; width:100px; height:19px; ">
  289. <script type="javascript" ev:event="onkeypress">
  290. <![CDATA[
  291. if(event.keyCode == 13){
  292. model.setValue("/root/tmp/srchcond", 1);
  293. model.setValue("/root/tmp/pid", ipt_pid.currentText);
  294. srchptnm.dispatch("DOMActivate");
  295. model.refresh();
  296. }
  297. ]]>
  298. </script>
  299. </input>
  300. <button id="srchptnm" class="icon_search" style="left:215px; top:70px; width:16px; height:16px; ">
  301. <caption/>
  302. <script type="javascript" ev:event="DOMActivate">
  303. <![CDATA[
  304. // 환자 기록 팝업
  305. model.setValue("/root/tmp/srchcond", 1);
  306. model.setValue("/root/tmp/pid", ipt_pid.currentText);
  307. model.setValue("/root/tmp/autoflag", "Y");
  308. modal("SPPMC02500", 1,10, 10, "SPPMC02500", "/root/tmp", "/root/send");
  309. ipt_pid.value = model.getValue("/root/main/patinfo/patinfolist/pid");
  310. ptnm1.value = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  311. model.refresh();
  312. ]]>
  313. </script>
  314. </button>
  315. <output id="ptnm1" ref="/root/send/patnm" class="output_search" style="left:255px; top:70px; width:100px; height:19px; "/>
  316. <caption id="caption8" class="search_name" style="left:504px; top:21px; width:86px; height:17px; vertical-align:middle; ">진료과 :</caption>
  317. <select1 id="cmb_orddeptcd" ref="/root/send/orddeptcd" class="combo_search" appearance="minimal" editmode="input" style="left:582px; top:21px; width:135px; height:19px; ">
  318. <choices>
  319. <itemset nodeset="/root/init/dept/dept">
  320. <label ref="depthngnm"/>
  321. <value ref="deptcd"/>
  322. </itemset>
  323. </choices>
  324. <script type="javascript" ev:event="xforms-value-changed">
  325. <![CDATA[
  326. ]]>
  327. </script>
  328. </select1>
  329. <caption id="caption9" class="search_name" style="left:504px; top:45px; width:86px; height:17px; vertical-align:middle; ">수술과 :</caption>
  330. <select1 id="cmb_opdeptcd" ref="/root/send/opdeptcd" class="combo_search" appearance="minimal" editmode="input" style="left:582px; top:45px; width:135px; height:19px; ">
  331. <choices>
  332. <itemset nodeset="/root/init/dept/dept">
  333. <label ref="depthngnm"/>
  334. <value ref="deptcd"/>
  335. </itemset>
  336. </choices>
  337. <script type="javascript" ev:event="xforms-value-changed">
  338. <![CDATA[
  339. ]]>
  340. </script>
  341. </select1>
  342. <caption id="caption5" class="tit_2" style="left:0px; top:105px; width:160px; height:14px; ">수술 기록 검색 목록</caption>
  343. </xhtml:body>
  344. </xhtml:html>