SPAER00802_대상자조회.xrw 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>대상자조회</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <pidlist1>
  11. <mainpidlist>
  12. <pid/>
  13. <patnm/>
  14. <sna/>
  15. <flag/>
  16. <wardcd/>
  17. <roomcd/>
  18. <juminno/>
  19. <emrinpat/>
  20. </mainpidlist>
  21. </pidlist1>
  22. </main>
  23. <send>
  24. <userid/>
  25. <flag>0</flag>
  26. <dailyyn/>
  27. <deptcd/>
  28. <drid/>
  29. <actdrid/>
  30. <wardcd/>
  31. <roomcd/>
  32. </send>
  33. <init>
  34. <cmb_ward>
  35. <initexecward>
  36. <execwardcdid/>
  37. <execwardcdnm/>
  38. </initexecward>
  39. </cmb_ward>
  40. <cmb_orddept>
  41. <initexecorddept>
  42. <execorddeptcdid/>
  43. <execorddeptcdnm/>
  44. </initexecorddept>
  45. </cmb_orddept>
  46. <cmb_orddept2>
  47. <initexecorddept>
  48. <execorddeptcdid/>
  49. <execorddeptcdnm/>
  50. </initexecorddept>
  51. </cmb_orddept2>
  52. <cmb_room>
  53. <initexecroom>
  54. <execroomcdid/>
  55. <execroomcdnm/>
  56. </initexecroom>
  57. </cmb_room>
  58. <userlist/>
  59. <userlist2/>
  60. </init>
  61. </root>
  62. </instance>
  63. <script type="javascript" ev:event="xforms-ready">
  64. <![CDATA[
  65. // 당일결과
  66. //chk_DailyResult.attribute("overflow")= "visible";
  67. //chk_DailyResult.attribute("cols")= 2;
  68. //chk_DailyResult.refresh();
  69. //model.makeValue("/root/send/userid", getUserInfo("userid"));
  70. model.makeValue("/root/send/flag", "0");
  71. model.makeNode("/root/send/actdrid");
  72. model.makeNode("/root/send/dailyyn");
  73. submit("TRAER00803"); // 진료과코드
  74. var jobkindcd = getUserInfo("jobkindcd");
  75. var dutplcecd = getUserInfo("dutplcecd");
  76. combo1.value = dutplcecd;
  77. cmb_wardcd.value = dutplcecd;
  78. submit("TRAER00801"); // 병동코드 조회
  79. if (combo1.label != "") { // 근무지가 진료과인경우
  80. combo1.value = dutplcecd
  81. combo1.dispatch("xforms-value-changed");
  82. model.setValue("root/send/drid", getUserInfo("userid"));
  83. combo5.value = getUserInfo("userid");
  84. if(combo2.label == ""){combo2.select(0); } //선택된 담당교수가 없는 경우 default로 첫번째 설정
  85. if(combo5.label == ""){combo5.select(0);} //선택된 담당교수가 없는 경우 default로 첫번째 설정
  86. cmb_wardcd.value = "";
  87. model.refresh();
  88. fGetPatList() ;
  89. } else if (cmb_wardcd.label != "") { // 근무지가 병동인 경우
  90. combo1.value = "";
  91. cmb_wardcd.value = dutplcecd;
  92. if(cmb_wardcd.label == ""){cmb_wardcd.select(0);} //선택된 담당교수가 없는 경우 default로 첫번째 설정
  93. model.setValue("/root/send/drid", "");
  94. model.setValue("/root/send/actdrid", "");
  95. model.setValue("/root/send/flag", "1");
  96. model.refresh();
  97. fGetPatList() ;
  98. } else { // 근무지가 병동이나 진료과가 아닌경우
  99. combo1.value = ""
  100. cmb_wardcd.value = ""
  101. model.setValue("/root/send/drid", "");
  102. model.setValue("/root/send/actdrid", "");
  103. model.refresh();
  104. }
  105. fChkButton();
  106. ]]>
  107. </script>
  108. <submission id="TRAER00819" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/pidlist1"/>
  109. <submission id="TRAER00801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/cmb_ward"/>
  110. <submission id="TRAER00802" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/wardcd" replace="instance" resultref="/root/init/cmb_room"/>
  111. <submission id="TRAER00803" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/cmb_orddept"/>
  112. <submission id="TRAER00804" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/deptcd" replace="instance" resultref="/root/init/cmb_orddr"/>
  113. <submission id="TRMMB04102" mediatype="application/x-www-form-urlencoded" method="post"/>
  114. </model>
  115. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  116. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  117. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  118. <script type="javascript" src="../../../ast/examcureweb/js/AEZ0001.js"/>
  119. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  120. <script type="javascript" src="../../../emr/prcpmngtweb/js/MMO001.js"/>
  121. <script type="javascript">
  122. <![CDATA[
  123. function fGetPatList() {
  124. var deptcd = combo1.value;
  125. var drid = combo2.value;
  126. var wardcd = cmb_wardcd.value ;
  127. var roomcd = combo4.value;
  128. if ( deptcd == "" && drid == "" && wardcd == "" && roomcd == "" ) {
  129. messageBox("조회 항목[진료과,주치의,병동,병실]을 선택하세요.","I999");
  130. return;
  131. }
  132. submit("TRAER00819");
  133. var srchLength1 = model.instances(0).selectNodes( "/root/main/pidlist1/mainpidlist" ).length;
  134. if ( srchLength1 > 0 ) {
  135. // Grid Background Color Clear
  136. for ( var i = 1; i <= srchLength1; i++ ) {
  137. grd_pidlist.rowstyle( i , "data" , "background-color" ) = "#ffffff";
  138. }
  139. for ( var i = 1; i <= srchLength1; i++ ) {
  140. var emrinpat = model.getValue("/root/main/pidlist1/mainpidlist[" + i + "]/emrinpat");
  141. if (getUserInfo("jobkindcd") == "0330" || getUserInfo("jobkindcd") == "0332") {
  142. if ( emrinpat== "N3" ) { // 의사의 내환자일 경우 색깔로 표시
  143. grd_pidlist.rowstyle( i , "data" , "background-color" ) = "#b9e5fb";
  144. }
  145. } else {
  146. if ( emrinpat== "N4" ) { // 간호사의 내환자 일경우 색깔로 표시
  147. grd_pidlist.rowstyle( i , "data" , "background-color" ) = "#b9e5fb";
  148. }
  149. }
  150. }
  151. }
  152. }
  153. function fSendPidList(grdobj){
  154. // alert("1");
  155. if ( grdobj.row >= grdobj.fixedRows ) {
  156. var row = grdobj.row;
  157. var pid = model.getValue("/root/main/pidlist1/mainpidlist[" + row + "]/pid");
  158. var patnm = model.getValue("/root/main/pidlist1/mainpidlist[" + row + "]/patnm");
  159. var juminno = model.getValue("/root/main/pidlist1/mainpidlist[" + row + "]/juminno");
  160. //var warcd = model.getValue("/root/main/pidlist1/mainpidlist[" + row + "]/wardcd");
  161. window.opener.model.setValue("/root/send/data/singdata/srchpid", pid);
  162. window.opener.model.makeValue("/root/main/patinfo/patinfolist/hngnm", patnm);
  163. window.opener.model.makeValue("/root/main/patinfo/patinfolist/rrgstno1", juminno);
  164. //if ( warcd != "" )
  165. // window.opener.model.setValue("/root/send/data/singdata/wardcd", wardcd);
  166. window.opener.model.refresh();
  167. window.opener.javaScript.btn_srch.dispatch("DOMActivate");
  168. // searchChart("/root/hidden/temp")
  169. }
  170. }
  171. /* @group : 결과조회
  172. * @ver : 2007.06.14
  173. * @by : 장준원
  174. * @-----------------------------------
  175. * @type : function
  176. * @access : public
  177. * @desc : 주치의정보 조회를 위한 Function
  178. */
  179. function fChngSrchDrId() {
  180. if ( model.getValue("/root/send/deptcd") == "" ) return;
  181. // model.resetInstanceNode("/root/init/cmb_orddr/initexecorddr");
  182. // submit("TRAER00804");
  183. mmbfGetUserComboList("/root/send/reqdata", "/root/init/userlist" , model.getValue("/root/send/deptcd"), "0330", "", "M");
  184. mmbfGetUserComboList("/root/send/reqdata", "/root/init/userlist2", model.getValue("/root/send/deptcd"), "0330", "", "A");
  185. addComboInstance("/root/init/userlist", "userid^usernm", "^--전체--", "usercombo"); //의사콤보 전체항목 추가
  186. addComboInstance("/root/init/userlist2", "userid^usernm", "^--전체--", "usercombo");//의사콤보 전체항목 추가
  187. }
  188. /* @group : 결과조회
  189. * @ver : 2007.06.14
  190. * @by : 장준원
  191. * @-----------------------------------
  192. * @type : function
  193. * @access : public
  194. * @desc : 병실정보 조회를 위한 Function
  195. */
  196. function fChngSrchRoomCd() {
  197. if ( model.getValue("/root/send/wardcd") == "" ) return;
  198. model.resetInstanceNode("/root/init/cmb_room/initexecroom");
  199. submit("TRAER00802");
  200. }
  201. /* @group : 결과조회
  202. * @ver : 2007.06.14
  203. * @by : 장준원
  204. * @-----------------------------------
  205. * @type : function
  206. * @access : public
  207. * @desc : 병동조회
  208. */
  209. function fChkButton() {
  210. var flag = model.getValue("/root/send/flag");
  211. if (flag == "1") {
  212. cmb_wardcd.disabled = false;
  213. combo4.disabled = false;
  214. } else {
  215. cmb_wardcd.disabled = true;
  216. combo4.disabled = true;
  217. model.setValue("/root/send/wardcd", "");
  218. model.setValue("/root/send/roomcd", "");
  219. }
  220. model.refresh();
  221. }
  222. ]]>
  223. </script>
  224. </xhtml:head>
  225. <xhtml:body overflow="hidden" pagewidth="410" pageheight="650" guideline="1,440;1,410;">
  226. <shape id="roundrect5" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:7px; top:0px; width:398px; height:105px; background-color:#fffbf2; border-color:#ffd799; "/>
  227. <button id="btn_sea" class="btn1_letter2" style="left:340px; top:35px; width:56px; height:22px; ">
  228. <caption>조회</caption>
  229. <script type="javascript" ev:event="DOMActivate">
  230. <![CDATA[
  231. model.makeValue("/root/send/flag", radio1.value);
  232. fGetPatList();
  233. window.modelesstopmost = true;
  234. ]]>
  235. </script>
  236. </button>
  237. <datagrid id="grd_pidlist" nodeset="/root/main/pidlist1/mainpidlist" autoresize="true" caption="등록번호^이름^S/A^구분^병동^병실^주민번호^대상자구분" colsep="^" colwidth="70, 59, 36, 33, 71, 56, 63, 0" dataheight="23" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheight="23" rowsep="|" tooltip="true" style="left:6px; top:112px; width:399px; height:533px; ">
  238. <col ref="pid" style="text-align:center; "/>
  239. <col ref="patnm" style="font-weight:bold; "/>
  240. <col ref="sna" style="text-align:center; "/>
  241. <col ref="flag"/>
  242. <col disabled="true" ref="wardcd" type="combo" style="text-align:left; ">
  243. <choices>
  244. <itemset nodeset="/root/init/cmb_ward/initexecward">
  245. <label ref="execwardcdnm"/>
  246. <value ref="execwardcdid"/>
  247. </itemset>
  248. </choices>
  249. </col>
  250. <col ref="roomcd" style="text-align:left; "/>
  251. <col ref="juminno" style="text-align:center; "/>
  252. <col ref="emrinpat" visibility="hidden"/>
  253. <script type="javascript" ev:event="onaftersort">
  254. <![CDATA[
  255. grd_pidlist.gridToInstance();
  256. ]]>
  257. </script>
  258. <script type="javascript" ev:event="ondblclick">
  259. <![CDATA[
  260. if ( (grd_pidlist.row >= grd_pidlist.fixedRows) && (grd_pidlist.isCell(event.target))) {
  261. fSendPidList(grd_pidlist);
  262. }
  263. ]]>
  264. </script>
  265. </datagrid>
  266. <select1 id="cmb_flag" ref="/root/send/flag" class="combo_search" visibility="hidden" appearance="minimal" style="left:350px; top:10px; width:30px; height:19px; ">
  267. <choices>
  268. <item>
  269. <label>--전체--</label>
  270. <value>0</value>
  271. </item>
  272. <item>
  273. <label>입원</label>
  274. <value>1</value>
  275. </item>
  276. <item>
  277. <label>외래</label>
  278. <value>2</value>
  279. </item>
  280. <item>
  281. <label>응급</label>
  282. <value>3</value>
  283. </item>
  284. </choices>
  285. <script type="javascript" ev:event="xforms-value-changed">
  286. <![CDATA[
  287. btn_sea.dispatch("DOMActivate");
  288. window.modelesstopmost = true;
  289. ]]>
  290. </script>
  291. </select1>
  292. <line id="line1" class="line_1" style="x1:7px; y1:107px; x2:405px; y2:107px; "/>
  293. <caption id="caption3" class="search_name" style="left:8px; top:11px; width:80px; height:17px; ">조회기준</caption>
  294. <caption id="caption1" class="search_name" style="left:8px; top:36px; width:70px; height:17px; ">진료과</caption>
  295. <select1 id="combo1" ref="/root/send/deptcd" class="combo_search" appearance="minimal" style="left:86px; top:35px; width:84px; height:19px; ">
  296. <choices>
  297. <itemset nodeset="/root/init/cmb_orddept/initexecorddept">
  298. <label ref="execorddeptcdnm"/>
  299. <value ref="execorddeptcdid"/>
  300. </itemset>
  301. </choices>
  302. <script type="javascript" ev:event="xforms-value-changed">
  303. <![CDATA[
  304. fChngSrchDrId();
  305. // btn_sea.dispatch("DOMActivate");
  306. window.modelesstopmost = true;
  307. ]]>
  308. </script>
  309. </select1>
  310. <caption id="caption4" class="search_name" style="left:8px; top:56px; width:67px; height:17px; ">주치의</caption>
  311. <select1 id="combo2" ref="/root/send/drid" class="combo_search" appearance="minimal" style="left:86px; top:55px; width:84px; height:19px; ">
  312. <choices>
  313. <itemset nodeset="/root/init/userlist/usercombo">
  314. <label ref="usernm"/>
  315. <value ref="userid"/>
  316. </itemset>
  317. </choices>
  318. <script type="javascript" ev:event="xforms-value-changed">
  319. <![CDATA[
  320. btn_sea.dispatch("DOMActivate");
  321. window.modelesstopmost = true;
  322. ]]>
  323. </script>
  324. </select1>
  325. <caption id="caption5" class="search_name" style="left:8px; top:80px; width:86px; height:17px; ">병동</caption>
  326. <select1 id="cmb_wardcd" ref="/root/send/wardcd" class="combo_search" appearance="minimal" style="left:86px; top:79px; width:84px; height:19px; ">
  327. <choices>
  328. <itemset nodeset="/root/init/cmb_ward/initexecward">
  329. <label ref="execwardcdnm"/>
  330. <value ref="execwardcdid"/>
  331. </itemset>
  332. </choices>
  333. <script type="javascript" ev:event="xforms-value-changed">
  334. <![CDATA[
  335. fChngSrchRoomCd();
  336. if(isNull(model.getValue("/root/send/wardcd")) == true) {
  337. model.setValue("/root/send/roomcd", "");
  338. } else {
  339. model.setValue("/root/send/flag", "1");
  340. }
  341. btn_sea.dispatch("DOMActivate");
  342. window.modelesstopmost = true;
  343. ]]>
  344. </script>
  345. </select1>
  346. <select1 id="combo4" ref="/root/send/roomcd" class="combo_search" appearance="minimal" style="left:175px; top:80px; width:84px; height:19px; ">
  347. <choices>
  348. <itemset nodeset="/root/init/cmb_room/initexecroom">
  349. <label ref="execroomcdnm"/>
  350. <value ref="execroomcdid"/>
  351. </itemset>
  352. </choices>
  353. <script type="javascript" ev:event="xforms-value-changed">
  354. <![CDATA[
  355. btn_sea.dispatch("DOMActivate");
  356. window.modelesstopmost = true;
  357. ]]>
  358. </script>
  359. </select1>
  360. <select id="chk_DailyResult" ref="/root/send/dailyyn" overflow="visible" appearance="full" style="left:275px; top:10px; width:70px; height:20px; border-style:none; ">
  361. <choices>
  362. <item>
  363. <label>당일결과</label>
  364. <value>Y</value>
  365. </item>
  366. </choices>
  367. <script type="javascript" ev:event="onclick">
  368. <![CDATA[
  369. var dailyyn = model.getValue("/root/send/dailyyn")
  370. if (dailyyn == "Y") {
  371. btn_mypat.visible = false;
  372. } else {
  373. btn_mypat.visible = true;
  374. }
  375. ]]>
  376. </script>
  377. </select>
  378. <select1 id="combo5" ref="/root/send/actdrid" class="combo_search" appearance="minimal" style="left:240px; top:55px; width:84px; height:19px; ">
  379. <choices>
  380. <itemset nodeset="/root/init/userlist2/usercombo">
  381. <label ref="usernm"/>
  382. <value ref="userid"/>
  383. </itemset>
  384. </choices>
  385. <script type="javascript" ev:event="xforms-value-changed">
  386. <![CDATA[
  387. btn_sea.dispatch("DOMActivate");
  388. window.modelesstopmost = true;
  389. ]]>
  390. </script>
  391. </select1>
  392. <select1 id="radio1" ref="/root/send/flag" appearance="full" cols="4" overflow="visible" style="left:85px; top:10px; width:185px; height:20px; border-style:none; ">
  393. <choices>
  394. <item>
  395. <label>전체</label>
  396. <value>0</value>
  397. </item>
  398. <item>
  399. <label>입원</label>
  400. <value>1</value>
  401. </item>
  402. <item>
  403. <label>외래</label>
  404. <value>2</value>
  405. </item>
  406. <item>
  407. <label>응급</label>
  408. <value>3</value>
  409. </item>
  410. </choices>
  411. <script type="javascript" ev:event="onclick">
  412. <![CDATA[
  413. fChkButton();
  414. ]]>
  415. </script>
  416. </select1>
  417. <caption id="caption2" class="search_name" style="left:175px; top:55px; width:70px; height:17px; ">담당의</caption>
  418. <button id="btn_mypat" class="btn2_letter3" style="left:265px; top:80px; width:53px; height:19px; ">
  419. <caption>내환자</caption>
  420. <script type="javascript" ev:event="DOMActivate">
  421. <![CDATA[
  422. grd_pidlist.colsort(grd_pidlist.colRef("emrinpat")) = "desc"
  423. grd_pidlist.sort(1, 1, grd_pidlist.rows -1, grd_pidlist.cols -1) = "usersort";
  424. grd_pidlist.gridToInstance();
  425. ]]>
  426. </script>
  427. </button>
  428. </xhtml:body>
  429. </xhtml:html>