SPADC61800_약품식별의뢰.xrw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  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>Untitle</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <patinfo>
  11. <pid/>
  12. <sna/>
  13. <hngnm/>
  14. <roomcd/>
  15. <reqdeptnm/>
  16. <requsernm/>
  17. <prcpflag/>
  18. <recvdeptnm/>
  19. <recvusernm/>
  20. </patinfo>
  21. <cnstinfo>
  22. <cnstkind>5</cnstkind>
  23. <cnstseqno/>
  24. <cretno/>
  25. <formrecseq/>
  26. <formcd>0000000768</formcd>
  27. <cnststat/>
  28. <reqdd/>
  29. <reqhm/>
  30. <chosflag/>
  31. <orddd/>
  32. <eryn>N</eryn>
  33. <reqdeptcd/>
  34. <requserid/>
  35. <cnstcnts1/>
  36. <cnstcnts2/>
  37. <cnstcnts3/>
  38. <cnstcnts4/>
  39. <cnstcnts5/>
  40. <cnstcnts6/>
  41. <cnstcnts7>1</cnstcnts7>
  42. <cnstcnts18/>
  43. <cnstflag>3</cnstflag>
  44. <recvdeptcd>3240000000</recvdeptcd>
  45. </cnstinfo>
  46. </main>
  47. <send>
  48. <srchinfo/>
  49. </send>
  50. <hidden>
  51. <item>
  52. <count/>
  53. </item>
  54. <cnststatinfo>
  55. <cnststat/>
  56. </cnststatinfo>
  57. </hidden>
  58. <paminfo>
  59. </paminfo>
  60. <temp>
  61. <cnstinfo/>
  62. </temp>
  63. </root>
  64. </instance>
  65. <script type="javascript">
  66. <![CDATA[
  67. function finit(){
  68. if(fCnstType()){
  69. model.toggle("case2");
  70. model.toggle("case4");
  71. fSetPatinfo();
  72. //btn_cnst.disabled = true;
  73. }else{
  74. model.toggle("case1");
  75. var pamInfoCvs = getGlobalVariable("paminfo");
  76. if(!isNull(pamInfoCvs)){ //cvs가 null이 아닌 경우에만 처리함.
  77. model.removeNodeSet ( "/root/paminfo/list" ); //상단화면 정보 초기화
  78. setCSVToNode ( "/root/paminfo", pamInfoCvs );
  79. model.setValue("/root/main/patinfo/pid",model.getValue("/root/paminfo/list/pid"));
  80. var sna = model.getValue("/root/paminfo/list/sex") +"/"+ model.getValue("/root/paminfo/list/age");
  81. model.setValue("/root/main/patinfo/sna", sna);
  82. model.setValue("/root/main/patinfo/hngnm", model.getValue("/root/paminfo/list/hngnm"));
  83. model.setValue("/root/main/patinfo/roomcd", model.getValue("/root/paminfo/list/roomcd"));
  84. model.setValue("/root/main/patinfo/reqdeptnm", getUserInfo("dutplcenm"));
  85. model.setValue("/root/main/cnstinfo/reqdeptcd", getUserInfo("dutplcecd"));
  86. model.setValue("/root/main/patinfo/requsernm", getUserName());
  87. model.setValue("/root/main/cnstinfo/requserid", getUserId());
  88. var prcpflag ="";
  89. var ioflag = model.getValue("/root/paminfo/list/ioflag");
  90. if(ioflag == "O" || ioflag == "S"){
  91. prcpflag = "외래";
  92. model.setValue("/root/main/cnstinfo/orddd", model.getValue("/root/paminfo/list/orddd"));
  93. }else {
  94. prcpflag = "입원";
  95. model.setValue("/root/main/cnstinfo/orddd", model.getValue("/root/paminfo/list/indd"));
  96. }
  97. if(model.getValue("/root/paminfo/list/fsexamflag") == "F"){
  98. prcpflag += "/초진";
  99. }else if(model.getValue("/root/paminfo/list/fsexamflag") =="R"){
  100. prcpflag += "/재진";
  101. }
  102. model.setValue("/root/main/patinfo/prcpflag", prcpflag);
  103. model.setValue("/root/main/cnstinfo/chosflag", model.getValue("/root/paminfo/list/ioflag"));
  104. model.setValue("/root/main/cnstinfo/cretno", model.getValue("/root/paminfo/list/cretno"));
  105. }else{
  106. var msg = messageBox("환자를 ", "C002");
  107. return false;
  108. }
  109. }
  110. model.refresh();
  111. }
  112. function fCnstType(){
  113. if(model.getValue("/root/temp/cnstinfo/formrecseq") == ""){
  114. return false;
  115. }else return true;
  116. }
  117. function fSetPatinfo(){
  118. model.setValue("/root/main/patinfo/pid", model.getValue("/root/temp/cnstinfo/pid"));
  119. model.setValue("/root/main/patinfo/hngnm", model.getValue("/root/temp/cnstinfo/pidnm"));
  120. model.setValue("/root/main/patinfo/reqdeptnm", model.getValue("/root/temp/cnstinfo/reqdeptnm"));
  121. model.setValue("/root/main/patinfo/requsernm", model.getValue("/root/temp/cnstinfo/requsernm"));
  122. model.setValue("/root/main/patinfo/recvdeptnm", model.getValue("/root/temp/cnstinfo/recvdeptnm"));
  123. model.setValue("/root/main/patinfo/recvusernm", model.getValue("/root/temp/cnstinfo/recvusernm"));
  124. model.copyNode("/root/send/srchinfo", "/root/temp/cnstinfo");
  125. submit("TRADC61701");
  126. if(model.getValue("/root/main/cnstinfo/cnststat") >= 20) {
  127. btn_cnstcancel.visible = false;
  128. btn_cnstcancel.refresh();
  129. }
  130. }
  131. // 현재시간 구하기 : 시간 분
  132. function astgetCurrentTime()
  133. {
  134. var sDate = getNewDate();
  135. rtnTime = (( sDate.getHours() > 9 ) ? sDate.getHours() : "0" + sDate.getHours());
  136. rtnTime = rtnTime.toString() + (( sDate.getMinutes() > 9 ) ? sDate.getMinutes() : "0" + sDate.getMinutes());
  137. return rtnTime;
  138. }
  139. function fSaveCnst(){
  140. if(model.getValue("/root/main/patinfo/pid") != ""){
  141. model.makeNode("/root/main/cnstinfo/pid");
  142. model.setValue("/root/main/cnstinfo/pid", model.getValue("/root/main/patinfo/pid"));
  143. submit("TXADC61701");
  144. model.refresh();
  145. }
  146. }
  147. ]]>
  148. </script>
  149. <script type="javascript" ev:event="xforms-ready">
  150. <![CDATA[
  151. finit();
  152. ]]>
  153. </script>
  154. <submission id="TXADC61701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/cnstinfo" replace="instance" resultref="/root/hidden"/>
  155. <submission id="TRADC61701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchinfo" replace="instance" resultref="/root/main"/>
  156. <submission id="TXADC61702" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchinfo" replace="instance" resultref="/root/hidden"/>
  157. <submission id="TRADC62202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/cnstinfo" replace="instance" resultref="/root/hidden/cnststatinfo"/>
  158. </model>
  159. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  160. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  161. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  162. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  163. </xhtml:head>
  164. <xhtml:body pagewidth="490" pageheight="370" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  165. <group id="group1" style="left:0px; top:0px; width:470px; height:330px; ">
  166. <line id="line1" class="line_1" style="x1:0px; y1:135px; x2:470px; y2:135px; "/>
  167. <caption id="caption1" class="tit_2" style="left:5px; top:120px; width:105px; height:13px; ">의뢰관련정보</caption>
  168. <caption id="caption2" class="cell_1" style="left:0px; top:140px; width:100px; height:23px; ">처방의원</caption>
  169. <caption id="caption3" class="cell_1" style="left:0px; top:165px; width:100px; height:23px; ">조제약국</caption>
  170. <caption id="caption4" class="cell_1" style="left:250px; top:140px; width:100px; height:23px; ">처방의원 연락처</caption>
  171. <caption id="caption5" class="cell_1" style="left:250px; top:165px; width:100px; height:23px; ">조제약국 연락처</caption>
  172. <caption id="caption6" class="cell_1" style="left:0px; top:190px; width:100px; height:23px; ">약 복용 이유</caption>
  173. <caption id="caption7" class="cell_1" style="left:0px; top:215px; width:100px; height:23px; ">식별 의뢰 이유</caption>
  174. <caption id="caption8" class="cell_1" style="left:0px; top:303px; width:100px; height:23px; ">식별약 반송</caption>
  175. <line id="line2" class="line_2" style="x1:0px; y1:163px; x2:470px; y2:163px; "/>
  176. <line id="line3" class="line_2" style="x1:0px; y1:188px; x2:470px; y2:188px; "/>
  177. <line id="line4" class="line_2" style="x1:0px; y1:213px; x2:470px; y2:213px; "/>
  178. <line id="line5" class="line_2" style="x1:0px; y1:300px; x2:470px; y2:300px; "/>
  179. <line id="line6" class="line_6" style="x1:0px; y1:325px; x2:470px; y2:325px; "/>
  180. <input id="ipt_cnstcnts1" ref="/root/main/cnstinfo/cnstcnts1" maxlength="33" style="left:105px; top:144px; width:140px; height:19px; ">
  181. <script type="javascript" ev:event="onmaxlength">
  182. <![CDATA[
  183. messageBox("입력가능한 글자수를", "E003");
  184. ]]>
  185. </script>
  186. </input>
  187. <input id="ipt_cnstcnts2" ref="/root/main/cnstinfo/cnstcnts2" maxlength="33" style="left:355px; top:144px; width:115px; height:19px; ">
  188. <script type="javascript" ev:event="onmaxlength">
  189. <![CDATA[
  190. messageBox("입력가능한 글자수를", "E003");
  191. ]]>
  192. </script>
  193. </input>
  194. <input id="ipt_cnstcnts3" ref="/root/main/cnstinfo/cnstcnts3" maxlength="33" style="left:105px; top:169px; width:140px; height:19px; ">
  195. <script type="javascript" ev:event="onmaxlength">
  196. <![CDATA[
  197. messageBox("입력가능한 글자수를", "E003");
  198. ]]>
  199. </script>
  200. </input>
  201. <input id="ipt_cnstcnts4" ref="/root/main/cnstinfo/cnstcnts4" maxlength="33" style="left:355px; top:169px; width:115px; height:19px; ">
  202. <script type="javascript" ev:event="onmaxlength">
  203. <![CDATA[
  204. messageBox("입력가능한 글자수를", "E003");
  205. ]]>
  206. </script>
  207. </input>
  208. <input id="ipt_cnstcnts5" ref="/root/main/cnstinfo/cnstcnts5" maxlength="33" style="left:105px; top:194px; width:365px; height:19px; ">
  209. <script type="javascript" ev:event="onmaxlength">
  210. <![CDATA[
  211. messageBox("입력가능한 글자수를", "E003");
  212. ]]>
  213. </script>
  214. </input>
  215. <select id="chk_cnstcnts6" ref="/root/main/cnstinfo/cnstcnts6" overflow="visible" appearance="full" cols="1" rows="4" style="left:105px; top:215px; width:365px; height:85px; border-style:none; ">
  216. <choices>
  217. <item>
  218. <label>외부에서 복용하던 약을 본원에서 처방하기 위함</label>
  219. <value>1</value>
  220. </item>
  221. <item>
  222. <label>본원에서 처방한 약과 중복 또는 상호작용이 있는지 확인</label>
  223. <value>2</value>
  224. </item>
  225. <item>
  226. <label>복용하던 약으로 인한 부작용 발현</label>
  227. <value>3</value>
  228. </item>
  229. <item>
  230. <label>수술전 혈액응고 저해제의 복용여부 확인</label>
  231. <value>4</value>
  232. </item>
  233. <item>
  234. <label>기타</label>
  235. <value>5</value>
  236. </item>
  237. </choices>
  238. <script type="javascript" ev:event="xforms-select">
  239. <![CDATA[
  240. if(isSearchString(chk_cnstcnts6.value, 5)){
  241. ipt_cnstcnts7.attribute("editable") = "true";
  242. }
  243. ]]>
  244. </script>
  245. <script type="javascript" ev:event="xforms-deselect">
  246. <![CDATA[
  247. if(isSearchString(chk_cnstcnts6.value, 5)){
  248. ipt_cnstcnts7.attribute("editable") = "true";
  249. }else{
  250. ipt_cnstcnts7.value = "";
  251. ipt_cnstcnts7.attribute("editable") = "false";
  252. }
  253. ]]>
  254. </script>
  255. </select>
  256. <input id="ipt_cnstcnts7" ref="/root/main/cnstinfo/cnstcnts18" editable="false" maxlength="33" style="left:156px; top:279px; width:314px; height:19px; ">
  257. <script type="javascript" ev:event="onmaxlength">
  258. <![CDATA[
  259. messageBox("입력가능한 글자수를", "E003");
  260. ]]>
  261. </script>
  262. </input>
  263. <select1 id="rdo_cnstcnts8" ref="/root/main/cnstinfo/cnstcnts7" appearance="full" cols="2" rows="1" overflow="visible" style="left:105px; top:305px; width:120px; height:20px; border-style:none; ">
  264. <choices>
  265. <item>
  266. <label>반송</label>
  267. <value>1</value>
  268. </item>
  269. <item>
  270. <label>반송안함</label>
  271. <value>2</value>
  272. </item>
  273. </choices>
  274. </select1>
  275. <switch id="switch1" class="sw_no_border" style="left:0px; top:0px; width:470px; height:120px; ">
  276. <case id="case1" selected="true">
  277. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:0px; top:0px; width:470px; height:115px; "/>
  278. <output id="output1" ref="/root/main/patinfo/sna" class="output_search" style="left:350px; top:35px; width:110px; height:19px; "/>
  279. <output id="output2" ref="/root/main/patinfo/requsernm" class="output_search" style="left:105px; top:85px; width:110px; height:19px; "/>
  280. <output id="output3" ref="/root/main/patinfo/hngnm" class="output_search" style="left:350px; top:60px; width:110px; height:19px; "/>
  281. <caption id="caption9" class="search_name" style="left:10px; top:35px; width:90px; height:17px; ">병실 :</caption>
  282. <output id="output4" ref="/root/main/patinfo/pid" class="output_search" style="left:350px; top:10px; width:110px; height:19px; "/>
  283. <caption id="caption10" class="search_name" style="left:10px; top:60px; width:90px; height:17px; ">진료과 :</caption>
  284. <caption id="caption11" class="search_name" style="left:10px; top:85px; width:90px; height:17px; ">처방의사 :</caption>
  285. <caption id="caption12" class="search_name" style="left:10px; top:10px; width:90px; height:17px; ">처방구분 :</caption>
  286. <output id="output5" ref="/root/main/patinfo/reqdeptnm" class="output_search" style="left:105px; top:60px; width:110px; height:19px; "/>
  287. <output id="output6" ref="/root/main/patinfo/prcpflag" class="output_search" style="left:105px; top:10px; width:110px; height:19px; "/>
  288. <output id="output7" ref="/root/main/patinfo/roomcd" class="output_search" style="left:105px; top:35px; width:110px; height:19px; "/>
  289. <caption id="caption16" class="search_name" style="left:250px; top:10px; width:90px; height:17px; ">등록번호 :</caption>
  290. <caption id="caption17" class="search_name" style="left:250px; top:35px; width:95px; height:17px; ">성별/나이 :</caption>
  291. <caption id="caption18" class="search_name" style="left:250px; top:60px; width:90px; height:17px; ">이름 :</caption>
  292. </case>
  293. <case id="case2">
  294. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:0px; top:0px; width:470px; height:115px; "/>
  295. <output id="output8" ref="/root/temp/cnstinfo/recvdeptnm" class="output_search" style="left:105px; top:60px; width:110px; height:19px; "/>
  296. <output id="output9" ref="/root/temp/cnstinfo/reqdeptnm" class="output_search" style="left:105px; top:10px; width:110px; height:19px; "/>
  297. <output id="output10" ref="/root/temp/cnstinfo/requsernm" class="output_search" style="left:105px; top:35px; width:110px; height:19px; "/>
  298. <caption id="caption13" class="search_name" style="left:10px; top:35px; width:90px; height:17px; ">의뢰자 :</caption>
  299. <caption id="caption14" class="search_name" style="left:10px; top:60px; width:90px; height:17px; ">수신부서 :</caption>
  300. <caption id="caption15" class="search_name" style="left:10px; top:85px; width:90px; height:17px; ">수신자 :</caption>
  301. <caption id="caption19" class="search_name" style="left:10px; top:10px; width:90px; height:17px; ">의뢰부서 :</caption>
  302. <output id="output11" ref="/root/temp/cnstinfo/recvusernm" class="output_search" style="left:105px; top:85px; width:110px; height:19px; "/>
  303. <output id="output12" ref="/root/temp/cnstinfo/pid" class="output_search" style="left:350px; top:10px; width:110px; height:19px; "/>
  304. <caption id="caption20" class="search_name" style="left:250px; top:10px; width:90px; height:17px; ">등록번호 :</caption>
  305. <caption id="caption21" class="search_name" style="left:250px; top:35px; width:95px; height:17px; ">이름 :</caption>
  306. <output id="output13" ref="/root/temp/cnstinfo/pidnm" class="output_search" style="left:350px; top:35px; width:110px; height:19px; "/>
  307. </case>
  308. </switch>
  309. </group>
  310. <group id="group2" style="left:0px; top:330px; width:470px; height:30px; ">
  311. <switch id="switch2" class="sw_no_border" style="left:0px; top:0px; width:470px; height:30px; ">
  312. <case id="case3" selected="true">
  313. <button id="btn_cnst" class="btn4_letter2" style="left:350px; top:5px; width:56px; height:22px; ">
  314. <caption>의뢰</caption>
  315. <script type="javascript" ev:event="DOMActivate">
  316. <![CDATA[
  317. if ( messageBox("의뢰내용을","Q002")==6 ){
  318. model.setValue("/root/main/cnstinfo/cnststat", "12");
  319. model.setValue("/root/main/cnstinfo/reqdd", getCurrentDate());
  320. model.setValue("/root/main/cnstinfo/reqhm", astgetCurrentTime());
  321. fSaveCnst();
  322. model.close();
  323. }
  324. ]]>
  325. </script>
  326. </button>
  327. <button id="btn_cancel" class="btn4_letter2" style="left:410px; top:5px; width:56px; height:22px; ">
  328. <caption>닫기</caption>
  329. <script type="javascript" ev:event="DOMActivate">
  330. <![CDATA[
  331. model.close();
  332. ]]>
  333. </script>
  334. </button>
  335. <button id="button6" class="btn4_letter2" visibility="hidden" style="left:110px; top:5px; width:56px; height:22px; ">
  336. <caption>저장</caption>
  337. <script type="javascript" ev:event="DOMActivate">
  338. <![CDATA[
  339. model.setValue("/root/main/cnstinfo/cnststat", "11");
  340. fSaveCnst();
  341. ]]>
  342. </script>
  343. </button>
  344. </case>
  345. <case id="case4">
  346. <button id="btn_cnstcancel" class="btn4_letter4" style="left:327px; top:5px; width:80px; height:22px; ">
  347. <caption>의뢰취소</caption>
  348. <script type="javascript" ev:event="DOMActivate">
  349. <![CDATA[
  350. if(submit("TRADC62202")){
  351. var cnststat = model.getValue("/root/hidden/cnststatinfo/cnststat");
  352. if(cnststat == "22"){
  353. messageBox("[회신] 의뢰를 취소할 수","I004");
  354. }else if(cnststat == "21"){
  355. messageBox("[임시회신] 의뢰를 취소할 수","I004");
  356. }else if(cnststat == "20"){
  357. messageBox("[의뢰확정] 의뢰를 취소할 수","I004");
  358. }else if(messageBox("의뢰를","Q007") == 6){
  359. model.setValue("/root/send/srchinfo/cnststat", "04");
  360. if(submit("TXADC61702")){
  361. messageBox("요청하신 작업이","I001");
  362. window.close();
  363. }
  364. }
  365. }
  366. ]]>
  367. </script>
  368. </button>
  369. <button id="btn_cancel1" class="btn4_letter2" style="left:410px; top:5px; width:56px; height:22px; ">
  370. <caption>닫기</caption>
  371. <script type="javascript" ev:event="DOMActivate">
  372. <![CDATA[
  373. model.close();
  374. ]]>
  375. </script>
  376. </button>
  377. </case>
  378. </switch>
  379. </group>
  380. </xhtml:body>
  381. </xhtml:html>