SPMMO32400_응급실의사호출Addition.xrw 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429
  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>응급실 의사호출 Addition</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <erdrcalllist>
  11. <erdrcalllist/>
  12. </erdrcalllist>
  13. <erdrinfo>
  14. <orddeptcd/>
  15. <orddrid/>
  16. <mainyn>M</mainyn>
  17. <call1/>
  18. <call2/>
  19. <call3/>
  20. <call4/>
  21. <callcnts/>
  22. <callcnts2/>
  23. <callnm/>
  24. </erdrinfo>
  25. </main>
  26. <send>
  27. <reqdata/>
  28. <savedata/>
  29. </send>
  30. <hidden/>
  31. <init>
  32. <orddept/>
  33. <userlist/>
  34. <erdeptcd/>
  35. <macaddr/>
  36. </init>
  37. </root>
  38. </instance>
  39. <script type="javascript" ev:event="xforms-ready">
  40. <![CDATA[
  41. fInitialize_SPMMO32300();
  42. ]]>
  43. </script>
  44. <submission id="TRMMB04101" mediatype="application/x-www-form-urlencoded" method="post"/>
  45. <submission id="TRMMB04102" mediatype="application/x-www-form-urlencoded" method="post"/>
  46. <script type="javascript" ev:event="xforms-model-construct-done">
  47. <![CDATA[
  48. group1.attribute("height") = 0;
  49. ]]>
  50. </script>
  51. <submission id="TRMMO32301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/erdrcalllist"/>
  52. <submission id="TRMMB04103" mediatype="application/x-www-form-urlencoded" method="post"/>
  53. <submission id="TXMMO32301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/main/erdrcalllist"/>
  54. <submission id="TXMMO32303" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/main/erdrcalllist"/>
  55. </model>
  56. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  57. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  58. <script type="javascript" src="../../../emr/prcpmngtweb/js/MMO001.js"/>
  59. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  60. <script type="javascript">
  61. <![CDATA[
  62. var sERDRCALLLIST_PATH = "/root/main/erdrcalllist/erdrcalllist"
  63. /**
  64. * @desc : 초기화
  65. * @
  66. * @param :
  67. * @return :
  68. * @author :
  69. * @---------------------------------------------------
  70. */
  71. function fInitialize_SPMMO32300() {
  72. mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/orddept", "D");
  73. mmbfGetUserComboList("/root/send/reqdata", "/root/init/userlist" , getUserInfo("dutplcecd"), "0330");
  74. mmbfGetHardCodeInfo("/root/send/reqdata" , "/root/init/erdeptcd" , 1);
  75. mmbfGetHardCodeInfo("/root/send/reqdata" , "/root/init/macaddr" , 46);
  76. fReqCallDrList() ;
  77. }
  78. /**
  79. * @desc : 조회
  80. * @
  81. * @param :
  82. * @return :
  83. * @author :
  84. * @---------------------------------------------------
  85. */
  86. function fReqCallDrList() {
  87. var param = opener.javascript.getParameter("SPMMO32400_param");
  88. gPARAM = param.split("▦");
  89. model.removeNodeset("/root/send/reqdata");
  90. model.makeValue("/root/send/reqdata/pid" , gPARAM[0]);
  91. model.makeValue("/root/send/reqdata/indd" , gPARAM[1]);
  92. model.makeValue("/root/send/reqdata/cretno" , gPARAM[2]);
  93. model.makeValue("/root/send/reqdata/visitno" , gPARAM[3]);
  94. if (submit("TRMMO32301") == true) {
  95. }
  96. }
  97. /**
  98. * @desc : 삭제
  99. * @
  100. * @param :
  101. * @return :
  102. * @author :
  103. * @---------------------------------------------------
  104. */
  105. function fDelERCallInfo(){
  106. var currow = grd_erdrcalllist.row;
  107. if(currow < 1){
  108. return;
  109. }
  110. if (grd_erdrcalllist.rows >2) {
  111. if (grd_erdrcalllist.row ==1 ) {
  112. messageBox("부유형이 있을때 주 유형은 삭제할수", "I004");
  113. return;
  114. }
  115. }
  116. for (i = grd_erdrcalllist.selectedRow(0) ; i < grd_erdrcalllist.selectedRows + grd_erdrcalllist.selectedRow(0); i++ ) {
  117. var status = model.getValue(sERDRCALLLIST_PATH + "[" + i + "]/status");
  118. if(status == "i"){
  119. grd_erdrcalllist.deleteRow(i);
  120. }else{
  121. model.setValue(sERDRCALLLIST_PATH + "[" + i + "]/status", "d");
  122. }
  123. }
  124. /*
  125. //호출한 사람 +응급의학과만 삭제할 수 있도록 로직 추가
  126. var callpsnid = model.getValue(sERDRCALLLIST_PATH + "[" + currow + "]/callpsnid");
  127. var userid = getUserId()
  128. var erdeptcd = model.getValue("/root/init/erdeptcd/hardcd/hardcd");
  129. if(callpsnid == userid || getUserInfo("dutplcecd") == erdeptcd) {
  130. var savedata = getNodeListCSV(instance1.selectNodes(sERDRCALLLIST_PATH));
  131. model.setValue("/root/send/savedata", savedata);
  132. if(submit("TXMMO32301")){
  133. fReConCPhone();
  134. }
  135. } else {
  136. messageBox("호출한 사람과", "E004");
  137. }
  138. */
  139. model.refresh();
  140. }
  141. /**
  142. * @desc : 주/부 유형 클릭
  143. * @
  144. * @param :
  145. * @return :
  146. * @author :
  147. * @---------------------------------------------------
  148. */
  149. function fClkColMainYN(){
  150. var currow = grd_erdrcalllist.row;
  151. var curcol = grd_erdrcalllist.col;
  152. var status = model.getValue(sERDRCALLLIST_PATH + "[" + currow + "]/status");
  153. if(curcol == grd_erdrcalllist.colRef("mainyn")){ //주부유형 클릭한 경우
  154. if(status == "i" || status == "d"){ //신규, 삭제가 아닌 경우
  155. return;
  156. }else{
  157. model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/status", "u");
  158. }
  159. }
  160. model.refresh();
  161. }
  162. /**
  163. * @desc : 저장
  164. * @
  165. * @param :
  166. * @return :
  167. * @author :
  168. * @---------------------------------------------------
  169. */
  170. function fSaveERCallInfo(){
  171. var statusCnts = 0;
  172. for (i = 1; i < grd_erdrcalllist.rows; i++ ) {
  173. var status = model.getValue(sERDRCALLLIST_PATH + "[" + i + "]/status");
  174. if (status != "-") {
  175. statusCnts ++
  176. }
  177. }
  178. if (statusCnts < 1) {
  179. messageBox("변경된 정보가 없습니다", "I");
  180. return;
  181. }
  182. var savedata = getNodeListCSV(instance1.selectNodes(sERDRCALLLIST_PATH));
  183. model.setValue("/root/send/savedata", savedata);
  184. if(submit("TXMMO32301")){
  185. }
  186. }
  187. /**
  188. * @desc : 추가버튼 클릭
  189. * @
  190. * @param :
  191. * @return :
  192. * @author :
  193. * @---------------------------------------------------
  194. */
  195. function fClkBtnAdd(){
  196. if ( grd_erdrcalllist.rows <= 1 ) {
  197. messageBox("호출내역이 있을 경우에만 추가할 수 있습니다.", "I");
  198. return;
  199. }
  200. model.resetInstanceNode("/root/main/erdrinfo");
  201. group1.attribute("height")=95;
  202. model.setFocus("cmb_orddeptcd");
  203. model.refresh();
  204. }
  205. /**
  206. * @desc : 취소버튼 클릭
  207. * @
  208. * @param :
  209. * @return :
  210. * @author : 오지훈
  211. * @---------------------------------------------------
  212. */
  213. function fClkBtnCncl(){
  214. group1.attribute("height")=0;
  215. model.refresh();
  216. }
  217. /**
  218. * @desc : 확인버튼 클릭
  219. * @
  220. * @param :
  221. * @return :
  222. * @author : 오지훈
  223. * @---------------------------------------------------
  224. */
  225. function fClkBtnCnfm(){
  226. var orddoct = model.getValue("/root/main/erdrinfo/orddrid"); // 담당의
  227. if (isNull(orddoct)) {
  228. messageBox("담당의를 ", "C002");
  229. return;
  230. }
  231. grd_erdrcalllist.addItem();
  232. var currow = grd_erdrcalllist.row;
  233. model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/status" , "i");
  234. model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/instcd" , getUserInfo("dutplceinstcd"));
  235. model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/pid" , gPARAM[0]);
  236. model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/indd" , gPARAM[1]);
  237. model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/cretno" , gPARAM[2]);
  238. model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/visitno" , gPARAM[3]);
  239. model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/erorddoctcd" , cmb_orddrid.value);
  240. model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/erorddeptcd" , cmb_orddeptcd.value);
  241. model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/erorddoctnm" , cmb_orddrid.label);
  242. model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/erorddeptnm" , cmb_orddeptcd.label);
  243. model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/mainyn" , "S");
  244. model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/callpsnid" , getUserInfo("userid"));
  245. model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/callpsnnm" , getUserInfo("usernm"));
  246. model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/grtype" , "-");
  247. model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/grtypenm" , "Call-Visit");
  248. group1.attribute("height")= 0;
  249. model.refresh();
  250. //저장
  251. fSaveERCallInfo();
  252. }
  253. ]]>
  254. </script>
  255. </xhtml:head>
  256. <xhtml:body pagewidth="814" pageheight="400" guideline="1,797;1,815;" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  257. <button id="btn_del" class="btn2_letter2" navindex="1" visibility="hidden" style="left:663px; top:8px; width:42px; height:19px; ">
  258. <caption>삭제</caption>
  259. <script type="javascript" ev:event="DOMActivate">
  260. <![CDATA[
  261. fDelERCallInfo();
  262. ]]>
  263. </script>
  264. </button>
  265. <line id="line5" class="line_1" style="x1:0px; y1:30px; x2:797px; y2:30px; "/>
  266. <caption id="caption2" class="tit_2" style="left:0px; top:14px; width:161px; height:14px; vertical-align:middle; ">응급실의사 호출 List</caption>
  267. <button id="btn_exit" class="btn4_letter2" navindex="3" style="left:736px; top:368px; width:56px; height:22px; ">
  268. <caption>종료</caption>
  269. <script type="javascript" ev:event="DOMActivate">
  270. <![CDATA[
  271. window.close();
  272. ]]>
  273. </script>
  274. </button>
  275. <datagrid id="grd_erdrcalllist" nodeset="/root/main/erdrcalllist/erdrcalllist" caption="상태^instcd^pid^hngnm^indd^cretno^visitno^erorddeptcd^주/부^진료과^담당의^담당의ID^Gr Type^Call 유형^호출자^호출자ID^호출시간^도착시간^등록자^등록자ID" colsep="^" colwidth="46, 0, 0, 0, 0, 0, 0, 0, 40, 100, 75, 0, 0, 100, 74, 0, 129, 127, 79, 0" mergecellsfixedrows="bycolrec" rowsep="|" navindex="5" style="left:0px; top:35px; width:797px; height:325px; ">
  276. <col disabled="true" ref="status" type="combo">
  277. <choices>
  278. <item>
  279. <label>-</label>
  280. <value/>
  281. </item>
  282. <item>
  283. <label>신규</label>
  284. <value>i</value>
  285. </item>
  286. <item>
  287. <label>수정</label>
  288. <value>u</value>
  289. </item>
  290. <item>
  291. <label>삭제</label>
  292. <value>d</value>
  293. </item>
  294. </choices>
  295. </col>
  296. <col ref="instcd" visibility="hidden"/>
  297. <col ref="pid" visibility="hidden"/>
  298. <col ref="hngnm" visibility="hidden"/>
  299. <col ref="indd" visibility="hidden"/>
  300. <col ref="cretno" visibility="hidden"/>
  301. <col ref="visitno" visibility="hidden"/>
  302. <col ref="erorddeptcd" visibility="hidden"/>
  303. <col ref="mainyn" type="combo">
  304. <choices>
  305. <item>
  306. <label>주</label>
  307. <value>M</value>
  308. </item>
  309. <item>
  310. <label>부</label>
  311. <value>S</value>
  312. </item>
  313. </choices>
  314. </col>
  315. <col ref="erorddeptnm"/>
  316. <col ref="erorddoctnm"/>
  317. <col ref="erorddoctcd" visibility="hidden"/>
  318. <col ref="grtype" visibility="hidden"/>
  319. <col ref="grtypenm"/>
  320. <col ref="callpsnnm"/>
  321. <col ref="callpsnid" visibility="hidden"/>
  322. <col ref="calldt" format="yyyy-mm-dd hh:nn:ss"/>
  323. <col ref="arrivdt" format="yyyy-mm-dd hh:nn:ss"/>
  324. <col ref="visitrgstrnm"/>
  325. <col ref="visitrgstrid" visibility="hidden"/>
  326. <script type="javascript" ev:event="xforms-value-changed">
  327. <![CDATA[
  328. fClkColMainYN();
  329. ]]>
  330. </script>
  331. </datagrid>
  332. <button id="btn_save" class="btn5_letter2" navindex="2" style="left:753px; top:8px; width:42px; height:19px; ">
  333. <caption>수정</caption>
  334. <script type="javascript" ev:event="DOMActivate">
  335. <![CDATA[
  336. fSaveERCallInfo();
  337. ]]>
  338. </script>
  339. </button>
  340. <button id="btn_add" class="btn2_letter2" navindex="1" style="left:708px; top:8px; width:42px; height:19px; ">
  341. <caption>추가</caption>
  342. <script type="javascript" ev:event="DOMActivate">
  343. <![CDATA[
  344. fClkBtnAdd();
  345. ]]>
  346. </script>
  347. </button>
  348. <group id="group1" style="left:300px; top:145px; width:205px; height:95px; background-color:#ffffff; border-color:transparent; border-style:solid; ">
  349. <caption id="caption4" class="cell_1" style="left:3px; top:22px; width:70px; height:22px; vertical-align:middle; ">진료과</caption>
  350. <button id="btn_cnfm" class="btn5_letter2" navindex="7" style="left:112px; top:69px; width:42px; height:19px; ">
  351. <caption>확인</caption>
  352. <script type="javascript" ev:event="DOMActivate">
  353. <![CDATA[
  354. fClkBtnCnfm();
  355. ]]>
  356. </script>
  357. </button>
  358. <caption id="caption5" class="tit_2" style="left:5px; top:3px; width:151px; height:14px; vertical-align:middle; ">응급실 호출의사 정보</caption>
  359. <caption id="caption3" class="cell_1" style="left:3px; top:45px; width:70px; height:20px; vertical-align:middle; ">담당의</caption>
  360. <line id="line4" class="line_1" style="x1:3px; y1:17px; x2:198px; y2:17px; "/>
  361. <button id="btn_cncl" class="btn2_letter2" navindex="8" style="left:156px; top:69px; width:42px; height:19px; ">
  362. <caption>취소</caption>
  363. <script type="javascript" ev:event="DOMActivate">
  364. <![CDATA[
  365. fClkBtnCncl();
  366. ]]>
  367. </script>
  368. </button>
  369. <select1 id="cmb_orddeptcd" ref="/root/main/erdrinfo/orddeptcd" navindex="4" appearance="minimal" style="left:74px; top:24px; width:124px; height:19px; ">
  370. <choices>
  371. <itemset nodeset="/root/init/orddept/dept">
  372. <label ref="depthngnm"/>
  373. <value ref="deptcd"/>
  374. </itemset>
  375. </choices>
  376. <script type="javascript" ev:event="xforms-value-changed">
  377. <![CDATA[
  378. mmbfGetUserComboList("/root/send/reqdata", "/root/init/userlist", cmb_orddeptcd.value, "0330");
  379. model.refresh();
  380. ]]>
  381. </script>
  382. </select1>
  383. <select1 id="cmb_orddrid" ref="/root/main/erdrinfo/orddrid" navindex="5" appearance="minimal" style="left:74px; top:44px; width:124px; height:19px; ">
  384. <choices>
  385. <itemset nodeset="/root/init/userlist/usercombo">
  386. <label ref="usernm"/>
  387. <value ref="userid"/>
  388. </itemset>
  389. </choices>
  390. <script type="javascript" ev:event="xforms-value-changed">
  391. <![CDATA[
  392. var orddrid = model.getValue(sERDRCALLLIST_PATH + "[erorddoctcd='" + cmb_orddrid.value + "']/erorddoctcd");
  393. if(orddrid != ""){
  394. messageBox("[" + cmb_orddrid.label + "]은(는) 이미 호출한 의사", "E008");
  395. model.setValue("/root/main/erdrinfo/orddrid", "");
  396. return;
  397. }
  398. ]]>
  399. </script>
  400. </select1>
  401. </group>
  402. </xhtml:body>
  403. </xhtml:html>