SMADS01700_자문업무통계.xrw 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801
  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>자문업무 통계</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <statslist/>
  11. </main>
  12. <send>
  13. <bizflag/>
  14. <rqflag/>
  15. <srchfromdd/>
  16. <srchtodd/>
  17. <globalinstance>
  18. <instance1/>
  19. </globalinstance>
  20. <suppdeptcd/>
  21. <formflag1>1</formflag1>
  22. <formflag2>1</formflag2>
  23. <srchdeptcd/>
  24. <srchdrid/>
  25. <deptinfo>
  26. <deptflag/>
  27. </deptinfo>
  28. <baseinfo>
  29. <spcldrug/>
  30. <efcycd/>
  31. </baseinfo>
  32. <srchdata>
  33. <prcpcd/>
  34. </srchdata>
  35. <srchwardcd/>
  36. </send>
  37. <init>
  38. </init>
  39. <hidden>
  40. <srchinfo>
  41. <wardcd/>
  42. <wardnm/>
  43. <sendwardcd/>
  44. <senddeptcd/>
  45. <tdmdrugnm/>
  46. </srchinfo>
  47. <baseinfo>
  48. <spcldrug>
  49. <A0006/>
  50. </spcldrug>
  51. </baseinfo>
  52. <receivedrugcd>/root/send/srchdata/hngnm</receivedrugcd>
  53. <orddept>
  54. <dept/>
  55. </orddept>
  56. <receiveefcy>/root/send/baseinfo/efcycd</receiveefcy>
  57. <formflag2/>
  58. <tdmdruginfo>
  59. <testlist>
  60. <drugcd/>
  61. <drugnm/>
  62. </testlist>
  63. </tdmdruginfo>
  64. </hidden>
  65. <temp>
  66. <srchinfo>
  67. <ward/>
  68. <tdmdrug/>
  69. </srchinfo>
  70. <receivedata>
  71. <receiveref/>
  72. <srchflag/>
  73. <srchcnts/>
  74. <drugkind/>
  75. </receivedata>
  76. </temp>
  77. </root>
  78. </instance>
  79. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  80. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  81. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  82. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  83. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  84. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  85. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  86. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  87. <script type="javascript" ev:event="xforms-ready">
  88. <![CDATA[
  89. // 진료과/진료의 조회
  90. submit("TRPMOCOM01");
  91. astfAddCombo("/root/init", "orddeptcd", "cd,nm", ",전체");
  92. var rdo_children = rdo_formcd1.children;
  93. rdo_children.item(1).attribute("disable") = true;
  94. model.setValue("/root/send/suppdeptcd", model.getValue("/root/send/globalinstance/instance1"));
  95. model.setValue("/root/send/srchfromdd", getCurrentDate());
  96. model.setValue("/root/send/srchtodd", getCurrentDate());
  97. model.setValue("/root/send/formflag1", "1"); // 초기값 세팅
  98. model.setValue("/root/send/formflag2", "1"); // 초기화
  99. makeReportPreview(0,150,1195,570);
  100. //병동 Combo 조회
  101. model.setValue("/root/send/deptinfo/deptflag", "W");
  102. submit("TRADT10203");
  103. astfAddCombo("/root/hidden/deptlist", "ward", "wardcd,wardnm", "T,전체");
  104. // 의사 항목에 '전체' 추가하기 - 시작
  105. var initNode = instance1.selectSingleNode("/root/init"); // 전체 데이터
  106. var nodes = instance1.selectNodes("/root/init/orddrid"); // 의사 데이터
  107. var equalsValue1 = ""; // 비교 부서코드1
  108. var equalsValue2 = ""; // 비교 부서코드2
  109. var copyedNode = null; // 복사 노드
  110. for(var i = 0; i < nodes.length; ++i) {
  111. if(i == 0) {
  112. equalsValue1 = nodes.item(i).childNodes.item(2).nodeValue;
  113. } else {
  114. equalsValue2 = nodes.item(i).childNodes.item(2).nodeValue;
  115. }
  116. if(equalsValue1 != equalsValue2) {
  117. // 첫번째 값은 비교 대상이 없으므로 1번만 비교
  118. if(i == 0) {
  119. copyedNode = nodes.item(i).cloneNode(true); // 노드 복사
  120. copyedNode.childNodes.item(0).nodeValue = ""; // cd
  121. copyedNode.childNodes.item(1).nodeValue = "전체"; // nm
  122. copyedNode.childNodes.item(2).nodeValue = equalsValue1; // deptCode
  123. } else {
  124. copyedNode = nodes.item(i).cloneNode(true); // 노드 복사
  125. copyedNode.childNodes.item(0).nodeValue = ""; // cd
  126. copyedNode.childNodes.item(1).nodeValue = "전체"; // nm
  127. copyedNode.childNodes.item(2).nodeValue = equalsValue2; // deptCode
  128. equalsValue1 = equalsValue2;
  129. }
  130. initNode.insertBefore(copyedNode, nodes.item(i)); // 대상노드 상위에 노드 추가
  131. }
  132. }
  133. // 의사 항목에 '전체' 추가하기 - 끝
  134. model.refresh();
  135. ]]>
  136. </script>
  137. <submission id="TRZBC00101"/>
  138. <submission id="TRZSD00109" mediatype="application/x-www-form-urlencoded" method="post"/>
  139. <submission id="TRADS01701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/statslist"/>
  140. <submission id="TRADS01702" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/statslist"/>
  141. <submission id="TRADS01703" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/statslist"/>
  142. <submission id="TRADS01704" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/statslist"/>
  143. <submission id="TRADS01705" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/statslist"/>
  144. <submission id="TRADS01706" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/statslist"/>
  145. <submission id="TRADS01707" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/statslist"/>
  146. <submission id="TRADS01708" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/statslist"/>
  147. <submission id="TRADS01709" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/statslist"/>
  148. <submission id="TRADS01710" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/statslist"/>
  149. <submission id="TRADS01711" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/statslist"/>
  150. <submission id="TRADS01712" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/statslist"/>
  151. <submission id="TRADS01713" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/statslist"/>
  152. <submission id="TRADT10203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/deptinfo" replace="instance" resultref="/root/hidden/deptlist"/>
  153. <submission id="TRADB62202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/hidden/srchinfo" replace="instance" resultref="/root/hidden/tdmdruginfo/testlist"/>
  154. <submission id="TRPMOCOM01" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/hidden/session" replace="instance" resultref="/root/init"/>
  155. </model>
  156. </xhtml:head>
  157. <xhtml:body pagewidth="1211" pageheight="784" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  158. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  159. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:200px; height:14px; ">자문업무 통계</caption>
  160. </group>
  161. <group id="grp_biz" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  162. <line id="line1" class="line_1" style="x1:0px; y1:130px; x2:1195px; y2:130px; "/>
  163. <group id="group1" style="left:0px; top:10px; width:1195px; height:110px; vertical-align:top; ">
  164. <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1193px; height:110px; background-color:#fffbf2; border-color:#ffd799; "/>
  165. <line id="line2" class="line_4" style="x1:1110px; y1:15px; x2:1110px; y2:95px; "/>
  166. <button id="button1" class="btn1_letter2" navindex="4" style="left:1120px; top:19px; width:56px; height:22px; ">
  167. <caption>조회</caption>
  168. <script type="javascript" ev:event="DOMActivate">
  169. <![CDATA[
  170. // 조회 시작일자
  171. if(ipt_fromdd.value.length == 6) {
  172. // 월별
  173. ipt_fromdd.value = ipt_fromdd.value + "01";
  174. }
  175. else if(ipt_fromdd.value.length == 4) {
  176. // 년별
  177. ipt_fromdd.value = ipt_fromdd.value + "0101";
  178. }
  179. // 조회 종료일자
  180. if(ipt_todd.value.length == 6) {
  181. // 월별
  182. ipt_todd.value = ipt_todd.value + getDayCountForMonth(ipt_todd.value.substring(0, 4), ipt_todd.value.substring(4, 6));
  183. }
  184. else if(ipt_todd.value.length == 4) {
  185. // 년별
  186. ipt_todd.value = ipt_todd.value + "1231";
  187. }
  188. // 통계양식 일자별
  189. if(rdo_formcd1.value == "1") {
  190. if(!(isValidDateTime(ipt_fromdd.value, "YYYYMMDD") && isValidDateTime(ipt_todd.value, "YYYYMMDD"))) {
  191. messageBox("조회 일자를 다시 입력","I008");
  192. return;
  193. }
  194. }
  195. // 통계양식 월별
  196. else if(rdo_formcd1.value == "2") {
  197. if(!(isValidDateTime(ipt_fromdd.value.substring(0, 6), "YYYYMM") && isValidDateTime(ipt_todd.value.substring(0, 6), "YYYYMM"))) {
  198. messageBox("조회 일자를 다시 입력","I008");
  199. return;
  200. }
  201. }
  202. // 통계양식 연별
  203. else if(rdo_formcd1.value == "3") {
  204. // YYYY 형식 값은 isValidDateTime 함수로 처리가 안되서 문자열 싸이즈와 숫자 여부만 판단
  205. if((ipt_fromdd.value.substring(0, 4).length < 4 || ipt_todd.value.substring(0, 4).length < 4) ||
  206. !(ipt_fromdd.value.substring(0, 4).isNumber() && ipt_todd.value.substring(0, 4).isNumber())) {
  207. messageBox("조회 일자를 다시 입력","I008");
  208. return;
  209. }
  210. }
  211. // model.setValue("/root/send/srchdeptcd", model.getValue("/root/hidden/srchinfo/senddeptcd")); // 진료과
  212. model.setValue("/root/send/srchwardcd", model.getValue("/root/hidden/srchinfo/sendwardcd")); // 병동
  213. // case6 - TDM 임상과(세부분과)별 자문업무 건수 통계
  214. if(cmb_bizflag.value == "TDM" && rdo_formcd1.value == '1' && rdo_formcd2.value == '1') {
  215. // case6 - 임상과(세부분과)별 TDM자문업무 건수 통계
  216. alert("TDM case6");
  217. if(submit("TRADS01706")){
  218. exeReportPreview("RPADS01706", "XMLSTR", "/root/main/statslist/item");
  219. }
  220. }
  221. // case2 - TDM 기간별 자문업무 건수 통계 - !!!!!!!필요 없어서 삭제 됨!!!!!!!
  222. // case7 - 임상과별 TDM 자문 회신업무 건수 통계 1
  223. else if(cmb_bizflag.value == "TDM" && cmb_reqreplflag.value == "R" && (rdo_formcd1.value == "1" || rdo_formcd1.value == "2" || rdo_formcd1.value == "3") && rdo_formcd2.value == '2') {
  224. alert("TDM case7");
  225. if(submit("TRADS01707")){
  226. exeReportPreview("RPADS01707", "XMLSTR", "/root/main/statslist/item");
  227. }
  228. }
  229. // case8 - 임상과별 TDM 자문 회신업무 건수 통계 2
  230. else if(cmb_bizflag.value == "TDM" && cmb_reqreplflag.value == "A" && (rdo_formcd1.value == "1" || rdo_formcd1.value == "2" || rdo_formcd1.value == "3") && rdo_formcd2.value == '2') {
  231. alert("TDM case8");
  232. if(submit("TRADS01708")){
  233. exeReportPreview("RPADS01708", "XMLSTR", "/root/main/statslist/item");
  234. }
  235. }
  236. // case9 - 임상과별 TDM 자문 회신업무 건수 통계 3
  237. else if(cmb_bizflag.value == "TDM" && (rdo_formcd1.value == "1" || rdo_formcd1.value == "2" || rdo_formcd1.value == "3") && rdo_formcd2.value == '3') {
  238. alert("TDM case9");
  239. if(submit("TRADS01709")){
  240. exeReportPreview("RPADS01709", "XMLSTR", "/root/main/statslist/item");
  241. }
  242. }
  243. // case10 - 임상과별 TDM 자문 회신업무 건수 통계 4
  244. else if(cmb_bizflag.value == "TDM" && rdo_formcd1.value == '2' && rdo_formcd2.value == "") {
  245. alert("TDM case10");
  246. if(submit("TRADS01710")){
  247. exeReportPreview("RPADS01710", "XMLSTR", "/root/main/statslist/item");
  248. }
  249. }
  250. // case11 - 임상과별 TDM 자문 회신업무 건수 통계 5
  251. else if(cmb_bizflag.value == "TDM" && rdo_formcd1.value == '3' && rdo_formcd2.value == "") {
  252. alert("TDM case11");
  253. if(submit("TRADS01711")){
  254. exeReportPreview("RPADS01711", "XMLSTR", "/root/main/statslist/item");
  255. }
  256. }
  257. // case12 - 임상과별 TDM 자문 회신업무 건수 통계 2-1
  258. else if(cmb_bizflag.value == "TDM" && cmb_reqreplflag.value == "Q" && (rdo_formcd1.value == "1" || rdo_formcd1.value == "2" || rdo_formcd1.value == "3") && rdo_formcd2.value == '2') {
  259. alert("TDM case12");
  260. if(submit("TRADS01712")){
  261. exeReportPreview("RPADS01712", "XMLSTR", "/root/main/statslist/item");
  262. }
  263. }
  264. // case13 - 임상과별 TDM 자문 회신업무 건수 통계 2-2
  265. else if(cmb_bizflag.value == "TDM" && cmb_reqreplflag.value == "C" && (rdo_formcd1.value == "1" || rdo_formcd1.value == "2" || rdo_formcd1.value == "3") && rdo_formcd2.value == '2') {
  266. alert("TDM case13");
  267. if(submit("TRADS01713")){
  268. exeReportPreview("RPADS01713", "XMLSTR", "/root/main/statslist/item");
  269. }
  270. }
  271. // case3 - NST 기간별 특수조제실 조제량 통계(TPN)
  272. else if(cmb_bizflag.value == "NST" && rdo_formcd1.value == '1' && rdo_formcd2.value == "") {
  273. alert("NST case3");
  274. if(submit("TRADS01703")){
  275. exeReportPreview("RPADS01703", "XMLSTR", "/root/main/statslist/item");
  276. }
  277. }
  278. // case4 - NST 기간별 건수 통계(분기별, 연별)
  279. else if(cmb_bizflag.value == "NST" && (rdo_formcd1.value == '2' || rdo_formcd1.value == '3') && rdo_formcd2.value == "") {
  280. alert("NST case4");
  281. if(submit("TRADS01704")){
  282. exeReportPreview("RPADS01704", "XMLSTR", "/root/main/statslist/item");
  283. }
  284. }
  285. // case5 - NST 임상과(세부분과)별 자문업무 건수 통계
  286. else if(cmb_bizflag.value == "NST" && (rdo_formcd1.value == '1' || rdo_formcd1.value == '2' || rdo_formcd1.value == '3') && rdo_formcd2.value == '1') {
  287. alert("NST case5");
  288. if(submit("TRADS01705")){
  289. exeReportPreview("RPADS01705", "XMLSTR", "/root/main/statslist/item");
  290. }
  291. } else {
  292. alert("조건에 해당하는 통계양식이 없습니다.");
  293. }
  294. model.refresh();
  295. ]]>
  296. </script>
  297. </button>
  298. <caption id="caption2" class="search_name" style="left:335px; top:10px; width:86px; height:17px; ">일자 :</caption>
  299. <input id="ipt_fromdd" ref="/root/send/srchfromdd" class="input_default" navindex="1" inputtype="date" format="yyyy-mm-dd" style="left:430px; top:10px; width:100px; height:19px; "/>
  300. <input id="ipt_todd" ref="/root/send/srchtodd" class="input_default" navindex="2" inputtype="date" format="yyyy-mm-dd" style="left:548px; top:10px; width:100px; height:19px; "/>
  301. <caption id="caption5" class="search_no_b" style="left:533px; top:10px; width:12px; height:17px; ">~</caption>
  302. <select1 id="cmb_bizflag" ref="/root/send/bizflag" class="combo_search" appearance="minimal" style="left:140px; top:10px; width:166px; height:19px; ">
  303. <choices>
  304. <item>
  305. <label>TDM</label>
  306. <value>TDM</value>
  307. </item>
  308. <item>
  309. <label>NST</label>
  310. <value>NST</value>
  311. </item>
  312. </choices>
  313. <script type="javascript" ev:event="xforms-value-changed">
  314. <![CDATA[
  315. // 조회 시작일자
  316. if(ipt_fromdd.value.length == 6) {
  317. // 월별
  318. ipt_fromdd.value = ipt_fromdd.value + "01";
  319. }
  320. else if(ipt_fromdd.value.length == 4) {
  321. // 년별
  322. ipt_fromdd.value = ipt_fromdd.value + "0101";
  323. }
  324. // 조회 종료일자
  325. if(ipt_todd.value.length == 6) {
  326. // 월별
  327. ipt_todd.value = ipt_todd.value + getDayCountForMonth(ipt_todd.value.substring(0, 4), ipt_todd.value.substring(4, 6));
  328. }
  329. else if(ipt_todd.value.length == 4) {
  330. // 년별
  331. ipt_todd.value = ipt_todd.value + "1231";
  332. }
  333. if(model.getValue("/root/send/bizflag") == "NST") {
  334. ipt_fromdd.attribute("format") = "yyyy-mm-dd";
  335. ipt_todd.attribute("format") = "yyyy-mm-dd";
  336. model.setValue("/root/send/formflag1" , "1" ); // 통계양식 '일자별' 세팅
  337. model.setValue("/root/send/formflag2" , "1" ); // 통계양식 초기화
  338. model.setValue("/root/send/rqflag" , "" ); // 통계양식 초기화
  339. cmb_reqreplflag.disabled = true; // 의뢰,회신구분 비활성화
  340. rdo_formcd2.disabled = false; // 통계양식 과별, 의뢰,회신 구분, 자문료 구분별
  341. }
  342. // else if ( (model.getValue("/root/send/formflag2") == "2" || model.getValue("/root/send/formflag2") == "3") && model.getValue("/root/send/bizflag") == "NST" ) {
  343. // messageBox("[업무구분]이 [NST]일경우 [회신,회신 구분별 또는 자문료 구분별을]선택 하실수","I004");
  344. // model.setValue("/root/send/bizflag", "1");
  345. // model.setValue("/root/send/rqflag", ""); // 데이터 초기화
  346. // cmb_reqreplflag.disabled = true; // 비활성화
  347. // } else if ( model.getValue("/root/send/formflag1") != "" && model.getValue("/root/send/formflag2") == "1" && model.getValue("/root/send/bizflag") == "NST" ) {
  348. // messageBox("[업무구분]이 [NST]일경우 [일자별, 월별, 연별 또는 과별]만 선택 하실수","I010");
  349. // model.setValue("/root/send/formflag2" , "" );
  350. // }
  351. else if ( model.getValue("/root/send/formflag2") == "2" && model.getValue("/root/send/bizflag") == "TDM" ) {
  352. cmb_reqreplflag.disabled = false; // 의뢰,회신구분 활성화
  353. model.setValue("/root/send/formflag1" , "1" ); // 통계양식 '일자별' 세팅
  354. model.setValue("/root/send/rqflag" , "A" ); // 의뢰,회신구분 '전체' 세팅
  355. } else if(model.getValue("/root/send/bizflag") == "TDM") {
  356. // 검색일자의 년 / 월 / 일 속성 변경
  357. ipt_fromdd.attribute("format") = "yyyy-mm-dd";
  358. ipt_todd.attribute("format") = "yyyy-mm-dd";
  359. model.setValue("/root/send/formflag1" , "1" ); // 통계양식 '일자별' 세팅
  360. model.setValue("/root/send/formflag2" , "1" ); // 통계양식 '과별' 세팅
  361. }
  362. model.refresh();
  363. ]]>
  364. </script>
  365. </select1>
  366. <caption id="caption3" class="search_name" style="left:15px; top:10px; width:116px; height:17px; ">업무구분 :</caption>
  367. <caption id="caption4" class="search_name" style="left:680px; top:10px; width:86px; height:17px; ">통계양식 :</caption>
  368. <select1 id="rdo_formcd1" ref="/root/send/formflag1" class="radio_search" appearance="full" cellspacing="10" cols="3" overflow="visible" style="left:775px; top:10px; width:190px; height:20px; border-style:none; ">
  369. <choices>
  370. <item>
  371. <label>일자별</label>
  372. <value>1</value>
  373. </item>
  374. <item>
  375. <label>월별</label>
  376. <value>2</value>
  377. </item>
  378. <item>
  379. <label>연별</label>
  380. <value>3</value>
  381. </item>
  382. </choices>
  383. <script type="javascript" ev:event="xforms-value-changed">
  384. <![CDATA[
  385. if(model.getValue("/root/send/bizflag") == "") {
  386. messageBox("[업무구분] 을 선택","I008");
  387. return;
  388. }
  389. // 조회 시작일자
  390. if(ipt_fromdd.value.length == 6) {
  391. // 월별
  392. ipt_fromdd.value = ipt_fromdd.value + "01";
  393. }
  394. else if(ipt_fromdd.value.length == 4) {
  395. // 년별
  396. ipt_fromdd.value = ipt_fromdd.value + "0101";
  397. }
  398. // 조회 종료일자
  399. if(ipt_todd.value.length == 6) {
  400. // 월별
  401. ipt_todd.value = ipt_todd.value + getDayCountForMonth(ipt_todd.value.substring(0, 4), ipt_todd.value.substring(4, 6));
  402. }
  403. else if(ipt_todd.value.length == 4) {
  404. // 년별
  405. ipt_todd.value = ipt_todd.value + "1231";
  406. }
  407. if ( model.getValue("/root/send/bizflag") == "NST" && model.getValue("/root/send/formflag1") != "1" && model.getValue("/root/send/formflag2") == "1") {
  408. model.setValue("/root/send/rqflag", ""); // 의뢰,회신구분 데이터 초기화
  409. rdo_formcd2.disabled = false; // 통계양식 과별, 의뢰,회신 구분별, 자문료 비활성화
  410. cmb_reqreplflag.disabled = true; // 의뢰,회신구분 비활성화
  411. } else if ( model.getValue("/root/send/bizflag") == "TDM" && model.getValue("/root/send/formflag1") != "1" && model.getValue("/root/send/formflag2") == "1") {
  412. model.setValue("/root/send/formflag2" , ""); // 통계양식 과별, 의뢰,회신 구분별, 자문료 구분별 초기화
  413. model.setValue("/root/send/rqflag", ""); // 의뢰,회신구분 데이터 초기화
  414. rdo_formcd2.disabled = true; // 통계양식 과별, 의뢰,회신 구분별, 자문료 비활성화
  415. cmb_reqreplflag.disabled = true; // 의뢰,회신구분 비활성화
  416. } else if ( model.getValue("/root/send/formflag1") != "1" && model.getValue("/root/send/formflag2") == "") {
  417. model.setValue("/root/send/formflag2" , ""); // 통계양식 과별, 의뢰,회신 구분별, 자문료 구분별 초기화
  418. model.setValue("/root/send/rqflag", ""); // 의뢰,회신구분 데이터 초기화
  419. rdo_formcd2.disabled = true; // 통계양식 과별, 의뢰,회신 구분별, 자문료 비활성화
  420. cmb_reqreplflag.disabled = true; // 의뢰,회신구분 비활성화
  421. } else if ( model.getValue("/root/send/bizflag") == "TDM" && model.getValue("/root/send/formflag1") == "1" && model.getValue("/root/send/formflag2") == "") {
  422. model.setValue("/root/send/formflag2" , "1"); // 통계양식 '과별' 세팅
  423. model.setValue("/root/send/rqflag", ""); // 의뢰,회신구분 데이터 초기화
  424. rdo_formcd2.disabled = false; // 통계양식 과별, 의뢰,회신 구분별, 자문료 활성화
  425. } else {
  426. rdo_formcd2.disabled = false; // 통계양식 과별, 의뢰,회신 구분별, 자문료 활성화
  427. }
  428. // 검색일자의 년 / 월 / 일 속성 변경
  429. if ( model.getValue("/root/send/formflag1") == "1" ) {
  430. ipt_fromdd.attribute("format") = "yyyy-mm-dd";
  431. ipt_todd.attribute("format") = "yyyy-mm-dd";
  432. } else if( model.getValue("/root/send/formflag1") == "2" ) {
  433. ipt_fromdd.attribute("format") = "yyyy-mm";
  434. ipt_todd.attribute("format") = "yyyy-mm";
  435. } else if( model.getValue("/root/send/formflag1") == "3" ) {
  436. ipt_fromdd.attribute("format") = "yyyy";
  437. ipt_todd.attribute("format") = "yyyy";
  438. } else {
  439. ipt_fromdd.attribute("format") = "yyyy-mm-dd";
  440. ipt_todd.attribute("format") = "yyyy-mm-dd";
  441. }
  442. model.refresh();
  443. ]]>
  444. </script>
  445. <script type="javascript" ev:event="ondblclick">
  446. <![CDATA[
  447. rdo_formcd1.value = "";
  448. model.refresh();
  449. ]]>
  450. </script>
  451. <script type="javascript" ev:event="onclick">
  452. <![CDATA[
  453. // if ( model.getValue("/root/send/formflag1") != "" && model.getValue("/root/send/formflag2") == "1" && model.getValue("/root/send/bizflag") == "NST" ) {
  454. // messageBox("[업무구분]이 [NST]일경우 [일자별, 월별, 연별 또는 과별]만 선택 하실수","I010");
  455. // model.setValue("/root/send/formflag2" , "");
  456. // model.refresh();
  457. // return;
  458. // }
  459. ]]>
  460. </script>
  461. </select1>
  462. <caption id="caption8" class="search_name" visibility="hidden" style="left:680px; top:70px; width:86px; height:17px; ">병동 :</caption>
  463. <caption id="caption10" class="search_name" style="left:15px; top:70px; width:118px; height:17px; ">진료과 :</caption>
  464. <caption id="caption12" class="search_name" style="left:335px; top:70px; width:88px; height:17px; ">의사 :</caption>
  465. <caption id="caption13" class="search_name" style="left:335px; top:40px; width:86px; height:17px; ">의뢰약물 :</caption>
  466. <select1 id="cmb_orddept" ref="/root/send/srchdeptcd" class="combo_search" appearance="minimal" style="left:140px; top:70px; width:165px; height:19px; ">
  467. <choices>
  468. <itemset nodeset="/root/init/orddeptcd">
  469. <label ref="nm"/>
  470. <value ref="cd"/>
  471. </itemset>
  472. </choices>
  473. <script type="javascript" ev:event="xforms-value-changed">
  474. <![CDATA[
  475. ]]>
  476. </script>
  477. <script type="javascript" ev:event="xforms-select">
  478. <![CDATA[
  479. // 진료과가 '전체' 선택일 경우
  480. if(cmb_orddept.value == "") {
  481. model.resetInstanceNode("/root/send/srchdrid");
  482. cmb_orddr.choices.itemset.attribute("nodeset") = "/root/init/orddrid";
  483. }
  484. // '전체' 선택이 아닐 경우
  485. else {
  486. cmb_orddr.choices.itemset.attribute("nodeset") = "/root/init/orddrid[dp = '"+ cmb_orddept.value +"']";
  487. }
  488. model.refresh();
  489. ]]>
  490. </script>
  491. </select1>
  492. <select1 id="cmb_orddr" ref="/root/send/srchdrid" class="combo_search" appearance="minimal" style="left:430px; top:70px; width:100px; height:19px; ">
  493. <choices>
  494. <itemset nodeset="/root/init/orddrid">
  495. <label ref="nm"/>
  496. <value ref="cd"/>
  497. </itemset>
  498. </choices>
  499. </select1>
  500. <button id="button2" class="icon_search" visibility="hidden" style="left:980px; top:70px; width:16px; height:16px; ">
  501. <caption/>
  502. <script type="javascript" ev:event="DOMActivate">
  503. <![CDATA[
  504. if(chk_ward.visible==true){
  505. chk_ward.visible = false;
  506. }else {
  507. chk_ward.visible = true;
  508. }
  509. model.refresh();
  510. ]]>
  511. </script>
  512. </button>
  513. <button id="button4" class="icon_search" style="left:618px; top:40px; width:16px; height:16px; ">
  514. <caption/>
  515. <script type="javascript" ev:event="DOMActivate">
  516. <![CDATA[
  517. if(chk_tdmdrug.visible){
  518. chk_tdmdrug.visible = false;
  519. }else {
  520. submit("TRADB62202"); //TDM 기준정보 데이타 가져오기 (ast.adbmtdmbase)
  521. astfAddCombo("/root/hidden/tdmdruginfo/testlist", "item", "testcd,testnm", "A,전체선택"); //2010-01-25 진료과 멀티선택 가능하도록 추가처리
  522. chk_tdmdrug.visible = true;
  523. }
  524. model.refresh();
  525. ]]>
  526. </script>
  527. </button>
  528. <select id="chk_tdmdrug" ref="/root/temp/srchinfo/tdmdrug" class="checkbox_search" visibility="hidden" overflow="visible" appearance="full" cols="5" sep="|" style="left:450px; top:60px; width:205px; height:15px; background-color:#e5eae9; border-style:none; ">
  529. <choices>
  530. <itemset nodeset="/root/hidden/tdmdruginfo/testlist/item">
  531. <label ref="testnm"/>
  532. <value ref="testcd"/>
  533. </itemset>
  534. </choices>
  535. <script type="javascript" ev:event="onclick">
  536. <![CDATA[
  537. if(chk_tdmdrug.mouseRow == 0 && chk_tdmdrug.mouseCol == 0 ){ //전체선택
  538. if(isSearchString(model.getValue("/root/temp/srchinfo/tdmdrug"),"A")){ //2010-01-25 전체
  539. var tdmdrug = "";
  540. for(var i = 1; i <= getNodesetCount("/root/hidden/tdmdruginfo/testlist/item"); i++){
  541. tdmdrug += model.getValue("/root/hidden/tdmdruginfo/testlist/item["+i+"]/testcd")+"|";
  542. }
  543. model.setValue("/root/temp/srchinfo/tdmdrug" , tdmdrug);
  544. }else{
  545. model.setValue("/root/temp/srchinfo/tdmdrug", "");
  546. }
  547. model.refresh();
  548. }
  549. if(isSearchString(model.getValue("/root/temp/srchinfo/tdmdrug"),"A")){
  550. inp_tdmdrugcd.value = chk_tdmdrug.value.substr(2,chk_tdmdrug.value.length); //전체선택(A) 코드 제외
  551. inp_tdmdrugnm.value = chk_tdmdrug.label.substr(5,chk_tdmdrug.label.length); //전체선택 명칭 제외
  552. } else {
  553. inp_tdmdrugcd.value = chk_tdmdrug.value
  554. inp_tdmdrugnm.value = chk_tdmdrug.label;
  555. }
  556. var tempDeptList2 = ""; // 따옴표가 붙은 병동코드 임시 저장 변수( 데이터 조회시 쿼리에서 쓰일 형태로 만듬 )
  557. var isSelected = true;
  558. for(var i = 0; i < chk_tdmdrug.length; ++i) {
  559. // 선택된 항목 체크
  560. if(chk_tdmdrug.item(i).selected == '1') {
  561. if(isSelected) {
  562. tempDeptList2 += "'" + chk_tdmdrug.item(i).value + "'";
  563. isSelected = false;
  564. } else {
  565. tempDeptList2 += "," + "'" + chk_tdmdrug.item(i).value + "'"; // 병동코드 구분을 ',' 사용
  566. }
  567. }
  568. }
  569. // 전체 선택 'T' 제거 하기
  570. if(isSearchString(tempDeptList2, "A")) {
  571. tempDeptList2 = tempDeptList2.substr(4, tempDeptList2.length);
  572. }
  573. model.setValue("/root/send/srchdata/prcpcd", tempDeptList2);
  574. ]]>
  575. </script>
  576. <script type="javascript" ev:event="onmousemove">
  577. <![CDATA[
  578. chk_tdmdrug.visible=true;
  579. ]]>
  580. </script>
  581. <script type="javascript" ev:event="onmouseout">
  582. <![CDATA[
  583. chk_tdmdrug.visible=false;
  584. ]]>
  585. </script>
  586. </select>
  587. <input id="inp_tdmdrugcd" ref="/root/send/srchdata/prcpcd" class="input_search" disabled="true" visibility="hidden" style="left:410px; top:40px; width:15px; height:19px; "/>
  588. <input id="inp_tdmdrugnm" ref="/root/hidden/srchinfo/tdmdrugnm" class="input_search" disabled="true" style="left:430px; top:40px; width:184px; height:19px; "/>
  589. <select1 id="rdo_formcd2" ref="/root/send/formflag2" class="radio_search" appearance="full" cellspacing="10" cols="3" overflow="visible" style="left:775px; top:40px; width:295px; height:20px; border-style:none; ">
  590. <choices>
  591. <item>
  592. <label>과별</label>
  593. <value>1</value>
  594. </item>
  595. <item>
  596. <label>의뢰,회신 구분별</label>
  597. <value>2</value>
  598. </item>
  599. <item>
  600. <label>자문료 구분별</label>
  601. <value>3</value>
  602. </item>
  603. </choices>
  604. <script type="javascript" ev:event="onclick">
  605. <![CDATA[
  606. // 조회 시작일자
  607. if(ipt_fromdd.value.length == 6) {
  608. // 월별
  609. ipt_fromdd.value = ipt_fromdd.value + "01";
  610. }
  611. else if(ipt_fromdd.value.length == 4) {
  612. // 년별
  613. ipt_fromdd.value = ipt_fromdd.value + "0101";
  614. }
  615. // 조회 종료일자
  616. if(ipt_todd.value.length == 6) {
  617. // 월별
  618. ipt_todd.value = ipt_todd.value + getDayCountForMonth(ipt_todd.value.substring(0, 4), ipt_todd.value.substring(4, 6));
  619. }
  620. else if(ipt_todd.value.length == 4) {
  621. // 년별
  622. ipt_todd.value = ipt_todd.value + "1231";
  623. }
  624. // 의뢰, 회신구분 활성화
  625. if((rdo_formcd2.value == '2') && model.getValue("/root/send/bizflag") == "TDM") {
  626. cmb_reqreplflag.disabled = false;
  627. model.setValue("/root/send/formflag1" , "1" ); // 통계양식 '일자별' 세팅
  628. model.setValue("/root/send/rqflag" , "A" ); // 의뢰,회신구분 '전체' 세팅
  629. }
  630. // TDM 일경우 통계양식의 '과별' 선택시 '일자별' 로 강제 세팅
  631. else if((rdo_formcd2.value == '1') && model.getValue("/root/send/bizflag") == "TDM") {
  632. // 검색일자의 년 / 월 / 일 속성 변경
  633. ipt_fromdd.attribute("format") = "yyyy-mm-dd";
  634. ipt_todd.attribute("format") = "yyyy-mm-dd";
  635. model.setValue("/root/send/formflag1" , "1" ); // 통계양식 '일자별' 세팅
  636. model.setValue("/root/send/rqflag" , "" ); // 의뢰,회신구분 '전체' 세팅
  637. cmb_reqreplflag.disabled = true; // 의뢰,회신구분 비활성화
  638. }
  639. // 의뢰, 회신구분 비활성화
  640. else {
  641. model.setValue("/root/send/rqflag", ""); // 의뢰,회신구분 데이터 초기화
  642. cmb_reqreplflag.disabled = true; // 의뢰,회신구분 비활성화
  643. }
  644. // 업무구분 체크
  645. if(model.getValue("/root/send/bizflag") == "") {
  646. messageBox("[업무구분] 을 선택","I008");
  647. } else if ( (model.getValue("/root/send/formflag2") == "2" || model.getValue("/root/send/formflag2") == "3") && model.getValue("/root/send/bizflag") == "NST" ) {
  648. messageBox("[업무구분]이 [NST]일경우 [의뢰,회신 구분별 또는 자문료 구분별을]선택 하실수","I004");
  649. model.setValue("/root/send/formflag2" , model.getValue("/root/hidden/formflag2") );
  650. }
  651. // else if ( model.getValue("/root/send/formflag1") != "" && model.getValue("/root/send/formflag2") == "1" && model.getValue("/root/send/bizflag") == "NST" ) {
  652. // messageBox("[업무구분]이 [NST]일경우 [일자별, 월별, 연별 또는 과별]만 선택 하실수","I010");
  653. // model.setValue("/root/send/formflag2" , "" );
  654. // }
  655. model.refresh();
  656. ]]>
  657. </script>
  658. <script type="javascript" ev:event="DOMFocusIn">
  659. <![CDATA[
  660. model.setValue("/root/hidden/formflag2" , model.getValue("/root/send/formflag2") );
  661. ]]>
  662. </script>
  663. <script type="javascript" ev:event="ondblclick">
  664. <![CDATA[
  665. model.setValue("/root/send/rqflag", ""); // 의뢰,회신구분 데이터 초기화
  666. cmb_reqreplflag.disabled = true; // 의뢰,회신구분 비활성화
  667. rdo_formcd2.value = "";
  668. model.refresh();
  669. ]]>
  670. </script>
  671. </select1>
  672. <select1 id="cmb_reqreplflag" ref="/root/send/rqflag" class="combo_search" disabled="true" appearance="minimal" style="left:140px; top:40px; width:165px; height:19px; ">
  673. <choices>
  674. <item>
  675. <label>전체</label>
  676. <value>A</value>
  677. </item>
  678. <item>
  679. <label>회신구분</label>
  680. <value>R</value>
  681. </item>
  682. <item>
  683. <label>의뢰구분</label>
  684. <value>Q</value>
  685. </item>
  686. <item>
  687. <label>자문내용 및 결과구분</label>
  688. <value>C</value>
  689. </item>
  690. </choices>
  691. </select1>
  692. <caption id="caption1" class="search_name" style="left:15px; top:40px; width:117px; height:17px; ">의뢰,회신구분 :</caption>
  693. <input id="ipt_wardnm" ref="/root/hidden/srchinfo/wardnm" class="input_search" disabled="true" visibility="hidden" style="left:775px; top:70px; width:196px; height:19px; "/>
  694. </group>
  695. <select id="chk_ward" ref="/root/temp/srchinfo/ward" class="checkbox_search" visibility="hidden" overflow="visible" appearance="full" cols="8" direction="downacross" sep="," style="left:245px; top:15px; width:205px; height:15px; background-color:#e5eae9; border-style:none; ">
  696. <choices>
  697. <itemset nodeset="/root/hidden/deptlist/ward">
  698. <label ref="wardnm"/>
  699. <value ref="wardcd"/>
  700. </itemset>
  701. </choices>
  702. <script type="javascript" ev:event="onclick">
  703. <![CDATA[
  704. if(chk_ward.mouseRow == 0 && chk_ward.mouseCol == 0 ){
  705. if(isSearchString(model.getValue("/root/temp/srchinfo/ward"),"T")){
  706. var tempWardList = ""; // 병동코드 임시 저장 변수
  707. for(var i = 0; i < chk_ward.length; ++i) {
  708. if(i == 0) {
  709. tempWardList += chk_ward.item(i).value;
  710. } else {
  711. tempWardList += "," + chk_ward.item(i).value; // 병동코드 구분을 ',' 사용
  712. }
  713. }
  714. model.setValue("/root/temp/srchinfo/ward", tempWardList);
  715. } else {
  716. //ipt_wardcd.value = "";
  717. //ipt_wardnm.value = "";
  718. model.setValue("/root/temp/srchinfo/ward", "");
  719. }
  720. model.refresh();
  721. }
  722. if(isSearchString(model.getValue("/root/temp/srchinfo/ward"),"T")){
  723. ipt_wardcd.value = chk_ward.value.substr(2,chk_ward.value.length);
  724. ipt_wardnm.value = chk_ward.label.substr(3,chk_ward.label.length);
  725. } else {
  726. ipt_wardcd.value = chk_ward.value;
  727. ipt_wardnm.value = chk_ward.label;
  728. }
  729. var tempWardList2 = ""; // 따옴표가 붙은 병동코드 임시 저장 변수( 데이터 조회시 쿼리에서 쓰일 형태로 만듬 )
  730. var isSelected = true;
  731. for(var i = 0; i < chk_ward.length; ++i) {
  732. // 선택된 항목 체크
  733. if(chk_ward.item(i).selected == '1') {
  734. if(isSelected) {
  735. tempWardList2 += "'" + chk_ward.item(i).value + "'";
  736. isSelected = false;
  737. } else {
  738. tempWardList2 += "," + "'" + chk_ward.item(i).value + "'"; // 병동코드 구분을 ',' 사용
  739. }
  740. }
  741. }
  742. // 전체 선택 'A' 제거 하기
  743. if(isSearchString(tempWardList2, "T")) {
  744. tempWardList2 = tempWardList2.substr(4,tempWardList2.length);
  745. }
  746. model.setValue("/root/hidden/srchinfo/sendwardcd", tempWardList2);
  747. ]]>
  748. </script>
  749. </select>
  750. <input id="ipt_wardcd" ref="/root/hidden/srchinfo/wardcd" class="input_search" visibility="hidden" style="left:630px; top:10px; width:140px; height:19px; "/>
  751. </group>
  752. </xhtml:body>
  753. </xhtml:html>