SPMMO41000_교수별회진시간관리.xrw 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  1. <?xml version="1.0" encoding="UTF-8"?>
  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. <grpmasterinfo>
  11. <grpmasterinfolist>
  12. <shownm/>
  13. <grtype/>
  14. <staffid/>
  15. <orddeptcd/>
  16. </grpmasterinfolist>
  17. </grpmasterinfo>
  18. <drinfo>
  19. <drinfolist>
  20. <drnm/>
  21. <drid/>
  22. <deptcd/>
  23. <phone/>
  24. <bbtel/>
  25. </drinfolist>
  26. </drinfo>
  27. <workerinfo>
  28. <workerinfolist/>
  29. </workerinfo>
  30. <titleinfo>
  31. <worktitle/>
  32. <grpmtitle/>
  33. <staffnm/>
  34. <staffid/>
  35. <fromtm/>
  36. <totm/>
  37. </titleinfo>
  38. <drdetlinfo>
  39. <drnm/>
  40. <drid/>
  41. <deptcd/>
  42. <phone/>
  43. <bbtel/>
  44. </drdetlinfo>
  45. <prtinfo/>
  46. </main>
  47. <cond>
  48. <srchym/>
  49. <orddeptcd/>
  50. <drid/>
  51. <prtdeptcd/>
  52. </cond>
  53. <init>
  54. <orddeptinfo>
  55. <orddeptinfolist>
  56. <orddeptcd/>
  57. <orddeptnm/>
  58. </orddeptinfolist>
  59. </orddeptinfo>
  60. <menu>
  61. <item>
  62. <name>추가</name>
  63. <func>fAddWorkDr</func>
  64. </item>
  65. <item>
  66. <name>삭제</name>
  67. <func>fSetWorkDr</func>
  68. </item>
  69. <item>
  70. <name>새로고침</name>
  71. <func>fRefreshWorkDr</func>
  72. </item>
  73. </menu>
  74. </init>
  75. <send/>
  76. </root>
  77. </instance>
  78. <script type="javascript">
  79. <![CDATA[
  80. function fInit() {
  81. zbcfGetDeptCodeList(getUserInfo("dutplceinstcd"), "orduseyn", "D", "/root/init/orddept"); //부서코드 콤보조회
  82. zbcfGetDeptCodeList(getUserInfo("dutplceinstcd"), "orduseyn", "D", "/root/prtinfo/orddept"); //부서코드 콤보조회
  83. addComboInstance("/root/init/orddept", "deptcd^depthngnm", "-^전체", "dept"); //부서콤보 전체추가
  84. model.refresh();
  85. }
  86. function fSearch() {
  87. var deptcd = model.getValue("/root/cond/orddeptcd");
  88. var drid = model.getValue("/root/cond/drid");
  89. model.removenode("/root/send/deptcd");
  90. model.makeValue("/root/send/deptcd", deptcd);
  91. model.removenode("/root/send/drid");
  92. model.makeValue("/root/send/drid", drid);
  93. submit("TRMMO41002") ;
  94. }
  95. function fAdd() {
  96. var deptcd = model.getValue("/root/cond/orddeptcd");
  97. var deptnm = cmb_orddeptcd.label;
  98. var drid = model.getValue("/root/cond/drid");
  99. var drnm = combo1.label;
  100. if (deptcd == "" || deptcd == null || deptcd == "-") {
  101. messageBox("진료과를 선택하세요", "I999");
  102. return;
  103. }
  104. if (drid == "" || drid == null || drid == "-") {
  105. messageBox("의사를 선택하세요", "I999");
  106. return;
  107. }
  108. if (grd_rnlist.rows > 1 ){
  109. grd_rnlist.insertRow(1, "above");
  110. } else if (grd_rnlist.rows == 1 ){
  111. grd_rnlist.addRow(true, true);
  112. }
  113. grd_rnlist.valuematrix(1, grd_rnlist.colRef("deptcd")) = deptcd;
  114. grd_rnlist.valuematrix(1, grd_rnlist.colRef("deptnm")) = deptnm;
  115. grd_rnlist.valuematrix(1, grd_rnlist.colRef("drid")) = drid;
  116. grd_rnlist.valuematrix(1, grd_rnlist.colRef("drnm")) = drnm;
  117. grd_rnlist.refresh();
  118. }
  119. function fSave() {
  120. model.removenode("/root/send/savedata");
  121. var sHeader = "status▦deptcd▦drid▦seqno▦ampm▦datenm▦starttm▦endtm▦bigo▩";
  122. var sData = "";
  123. for(i = grd_rnlist.fixedRows; i < grd_rnlist.rows; i++) {
  124. var status = grd_rnlist.rowStatus(i) ;
  125. if (status == 1 || status == 2 || status == 3 || status == 4) {
  126. var ampm = grd_rnlist.ValueMatrix(i, grd_rnlist.colRef("ampm"));
  127. if (ampm == "" || ampm == null) {
  128. ampm = "T";
  129. }
  130. var datenm = grd_rnlist.ValueMatrix(i, grd_rnlist.colRef("datenm"));
  131. if (datenm == "" || datenm == null) {
  132. datenm = "T";
  133. }
  134. sData += status + "▦"
  135. + grd_rnlist.ValueMatrix(i, grd_rnlist.colRef("deptcd")) + "▦"
  136. + grd_rnlist.ValueMatrix(i, grd_rnlist.colRef("drid")) + "▦"
  137. + grd_rnlist.ValueMatrix(i, grd_rnlist.colRef("seqno")) + "▦"
  138. + ampm + "▦"
  139. + datenm + "▦"
  140. + grd_rnlist.ValueMatrix(i, grd_rnlist.colRef("starttm")) + "▦"
  141. + grd_rnlist.ValueMatrix(i, grd_rnlist.colRef("endtm")) + "▦"
  142. + grd_rnlist.ValueMatrix(i, grd_rnlist.colRef("bigo")) + "▩";
  143. }
  144. }
  145. model.makeValue("/root/send/savedata/roundlist", sHeader + sData);
  146. if(submit("TXMMO41001")){
  147. fSearch();
  148. }
  149. }
  150. function fPrt() {
  151. var prtgbn = "";
  152. if (grd_prtdept.Rows == 1) {
  153. prtgbn = "all";
  154. }
  155. model.removenode("/root/send/deptcd");
  156. model.removenode("/root/send/drid");
  157. model.makeValue("/root/send/drid", "");
  158. var tmpDeptcd = "";
  159. if (prtgbn == "all") {
  160. model.makeValue("/root/send/deptcd", "");
  161. } else {
  162. for(var i = 1; i < grd_prtdept.Rows; i++) {
  163. tmpDeptcd += "'" + grd_prtdept.valueMatrix(i, grd_prtdept.colRef("deptcd")) + "',"
  164. }
  165. var deptcd = tmpDeptcd.substr(0, tmpDeptcd.length-1);
  166. model.makeValue("/root/send/deptcd", deptcd);
  167. }
  168. submit("TRMMO41002");
  169. exeReportPreview("RPMMO41001", "XMLSTR");
  170. }
  171. ]]>
  172. </script>
  173. <script type="javascript" ev:event="xforms-ready">
  174. <![CDATA[
  175. fInit();
  176. ]]>
  177. </script>
  178. <submission id="TRZSD00109" mediatype="application/x-www-form-urlencoded" method="post"/>
  179. <submission id="TRMMO41001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="root/main/userlist"/>
  180. <submission id="TRMMO41002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/roundinfo"/>
  181. <submission id="TXMMO41001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/temp/roundinfo"/>
  182. </model>
  183. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  184. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  185. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  186. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  187. <script type="javascript" src="../../../com/userdeptinfoweb/js/ZSU001.js"/>
  188. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  189. <script type="javascript" src="../../../emr/prcpmngtweb/js/MMO001.js"/>
  190. <script type="javascript" src="../../../emr/carecomweb/js/CareCom.js"/>
  191. </xhtml:head>
  192. <xhtml:body pagewidth="850" pageheight="580" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  193. <group id="group3" scroll="auto" style="left:0px; top:16px; width:820px; height:550px; text-align:center; ">
  194. <line id="line2" class="line_1" style="x1:1px; y1:42px; x2:820px; y2:42px; "/>
  195. <group id="group4" style="left:0px; top:0px; width:820px; height:40px; vertical-align:top; ">
  196. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:820px; height:40px; "/>
  197. <button id="btn_search" class="btn1_letter2" navindex="3" style="left:524px; top:10px; width:56px; height:22px; ">
  198. <caption>조회</caption>
  199. <script type="javascript" ev:event="DOMActivate">
  200. <![CDATA[
  201. fSearch();
  202. ]]>
  203. </script>
  204. </button>
  205. <line id="line13" class="line_4" style="x1:517px; y1:9px; x2:517px; y2:34px; "/>
  206. <caption id="caption1" class="search_name" style="left:5px; top:9px; width:91px; height:17px; ">진 료 과 :</caption>
  207. <select1 id="cmb_orddeptcd" ref="/root/cond/orddeptcd" navindex="2" appearance="minimal" style="left:90px; top:9px; width:190px; height:19px; text-align:left; ">
  208. <choices>
  209. <itemset nodeset="/root/init/orddept/dept">
  210. <label ref="depthngnm"/>
  211. <value ref="deptcd"/>
  212. </itemset>
  213. </choices>
  214. <script type="javascript" ev:event="xforms-value-changed">
  215. <![CDATA[
  216. model.removenode("/root/send/deptcd");
  217. model.makeValue("/root/send/deptcd", cmb_orddeptcd.value);
  218. model.setValue("/root/cond/drid", "");
  219. submit("TRMMO41001");
  220. addComboInstance("/root/main/userlist", "userid^usernm", "-^전체", "usercombo");
  221. model.refresh();
  222. ]]>
  223. </script>
  224. </select1>
  225. <caption id="caption2" class="search_name" style="left:295px; top:9px; width:71px; height:17px; ">의 사:</caption>
  226. <select1 id="combo1" ref="/root/cond/drid" navindex="2" appearance="minimal" style="left:360px; top:9px; width:120px; height:19px; text-align:left; ">
  227. <choices>
  228. <itemset nodeset="/root/main/userlist/usercombo">
  229. <label ref="usernm"/>
  230. <value ref="userid"/>
  231. </itemset>
  232. </choices>
  233. <script type="javascript" ev:event="xforms-value-changed">
  234. <![CDATA[
  235. model.setValue("/root/cond/drid", combo1.value);
  236. //btn_search.dispatch('DOMActivate');
  237. ]]>
  238. </script>
  239. </select1>
  240. <button id="button1" class="btn1_letter2" navindex="3" style="left:581px; top:10px; width:56px; height:22px; ">
  241. <caption>추가</caption>
  242. <script type="javascript" ev:event="DOMActivate">
  243. <![CDATA[
  244. fAdd();
  245. ]]>
  246. </script>
  247. </button>
  248. <button id="button2" class="btn1_letter2" navindex="3" style="left:695px; top:10px; width:56px; height:22px; ">
  249. <caption>저장</caption>
  250. <script type="javascript" ev:event="DOMActivate">
  251. <![CDATA[
  252. fSave();
  253. ]]>
  254. </script>
  255. </button>
  256. <button id="button3" class="btn1_letter2" navindex="3" style="left:638px; top:10px; width:56px; height:22px; ">
  257. <caption>삭제</caption>
  258. <script type="javascript" ev:event="DOMActivate">
  259. <![CDATA[
  260. for (var i = 1; i < grd_rnlist.rows; i++) {
  261. if (grd_rnlist.isSelected(i)) {
  262. grd_rnlist.rowStatus(i) = 4;
  263. }
  264. }
  265. grd_rnlist.refresh();
  266. ]]>
  267. </script>
  268. </button>
  269. <button id="button4" class="btn1_letter2" navindex="3" style="left:752px; top:10px; width:56px; height:22px; ">
  270. <caption>출력</caption>
  271. <script type="javascript" ev:event="DOMActivate">
  272. <![CDATA[
  273. group1.visible = true;
  274. ]]>
  275. </script>
  276. </button>
  277. </group>
  278. <!-- 조회그룹 종료 -->
  279. <shape id="roundrect3" class="roundrect_example" appearance="roundrect" style="left:0px; top:517px; width:820px; height:32px; "/>
  280. <caption id="caption3" style="left:5px; top:520px; width:800px; height:27px; ">* 회진 시간은 사정에 따라 변경될 수 있으니 양해 바랍니다.</caption>
  281. <datagrid id="grd_rnlist" nodeset="/root/main/roundinfo/roundlist" caption="^진료과^^의사^seqno^오전/오후^요일^시작시간^종료시간^비고" colsep="^" colwidth="0, 140, 0, 90, 0, 60, 50, 70, 70, 300" defaultrows="0" focuscolor="#7fef0f" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:47px; width:820px; height:468px; ">
  282. <col ref="deptcd"/>
  283. <col ref="deptnm" type="output"/>
  284. <col ref="drid"/>
  285. <col ref="drnm" type="output"/>
  286. <col ref="seqno"/>
  287. <col ref="ampm" type="combo">
  288. <choices>
  289. <item>
  290. <label>오전</label>
  291. <value>A</value>
  292. </item>
  293. <item>
  294. <label>오후</label>
  295. <value>P</value>
  296. </item>
  297. <item>
  298. <label/>
  299. <value>T</value>
  300. </item>
  301. </choices>
  302. </col>
  303. <col ref="datenm" type="combo">
  304. <choices>
  305. <item>
  306. <label>월</label>
  307. <value>2</value>
  308. </item>
  309. <item>
  310. <label>화</label>
  311. <value>3</value>
  312. </item>
  313. <item>
  314. <label>수</label>
  315. <value>4</value>
  316. </item>
  317. <item>
  318. <label>목</label>
  319. <value>5</value>
  320. </item>
  321. <item>
  322. <label>금</label>
  323. <value>6</value>
  324. </item>
  325. <item>
  326. <label>토</label>
  327. <value>7</value>
  328. </item>
  329. <item>
  330. <label>일</label>
  331. <value>1</value>
  332. </item>
  333. <item>
  334. <label/>
  335. <value>T</value>
  336. </item>
  337. </choices>
  338. </col>
  339. <col ref="starttm" type="input" format="hh:nn"/>
  340. <col ref="endtm" type="input" format="hh:nn"/>
  341. <col ref="bigo" type="input" style="text-align:left; "/>
  342. </datagrid>
  343. <group id="group1" visibility="hidden" style="left:240px; top:135px; width:390px; height:250px; background-color:#ccffff; border-style:solid; ">
  344. <datagrid id="grd_prtdept" nodeset="/root/main/prtinfo/dept" caption="출력할 진료과^" colsep="^" colwidth="264, 0" mergecellsfixedrows="bycolrec" rowsep="|" style="left:12px; top:34px; width:367px; height:205px; ">
  345. <col ref="deptnm"/>
  346. <col ref="deptcd"/>
  347. </datagrid>
  348. <select1 id="cmb_dept2" ref="/root/cond/prtdeptcd" navindex="2" appearance="minimal" style="left:12px; top:9px; width:170px; height:19px; text-align:left; ">
  349. <choices>
  350. <itemset nodeset="/root/prtinfo/orddept/dept">
  351. <label ref="depthngnm"/>
  352. <value ref="deptcd"/>
  353. </itemset>
  354. </choices>
  355. </select1>
  356. <button id="button5" class="btn2_letter2" navindex="3" style="left:186px; top:9px; width:42px; height:19px; ">
  357. <caption>추가</caption>
  358. <script type="javascript" ev:event="DOMActivate">
  359. <![CDATA[
  360. var deptcd = cmb_dept2.value;
  361. var deptnm = cmb_dept2.label;
  362. if (deptcd == "" || deptcd == null) {
  363. messageBox("출력할 진료과를 선택하십시오", "I999");
  364. return;
  365. }
  366. for (var i = 1 ; i < grd_prtdept.rows; i++) {
  367. if (deptcd == grd_prtdept.valuematrix(i, grd_prtdept.colRef("deptcd"))) {
  368. messageBox("이미 선택된 진료과 입니다.", "I999");
  369. return;
  370. }
  371. }
  372. if (grd_prtdept.rows > 1 ){
  373. grd_prtdept.insertRow(1, "above");
  374. } else if (grd_prtdept.rows == 1 ){
  375. grd_prtdept.addRow(true, true);
  376. }
  377. grd_prtdept.valuematrix(1, grd_prtdept.colRef("deptcd")) = deptcd;
  378. grd_prtdept.valuematrix(1, grd_prtdept.colRef("deptnm")) = deptnm;
  379. ]]>
  380. </script>
  381. </button>
  382. <button id="button6" class="btn2_letter2" navindex="3" style="left:229px; top:9px; width:42px; height:19px; ">
  383. <caption>출력</caption>
  384. <script type="javascript" ev:event="DOMActivate">
  385. <![CDATA[
  386. if (grd_prtdept.Rows == 1) {
  387. if (messageBox("전체 진료과를 출력하시겠습니까?", "Q999") != "6") {
  388. return;
  389. }
  390. }
  391. fPrt();
  392. button7.dispatch('DOMActivate');
  393. group1.visible = false;
  394. ]]>
  395. </script>
  396. </button>
  397. <button id="button7" class="btn2_letter4" navindex="3" style="left:272px; top:9px; width:64px; height:19px; ">
  398. <caption>새로고침</caption>
  399. <script type="javascript" ev:event="DOMActivate">
  400. <![CDATA[
  401. model.destroy("/root/main/prtinfo");
  402. grd_prtdept.refresh();
  403. ]]>
  404. </script>
  405. </button>
  406. <button id="button8" class="btn2_letter2" navindex="3" style="left:337px; top:9px; width:42px; height:19px; ">
  407. <caption>닫기</caption>
  408. <script type="javascript" ev:event="DOMActivate">
  409. <![CDATA[
  410. button7.dispatch('DOMActivate');
  411. group1.visible = false;
  412. ]]>
  413. </script>
  414. </button>
  415. </group>
  416. </group>
  417. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">과별 교수별 회진 시간 관리</caption>
  418. </xhtml:body>
  419. </xhtml:html>