SPPMI03200_입원약정서관리.xrw 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SPPMI03200_입원약정서관리.xrw
  4. * 작 성 자 : 조중래
  5. * 작 성 일 : 2012.02.22
  6. * 수정이력 :
  7. * 기 타 :
  8. -->
  9. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  10. <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">
  11. <xhtml:head>
  12. <xhtml:title>입원약정서관리</xhtml:title>
  13. <model id="model1">
  14. <![CDATA[/>]]>
  15. <instance id="instance1">
  16. <root xmlns="">
  17. <send>
  18. <cond>
  19. <pid/>
  20. <ocrtagno/>
  21. <fromdd/>
  22. <todd/>
  23. <agmttype>0</agmttype>
  24. <indd/>
  25. </cond>
  26. <agmtdesc>
  27. <pid/>
  28. <hngnm/>
  29. <age/>
  30. <sex/>
  31. <brthdd/>
  32. <rrgstno/>
  33. <address/>
  34. <agmttype>1</agmttype>
  35. <fromdd/>
  36. <todd/>
  37. <rmk/>
  38. <ocrtagno/>
  39. <orgfromdd/>
  40. <indd/>
  41. <ocrtype>S</ocrtype>
  42. </agmtdesc>
  43. <iemr/>
  44. </send>
  45. <main>
  46. <agmtlist/>
  47. <printinfo>
  48. <seq/>
  49. <pid/>
  50. <hngnm/>
  51. <rrgstno1/>
  52. <rrgstno2/>
  53. <address/>
  54. <hometelno/>
  55. <mpphontel/>
  56. <hospnm/>
  57. <ordcentnm/>
  58. <orddeptnm/>
  59. <roomnm/>
  60. <roomcnt/>
  61. <insukind/>
  62. <curdate/>
  63. <curtm/>
  64. <usernm/>
  65. <instcd/>
  66. <orddd/>
  67. </printinfo>
  68. <ininfo>
  69. <pid/>
  70. <indd/>
  71. <agmttype/>
  72. <autoyn/>
  73. <orddeptcd/>
  74. <orddrid/>
  75. <cretno/>
  76. <ordtype/>
  77. <orddeptnm/>
  78. <roomcd/>
  79. <bedcnt/>
  80. <insukind/>
  81. <fromdd/>
  82. <todd/>
  83. <officetelno/>
  84. <aprv1/>
  85. <aprv2/>
  86. <aprv3/>
  87. </ininfo>
  88. <agmtcount/>
  89. <inptinfo/>
  90. </main>
  91. <init>
  92. <hardcd/>
  93. <prncd/>
  94. <PAM>
  95. <PK048list>
  96. <PK048>
  97. <cdid/>
  98. <cdnm/>
  99. </PK048>
  100. </PK048list>
  101. <PK066list>
  102. <PK066>
  103. <cdid/>
  104. <cdnm/>
  105. </PK066>
  106. </PK066list>
  107. </PAM>
  108. </init>
  109. <hidden>
  110. </hidden>
  111. <tmp>
  112. </tmp>
  113. </root>
  114. </instance>
  115. <script type="javascript" ev:event="xforms-ready">
  116. <![CDATA[
  117. // 입원 / 응급등록시 호출된 경우
  118. model.setValue("/root/main/ininfo/pid", opener.javascript.getParameter("SPPMI03200_PARM_PID"));
  119. model.setValue("/root/main/ininfo/indd", opener.javascript.getParameter("SPPMI03200_PARM_ORDDD"));
  120. model.setValue("/root/main/ininfo/agmttype", opener.javascript.getParameter("SPPMI03200_PARM_AGMTTYPE"));
  121. model.setValue("/root/main/ininfo/orddeptcd", opener.javascript.getParameter("SPPMI03200_PARM_ORDDEPTCD"));
  122. model.setValue("/root/main/ininfo/orddrid", opener.javascript.getParameter("SPPMI03200_PARM_ORDDRID"));
  123. model.setValue("/root/main/ininfo/cretno", opener.javascript.getParameter("SPPMI03200_PARM_CRETNO"));
  124. model.setValue("/root/main/ininfo/ordtype", opener.javascript.getParameter("SPPMI03200_PARM_ORDTYPE"));
  125. model.refreshpart("/root/main/ininfo");
  126. // OCR연동을 위한 서식코드 취득
  127. reqHardCodeInfo("/root/send/reqdata", "/root/init/prncd", "5604");
  128. // 2009.04.02 - 출력물 자동 출력여부를 위해서 원무공통코드조회
  129. pamfGetCodeList(new Array("PK048","PK066"), new Array("/root/init/PAM/PK048list", "/root/init/PAM/PK066list"));
  130. // 차트번호가 전달된 경에는 자동검색 실시
  131. if (!isNull(model.getValue("/root/main/ininfo/pid"))) {
  132. // 차트번호 설정
  133. model.setValue("/root/send/cond/pid", model.getValue("/root/main/ininfo/pid"));
  134. model.refresh();
  135. // 검색 실시
  136. fSearch();
  137. }
  138. model.setValue("/root/send/agmtdesc/ocrtype", "S"); // O:OCR, S:전자서명
  139. model.setValue("/root/send/agmtdesc/agmttype", "1");
  140. model.setValue("/root/send/agmtdesc/fromdd", getCurrentDate());
  141. var todd = getNewDate();
  142. todd = todd.getAddDate(364, "D");
  143. todd = getDateTime(todd, "D");
  144. model.setValue("/root/send/agmtdesc/todd", todd);
  145. model.refresh();
  146. ]]>
  147. </script>
  148. <submission id="TRPMI03201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/cond" resultref="/root/main/agmtlist"/>
  149. <submission id="TXPMI03202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/agmtdesc" resultref="/root/main/agmtlist"/>
  150. <submission id="TXPMI03203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/printcond" resultref="/root/main/printinfo"/>
  151. <submission id="TXMRF03805" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/hidden/atadocrdata" resultref="/root/hidden/insocrtag"/>
  152. <submission id="TRPMI03204" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/cond" resultref="/root/main/agmtcount"/>
  153. <submission id="TRPMI03205" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/agmtdesc" resultref="/root/main/ocrinfo"/>
  154. <submission id="TRPMI03206" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/ininfo" resultref="/root/main/inptinfo"/>
  155. <submission id="TRPAM00105" mediatype="application/x-www-form-urlencoded" method="post"/>
  156. </model>
  157. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  158. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  159. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  160. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  161. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  162. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  163. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  164. <script type="javascript" src="../../../pam/ipatmngtweb/js/SPPMI03200.js"/>
  165. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
  166. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM001.js"/>
  167. <script type="javascript" src="../../../emr/prcpmngtweb/js/SMMMO00100.js"/>
  168. <script type="javascript" src="../../../emr/prcpmngtweb/js/MMO001.js"/>
  169. </xhtml:head>
  170. <xhtml:body pagewidth="1200" pageheight="850" style="text-align:center; border-color:#c0c0c0; margin-left:8; margin-top:8; ">
  171. <shape id="roundrect2" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:795px; top:658px; width:385px; height:160px; color:#0000ff; background-color:#e9f4fe; border-color:#99ccff; "/>
  172. <shape id="roundrect1" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:5px; top:20px; width:1175px; height:35px; "/>
  173. <caption id="caption1" class="tit_2" style="left:10px; top:665px; width:139px; height:13px; ">입원약정서 상세정보</caption>
  174. <caption id="caption2" class="tit_1" style="left:0px; top:0px; width:190px; height:14px; ">입원약정서 관리</caption>
  175. <input id="ipt_pid" ref="/root/send/agmtdesc/pid" disabled="true" navindex="16" style="left:91px; top:687px; width:87px; height:19px; text-align:center; ">
  176. <script type="javascript" ev:event="onkeypress">
  177. <![CDATA[
  178. if (event.keyCode == "13") {
  179. setInputNodeCurText();
  180. btn_ptbspid.dispatch("DOMActivate");
  181. }
  182. ]]>
  183. </script>
  184. </input>
  185. <caption id="caption3" class="cell_1" style="left:5px; top:687px; width:85px; height:20px; ">환자번호</caption>
  186. <button id="btn_ptbspid" class="icon_search" disabled="true" visibility="hidden" style="left:184px; top:689px; width:16px; height:16px; ">
  187. <caption/>
  188. <script type="javascript" ev:event="DOMActivate">
  189. <![CDATA[
  190. var ptbs_pid = model.getValue("/root/send/agmtdesc/pid");
  191. // 화면 초기화
  192. //fInitialize();
  193. if (ptbs_pid == null || ptbs_pid ==" " || ptbs_pid == "") {
  194. model.resetInstanceNode("/root/send/data9");
  195. } else {
  196. model.setValue("/root/send/data9/pid", ptbs_pid);
  197. model.setValue("/root/send/data9/srchcond", "1");
  198. }
  199. model.setValue("/root/send/data9/autoflag", "Y");
  200. model.setValue("/root/send/data9/checkfnexam", "1");
  201. //model.setValue("/root/send/data9/autoflag", "NON"); //조회내역 없을경우 자동 화면 닫기
  202. modal("../../../pam/commonweb/xrw/SPPMC02500", "1","150", "150", "SPPMC02500", "/root/send/data9", "/root/send");
  203. // modal("../../../pam/patinfomngtweb/xrw/SPPMC02500", "1","150", "150", "SPPMC02500", "/root/send/data9", "/root/send");
  204. model.resetInstanceNode("/root/send/data9");
  205. // 팝업 정상종료 체크
  206. if (model.getValue("/root/main/popupendflag") == 'ok') {
  207. // 환자기본정보 입력
  208. model.setValue("/root/send/agmtdesc/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  209. model.setValue("/root/send/agmtdesc/hngnm", model.getValue("/root/main/patinfo/patinfolist/hngnm"));
  210. model.setValue("/root/send/agmtdesc/age", model.getValue("/root/main/patinfo/patinfolist/age"));
  211. model.setValue("/root/send/agmtdesc/sex", model.getValue("/root/main/patinfo/patinfolist/sex"));
  212. model.setValue("/root/send/agmtdesc/brthdd", model.getValue("/root/main/patinfo/patinfolist/brthdd"));
  213. model.setValue("/root/send/agmtdesc/rrgstno", model.getValue("/root/main/patinfo/patinfolist/rrgstno1") + model.getValue("/root/main/patinfo/patinfolist/rrgstno2"));
  214. model.setValue("/root/send/agmtdesc/address", model.getValue("/root/main/patinfo/patinfolist/addr") + model.getValue("/root/main/patinfo/patinfolist/detladdr"));
  215. }
  216. model.refresh();
  217. // 로딩창 열기
  218. // var sWindowMsg = "환자의 정보를 조회중입니다...";
  219. // callLoadingWindow(sWindowMsg);
  220. //fInRgstBaseInfoRef(2);
  221. //2007.11.28 인사정보의 직원, 직원가족정보 조회
  222. //fPatEmplInfoRef();
  223. //model.refresh();
  224. // 로딩창 닫기
  225. // removeLoadingWindow();
  226. ]]>
  227. </script>
  228. </button>
  229. <line id="line1" class="line_1" style="x1:5px; y1:682px; x2:786px; y2:682px; "/>
  230. <caption id="caption4" class="cell_1" style="left:206px; top:687px; width:84px; height:20px; ">성명</caption>
  231. <caption id="caption5" class="cell_1" style="left:581px; top:687px; width:76px; height:20px; ">생년월일</caption>
  232. <caption id="caption6" class="cell_1" style="left:206px; top:708px; width:84px; height:20px; ">주소</caption>
  233. <caption id="caption7" class="cell_1" style="left:393px; top:687px; width:84px; height:20px; ">나이/성별</caption>
  234. <caption id="caption8" class="cell_1" style="left:5px; top:708px; width:85px; height:20px; ">주민번호</caption>
  235. <line id="line3" class="line_1" style="x1:5px; y1:60px; x2:1180px; y2:60px; "/>
  236. <input id="opt_hngnm" ref="/root/send/agmtdesc/hngnm" disabled="true" style="left:291px; top:687px; width:100px; height:19px; text-align:center; "/>
  237. <input id="opt_age" ref="/root/send/agmtdesc/age" disabled="true" style="left:478px; top:687px; width:47px; height:19px; text-align:center; "/>
  238. <select1 id="cmb_sex" ref="/root/send/agmtdesc/sex" disabled="true" appearance="minimal" style="left:524px; top:687px; width:54px; height:19px; text-align:center; ">
  239. <choices>
  240. <item>
  241. <label>남</label>
  242. <value>M</value>
  243. </item>
  244. <item>
  245. <label>여</label>
  246. <value>F</value>
  247. </item>
  248. </choices>
  249. </select1>
  250. <input id="opt_brthdd" ref="/root/send/agmtdesc/brthdd" disabled="true" format="yyyy-mm-dd" style="left:658px; top:687px; width:127px; height:19px; text-align:center; "/>
  251. <input id="opt_address" ref="/root/send/agmtdesc/address" disabled="true" style="left:291px; top:708px; width:494px; height:19px; text-align:left; "/>
  252. <input id="opt_rrgstno" ref="/root/send/agmtdesc/rrgstno" disabled="true" format="999999-9999999" style="left:91px; top:708px; width:112px; height:19px; text-align:center; "/>
  253. <input id="ipt_fromdd" ref="/root/send/agmtdesc/fromdd" disabled="false" navindex="6" inputtype="date" style="left:291px; top:729px; width:100px; height:19px; "/>
  254. <input id="ipt_todd" ref="/root/send/agmtdesc/todd" disabled="false" navindex="7" inputtype="date" style="left:478px; top:729px; width:100px; height:19px; "/>
  255. <select1 id="cmb_type" ref="/root/send/agmtdesc/ocrtype" disabled="false" navindex="17" appearance="minimal" style="left:91px; top:729px; width:57px; height:19px; text-align:center; ">
  256. <choices>
  257. <item>
  258. <label>전자</label>
  259. <value>S</value>
  260. </item>
  261. <item>
  262. <label>OCR</label>
  263. <value>O</value>
  264. </item>
  265. </choices>
  266. </select1>
  267. <textarea id="ta_rmk" ref="/root/send/agmtdesc/rmk" navindex="8" style="left:91px; top:750px; width:694px; height:68px; text-align:left; "/>
  268. <caption id="caption11" class="cell_1" style="left:5px; top:729px; width:85px; height:20px; ">서식/구분 (*)</caption>
  269. <caption id="caption12" class="cell_1" style="left:206px; top:729px; width:84px; height:20px; ">시작일자 (*)</caption>
  270. <caption id="caption13" class="cell_1" style="left:393px; top:729px; width:84px; height:20px; ">종료일자 (*)</caption>
  271. <caption id="caption14" class="cell_1" style="left:5px; top:750px; width:85px; height:68px; ">비고</caption>
  272. <datagrid id="grd_agmt" nodeset="/root/main/agmtlist" visibility="visible" caption="isntcd^차트번호^성명^나이^성별^생년월일^서식^구분^ocrtagno^연동^스캔^시작일자^seqno^종료일자^해당입원일자^입원구분^입원구분^진료과^orddeptcd^전문의^medispclcd^주민번호^주소^비고^최초등록자^최초등록일시^최종수정자^최종수정일시^cretno^roomnm^insukind^hometel^mpphontel^hospnm" colsep="^" colwidth="31, 70, 66, 32, 32, 74, 39, 40, 100, 31, 30, 84, 48, 84, 84, 30, 30, 100, 60, 100, 34, 40, 40, 200, 80, 120, 80, 120, 66, 72, 69, 61, 79, 74" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:5px; top:65px; width:1175px; height:580px; ">
  273. <col ref="instcd" visibility="hidden"/>
  274. <col ref="pid" style="text-align:center; "/>
  275. <col ref="hngnm" style="text-align:center; "/>
  276. <col ref="age" style="text-align:center; "/>
  277. <col disabled="true" ref="sex" type="combo" style="text-align:center; ">
  278. <choices>
  279. <item>
  280. <label>남</label>
  281. <value>M</value>
  282. </item>
  283. <item>
  284. <label>여</label>
  285. <value>F</value>
  286. </item>
  287. </choices>
  288. </col>
  289. <col ref="brthdd" format="yyyy-mm-dd" style="text-align:center; "/>
  290. <col disabled="true" ref="ocrtype" type="combo">
  291. <choices>
  292. <item>
  293. <label>OCR</label>
  294. <value>O</value>
  295. </item>
  296. <item>
  297. <label>전자</label>
  298. <value>S</value>
  299. </item>
  300. </choices>
  301. </col>
  302. <col disabled="true" ref="agmttype" type="combo" style="text-align:center; ">
  303. <choices>
  304. <item>
  305. <label>일반</label>
  306. <value>1</value>
  307. </item>
  308. <item>
  309. <label>기간</label>
  310. <value>2</value>
  311. </item>
  312. </choices>
  313. </col>
  314. <col ref="ocrtagno" style="text-align:center; "/>
  315. <col ref="emrif" style="text-align:center; "/>
  316. <col ref="scanyn" style="text-align:center; "/>
  317. <col ref="fromdd" format="yyyy-mm-dd" style="text-align:center; "/>
  318. <col ref="seqno" visibility="hidden" style="text-align:center; "/>
  319. <col ref="todd" format="yyyy-mm-dd" style="text-align:center; "/>
  320. <col ref="indd" format="yyyy-mm-dd" style="text-align:center; "/>
  321. <col ref="ordtype" style="text-align:center; "/>
  322. <col ref="orgordtype" style="text-align:center; "/>
  323. <col ref="orddeptnm" style="text-align:center; "/>
  324. <col ref="orddeptcd" visibility="hidden"/>
  325. <col ref="medispclnm" style="text-align:center; "/>
  326. <col ref="medispclid" visibility="hidden"/>
  327. <col ref="rrgstno" visibility="hidden" format="999999-9999999" style="text-align:center; "/>
  328. <col ref="address" visibility="hidden"/>
  329. <col ref="rmk" visibility="visible"/>
  330. <col ref="fstrgstrnm" style="text-align:center; "/>
  331. <col ref="fstrgstdt" format="yyyy-mm-dd hh:nn:ss" style="text-align:center; "/>
  332. <col ref="lastupdtrnm" style="text-align:center; "/>
  333. <col ref="lastupdtdt" format="yyyy-mm-dd hh:nn:ss" style="text-align:center; "/>
  334. <col ref="cretno" visibility="hidden"/>
  335. <col ref="roomnm" visibility="hidden"/>
  336. <col ref="insukind" visibility="hidden"/>
  337. <col ref="hometel" visibility="hidden"/>
  338. <col ref="mpphontel" visibility="hidden"/>
  339. <col ref="hospnm" visibility="hidden"/>
  340. <script type="javascript" ev:event="onaftersort">
  341. <![CDATA[
  342. grd_agmt.gridToInstance();
  343. ]]>
  344. </script>
  345. <script type="javascript" ev:event="ondblclick">
  346. <![CDATA[
  347. model.copyNode("/root/send/agmtdesc", "/root/main/agmtlist[" + grd_agmt.row + "]");
  348. model.makeValue("/root/send/agmtdesc/orgfromdd", model.getValue("/root/send/agmtdesc/fromdd"));
  349. model.refresh();
  350. // 의무기록 연동 이후에는 시작일자 및 종료일자 수정 불가능하도록 제어
  351. if (model.getValue("/root/send/agmtdesc/emrif") == "Y") {
  352. ipt_fromdd.disabled = true;
  353. ipt_todd.disabled = true;
  354. } else {
  355. ipt_fromdd.disabled = false;
  356. ipt_todd.disabled = false;
  357. }
  358. // 서식/구분은 수정 불가
  359. cmb_type.disabled = true;
  360. combo1.disabled = true;
  361. ]]>
  362. </script>
  363. </datagrid>
  364. <button id="btn_init" class="btn4_letter3" navindex="15" style="left:1115px; top:824px; width:68px; height:22px; ">
  365. <caption>초기화</caption>
  366. <script type="javascript" ev:event="DOMActivate">
  367. <![CDATA[
  368. fInit();
  369. ]]>
  370. </script>
  371. </button>
  372. <button id="btn_delete" class="btn5_letter2" navindex="11" style="left:733px; top:658px; width:42px; height:19px; ">
  373. <caption>삭제</caption>
  374. <script type="javascript" ev:event="DOMActivate">
  375. <![CDATA[
  376. // OCR서식의 경우에만 기존로직 설정
  377. if (model.getValue("/root/send/agmtdesc/ocrtype") == "O"
  378. && model.getValue("/root/send/agmtdesc/emrif") == "Y") {
  379. messageBox("이미 연동이 완료된 데이터입니다. ", "C000");
  380. return;
  381. }
  382. if (messageBox("삭제하시겠습니까?", "Q000") == "6") {
  383. model.makeValue("/root/send/agmtdesc/updateflag", "D");
  384. if (submit("TXPMI03202")) {
  385. // 성공시 리스트 재조회
  386. fSearch();
  387. }
  388. }
  389. ]]>
  390. </script>
  391. </button>
  392. <button id="btn_search" class="btn1_letter2" navindex="5" style="left:1115px; top:27px; width:56px; height:22px; ">
  393. <caption>조회</caption>
  394. <script type="javascript" ev:event="DOMActivate">
  395. <![CDATA[
  396. // 검색 필수조건 확인
  397. if (isNull(model.getValue("/root/send/cond/pid"))
  398. && isNull(model.getValue("/root/send/cond/ocrtagno"))
  399. && (isNull(model.getValue("/root/send/cond/fromdd"))
  400. || isNull(model.getValue("/root/send/cond/todd")))) {
  401. messageBox("차트번호 또는 OCRTAGNO가 없는 경우에는 적용기간을 입력하시기 바랍니다.", "E000");
  402. return;
  403. }
  404. // 적용기간 제한 설정
  405. if (getDateInterval(model.getValue("/root/send/cond/fromdd"), model.getValue("/root/send/cond/todd")) > 10) {
  406. messageBox("시스템부하방지를 위하여 검색기간은 최대 10일 이내로 설정 해주십시요. ", "C000");
  407. return;
  408. }
  409. fSearch();
  410. ]]>
  411. </script>
  412. </button>
  413. <caption id="caption9" class="search_name" style="left:14px; top:28px; width:80px; height:17px; ">차트번호</caption>
  414. <caption id="caption15" class="search_name" style="left:174px; top:28px; width:101px; height:17px; ">OCRTAGNO</caption>
  415. <caption id="caption16" class="search_name" style="left:413px; top:28px; width:80px; height:17px; ">적용기간</caption>
  416. <input id="ipt_pid2" ref="/root/send/cond/pid" navindex="1" maxbyte="8" style="left:95px; top:28px; width:65px; height:19px; ">
  417. <script type="javascript" ev:event="onkeypress">
  418. <![CDATA[
  419. if (event.keyCode == "13") {
  420. setInputNodeCurText();
  421. fSearch();
  422. }
  423. ]]>
  424. </script>
  425. </input>
  426. <input id="input1" ref="/root/send/cond/ocrtagno" navindex="2" inputtype="button" style="left:280px; top:28px; width:122px; height:19px; ">
  427. <script type="javascript" ev:event="onkeyup">
  428. <![CDATA[
  429. // 바코드 리더기
  430. fSetBcode();
  431. ]]>
  432. </script>
  433. </input>
  434. <input id="input2" ref="/root/send/cond/fromdd" navindex="3" inputtype="date" style="left:499px; top:28px; width:90px; height:19px; "/>
  435. <input id="input3" ref="/root/send/cond/todd" navindex="4" inputtype="date" style="left:606px; top:28px; width:90px; height:19px; "/>
  436. <caption id="caption17" style="left:590px; top:28px; width:15px; height:20px; text-align:center; ">~</caption>
  437. <input id="input4" ref="/root/send/agmtdesc/ocrtagno" disabled="true" style="left:658px; top:729px; width:127px; height:19px; text-align:center; "/>
  438. <caption id="caption10" class="cell_1" style="left:581px; top:729px; width:76px; height:20px; ">OCRNO</caption>
  439. <button id="button1" class="btn3_letter8" navindex="12" style="left:10px; top:825px; width:128px; height:22px; ">
  440. <caption>약정서 신규출력</caption>
  441. <script type="javascript" ev:event="DOMActivate">
  442. <![CDATA[
  443. if (model.getValue("/root/send/agmtdesc/ocrtype") == ""
  444. || model.getValue("/root/send/agmtdesc/agmttype") == "") {
  445. messageBox("서식 및 구분이 선택되지 않았습니다. ", "C000");
  446. return;
  447. }
  448. if (model.getValue("/root/main/ininfo/pid") == "") {
  449. messageBox("환자정보가 없습니다", "C000");
  450. return;
  451. }
  452. if (model.getValue("/root/send/cond/pid") != model.getValue("/root/main/ininfo/pid")) {
  453. messageBox("입원등록화면의 환자와 다른 환자가 현재 조회되었습니다.\r\n입원약정서 화면을 닫고 새로 진행해주시기 바랍니다.", "C000");
  454. return;
  455. }
  456. if (model.getValue("/root/send/agmtdesc/agmttype") == "2"
  457. && (model.getValue("/root/send/agmtdesc/fromdd") == ""
  458. || model.getValue("/root/send/agmtdesc/todd") == "")) {
  459. messageBox("기간약정서의 경우 시작일자 / 종료일자를 입력해야합니다.", "C000");
  460. return;
  461. }
  462. // OCR 서식
  463. if (model.getValue("/root/send/agmtdesc/ocrtype") == "O") {
  464. // 일반약정서
  465. if (model.getValue("/root/send/agmtdesc/agmttype") == "1") {
  466. // 약정서 출력
  467. fPrintAgmt(model.getValue("/root/main/ininfo/pid"),
  468. model.getValue("/root/main/ininfo/indd"),
  469. model.getValue("/root/main/ininfo/orddeptcd"),
  470. model.getValue("/root/main/ininfo/orddrid"),
  471. '1',
  472. 'N',
  473. '',
  474. '',
  475. '',
  476. '',
  477. model.getValue("/root/main/ininfo/cretno"));
  478. // 기간약정서
  479. } else {
  480. // 기존의 출력데이터 존재유무확인
  481. var retMsg = fReqGetInAgmtCount(
  482. model.getValue("/root/main/ininfo/pid"),
  483. model.getValue("/root/main/ininfo/indd"),
  484. "2"
  485. );
  486. if (retMsg == true) {
  487. messageBox("이미 기간약정서가 존재합니다. 재출력은 OCR반납화면을 이용하시기 바랍니다.", "C000");
  488. return;
  489. } else {
  490. // 신규출력
  491. fPrintAgmt(model.getValue("/root/main/ininfo/pid"),
  492. model.getValue("/root/main/ininfo/indd"),
  493. model.getValue("/root/main/ininfo/orddeptcd"),
  494. model.getValue("/root/main/ininfo/orddrid"),
  495. '2',
  496. 'N',
  497. '',
  498. '',
  499. '',
  500. model.getValue("/root/send/agmtdesc/todd"),
  501. model.getValue("/root/main/ininfo/cretno")
  502. );
  503. }
  504. }
  505. // 전자동의서
  506. } else {
  507. // 전자동의서의 경우 입원이력 체크(반드시 있어야함)
  508. if (model.getValue("/root/main/ininfo/cretno") == null || model.getValue("/root/main/ininfo/cretno") == "") {
  509. messageBox("전자동의서의 경우 입원등록 이후에 진행하시기 바랍니다. ", "C000");
  510. return;
  511. }
  512. // 입원정보 조회
  513. submit("TRPMI03206");
  514. // 입원정보 설정
  515. model.setValue("/root/main/ininfo/orddeptnm", model.getValue("/root/main/inptinfo/orddeptnm"));
  516. model.setValue("/root/main/ininfo/roomcd", model.getValue("/root/main/inptinfo/roomcd"));
  517. model.setValue("/root/main/ininfo/bedcnt", model.getValue("/root/main/inptinfo/bedcnt"));
  518. model.setValue("/root/main/ininfo/insukind", model.getValue("/root/main/inptinfo/insukind"));
  519. // 전자동의서 파라미터 설정
  520. setParameter("SSMRC03160_param_patid", model.getValue("/root/main/ininfo/pid"));
  521. setParameter("SSMRC03160_param_indate", model.getValue("/root/main/ininfo/indd"));
  522. setParameter("SSMRC03160_param_cretno", model.getValue("/root/main/ininfo/cretno"));
  523. setParameter("SSMRC03160_param_instcd", getUserInfo("dutplceinstcd"));
  524. setParameter("SSMRC03160_param_cuser", getUserInfo("userid"));
  525. setParameter("SSMRC03160_param_class", model.getValue("/root/main/ininfo/ordtype"));
  526. setParameter("SSMRC03160_param_cpensize", "1"); // 환자측 펜굵기 강제지정
  527. setParameter("SSMRC03160_param_sendmsg", "1"); // 환자측 필압설정 강제지정
  528. // 구분에 따라 서식코드 / 기간 설정
  529. if (model.getValue("/root/send/agmtdesc/agmttype") == "1") {
  530. setParameter("SSMRC03160_param_docucd", "1300013648"); // 1300013648 일반약정서
  531. model.setValue("/root/main/ininfo/fromdd", model.getValue("/root/send/agmtdesc/fromdd"));
  532. model.setValue("/root/main/ininfo/todd", model.getValue("/root/send/agmtdesc/fromdd"));
  533. model.setValue("/root/main/ininfo/agmttype", "1");
  534. setParameter("SSMRC03160_param_flag", "A"); // S : 선택진료신청서, A : 입원약정서, T : 기간약정서
  535. } else {
  536. setParameter("SSMRC03160_param_docucd", "1300013649"); // 1300013649 기간약정서
  537. model.setValue("/root/main/ininfo/fromdd", model.getValue("/root/send/agmtdesc/fromdd"));
  538. model.setValue("/root/main/ininfo/todd", model.getValue("/root/send/agmtdesc/todd"));
  539. model.setValue("/root/main/ininfo/agmttype", "2");
  540. setParameter("SSMRC03160_param_flag", "T"); // S : 선택진료신청서, A : 입원약정서, T : 기간약정서
  541. }
  542. // 담당자 연락처 설정
  543. // 치과병원 법인화 관련 033 추가 by 조중래 20151123
  544. if (getUserInfo("dutplceinstcd") == '031') {
  545. model.setValue("/root/main/ininfo/officetelno", "053-200-5061"); // 본원
  546. } else if (getUserInfo("dutplceinstcd") == '032') {
  547. model.setValue("/root/main/ininfo/officetelno", "053-200-2073"); // 칠곡
  548. } else if (getUserInfo("dutplceinstcd") == '033') {
  549. model.setValue("/root/main/ininfo/officetelno", "053-200-5061"); // 치과병원
  550. } else {
  551. model.setValue("/root/main/ininfo/officetelno", "");
  552. }
  553. // 결재정보 설정
  554. model.setValue("/root/main/ininfo/aprv1", getUserInfo("usernm"));
  555. model.setValue("/root/main/ininfo/aprv2", model.getValue("/root/init/PAM/PK066list/PK066[detl='원무 마감 팀장']/cdnm"));
  556. model.setValue("/root/main/ininfo/aprv3", model.getValue("/root/init/PAM/PK048list/PK048[detl='원무 마감 부서장']/cdnm"));
  557. // 전자동의서 팝업 호출
  558. modal("SSMRC03160");
  559. }
  560. ]]>
  561. </script>
  562. </button>
  563. <button id="btn_insert" class="btn5_letter2" navindex="10" style="left:685px; top:658px; width:42px; height:19px; ">
  564. <caption>저장</caption>
  565. <script type="javascript" ev:event="DOMActivate">
  566. <![CDATA[
  567. if (isNull(model.getValue("/root/send/agmtdesc/pid"))) {
  568. messageBox("대상 약정서가 선택되지 않았습니다. ", "C000");
  569. return;
  570. }
  571. // 수정은 OCR 서식만 가능(전자서명 불가)
  572. if (model.getValue("/root/send/agmtdesc/ocrtype") != "O") {
  573. messageBox("전사서명서식은 수정 불가능합니다.");
  574. return;
  575. }
  576. /*
  577. if (model.getValue("/root/send/agmtdesc/emrif") == "Y") {
  578. messageBox("이미 연동이 완료된 데이터입니다. ", "C000");
  579. return;
  580. }
  581. */
  582. if (isNull(model.getValue("/root/send/agmtdesc/fromdd"))) {
  583. messageBox("시작일자는 필수입니다. ", "C000");
  584. return;
  585. }
  586. if (messageBox("등록하시겠습니까?", "Q000") == "6") {
  587. model.makeValue("/root/send/agmtdesc/updateflag", "U");
  588. model.makeValue("/root/send/agmtdesc/formcd", fGetFromCd(model.getValue("/root/send/agmtdesc/agmttype")));
  589. if (submit("TXPMI03202")) {
  590. // 성공시 리스트 재조회
  591. submit("TRPMI03201");
  592. /*
  593. // 의무기록 연동이 되어 있지 않은 경우 연동실시
  594. if (model.getValue("/root/send/agmtdesc/emrif") == "N") {
  595. if (fOCRSave()) {
  596. // 연동 성공시 재저장을 막기위한 상세정보 리셋
  597. model.resetInstanceNode("/root/send/agmtdesc");
  598. model.refresh();
  599. }
  600. }
  601. */
  602. }
  603. }
  604. ]]>
  605. </script>
  606. </button>
  607. <button id="button3" class="btn3_letter6" navindex="14" style="left:146px; top:825px; width:104px; height:22px; ">
  608. <caption>약정서재출력</caption>
  609. <script type="javascript" ev:event="DOMActivate">
  610. <![CDATA[
  611. fRePrintOcr();
  612. ]]>
  613. </script>
  614. </button>
  615. <button id="button4" class="btn5_letter7" navindex="9" style="left:526px; top:658px; width:97px; height:19px; text-align:center; ">
  616. <caption>의무기록연동</caption>
  617. <script type="javascript" ev:event="DOMActivate">
  618. <![CDATA[
  619. // 의무기록연동
  620. fOCRSave();
  621. ]]>
  622. </script>
  623. </button>
  624. <input id="ipt_ocrtagnoif" ref="/root/send/cond/ocrtagno" navindex="2" inputtype="button" style="left:400px; top:658px; width:122px; height:19px; ">
  625. <script type="javascript" ev:event="onkeyup">
  626. <![CDATA[
  627. // 바코드 조회
  628. if (fSetBcode() != false) {
  629. // 결과가 1개일 때만 자동세팅
  630. if (getNodesetCount("/root/main/agmtlist") < 1) {
  631. messageBox("검색결과가 존재하지 않습니다. ", "C000");
  632. return;
  633. } else if (getNodesetCount("/root/main/agmtlist") > 1) {
  634. messageBox("검색결과가 복수건 존재합니다. 대상을 선택한 후 진행하십시요. ", "C000");
  635. return;
  636. } else {
  637. // 상세정보로 복사하기
  638. model.copyNode("/root/send/agmtdesc", "/root/main/agmtlist[" + 1 + "]");
  639. model.refresh();
  640. // 의무기록연동 자동호출
  641. fOCRSave();
  642. }
  643. }
  644. ]]>
  645. </script>
  646. </input>
  647. <caption id="caption18" style="left:294px; top:658px; width:104px; height:20px; text-align:right; ">* 의무기록연동용 :</caption>
  648. <select1 id="radio1" ref="/root/send/cond/agmttype" appearance="full" cols="3" overflow="visible" style="left:767px; top:28px; width:135px; height:20px; border-style:none; ">
  649. <choices>
  650. <item>
  651. <label>전체</label>
  652. <value>0</value>
  653. </item>
  654. <item>
  655. <label>일반</label>
  656. <value>1</value>
  657. </item>
  658. <item>
  659. <label>기간</label>
  660. <value>2</value>
  661. </item>
  662. </choices>
  663. </select1>
  664. <caption id="caption19" class="search_name" style="left:711px; top:28px; width:55px; height:17px; ">구분</caption>
  665. <input id="input5" ref="/root/send/cond/indd" inputtype="date" style="left:1001px; top:28px; width:90px; height:19px; "/>
  666. <caption id="caption20" class="search_name" style="left:915px; top:28px; width:80px; height:17px; ">입원일자</caption>
  667. <caption id="caption21" style="left:802px; top:684px; width:378px; height:133px; color:#000000; ">
  668. <![CDATA[가. 외래에서 출력된 OCR약정서의 경우, 반납 이전에 반드시
  669. 의무기록연동을 실시하시기 바랍니다. (원무출력 시 자동연동)
  670. 나. 약정서의 삭제는 의무기록 연동 이전에만 가능하며,
  671. 의무기록 연동 이후는 의무기록실과의 업무협조를 통하여 해당
  672. 의무기록(약정서)을 삭제하시기 바랍니다.
  673. 다. 약정서의 재출력은 의무기록 연동 이전에만 가능하며,
  674. 의무기록 연동 이후는 OCR반납화면에서 재출력하시기 바랍니다.]]>
  675. </caption>
  676. <caption id="caption22" style="left:938px; top:664px; width:105px; height:20px; font-weight:bold; text-align:center; ">
  677. <![CDATA[[ 참 고 사 항 ]]]>
  678. <script type="javascript" ev:event="ondblclick">
  679. <![CDATA[
  680. //rePrintAgmtPid("1496619", "20121024");
  681. ]]>
  682. </script>
  683. </caption>
  684. <button id="button5" class="btn3_letter6" navindex="14" style="left:259px; top:825px; width:104px; height:22px; ">
  685. <caption>OCR미리보기</caption>
  686. <script type="javascript" ev:event="DOMActivate">
  687. <![CDATA[
  688. if (isNull(model.getValue("/root/send/agmtdesc/ocrtagno")) || model.getValue("/root/send/agmtdesc/scanyn") != 'Y'){
  689. messageBox("약정서가 선택되지 않았거나 스캔되지 않았습니다.\r\n데이터를 확인하시기 바랍니다.", "C000");
  690. return;
  691. }
  692. model.resetInstanceNode("/root/send/iemr");
  693. model.makeValue("/root/send/iemr/pid", model.getValue("/root/send/agmtdesc/pid"));
  694. model.makeValue("/root/send/iemr/ocrcode", model.getValue("/root/send/agmtdesc/ocrtagno"));
  695. if((window.children.item("imgemrviewer") == null)){
  696. window.load("../../../emr/imgemrweb/xrw/SSMRC03130.xrw", "modeless", "imgemrviewer", "", "/root/send/iemr", "/root/hidden/temp");
  697. window.children.item("imgemrviewer").document.title = "Image EMR Viewer";
  698. }else{
  699. messageBox("약정서 뷰어 호출에 실패하였습니다.", "C000");
  700. }
  701. ]]>
  702. </script>
  703. </button>
  704. <select1 id="combo1" ref="/root/send/agmtdesc/agmttype" disabled="false" navindex="17" appearance="minimal" style="left:147px; top:729px; width:56px; height:19px; text-align:center; ">
  705. <choices>
  706. <item>
  707. <label>일반</label>
  708. <value>1</value>
  709. </item>
  710. <item>
  711. <label>기간</label>
  712. <value>2</value>
  713. </item>
  714. </choices>
  715. </select1>
  716. </xhtml:body>
  717. </xhtml:html>