SMABO02300_CBC리스트.xrw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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>CBC 리스트</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <cbcpatlist>
  11. <patlist>
  12. <roomcd/>
  13. <pathngnm/>
  14. <pid/>
  15. <sexage/>
  16. <day/>
  17. <wbc/>
  18. <anc/>
  19. <hb/>
  20. <pl/>
  21. <cd34/>
  22. <diag/>
  23. <tret/>
  24. <remfact/>
  25. <chemofrom/>
  26. <chemoto/>
  27. <trnptdd/>
  28. <trnptkind/>
  29. <trnptkindcd/>
  30. <patbtype/>
  31. </patlist>
  32. </cbcpatlist>
  33. <count/>
  34. </main>
  35. <send>
  36. <req>
  37. <testdd/>
  38. <deptcd/>
  39. <atdoctid/>
  40. <depthngnm/>
  41. <deptflag/>
  42. <atdoctnm/>
  43. </req>
  44. <lrggrupcd>DI</lrggrupcd>
  45. <hsctlrgcd/>
  46. </send>
  47. <deptlist>
  48. <ward>
  49. <wardcd/>
  50. <wardnm/>
  51. </ward>
  52. </deptlist>
  53. <init>
  54. <ward>
  55. <wardnm/>
  56. <wardcd/>
  57. </ward>
  58. <cmbinfo>
  59. <bmtatdoctist>
  60. <A0536>
  61. <cdnm/>
  62. <cdid/>
  63. </A0536>
  64. </bmtatdoctist>
  65. </cmbinfo>
  66. <dept>
  67. <deptnm/>
  68. <deptcd/>
  69. </dept>
  70. </init>
  71. <temp>
  72. <tempcodeinfo/>
  73. <dept>
  74. <A0478>
  75. <cdnm/>
  76. <cdid/>
  77. </A0478>
  78. </dept>
  79. <bmtatdoctlist>
  80. <A0536>
  81. <cdnm/>
  82. <cdid/>
  83. </A0536>
  84. </bmtatdoctlist>
  85. </temp>
  86. </root>
  87. </instance>
  88. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  89. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  90. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  91. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  92. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  93. <script type="javascript" src="../../../ast/examcureweb/js/AEZ0001.js"/>
  94. <script type="javascript" src="../../../ast/hsctweb/js/bmtcommon.js"/>
  95. <script type="javascript" ev:event="xforms-ready">
  96. <![CDATA[
  97. var sChkFlag = "N";
  98. ipt_testdd.value =getCurrentDate();
  99. //BMT 코드성 데이터 조회
  100. aboGetCodeList(new Array("A0536", "A0478")
  101. , new Array( "/root/init/cmbinfo/bmtatdoctlist", "/root/temp/dept"));
  102. /*
  103. aboGetCodeList(new Array("A0536")
  104. , new Array( "/root/temp/bmtatdoctlist"));
  105. aboGetCodeList(new Array("A0478")
  106. , new Array( "/root/temp/dept"));
  107. */
  108. // A0478
  109. model.setValue("/root/send/req/deptflag", "W");
  110. submit("TRADT10203");
  111. model.makeValue("/root/init/ward/wardcd", "");
  112. model.makeValue("/root/init/ward/wardnm", "전체");
  113. var nodelist = instance1.selectNodes("/root/deptlist/ward");
  114. for(var i = 2; i <= nodelist.length+1; i++){
  115. model.makeValue("/root/init/ward[" + i + "]/wardcd", model.getValue("/root/deptlist/ward[" + (i-1) + "]/wardcd"));
  116. model.makeValue("/root/init/ward[" + i + "]/wardnm", model.getValue("/root/deptlist/ward[" + (i-1) + "]/wardnm"));
  117. }
  118. model.makeValue("/root/init/dept/deptcd", "");
  119. model.makeValue("/root/init/dept/deptnm", "전체");
  120. var nodelist = instance1.selectNodes("/root/temp/dept/A0478");
  121. for(var i = 2; i <= nodelist.length; i++){
  122. model.makeValue("/root/init/dept[" + i + "]/deptcd", model.getValue("/root/temp/dept/A0478[" + i + "]/cdid"));
  123. model.makeValue("/root/init/dept[" + i + "]/deptnm", model.getValue("/root/temp/dept/A0478[" + i + "]/cdnm"));
  124. }
  125. model.makeValue("/root/init/cmbinfo/bmtatdoctlist/A0536/cdid", "");
  126. model.makeValue("/root/init/cmbinfo/bmtatdoctlist/A0536/cdnm", "전체");
  127. var nodelist = instance1.selectNodes("/root/temp/bmtatdoctlist/A0536");
  128. for(var i = 2; i <= nodelist.length; i++){
  129. model.makeValue("/root/init/cmbinfo/bmtatdoctlist/A0536[" + i + "]/cdid", model.getValue("/root/temp/bmtatdoctlist/A0536[" + i + "]/cdid"));
  130. model.makeValue("/root/init/cmbinfo/bmtatdoctlist/A0536[" + i + "]/cdnm", model.getValue("/root/temp/bmtatdoctlist/A0536[" + i + "]/cdnm"));
  131. }
  132. //유저세션정보의 소속부서가 진료과와 일치하면 진료과의 default값을 유저소속부서로 설정한다.
  133. for (var iRowNo=1; iRowNo <= getNodesetCount("/root/init/dept"); iRowNo++) {
  134. if(model.getValue("/root/init/dept["+ iRowNo +"]/deptcd") == getUserInfo("posdeptcd")) {
  135. model.setValue("/root/send/req/deptcd", getUserInfo("posdeptcd"));
  136. sChkFlag = "Y";
  137. break;
  138. }
  139. }
  140. //유저세션정보의 소속부서가 진료과와 일치하면 진료과의 default값을 유저소속부서로 설정한다.
  141. //if(sChkFlag = "N") {
  142. for (var iRowNo=1; iRowNo <= getNodesetCount("/root/init/ward"); iRowNo++) {
  143. if(model.getValue("/root/init/ward["+ iRowNo +"]/wardcd") == getUserInfo("dutplcecd")) {
  144. model.setValue("/root/send/req/depthngnm", getUserInfo("dutplcecd"));
  145. }
  146. }
  147. //}
  148. model.refresh();
  149. ]]>
  150. </script>
  151. <submission id="TRZBC00101"/>
  152. <submission id="TRABO02301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/cbcpatlist"/>
  153. <submission id="TRADT10203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" resultref="/root/deptlist"/>
  154. <submission id="TRABO02103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp/tempcodeinfo"/>
  155. </model>
  156. </xhtml:head>
  157. <xhtml:body guideline="1,1195;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  158. <group id="grp_biz" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
  159. <caption id="caption1" class="tit_2" style="left:5px; top:55px; width:85px; height:13px; ">환자명단</caption>
  160. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:70px; "/>
  161. <group id="grp_sea" style="left:0px; top:10px; width:1195px; height:35px; vertical-align:top; ">
  162. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  163. <caption id="caption2" class="search_name" style="left:15px; top:9px; width:90px; height:17px; ">검사일자 :</caption>
  164. <line id="line13" class="line_4" style="x1:1109px; y1:7px; x2:1109px; y2:29px; "/>
  165. <button id="btn_sea" class="btn1_letter2" style="left:1124px; top:7px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  166. <caption>조회</caption>
  167. <script type="javascript" ev:event="DOMActivate">
  168. <![CDATA[
  169. model.removeNodeset("/root/main/cbcpatlist/patlist");
  170. if(submit("TRABO02301")) {
  171. grd_patlist.autoResize = true;
  172. }
  173. var nodelist = instance1.selectNodes("/root/main/cbcpatlist/patlist");
  174. model.setValue("/root/main/count", nodelist.length);
  175. var day= "";
  176. var day_c= "";
  177. var day_p= "";
  178. var day_d= "";
  179. var c = "";
  180. var p = "";
  181. var d = "";
  182. var date = new Date();
  183. var today = new Date(date.getYear(), date.getMonth(), date.getDate());
  184. for(var i = 1; i <= nodelist.length; i++){
  185. day="";
  186. day_c= "";
  187. day_p= "";
  188. day_d= "";
  189. c = "";
  190. p = "";
  191. d = "";
  192. day_c= model.getValue("/root/main/cbcpatlist/patlist[" + i + "]/chemofrom");
  193. day_p= model.getValue("/root/main/cbcpatlist/patlist[" + i + "]/chemoto");
  194. day_d= model.getValue("/root/main/cbcpatlist/patlist[" + i + "]/trnptdd");
  195. if( day_c != "00000000" && day_c != ""){
  196. c = new Date(day_c.substring(0,4), day_c.substring(4,6)-1, day_c.substring(6,8));
  197. day = "C" + Math.floor((today.valueOf() - c.valueOf())/(24*60*60*1000));
  198. }
  199. if( day_p != "00000000" && day_p != ""){
  200. p = new Date(day_p.substring(0,4), day_p.substring(4,6)-1, day_p.substring(6,8));
  201. if(day != ""){
  202. day = day + "/";
  203. }
  204. day = day + "P" + Math.floor((today.valueOf() - p.valueOf())/(24*60*60*1000));
  205. }
  206. if( day_d != "00000000" && day_d != ""){
  207. d = new Date(day_d.substring(0,4), day_d.substring(4,6)-1, day_d.substring(6,8));
  208. if(day != ""){
  209. day = day + "/";
  210. }
  211. day = day + "D" +Math.floor((today.valueOf() - d.valueOf())/(24*60*60*1000));
  212. }
  213. model.setValue("/root/main/cbcpatlist/patlist[" + i + "]/day", day);
  214. }
  215. model.refresh();
  216. ]]>
  217. </script>
  218. </button>
  219. <caption id="caption7" class="search_name" style="left:295px; top:9px; width:73px; height:17px; ">진료과 :</caption>
  220. <caption id="caption4" class="search_name" style="left:875px; top:10px; width:60px; height:17px; ">병동 :</caption>
  221. <input id="ipt_testdd" ref="/root/send/req/testdd" class="input_s_essential" inputtype="date" style="left:105px; top:8px; width:100px; height:19px; "/>
  222. <select1 id="cmb_deptcd" ref="/root/send/req/deptcd" class="combo_search" appearance="minimal" editmode="input" style="left:370px; top:8px; width:130px; height:19px; ">
  223. <choices>
  224. <itemset nodeset="/root/init/dept">
  225. <label ref="deptnm"/>
  226. <value ref="deptcd"/>
  227. </itemset>
  228. </choices>
  229. </select1>
  230. <select1 id="cmb_depthngnm" ref="/root/send/req/depthngnm" class="combo_search" appearance="minimal" style="left:938px; top:9px; width:100px; height:19px; ">
  231. <choices>
  232. <itemset nodeset="/root/init/ward">
  233. <label ref="wardnm"/>
  234. <value ref="wardcd"/>
  235. </itemset>
  236. </choices>
  237. </select1>
  238. <caption id="caption3" class="search_name" style="left:600px; top:9px; width:73px; height:17px; ">주치의 :</caption>
  239. <select1 id="cmb_bmtdr" ref="/root/send/req/atdoctid" class="combo_default" appearance="minimal" style="left:675px; top:8px; width:100px; height:19px; ">
  240. <choices>
  241. <itemset nodeset="/root/init/cmbinfo/bmtatdoctlist/A0536">
  242. <label ref="cdnm"/>
  243. <value ref="cdid"/>
  244. </itemset>
  245. </choices>
  246. <script type="javascript" ev:event="xforms-value-changed">
  247. <![CDATA[
  248. model.setValue("/root/send/req/atdoctnm", cmb_bmtdr.label);
  249. model.refresh();
  250. ]]>
  251. </script>
  252. </select1>
  253. </group>
  254. <button id="btn_excsave" class="btn2_letter4" disable.background-image="../../../com/commonweb/images/dis_btn2_letter4.gif" style="left:1130px; top:50px; width:64px; height:19px; background-image:../../../com/commonweb/images/btn2_letter4.gif; ">
  255. <caption>엑셀저장</caption>
  256. <script type="javascript" ev:event="DOMActivate">
  257. <![CDATA[
  258. var fileName = window.fileDialog("save", ",", false, "CBC리스트", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  259. if (fileName != "")
  260. {
  261. grd_patlist.saveExcel(fileName);
  262. }
  263. ]]>
  264. </script>
  265. </button>
  266. <caption id="caption18" class="cell_1" style="left:105px; top:48px; width:40px; height:20px; text-align:center; vertical-align:middle; ">건수</caption>
  267. <input id="opt_count" ref="/root/main/count" class="output_fix" style="left:148px; top:49px; width:57px; height:19px; text-align:right; "/>
  268. <datagrid id="grd_patlist" nodeset="/root/main/cbcpatlist/patlist" visibility="visible" caption="Room^환자명^등록번호^성별/나이^Day^WBC^ANC^Hb^PL(k)^CD34^Diagnosis^Treatment^Remark^chemofrom^chemoto^trnptdd^trnptkind^trnptkindcd^patbtype^^7)^8)" colsep="^" colwidth="50, 50, 60, 60, 110, 40, 40, 40, 40, 40, 250, 250, 185, 100, 100, 100, 100, 100, 100" dataheight="23" explorerbar="sortshow" extendlastcol="scroll" focuscolor="#b9e5fb" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" style="left:0px; top:75px; width:1194px; height:645px; text-align:center; ">
  269. <col disabled="true" ref="roomcd" type="output"/>
  270. <col ref="pathngnm" type="output"/>
  271. <col ref="pid"/>
  272. <col ref="sexage"/>
  273. <col ref="day" type="output"/>
  274. <col ref="wbc" type="output"/>
  275. <col ref="anc"/>
  276. <col ref="hb"/>
  277. <col ref="pl"/>
  278. <col ref="cd34"/>
  279. <col ref="diag" style="text-align:left; "/>
  280. <col disabled="true" ref="tret" type="output" style="text-align:left; "/>
  281. <col disabled="true" ref="remfact" type="output" style="text-align:left; "/>
  282. <col ref="chemofrom" visibility="hidden"/>
  283. <col ref="chemoto" visibility="hidden"/>
  284. <col ref="trnptdd" visibility="hidden"/>
  285. <col ref="trnptkind" visibility="hidden"/>
  286. <col ref="trnptkindcd" visibility="hidden"/>
  287. <col ref="patbtype" visibility="hidden"/>
  288. <script type="javascript" ev:event="onaftersort">
  289. <![CDATA[
  290. grd_patlist.gridToInstance();
  291. ]]>
  292. </script>
  293. <script type="javascript" ev:event="ondblclick">
  294. <![CDATA[
  295. if ( grd_patlist.row == 0 ) return;
  296. var diag = model.getValue("/root/main/cbcpatlist/patlist["+ grd_patlist.row +"]/diag");
  297. var tret = model.getValue("/root/main/cbcpatlist/patlist["+ grd_patlist.row +"]/tret");
  298. var remfact = model.getValue("/root/main/cbcpatlist/patlist["+ grd_patlist.row +"]/remfact");
  299. var chemofrom = model.getValue("/root/main/cbcpatlist/patlist["+ grd_patlist.row +"]/chemofrom");
  300. var chemoto = model.getValue("/root/main/cbcpatlist/patlist["+ grd_patlist.row +"]/chemoto");
  301. var trnptdd = model.getValue("/root/main/cbcpatlist/patlist["+ grd_patlist.row +"]/trnptdd");
  302. var trnptkind = model.getValue("/root/main/cbcpatlist/patlist["+ grd_patlist.row +"]/trnptkind");
  303. var trnptkindcd = model.getValue("/root/main/cbcpatlist/patlist["+ grd_patlist.row +"]/trnptkindcd");
  304. var pid = model.getValue("/root/main/cbcpatlist/patlist["+ grd_patlist.row +"]/pid");
  305. var sflag = diag + "▦" + tret + "▦" + remfact + "▦" + chemofrom + "▦" + chemoto + "▦" + trnptdd + "▦" + trnptkind + "▦" + trnptkindcd+ "▦" + pid ;
  306. setParameter("opener_parameter_id", sflag);
  307. modal("SPABO62400", 1, "", 100, "", "", "", "left:0; right:; width:0; height:0; min:hidden, max:hidden;");
  308. model.removeNodeset("/root/main/cbcpatlist/patlist");
  309. submit("TRABO02301");
  310. var nodelist = instance1.selectNodes("/root/main/cbcpatlist/patlist");
  311. model.setValue("/root/main/count", nodelist.length);
  312. var day= "";
  313. var day_c= "";
  314. var day_p= "";
  315. var day_d= "";
  316. var c = "";
  317. var p = "";
  318. var d = "";
  319. var date = new Date();
  320. var today = new Date(date.getYear(), date.getMonth(), date.getDate());
  321. for(var i = 1; i <= nodelist.length; i++){
  322. day="";
  323. day_c= "";
  324. day_p= "";
  325. day_d= "";
  326. c = "";
  327. p = "";
  328. d = "";
  329. day_c= model.getValue("/root/main/cbcpatlist/patlist[" + i + "]/chemofrom");
  330. day_p= model.getValue("/root/main/cbcpatlist/patlist[" + i + "]/chemoto");
  331. day_d= model.getValue("/root/main/cbcpatlist/patlist[" + i + "]/trnptdd");
  332. if( day_c != "00000000" && day_c != ""){
  333. c = new Date(day_c.substring(0,4), day_c.substring(4,6)-1, day_c.substring(6,8));
  334. day = "C" + Math.floor((today.valueOf() - c.valueOf())/(24*60*60*1000));
  335. }
  336. if( day_p != "00000000" && day_p != ""){
  337. p = new Date(day_p.substring(0,4), day_p.substring(4,6)-1, day_p.substring(6,8));
  338. if(day != ""){
  339. day = day + "/";
  340. }
  341. day = day + "P" + Math.floor((today.valueOf() - p.valueOf())/(24*60*60*1000));
  342. }
  343. if( day_d != "00000000" && day_d != ""){
  344. d = new Date(day_d.substring(0,4), day_d.substring(4,6)-1, day_d.substring(6,8));
  345. if(day != ""){
  346. day = day + "/";
  347. }
  348. day = day + "D" +Math.floor((today.valueOf() - d.valueOf())/(24*60*60*1000));
  349. }
  350. model.setValue("/root/main/cbcpatlist/patlist[" + i + "]/day", day);
  351. }
  352. model.refresh();
  353. ]]>
  354. </script>
  355. </datagrid>
  356. </group>
  357. <group id="grp_btn" style="left:0px; top:13px; width:1195px; height:27px; ">
  358. <button id="btn_prt" class="btn6_letter5" visibility="visible" style="left:202px; top:5px; width:128px; height:22px; ">
  359. <caption>병동용</caption>
  360. <script type="javascript" ev:event="DOMActivate">
  361. <![CDATA[
  362. exeReportPreview("RPABO02302", "XMLSTR", "/root/main/cbcpatlist/patlist");
  363. ]]>
  364. </script>
  365. </button>
  366. <button id="button1" class="btn6_letter5" visibility="visible" style="left:0px; top:5px; width:92px; height:22px; ">
  367. <caption>진료용</caption>
  368. <script type="javascript" ev:event="DOMActivate">
  369. <![CDATA[
  370. exeReportPreview("RPABO02301", "XMLSTR", "/root/main/cbcpatlist/patlist");
  371. ]]>
  372. </script>
  373. </button>
  374. <button id="button2" class="btn6_letter6" visibility="visible" style="left:95px; top:5px; width:104px; height:22px; ">
  375. <caption>진료용(CD34)</caption>
  376. <script type="javascript" ev:event="DOMActivate">
  377. <![CDATA[
  378. exeReportPreview("RPABO02303", "XMLSTR", "/root/main/cbcpatlist/patlist");
  379. ]]>
  380. </script>
  381. </button>
  382. </group>
  383. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  384. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:200px; height:14px; ">CBC 리스트</caption>
  385. </group>
  386. </xhtml:body>
  387. </xhtml:html>