SMPMB02100_진료일정관리통계.xrw 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * @(#)SMPMB02100_진료일정관리.xrw
  4. * 수정이력
  5. * - 2007.10.29 / 최초작성 / 박재형
  6. -->
  7. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  8. <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">
  9. <xhtml:head>
  10. <xhtml:title>진료일정관리통계</xhtml:title>
  11. <model id="model1">
  12. <instance id="instance1">
  13. <root xmlns="">
  14. <main>
  15. <drordunit>
  16. <drordunitlist/>
  17. </drordunit>
  18. <ordcls>
  19. <ordclslist>
  20. <cls>진료예정</cls>
  21. <choicls>선택진료 예정</choicls>
  22. <month/>
  23. </ordclslist>
  24. <ordclslist>
  25. <cls/>
  26. <choicls>일반진료 예정</choicls>
  27. <month/>
  28. </ordclslist>
  29. <ordclslist>
  30. <cls/>
  31. <choicls>합계</choicls>
  32. <month/>
  33. </ordclslist>
  34. <ordclslist>
  35. <cls>휴진</cls>
  36. <choicls>선택진료</choicls>
  37. <month/>
  38. </ordclslist>
  39. <ordclslist>
  40. <cls/>
  41. <choicls>일반진료</choicls>
  42. <month/>
  43. </ordclslist>
  44. <ordclslist>
  45. <cls/>
  46. <choicls>합계</choicls>
  47. <month/>
  48. </ordclslist>
  49. <ordclslist>
  50. <cls>대진,임진</cls>
  51. <choicls>선택진료</choicls>
  52. <month/>
  53. </ordclslist>
  54. <ordclslist>
  55. <cls/>
  56. <choicls>일반진료</choicls>
  57. <month/>
  58. </ordclslist>
  59. <ordclslist>
  60. <cls/>
  61. <choicls>합계</choicls>
  62. <month/>
  63. </ordclslist>
  64. <ordclslist>
  65. <cls>진료</cls>
  66. <choicls>선택진료</choicls>
  67. <month/>
  68. </ordclslist>
  69. <ordclslist>
  70. <cls/>
  71. <choicls>일반진료</choicls>
  72. <month/>
  73. </ordclslist>
  74. <ordclslist>
  75. <cls/>
  76. <choicls>합계</choicls>
  77. <month/>
  78. </ordclslist>
  79. </ordcls>
  80. <ordunitcnt>
  81. <ordunitcntlist>
  82. <cls>교수</cls>
  83. <unit/>
  84. <dr/>
  85. <ordunit/>
  86. </ordunitcntlist>
  87. <ordunitcntlist>
  88. <cls>부교수</cls>
  89. <unit/>
  90. <dr/>
  91. <ordunit/>
  92. </ordunitcntlist>
  93. <ordunitcntlist>
  94. <cls>조교수</cls>
  95. <unit/>
  96. <dr/>
  97. <ordunit/>
  98. </ordunitcntlist>
  99. <ordunitcntlist>
  100. <cls>전임강사</cls>
  101. <unit/>
  102. <dr/>
  103. <ordunit/>
  104. </ordunitcntlist>
  105. <ordunitcntlist>
  106. <cls>임상강사</cls>
  107. <unit/>
  108. <dr/>
  109. <ordunit/>
  110. </ordunitcntlist>
  111. <ordunitcntlist>
  112. <cls>기타(초빙)</cls>
  113. <unit/>
  114. <dr/>
  115. <ordunit/>
  116. </ordunitcntlist>
  117. </ordunitcnt>
  118. </main>
  119. <send>
  120. <drordunitlist>
  121. <orddeptcd/>
  122. <orddrid/>
  123. <fromdd/>
  124. <todd/>
  125. <aftfromdd/>
  126. <afttodd/>
  127. </drordunitlist>
  128. <unitlist>
  129. <orddeptcd/>
  130. <year/>
  131. <month>-</month>
  132. <drinclyn/>
  133. <yearmonth/>
  134. </unitlist>
  135. </send>
  136. <init>
  137. <R0009list>
  138. <R0009>
  139. <cdnm/>
  140. <cdid/>
  141. </R0009>
  142. </R0009list>
  143. <R0062list>
  144. <R0062>
  145. <cdnm/>
  146. <cdid/>
  147. </R0062>
  148. </R0062list>
  149. <NR0062list>
  150. <NR0062>
  151. <cdnm>교수</cdnm>
  152. <cdid>1782</cdid>
  153. </NR0062>
  154. <NR0062>
  155. <cdnm>교수</cdnm>
  156. <cdid>1783</cdid>
  157. </NR0062>
  158. <NR0062>
  159. <cdnm>부교수</cdnm>
  160. <cdid>1784</cdid>
  161. </NR0062>
  162. <NR0062>
  163. <cdnm>부교수</cdnm>
  164. <cdid>1785</cdid>
  165. </NR0062>
  166. <NR0062>
  167. <cdnm>조교수</cdnm>
  168. <cdid>1786</cdid>
  169. </NR0062>
  170. <NR0062>
  171. <cdnm>조교수</cdnm>
  172. <cdid>1787</cdid>
  173. </NR0062>
  174. <NR0062>
  175. <cdnm>전임강사</cdnm>
  176. <cdid>1788</cdid>
  177. </NR0062>
  178. <NR0062>
  179. <cdnm>전임강사</cdnm>
  180. <cdid>1789</cdid>
  181. </NR0062>
  182. <NR0062>
  183. <cdnm>임상강사</cdnm>
  184. <cdid>0545</cdid>
  185. </NR0062>
  186. <NR0062>
  187. <cdnm>임상강사</cdnm>
  188. <cdid>1847</cdid>
  189. </NR0062>
  190. <NR0062>
  191. <cdnm>임상강사</cdnm>
  192. <cdid>1848</cdid>
  193. </NR0062>
  194. <NR0062>
  195. <cdnm>임상강사</cdnm>
  196. <cdid>1849</cdid>
  197. </NR0062>
  198. <NR0062>
  199. <cdnm>임상강사</cdnm>
  200. <cdid>1850</cdid>
  201. </NR0062>
  202. <NR0062>
  203. <cdnm>기타(초빙)</cdnm>
  204. <cdid>1800</cdid>
  205. </NR0062>
  206. <NR0062>
  207. <cdnm>기타(초빙)</cdnm>
  208. <cdid>1845</cdid>
  209. </NR0062>
  210. <NR0062>
  211. <cdnm>기타(초빙)</cdnm>
  212. <cdid>1799</cdid>
  213. </NR0062>
  214. </NR0062list>
  215. </init>
  216. <hidden>
  217. <orddeptcd>
  218. <orddeptcdlist>
  219. <nm/>
  220. <cd/>
  221. </orddeptcdlist>
  222. </orddeptcd>
  223. <orddrid>
  224. <orddridlist>
  225. <cd/>
  226. <nm/>
  227. <dp/>
  228. </orddridlist>
  229. </orddrid>
  230. <ordcls>
  231. <ordclslist/>
  232. </ordcls>
  233. <ordunitcnt>
  234. <ordunitcntlist/>
  235. </ordunitcnt>
  236. </hidden>
  237. </root>
  238. </instance>
  239. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/init"/>
  240. <submission id="TRPAM00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/hidden/tmp"/>
  241. <submission id="TRPMB02101" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/hidden"/>
  242. <submission id="TRPMB02102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/drordunitlist" resultref="/root/main/drordunit"/>
  243. <submission id="TRPMB02103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/unitlist" resultref="/root/hidden/ordcls"/>
  244. <submission id="TXPMB02101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save/drordunitlist"/>
  245. <submission id="TRPMB02104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/unitlist" resultref="/root/hidden/ordunitcnt"/>
  246. </model>
  247. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  248. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  249. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  250. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  251. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  252. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
  253. <script type="javascript" ev:event="xforms-ready">
  254. <![CDATA[
  255. fInitialize(); // 기본 화면 초기화 한다.
  256. //2008-08-20 이동식 추가
  257. btn_outrgst.selected = true;
  258. btn_outupdt.selected = false;
  259. model.toggle("case_outrgst");
  260. ]]>
  261. </script>
  262. <script type="javascript">
  263. <![CDATA[
  264. function fInitialize() {
  265. zbcfGetCodeList(new Array("R0062"), new Array("/root/init/R0062list"));
  266. //pamGetDeptCDDrIDList(); // 진료과
  267. submit("TRPMB02101"); // 진료과와 진료의사 콤보data.
  268. button2.visible= false; //총진료실 저장 버튼 초기숨김.
  269. model.setValue("/root/send/drordunitlist/afttodd",getCurrentDate()); //진료종료기간 현재일자 셋팅
  270. model.setValue("/root/send/drordunitlist/aftfromdd",getCurrentDate() - 6); //진료시작일자 현재일자 -7일
  271. cmb_orddrid.disabled = true; //초기 의사별 진료탭 진료의사 비활성화
  272. var today = getCurrentDate();
  273. var todayyear = today.substr(0,4);
  274. var todaymonth = today.substr(4,2); // 초기 현재 년월 셋팅
  275. model.setValue("/root/send/unitlist/year",todayyear);
  276. model.setValue("/root/send/unitlist/month",todaymonth);
  277. model.setValue("/root/send/unitlist/drinclyn",1);
  278. // 진료구분별 통계 merge
  279. grd_monthflag.mergeByFree(1,0,3,0); //진료예정
  280. grd_monthflag.mergeByFree(4,0,6,0); //휴진
  281. grd_monthflag.mergeByFree(7,0,9,0); //대진, 임진
  282. grd_monthflag.mergeByFree(10,0,12,0); //진료
  283. model.refresh();
  284. }
  285. function fCheck() {
  286. var orddeptcd = model.getValue("/root/send/drordunitlist/orddeptcd");
  287. var orddrid = model.getValue("/root/send/drordunitlist/orddrid");
  288. var aftfromdd = model.getValue("/root/send/drordunitlist/aftfromdd");
  289. var afttodd = model.getValue("/root/send/drordunitlist/afttodd");
  290. // if(orddeptcd == ""){
  291. // messageBox("");
  292. // return false;
  293. // }
  294. // if(orddrid == ""){
  295. // messageBox("");
  296. // return false;
  297. // }
  298. if(aftfromdd == "" && afttodd != ""){
  299. messageBox("시작일자를","C001");
  300. return false;
  301. }
  302. if(afttodd == "" && aftfromdd !=""){
  303. messageBox("종료일자를","C001");
  304. return false;
  305. }
  306. // 지난주 날짜 셋팅~!!
  307. var aftfromdd = model.getValue("/root/send/drordunitlist/aftfromdd");
  308. var afttodd = model.getValue("/root/send/drordunitlist/afttodd");
  309. var aftfromdate = aftfromdd.toDate(); //날짜형식변환
  310. var afttodate = afttodd.toDate(); //날짜형식변환
  311. var fromdddate = aftfromdate.getAddDate(-7, "D"); //일자로 7일더함
  312. var todddate = afttodate.getAddDate(-7, "D"); //일자로 7일더함
  313. var fromdd = fromdddate.getDateFormat(); //문자형식변환
  314. var todd = todddate.getDateFormat(); //문자형식변환
  315. model.setValue("/root/send/drordunitlist/fromdd",fromdd);
  316. model.setValue("/root/send/drordunitlist/todd",todd);
  317. model.refresh();
  318. return true;
  319. }
  320. function fOrddrid(orddeptcd){
  321. cmb_orddrid.choices.itemset.attribute("nodeset") = "/root/hidden/orddrid/orddridlist[dp = '" + orddeptcd + "']";
  322. cmb_orddrid.refresh();
  323. }
  324. function fUnitCheck(){
  325. var orddeptcd = model.getValue("/root/send/unitlist/orddeptcd")
  326. var yr = model.getValue("/root/send/unitlist/year")
  327. var mon = model.getValue("/root/send/unitlist/month")
  328. if( isNaN(yr ) || yr.length != 4 ){
  329. messageBox("년도를","C001");
  330. return false;
  331. }else if ( mon == '-' || mon == '' ){
  332. messageBox("월을","C001");
  333. return false;
  334. }else if( orddeptcd == '' || orddeptcd == '-' ){
  335. messageBox("진료과를","C001");
  336. return false;
  337. }
  338. var monnm = model.getValue("/root/send/unitlist/month");
  339. grd_monthflag.valueMatrix(0,2) = monnm+"월"
  340. model.setValue("/root/send/unitlist/yearmonth", yr + mon );
  341. return true;
  342. }
  343. function fUnitSet() {
  344. var msgcnt = model.getValue("/root/properties/error/msg");
  345. alert(msgcnt);
  346. var cnt = msgcnt.substr(0,1);
  347. var intcnt = parseInt(cnt);
  348. for(var i=1 ; i<=intcnt ; i++){
  349. var flag = model.getValue("/root/hidden/ordcls/ordclslist[" + i + "]/flag");
  350. var spcyn = model.getValue("/root/hidden/ordcls/ordclslist[" + i + "]/specordyn");
  351. var cnt = model.getValue("/root/hidden/ordcls/ordclslist[" + i + "]/cnt");
  352. var rows = grd_monthflag.rows;
  353. var fixedrows = grd_monthflag.fixedrows;
  354. var allrow = rows - fixedrows;
  355. if(flag == "1진료예정" && spcyn == "Y"){
  356. model.setValue("/root/main/ordcls/ordclslist[1]/month",cnt);
  357. }
  358. if(flag == "1진료예정" && spcyn == "N"){
  359. model.setValue("/root/main/ordcls/ordclslist[2]/month",cnt);
  360. }
  361. if(flag == "2휴진" && spcyn == "Y"){
  362. model.setValue("/root/main/ordcls/ordclslist[4]/month",cnt);
  363. }
  364. if(flag == "2휴진" && spcyn == "N"){
  365. model.setValue("/root/main/ordcls/ordclslist[5]/month",cnt);
  366. }
  367. if(flag == "3대진,임진" && spcyn == "Y"){
  368. model.setValue("/root/main/ordcls/ordclslist[7]/month",cnt);
  369. }
  370. if(flag == "3대진,임진" && spcyn == "N"){
  371. model.setValue("/root/main/ordcls/ordclslist[8]/month",cnt);
  372. }
  373. if(flag == "4진료" && spcyn == "Y"){
  374. model.setValue("/root/main/ordcls/ordclslist[10]/month",cnt);
  375. }
  376. if(flag == "4진료" && spcyn == "N"){
  377. model.setValue("/root/main/ordcls/ordclslist[11]/month",cnt);
  378. }
  379. for(var j = 1; j <= allrow ; j++){
  380. var value = model.getValue("/root/main/ordcls/ordclslist[" + j + "]/month");
  381. if(value == ""){
  382. model.setValue("/root/main/ordcls/ordclslist[" + j + "]/month", "0");
  383. }
  384. }
  385. var cnt1 = model.getValue("/root/main/ordcls/ordclslist[1]/month");
  386. var cnt2 = model.getValue("/root/main/ordcls/ordclslist[2]/month");
  387. model.setValue("/root/main/ordcls/ordclslist[3]/month",parseInt(cnt1)+parseInt(cnt2));
  388. var cnt4 = model.getValue("/root/main/ordcls/ordclslist[4]/month");
  389. var cnt5 = model.getValue("/root/main/ordcls/ordclslist[5]/month");
  390. model.setValue("/root/main/ordcls/ordclslist[6]/month",parseInt(cnt4)+parseInt(cnt5));
  391. var cnt7 = model.getValue("/root/main/ordcls/ordclslist[7]/month");
  392. var cnt8 = model.getValue("/root/main/ordcls/ordclslist[8]/month");
  393. model.setValue("/root/main/ordcls/ordclslist[9]/month",parseInt(cnt7)+parseInt(cnt8));
  394. var cnt10 = model.getValue("/root/main/ordcls/ordclslist[10]/month");
  395. var cnt11 = model.getValue("/root/main/ordcls/ordclslist[11]/month");
  396. model.setValue("/root/main/ordcls/ordclslist[12]/month",parseInt(cnt10)+parseInt(cnt11));
  397. }
  398. model.refresh();
  399. }
  400. function fMerge() {
  401. var grdrows = grd_drordunitlist.rows;
  402. var grdfixedrows = grd_drordunitlist.fixedRows;
  403. var newrows = grdrows - grdfixedrows;
  404. var chknum = 0;
  405. var chkrow = 0;
  406. var i = 1;
  407. var j = i+1;
  408. for(i; i <= newrows;){
  409. var value1 = model.getValue("/root/main/drordunit/drordunitlist[" + i + "]/deptcd");
  410. for(j; j <= newrows; j++){
  411. var value2 = model.getValue("/root/main/drordunit/drordunitlist[" + j + "]/deptcd");
  412. if(value1 == value2){
  413. chknum = chknum + 1;
  414. } else {
  415. break;
  416. }
  417. }
  418. grd_drordunitlist.mergeByFree(i+1+chkrow, 0, j+chkrow, 0);
  419. grd_drordunitlist.mergeByFree(i+1+chkrow, 1, j+chkrow, 1);
  420. grd_drordunitlist.mergeByFree(i+1+chkrow, 2, j+chkrow, 2);
  421. grd_drordunitlist.mergeByFree(i+1+chkrow, 3, j+chkrow, 3);
  422. grd_drordunitlist.mergeByFree(j+chkrow+1,2,j+chkrow+1,5);
  423. chkrow = chkrow+1;
  424. i = j;
  425. j = i+1;
  426. }
  427. // var grdrows = grd_drordunitlist.rows;
  428. // var grdfixedrows = grd_drordunitlist.fixedRows;
  429. // var newrows = grdrows - grdfixedrows;
  430. // var chknum = 0;
  431. // var i = 1;
  432. // var j = i+1;
  433. //
  434. // for(i; i <= newrows;){
  435. // var value1 = model.getValue("/root/main/drordunit/drordunitlist[" + i + "]/deptcd");
  436. // for(j; j <= newrows; j++){
  437. // var value2 = model.getValue("/root/main/drordunit/drordunitlist[" + j + "]/deptcd");
  438. // if(value1 == value2){
  439. // chknum = chknum + 1;
  440. // } else {
  441. // break;
  442. // }
  443. // }
  444. // grd_drordunitlist.mergeByFree(i+1, 1, j, 1);
  445. // //grd_drordunitlist.mergeByFree(i+1, 2, j, 2);
  446. // //grd_drordunitlist.mergeByFree(i+1, 3, j, 3);
  447. // i = j;
  448. // j = i+1;
  449. // }
  450. }
  451. function fSubtotal() {
  452. grd_drordunitlist.subtotalPosition = "below";
  453. grd_drordunitlist.subtotal("clear", 0, 0);
  454. grd_drordunitlist.subtotal("sum", 1, 7, "format:#,###; roundmode:round; roundpostion:2", "background-color:#c0c0c0; color:#000000; font-weight:bold; " ,2, "합 계" ,false);
  455. grd_drordunitlist.subtotal("sum", 1, 8, "format:#,###; roundmode:round; roundpostion:2", "background-color:#c0c0c0; color:#000000; font-weight:bold; " ,2, "합 계" ,false);
  456. grd_drordunitlist.subtotal("sum", 1, 9, "format:#,###; roundmode:round; roundpostion:2", "background-color:#c0c0c0; color:#000000; font-weight:bold; " ,2, "합 계" ,false);
  457. grd_drordunitlist.subtotal("sum", 1, 10, "format:#,###; roundmode:round; roundpostion:2", "background-color:#c0c0c0; color:#000000; font-weight:bold; " ,2, "합 계" ,false);
  458. grd_drordunitlist.subtotal("sum", 1, 11, "format:#,###; roundmode:round; roundpostion:2", "background-color:#c0c0c0; color:#000000; font-weight:bold; " ,2, "합 계" ,false);
  459. grd_drordunitlist.subtotal("sum", 1, 12, "format:#,###; roundmode:round; roundpostion:2", "background-color:#c0c0c0; color:#000000; font-weight:bold; " ,2, "합 계" ,false);
  460. grd_drordunitlist.subtotal("sum", 1, 13, "format:#,###; roundmode:round; roundpostion:2", "background-color:#c0c0c0; color:#000000; font-weight:bold; " ,2, "합 계" ,false);
  461. grd_drordunitlist.subtotal("sum", 1, 14, "format:#,###; roundmode:round; roundpostion:2", "background-color:#c0c0c0; color:#000000; font-weight:bold; " ,2, "합 계" ,false);
  462. grd_drordunitlist.subtotal("sum", 1, 15, "format:#,###; roundmode:round; roundpostion:2", "background-color:#c0c0c0; color:#000000; font-weight:bold; " ,2, "합 계" ,false);
  463. grd_drordunitlist.subtotal("sum", 1, 16, "format:#,###; roundmode:round; roundpostion:2", "background-color:#c0c0c0; color:#000000; font-weight:bold; " ,2, "합 계" ,false);
  464. }
  465. function fSave(){
  466. var allrows = grd_drordunitlist.rows;
  467. var fixedrows = grd_drordunitlist.fixedRows;
  468. var rows = allrows - fixedrows;
  469. var irow = 1;
  470. for(var i = 2; i <= rows; i++){
  471. var status = grd_drordunitlist.rowstatus(i);
  472. if(status != 0){
  473. var orddeptcd = grd_drordunitlist.valueMatrix(i,1);
  474. var allordroomqty = grd_drordunitlist.valueMatrix(i,2);
  475. model.makeNode("/root/send/save/drordunitlist[" + irow + "]/status");
  476. model.makeNode("/root/send/save/drordunitlist[" + irow + "]/orddeptcd");
  477. model.makeNode("/root/send/save/drordunitlist[" + irow + "]/allordroomqty");
  478. model.setValue("/root/send/save/drordunitlist[" + irow + "]/status",status);
  479. model.setValue("/root/send/save/drordunitlist[" + irow + "]/orddeptcd",orddeptcd);
  480. model.setValue("/root/send/save/drordunitlist[" + irow + "]/allordroomqty",allordroomqty);
  481. irow = irow + 1;
  482. }
  483. }
  484. return true;
  485. }
  486. function fAllUnit(){
  487. var grdrows = grd_drordunitlist.rows;
  488. var fixedrows = grd_drordunitlist.fixedRows;
  489. var rows = grdrows - fixedrows;
  490. for(var i=2; i <= rows; i++){
  491. var allordroom = grd_drordunitlist.valuematrix(i, 2);
  492. var allpossunit = allordroom * 11;
  493. grd_drordunitlist.valuematrix(i, 3) = allpossunit;
  494. model.refresh();
  495. }
  496. }
  497. function fOrdUnit(){
  498. var msgcnt = model.getValue("/root/properties/error/msg");
  499. var cnt = msgcnt.substr(0,1);
  500. var intcnt = parseInt(cnt);
  501. for(var i=1 ; i<=intcnt ; i++){
  502. var jobposcd = model.getValue("/root/hidden/ordunitcnt/ordunitcntlist[" + i + "]/jobposcd");
  503. var unit = model.getValue("/root/hidden/ordunitcnt/ordunitcntlist[" + i + "]/unit");
  504. var dr = model.getValue("/root/hidden/ordunitcnt/ordunitcntlist[" + i + "]/dr");
  505. var ordunit = model.getValue("/root/hidden/ordunitcnt/ordunitcntlist[" + i + "]/ordunit");
  506. var rows = grd_jobpos.rows;
  507. var fixedrows = grd_jobpos.fixedrows;
  508. var allrow = rows - fixedrows;
  509. if(jobposcd == "1교수"){
  510. model.setValue("/root/main/ordunitcnt/ordunitcntlist[1]/unit",unit);
  511. model.setValue("/root/main/ordunitcnt/ordunitcntlist[1]/dr",dr);
  512. model.setValue("/root/main/ordunitcnt/ordunitcntlist[1]/ordunit",ordunit);
  513. }
  514. if(jobposcd == "2부교수"){
  515. model.setValue("/root/main/ordunitcnt/ordunitcntlist[2]/unit",unit);
  516. model.setValue("/root/main/ordunitcnt/ordunitcntlist[2]/dr",dr);
  517. model.setValue("/root/main/ordunitcnt/ordunitcntlist[2]/ordunit",ordunit);
  518. }
  519. if(jobposcd == "3조교수"){
  520. model.setValue("/root/main/ordunitcnt/ordunitcntlist[3]/unit",unit);
  521. model.setValue("/root/main/ordunitcnt/ordunitcntlist[3]/dr",dr);
  522. model.setValue("/root/main/ordunitcnt/ordunitcntlist[3]/ordunit",ordunit);
  523. }
  524. if(jobposcd == "4전임강사"){
  525. model.setValue("/root/main/ordunitcnt/ordunitcntlist[4]/unit",unit);
  526. model.setValue("/root/main/ordunitcnt/ordunitcntlist[4]/dr",dr);
  527. model.setValue("/root/main/ordunitcnt/ordunitcntlist[4]/ordunit",ordunit);
  528. }
  529. if(jobposcd == "5임상강사"){
  530. model.setValue("/root/main/ordunitcnt/ordunitcntlist[5]/unit",unit);
  531. model.setValue("/root/main/ordunitcnt/ordunitcntlist[5]/dr",dr);
  532. model.setValue("/root/main/ordunitcnt/ordunitcntlist[5]/ordunit",ordunit);
  533. }
  534. if(jobposcd == "6기타(초빙)"){
  535. model.setValue("/root/main/ordunitcnt/ordunitcntlist[6]/unit",unit);
  536. model.setValue("/root/main/ordunitcnt/ordunitcntlist[6]/dr",dr);
  537. model.setValue("/root/main/ordunitcnt/ordunitcntlist[6]/ordunit",ordunit);
  538. }
  539. for(var j = 1; j <= allrow ; j++){
  540. var value = model.getValue("/root/main/ordunitcnt/ordunitcntlist[" + j + "]/ordunit");
  541. if(value == ""){
  542. model.setValue("/root/main/ordunitcnt/ordunitcntlist[" + j + "]/unit","0");
  543. model.setValue("/root/main/ordunitcnt/ordunitcntlist[" + j + "]/dr","0");
  544. model.setValue("/root/main/ordunitcnt/ordunitcntlist[" + j + "]/ordunit","0");
  545. }
  546. }
  547. }
  548. model.refresh();
  549. }
  550. ]]>
  551. </script>
  552. </xhtml:head>
  553. <xhtml:body guideline="1,1003;2,537;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  554. <group id="group1" style="left:0px; top:0px; width:985px; height:15px; ">
  555. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:235px; height:13px; ">진료일정관리통계</caption>
  556. </group>
  557. <group id="group4" scroll="auto" style="left:0px; top:508px; width:980px; height:28px; ">
  558. <button id="btn_clear" class="btn4_letter3" style="left:911px; top:3px; width:68px; height:22px; ">
  559. <caption>초기화</caption>
  560. <script type="javascript" ev:event="DOMActivate">
  561. <![CDATA[
  562. model.reset();
  563. fInitialize();
  564. ]]>
  565. </script>
  566. </button>
  567. <button id="button2" class="btn4_letter6" style="left:806px; top:3px; width:104px; height:22px; ">
  568. <caption>총진료실저장</caption>
  569. <script type="javascript" ev:event="DOMActivate">
  570. <![CDATA[
  571. fSave();
  572. if(submit("TXPMB02101")){
  573. var grdrows = grd_drordunitlist.rows;
  574. var fixedrows = grd_drordunitlist.fixedRows;
  575. var rows = grdrows - fixedrows;
  576. for(var i=0; i<= rows; i++){
  577. if(grd_drordunitlist.rowStatus(i) != 0) {
  578. grd_drordunitlist.rowStatus(i) = 0;
  579. }
  580. }
  581. model.removeNodeset("/root/send/save/drordunitlist");
  582. }
  583. ]]>
  584. </script>
  585. </button>
  586. <button id="btn_excelsave" class="btn2_letter4" style="left:6px; top:5px; width:75px; height:19px; ">
  587. <caption>엑셀저장</caption>
  588. <script type="javascript" ev:event="DOMActivate">
  589. <![CDATA[
  590. var outrgst = btn_outrgst.selected;
  591. var outupdt = btn_outupdt.selected;
  592. if(outrgst == true){
  593. var rgstFileName1 = window.fileDialog("save", ",", false, "진료구분별통계", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  594. if (rgstFileName1 != "")
  595. {
  596. grd_monthflag.saveExcel(rgstFileName1, "진료구분별통계");
  597. }
  598. var rgstFileName2 = window.fileDialog("save", ",", false, "1인당 진료 Unit 수", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  599. if (rgstFileName2 != "")
  600. {
  601. grd_jobpos.saveExcel(rgstFileName2, "1인당 진료 Unit 수");
  602. }
  603. }
  604. if(outupdt == true){
  605. var updtFileName = window.fileDialog("save", ",", false, "진료일정통계", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  606. if (updtFileName != "")
  607. {
  608. grd_drordunitlist.saveExcel(updtFileName, "진료일정통계");
  609. }
  610. }
  611. ]]>
  612. </script>
  613. </button>
  614. <button id="btn_print" class="btn2_letter2" visibility="hidden" style="left:72px; top:5px; width:42px; height:19px; ">
  615. <caption>출력</caption>
  616. <script type="javascript" ev:event="DOMActivate">
  617. <![CDATA[
  618. // exeReportPreview("RPPMB02101", "XMLSTR", "/root/main/drordunit/drordunitlist",true, true,"pdf","C:\Documents and Settings\pak0985\바탕 화면\진료일정관리통계\의사진료통계",1, false,1);
  619. exeReportPreview("RPPMB02101", "XMLSTR" , "/root/main/drordunit/drordunitlist" , "" , "true" , "", "", "", "", "true");
  620. ]]>
  621. </script>
  622. </button>
  623. </group>
  624. <group id="group2" scroll="auto" style="left:0px; top:16px; width:1000px; height:489px; ">
  625. <group id="group6" style="left:0px; top:3px; width:995px; height:482px; ">
  626. <switch id="swt_outpatient" style="left:0px; top:26px; width:990px; height:449px; border-color:#c7a3cf; border-style:solid; ">
  627. <case id="case_outrgst" selected="true" style="left:0px; top:0px; width:983px; height:442px; ">
  628. <line id="line17" class="line_1" style="x1:3px; y1:71px; x2:458px; y2:71px; "/>
  629. <datagrid id="grd_monthflag" nodeset="/root/main/ordcls/ordclslist" class="datagrid2" caption="진료구분^선택구분^월" colsep="^" colwidth="130, 165, 157" dataheight="23" defaultrows="13" ellipsis="false" extendlastcol="scroll" fixedcols="2" mergecellsfixedrows="bycolrec" rowheight="25" rowsep="|" tooltip="true" style="left:3px; top:76px; width:455px; height:359px; text-align:center; ">
  630. <col ref="cls" format="yyyy-mm-dd hh:nn" style="text-align:left; "/>
  631. <col ref="choicls" style="text-align:left; "/>
  632. <col ref="month" format="#,###"/>
  633. </datagrid>
  634. <datagrid id="grd_jobpos" nodeset="/root/main/ordunitcnt/ordunitcntlist" class="datagrid2" caption="^진료 Unit 총수^진료의사 총수^진료Unit수(1인당)" colsep="^" colwidth="147, 135, 116, 119" dataheight="23" defaultrows="7" ellipsis="false" extendlastcol="scroll" fixedcols="1" mergecellsfixedrows="bycolrec" rowheight="25" rowsep="|" tooltip="true" style="left:460px; top:76px; width:520px; height:360px; text-align:center; ">
  635. <col ref="cls" format="#,###"/>
  636. <col ref="unit" format="#,###"/>
  637. <col ref="dr" format="#,###.##"/>
  638. <col ref="ordunit"/>
  639. </datagrid>
  640. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:2px; top:12px; width:978px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  641. <button id="btn_search" class="btn1_letter2" style="left:909px; top:18px; width:56px; height:22px; ">
  642. <caption>조회</caption>
  643. <script type="javascript" ev:event="DOMActivate">
  644. <![CDATA[
  645. if(fUnitCheck()){
  646. for(var i = 1 ; i <= 11 ; i++)
  647. model.resetInstanceNode("/root/main/ordcls/ordclslist[" +i+ "]/month");
  648. for(var j = 1; j <= 6 ; j++){
  649. model.resetInstanceNode("/root/main/ordunitcnt/ordunitcntlist[" + j + "]/unit");
  650. model.resetInstanceNode("/root/main/ordunitcnt/ordunitcntlist[" + j + "]/dr");
  651. model.resetInstanceNode("/root/main/ordunitcnt/ordunitcntlist[" + j + "]/ordunit");
  652. }
  653. if(submit("TRPMB02103")){
  654. fUnitSet();
  655. }
  656. if(submit("TRPMB02104")) {
  657. fOrdUnit();
  658. }
  659. }
  660. ]]>
  661. </script>
  662. </button>
  663. <line id="line3" class="line_4" style="x1:893px; y1:18px; x2:893px; y2:40px; border-color:#ffe4bb; border-left-style:solid; "/>
  664. <select1 id="cmb_orddept" ref="/root/send/unitlist/orddeptcd" class="combo_search" appearance="minimal" style="left:99px; top:19px; width:200px; height:19px; ">
  665. <choices>
  666. <itemset nodeset="/root/hidden/orddeptcd/orddeptcdlist">
  667. <label ref="nm"/>
  668. <value ref="cd"/>
  669. </itemset>
  670. </choices>
  671. </select1>
  672. <caption id="caption3" class="search_name" style="left:22px; top:20px; width:73px; height:17px; ">진료과 :</caption>
  673. <input id="ipt_patnm" ref="/root/send/unitlist/year" class="input_search" maxlength="4" format="yyyy" style="left:384px; top:19px; width:138px; height:19px; "/>
  674. <caption id="caption1" class="search_name" style="left:317px; top:20px; width:73px; height:17px; ">년도 :</caption>
  675. <caption id="caption2" class="search_name" style="left:539px; top:19px; width:53px; height:17px; ">월 :</caption>
  676. <select1 id="cbo_suppkind" ref="/root/send/unitlist/month" class="combo_search" appearance="minimal" style="left:593px; top:19px; width:80px; height:19px; ">
  677. <choices>
  678. <item>
  679. <label/>
  680. <value>-</value>
  681. </item>
  682. <item>
  683. <label>1월</label>
  684. <value>01</value>
  685. </item>
  686. <item>
  687. <label>2월</label>
  688. <value>02</value>
  689. </item>
  690. <item>
  691. <label>3월</label>
  692. <value>03</value>
  693. </item>
  694. <item>
  695. <label>4월</label>
  696. <value>04</value>
  697. </item>
  698. <item>
  699. <label>5월</label>
  700. <value>05</value>
  701. </item>
  702. <item>
  703. <label>6월</label>
  704. <value>06</value>
  705. </item>
  706. <item>
  707. <label>7월</label>
  708. <value>07</value>
  709. </item>
  710. <item>
  711. <label>8월</label>
  712. <value>08</value>
  713. </item>
  714. <item>
  715. <label>9월</label>
  716. <value>09</value>
  717. </item>
  718. <item>
  719. <label>10월</label>
  720. <value>10</value>
  721. </item>
  722. <item>
  723. <label>11월</label>
  724. <value>11</value>
  725. </item>
  726. <item>
  727. <label>12월</label>
  728. <value>12</value>
  729. </item>
  730. </choices>
  731. </select1>
  732. <line id="line2" class="line_1" style="x1:460px; y1:71px; x2:980px; y2:71px; "/>
  733. <caption id="caption5" class="tit_2" style="left:3px; top:55px; width:130px; height:14px; ">진료구분별 통계</caption>
  734. <select1 id="radio1" ref="/root/send/unitlist/drinclyn" overflow="visible" appearance="full" cols="2" style="left:697px; top:20px; width:175px; height:20px; border-style:none; ">
  735. <choices>
  736. <item>
  737. <label>전공의포함</label>
  738. <value>0</value>
  739. </item>
  740. <item>
  741. <label>전공의비포함</label>
  742. <value>1</value>
  743. </item>
  744. </choices>
  745. </select1>
  746. <caption id="caption4" class="tit_2" style="left:463px; top:55px; width:130px; height:14px; ">1인당 진료 Unit수</caption>
  747. </case>
  748. <case id="case_outupdt" style="left:0px; top:0px; width:983px; height:442px; ">
  749. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:2px; top:16px; width:978px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  750. <button id="button1" class="btn1_letter2" style="left:912px; top:23px; width:56px; height:22px; ">
  751. <caption>조회</caption>
  752. <script type="javascript" ev:event="DOMActivate">
  753. <![CDATA[
  754. if(fCheck()){
  755. submit("TRPMB02102");
  756. }
  757. // 총가능 unit계산
  758. fAllUnit();
  759. // 합계 계산
  760. fSubtotal();
  761. // 같은영역 합침
  762. fMerge();
  763. ]]>
  764. </script>
  765. </button>
  766. <line id="line1" class="line_4" style="x1:896px; y1:24px; x2:896px; y2:46px; border-color:#ffe4bb; border-left-style:solid; "/>
  767. <caption id="caption9" class="search_name" style="left:20px; top:25px; width:73px; height:17px; ">진료과 :</caption>
  768. <select1 id="cmb_orddeptcd" ref="/root/send/drordunitlist/orddeptcd" class="combo_search" appearance="minimal" style="left:95px; top:24px; width:133px; height:19px; ">
  769. <choices>
  770. <itemset nodeset="/root/hidden/orddeptcd/orddeptcdlist">
  771. <label ref="nm"/>
  772. <value ref="cd"/>
  773. </itemset>
  774. </choices>
  775. <script type="javascript" ev:event="xforms-value-changed">
  776. <![CDATA[
  777. if(cmb_orddeptcd.value == "" || cmb_orddeptcd.value == "-"){
  778. cmb_orddrid.value = "";
  779. cmb_orddrid.disabled = true;
  780. } else {
  781. cmb_orddrid.disabled = false;
  782. fOrddrid(cmb_orddeptcd.value);
  783. }
  784. ]]>
  785. </script>
  786. </select1>
  787. <caption id="caption7" class="search_name" style="left:264px; top:25px; width:90px; height:17px; ">진료의사 :</caption>
  788. <select1 id="cmb_orddrid" ref="/root/send/drordunitlist/orddrid" class="combo_search" appearance="minimal" style="left:352px; top:24px; width:105px; height:19px; ">
  789. <choices>
  790. <itemset nodeset="/root/hidden/orddrid/orddridlist">
  791. <label ref="nm"/>
  792. <value ref="cd"/>
  793. </itemset>
  794. </choices>
  795. </select1>
  796. <caption id="caption8" class="search_name" style="left:499px; top:25px; width:86px; height:17px; ">진료기간 :</caption>
  797. <input id="ipt_fromdd" ref="/root/send/drordunitlist/aftfromdd" class="input_s_essential" inputtype="date" style="left:587px; top:24px; width:93px; height:19px; ">
  798. <script type="javascript" ev:event="xforms-value-changed">
  799. <![CDATA[
  800. var aftfromdd = model.getValue("/root/send/drordunitlist/aftfromdd");
  801. var aftfromdate = aftfromdd.toDate(); //날짜형식변환
  802. var afttodddate = aftfromdate.getAddDate(6, "D"); //일자로 7일더함
  803. var afttodd = afttodddate.getDateFormat(); //문자형식변환
  804. model.setValue("/root/send/drordunitlist/afttodd",afttodd);
  805. model.refresh();
  806. ]]>
  807. </script>
  808. </input>
  809. <caption id="caption10" style="left:683px; top:26px; width:15px; height:20px; ">~</caption>
  810. <input id="ipt_todd" ref="/root/send/drordunitlist/afttodd" class="input_s_essential" inputtype="date" style="left:696px; top:24px; width:93px; height:19px; ">
  811. <script type="javascript" ev:event="xforms-value-changed">
  812. <![CDATA[
  813. var afttodd = model.getValue("/root/send/drordunitlist/afttodd");
  814. var afttodate = afttodd.toDate(); //날짜형식변환
  815. var aftfromdddate = afttodate.getAddDate(-6, "D"); //일자로 7일더함
  816. var aftfromdd = aftfromdddate.getDateFormat(); //문자형식변환
  817. model.setValue("/root/send/drordunitlist/aftfromdd",aftfromdd);
  818. model.refresh();
  819. ]]>
  820. </script>
  821. </input>
  822. <line id="line4" class="line_1" style="x1:5px; y1:81px; x2:977px; y2:82px; "/>
  823. <datagrid id="grd_drordunitlist" nodeset="/root/main/drordunit/drordunitlist" class="datagrid2" caption="진료과^총 진료실^총가능&#xA;Unit^직위^진료의사^구&#xA;분^지난주^지난주^지난주^지난주^지난주^이번주^이번주^이번주^이번주^이번주|진료과^총 진료실^총가능&#xA;Unit^직위^진료의사^구&#xA;분^예정^휴진^임진^대진^실제^예정^휴진^임진^대진^실제" colsep="^" colwidth="155, 61, 50, 70, 85, 25, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50" dataheight="23" defaultrows="1" ellipsis="false" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" tooltip="true" style="left:5px; top:85px; width:974px; height:353px; text-align:center; ">
  824. <col disabled="true" ref="deptcd" type="combo">
  825. <choices>
  826. <itemset nodeset="/root/hidden/orddeptcd/orddeptcdlist">
  827. <label ref="nm"/>
  828. <value ref="cd"/>
  829. </itemset>
  830. </choices>
  831. </col>
  832. <col ref="allordroom" type="input"/>
  833. <col disabled="true" ref="allpossunit" type="input"/>
  834. <col disabled="true" ref="jobposcd" type="combo">
  835. <choices>
  836. <itemset nodeset="/root/init/NR0062list/NR0062">
  837. <label ref="cdnm"/>
  838. <value ref="cdid"/>
  839. </itemset>
  840. </choices>
  841. </col>
  842. <col disabled="true" ref="orddrid" type="combo">
  843. <choices>
  844. <itemset nodeset="/root/hidden/orddrid/orddridlist">
  845. <label ref="nm"/>
  846. <value ref="cd"/>
  847. </itemset>
  848. </choices>
  849. </col>
  850. <col disabled="true" ref="specordyn"/>
  851. <col disabled="true" ref="bfsche"/>
  852. <col disabled="true" ref="bfholi"/>
  853. <col disabled="true" ref="bftemp"/>
  854. <col disabled="true" ref="bfsubt"/>
  855. <col disabled="true" ref="bforg"/>
  856. <col disabled="true" ref="aftsche"/>
  857. <col disabled="true" ref="aftholi"/>
  858. <col disabled="true" ref="afttemp"/>
  859. <col disabled="true" ref="aftsubt"/>
  860. <col disabled="true" ref="aftorg"/>
  861. <script type="javascript" ev:event="onendedit">
  862. <![CDATA[
  863. var row = grd_drordunitlist.row;
  864. var col = grd_drordunitlist.col;
  865. var allordroom = grd_drordunitlist.valuematrix(row, col);
  866. var allpossunit = allordroom * 11;
  867. grd_drordunitlist.valueMatrix(row, col+1) = allpossunit;
  868. ]]>
  869. </script>
  870. </datagrid>
  871. <caption id="caption11" class="tit_2" style="left:5px; top:65px; width:205px; height:13px; ">의사별 진료 Unit 수 주간 통계</caption>
  872. </case>
  873. </switch>
  874. <button id="btn_outrgst" class="btn_sw" group="tab" selected="true" style="left:0px; top:3px; width:100px; height:22px; ">
  875. <caption>Unit수 월통계</caption>
  876. <toggle case="case_outrgst" ev:event="onclick"/>
  877. <script type="javascript" ev:event="DOMActivate">
  878. <![CDATA[
  879. button2.visible= false;
  880. ]]>
  881. </script>
  882. </button>
  883. <button id="btn_outupdt" class="btn_sw" group="tab" selected="false" style="left:100px; top:3px; width:170px; height:22px; ">
  884. <caption>의사별 진료Unit 주간통계</caption>
  885. <toggle case="case_outupdt" ev:event="onclick"/>
  886. <script type="javascript" ev:event="DOMActivate">
  887. <![CDATA[
  888. button2.visible= true;
  889. ]]>
  890. </script>
  891. </button>
  892. </group>
  893. </group>
  894. </xhtml:body>
  895. </xhtml:html>