SMPIZ00100_외래입원상병이력조회.xrw 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * @(#)SMPIZ00100_외래입원상병이력조회.xrw
  4. * 수정이력
  5. * - 2007.03.22 / 최초작성 / 정주미
  6. * - 2007.05.08 / aftjudgweb에서 insucomweb으로 변경 / 정주미
  7. * - 2007.05.08 / SMPID20600.xrw에서 SMPIZ00100.xrw으로 변경 / 정주미
  8. * - 2007.06.19 / 화면 수정 및 기능 보완 / 이창재
  9. * - 2007.12.26 / 심사화면에서 들어온 경우에도 진료기간은 전체로 조회되도록 수정 / 박지욱
  10. *
  11. * - opener 에서 전달받는 조건 경로
  12. /root/init
  13. * - SPPMC02500_환자조회.xrw 로 전달하는 조건 경로
  14. /root/hidden/sppmc02500/cond
  15. * - SPPMC02500_환자조회.xrw 에서 전달받는 결과 경로
  16. /root/main/patinfo/patinfolist
  17. /root/main/popupendflag
  18. -->
  19. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  20. <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">
  21. <xhtml:head>
  22. <xhtml:title>상병이력조회</xhtml:title>
  23. <model id="model1">
  24. <instance id="instance1">
  25. <root xmlns="">
  26. <main>
  27. <diaghist>
  28. <item1>
  29. <pmcmptbs>
  30. <pid/>
  31. <gender/>
  32. <age/>
  33. <patnm/>
  34. <patrrgstno/>
  35. </pmcmptbs>
  36. </item1>
  37. <list1>
  38. <diagdatelist/>
  39. </list1>
  40. <list01>
  41. <mmohdiag1>
  42. <diagcd/>
  43. <diagkindcd/>
  44. <diaghngnm/>
  45. <diagengnm/>
  46. <termcd/>
  47. <termhngnm/>
  48. <termengnm/>
  49. </mmohdiag1>
  50. <mmohdiag2>
  51. <diagcd/>
  52. <diagkindcd/>
  53. <diaghngnm/>
  54. <diagengnm/>
  55. </mmohdiag2>
  56. <mmohdiag3>
  57. <diagcd/>
  58. <diagkindcd/>
  59. <diaghngnm/>
  60. <diagengnm/>
  61. </mmohdiag3>
  62. </list01>
  63. </diaghist>
  64. <!-- SPPMC02500_환자조회 화면에서 선택된 검색결과를 받는 경로임 -->
  65. <patinfo>
  66. <patinfolist/>
  67. </patinfo>
  68. <orddeptcd>
  69. <orddeptlist>
  70. <cd/>
  71. <nm/>
  72. </orddeptlist>
  73. </orddeptcd>
  74. </main>
  75. <send>
  76. <pid/>
  77. <ordfromdd/>
  78. <ordtodd/>
  79. <ioflag/>
  80. <deptcd/>
  81. <orddd/>
  82. <clamym/>
  83. <clamdg/>
  84. <pid/>
  85. <pidsn/>
  86. <refterm/>
  87. <todd/>
  88. <fromdd/>
  89. </send>
  90. <init>
  91. <!-- opener (예:SMPID20300_입원사후심사관리) 화면에서 설정된 검색조건을 보내는 경로임-->
  92. <pid/>
  93. <!--
  94. <ordfromdd/>
  95. <ordtodd/>
  96. <srchflag/>
  97. -->
  98. </init>
  99. <hidden>
  100. <selected>
  101. <termcd/>
  102. <engdiagnm/>
  103. <hngdiagnm/>
  104. <rdoioflag/>
  105. <cmborddept/>
  106. </selected>
  107. <sppmc02500>
  108. <cond>
  109. <!-- SPPMC02500_환자조회 화면으로 검색조건을 보내는 경로임 -->
  110. <srchcond/>
  111. <pid/>
  112. <hngnm/>
  113. <rrgstno1/>
  114. <rrgstno2/>
  115. </cond>
  116. </sppmc02500>
  117. <smpiz00100>
  118. <rslt>
  119. <diag>
  120. <diagcd/>
  121. <diagkindcd/>
  122. <diaghngnm/>
  123. <diagengnm/>
  124. </diag>
  125. </rslt>
  126. </smpiz00100>
  127. <base>
  128. <basedd/>
  129. </base>
  130. </hidden>
  131. </root>
  132. </instance>
  133. <submission id="TRPAM00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/hidden/tmp"/>
  134. <submission id="TRPIZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/diaghist"/>
  135. <submission id="TRPIZ00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/diaghist/list01"/>
  136. <script type="javascript" ev:event="xforms-ready">
  137. <![CDATA[
  138. var today = new Date();
  139. var baseyear = today.getDateFormat("YYYY"); // (dateHelper.js)에서 제공하는 함수를 사용하여 해당 년를 구한다.
  140. var basemonth = today.getDateFormat("MM");
  141. var baseday = today.getDateFormat("DD");
  142. var currentdd = baseyear + basemonth + baseday;
  143. model.setValue("/root/hidden/base/basedd", currentdd);
  144. // (PAM.js) submission id="TRPAM00101" 를 사용하여 진료과 / 의사명 Combo item을 가져온다.
  145. // model.copyNode("root/init/orddeptcd", "root/hidden/tmp/orddeptcd"); model.copyNode("root/init/orddrid", "root/hidden/tmp/orddrid"); 처리가 이뤄짐
  146. pamGetDeptCDDrIDList();
  147. fInitialize(); // 화면을 초기화한다.
  148. fCheckAuth(); // 화면 권한을 설정한다.
  149. fCheckOpener(); // 심사화면에서 팝업용으로 호출한 경우, 조건값을 받아 조회한다.
  150. // // 기간 default 3개월 설정
  151. // model.makeValue("/root/send/refterm","2");
  152. // var currentdate = getCurrentDate();
  153. // model.makeValue("/root/send/fromdd", currentdate);
  154. // model.makeValue("/root/send/todd", currentdate);
  155. model.refresh();
  156. ]]>
  157. </script>
  158. </model>
  159. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  160. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  161. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  162. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  163. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
  164. <script type="javascript">
  165. <![CDATA[
  166. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  167. function fInitialize() {
  168. model.setFocus("ipt_pid");
  169. // model.resetInstanceNode("/root/main"); 의 경우 이전 조회한 값들의 빈 node 가 남아 Grid에 빈줄이 남게 된다.
  170. model.resetInstanceNode("/root/main/diaghist/item1");
  171. model.removeNodeset("/root/main/diaghist/list1");
  172. model.removeNodeset("/root/main/diaghist/list01");
  173. if (isPopup()) { // (common.js) 자신이 팝업인지 아닌지를 리턴한다.
  174. // 심사화면 팝업용인 경우 "초기화" 하여도 pid 값을 유지하도록 변경함.
  175. var oldpid = model.getValue("/root/send/pid");
  176. model.resetInstanceNode("/root/send");
  177. model.setValue("/root/send/pid", oldpid);
  178. } else {
  179. model.resetInstanceNode("/root/send");
  180. }
  181. //model.setValue("/root/send/srchflag", "emr"); // 검색구분 Radio의 초기값을 설정한다.
  182. model.setValue("/root/send/ordtodd", model.getValue("/root/hidden/base/basedd"));
  183. //model.resetInstanceNode("/root/init"); 은 opener(예:SMPID20300_입원사후심사관리)에서 조회조건을 전달받는 경로임
  184. model.resetInstanceNode("/root/hidden/selected");
  185. model.setValue("/root/hidden/selected/rdoioflag", "-");
  186. // 기간 default 6개월 설정, 현재일 설정
  187. model.makeValue("/root/send/refterm","3");
  188. var currentdate = getCurrentDate();
  189. model.makeValue("/root/send/fromdd", currentdate);
  190. model.makeValue("/root/send/todd", currentdate);
  191. }
  192. // 화면 권한을 설정한다.
  193. function fCheckAuth() {
  194. if (isPopup()) { // (common.js) 자신이 팝업인지 아닌지를 리턴한다.
  195. btn_judgdiag.disabled = false;
  196. btn_close.disabled = false;
  197. } else {
  198. btn_judgdiag.disabled = true;
  199. btn_close.disabled = true;
  200. }
  201. }
  202. // 심사화면에서 팝업용으로 호출한 경우, 조건값을 받아 조회한다.
  203. function fCheckOpener() {
  204. // roo/send 는 초기화 되므로 init 경로에 값을 전달받는다.
  205. if (model.getValue("/root/init/pid")) {
  206. model.makeValue("/root/send/pid", model.getValue("/root/init/pid"));
  207. // model.copyNode("/root/send", "/root/init");
  208. // 기간 default 6개월 설정
  209. model.makeValue("/root/send/refterm","3");
  210. var currentdate = getCurrentDate();
  211. model.makeValue("/root/send/fromdd", currentdate);
  212. model.makeValue("/root/send/todd", currentdate);
  213. submit("TRPIZ00101");
  214. // 상병이력에 해당되는 진료과만 보이도록 해준다.
  215. fSetOrdDeptCdList();
  216. }
  217. }
  218. // 등록번호 입력 후 Enter 또는 "조회" 버튼을 누르면 상병이력을 조회한다.
  219. function fGetIODiagHistList() {
  220. var ipt_pid = model.getValue("/root/send/pid");
  221. if (ipt_pid == "") {
  222. messageBox("검색할 등록번호를", "C001"); ///검색할 등록번호를 입력하십시오.
  223. return;
  224. }
  225. var fromdd = model.getValue("/root/send/fromdd");
  226. var todd = model.getValue("/root/send/todd");
  227. if (fromdd != "" && todd != "") {
  228. if (fromdd > todd) {
  229. messageBox("검색 시작날짜가 종료날짜 보다 클 수", "I004"); ///검색 시작날짜가 종료날짜 보다 클 수 없습니다.
  230. return;
  231. }
  232. }
  233. /*
  234. // [2007.03.23] Table Layout 상에는 pid가 VARCHAR(10) 이지만, 테스트용 data에서는 VARCHAR(8) 이므로 8자리로 구현함
  235. // [2007.04.27] 외래등록에서 입력한 테스트용 data의 pid가 8자리 미만인 경우가 많아서 입력된 pid 그대로 조회하도록 함.
  236. if (ipt_pid.length < 8) {
  237. ipt_pid = ipt_pid.getLeftPad(8, "0"); // (stringHelper.js) 저장된 숫자 값에 원하는 길이만큼 '0'을 붙여 표현
  238. model.setValue("/root/send/pid", ipt_pid);
  239. }
  240. */
  241. model.resetInstanceNode("/root/main/diaghist/item1/pmcmptbs");
  242. model.resetInstanceNode("/root/hidden/selected");
  243. model.setValue("/root/hidden/selected/rdoioflag", "-");
  244. grd_diaghistlist.attribute("nodeset") = "/root/main/diaghist/list1/diagdatelist";
  245. grd_diaghistlist.rebuild();
  246. submit("TRPIZ00101");
  247. fSetOrdDeptCdList();
  248. if (model.getValue("/root/main/diaghist/item1/pmcmptbs/pid") == "") {
  249. messageBox("입력된 등록번호의 환자정보가", "I004"); ///입력된 등록번호의 환자정보가 없습니다.
  250. }
  251. }
  252. // 진료과 Combo 목록을 작성한다.
  253. function fSetOrdDeptCdList() {
  254. model.removeNodeset("/root/main/orddeptcd");
  255. model.makeNode("/root/main/orddeptcd/orddeptlist/cd");
  256. model.makeNode("/root/main/orddeptcd/orddeptlist/nm");
  257. for (var i = 1; i < grd_diaghistlist.rows; i++) {
  258. var deptcd = model.getValue("/root/main/diaghist/list1/diagdatelist["+ i +"]/orddeptcd");
  259. var orddeptcNode = instance1.selectSingleNode("/root/main/orddeptcd");
  260. var nodeList = orddeptcNode.childNodes;
  261. var isFind = false;
  262. for (var j = 1; j <= nodeList.length; j++) {
  263. var cd = model.getValue("/root/main/orddeptcd/orddeptlist[" + j + "]/cd");
  264. if (deptcd == cd) { // 진료과 필터링 콤보에 이미 추가된 진료과인지 확인한다.
  265. isFind = true;
  266. j = nodeList.length + 1;
  267. }
  268. }
  269. if (!isFind) {
  270. var deptnm = grd_diaghistlist.labelMatrix(i, grd_diaghistlist.colRef("orddeptcd"));
  271. if (deptnm) {
  272. model.makeValue("/root/main/orddeptcd/orddeptlist[" + (nodeList.length + 1) + "]/nm", deptnm);
  273. } else { // 해당 진료과 명칭이 없는 경우 진료과코드로 대신한다.
  274. model.makeValue("/root/main/orddeptcd/orddeptlist[" + (nodeList.length + 1) + "]/nm", deptcd);
  275. }
  276. model.makeValue("/root/main/orddeptcd/orddeptlist[" + (nodeList.length + 1) + "]/cd", deptcd);
  277. }
  278. }
  279. // 상병이력목록 첫번째 날짜가 선택되도록 한다.
  280. grd_diaghistlist.row = 1;
  281. var pid = model.getValue("/root/main/diaghist/list1/diagdatelist/pid");
  282. if (pid) {
  283. // 상병 이력 목록 Grid를 선택한 경우
  284. fPatIODiagHistList();
  285. } else {
  286. model.refresh();
  287. }
  288. }
  289. // 입원외래구분 Radio / 진료과 Combo 필터링 적용
  290. function fSelectedIODept() {
  291. var ioflag = model.getValue("/root/hidden/selected/rdoioflag");
  292. var selCond = "";
  293. if (ioflag == "I") {
  294. selCond = "ioflagcd='I'";
  295. }
  296. else if (ioflag == "O") {
  297. selCond = "ioflagcd='O'";
  298. }
  299. var orddept = model.getValue("/root/hidden/selected/cmborddept");
  300. if (orddept != "") {
  301. if (selCond == "") {
  302. selCond = "orddeptcd='" + orddept + "'";
  303. } else {
  304. selCond += "and orddeptcd='" + orddept + "'";
  305. }
  306. }
  307. if (selCond) {
  308. grd_diaghistlist.attribute("nodeset") = "/root/main/diaghist/list1/diagdatelist[" + selCond + "]";
  309. grd_diaghistlist.rebuild();
  310. model.resetInstanceNode("/root/hidden/selected/termcd");
  311. model.resetInstanceNode("/root/hidden/selected/engdiagnm");
  312. model.resetInstanceNode("/root/hidden/selected/hngdiagnm");
  313. model.removeNodeset("/root/main/diaghist/list01");
  314. model.refresh();
  315. } else{
  316. grd_diaghistlist.attribute("nodeset") = "/root/main/diaghist/list1/diagdatelist";
  317. grd_diaghistlist.rebuild();
  318. // 상병이력목록 첫번째 날짜가 선택되도록 한다.
  319. grd_diaghistlist.row = 1;
  320. var pid = model.getValue("/root/main/diaghist/list1/diagdatelist/pid");
  321. if (pid) {
  322. // 상병 이력 목록 Grid를 선택한 경우
  323. fPatIODiagHistList();
  324. }
  325. }
  326. }
  327. // 상병 이력 목록 Grid를 선택한 경우
  328. function fPatIODiagHistList() {
  329. model.resetInstanceNode("/root/hidden/selected/termcd");
  330. model.resetInstanceNode("/root/hidden/selected/engdiagnm");
  331. model.resetInstanceNode("/root/hidden/selected/hngdiagnm");
  332. var row = grd_diaghistlist.row;
  333. model.makeValue("/root/send/pid", grd_diaghistlist.valueMatrix(row, grd_diaghistlist.colRef("pid")));
  334. model.makeValue("/root/send/ioflag", grd_diaghistlist.valueMatrix(row, grd_diaghistlist.colRef("ioflagcd")));
  335. model.makeValue("/root/send/deptcd", grd_diaghistlist.valueMatrix(row, grd_diaghistlist.colRef("orddeptcd")));
  336. model.makeValue("/root/send/orddd", grd_diaghistlist.valueMatrix(row, grd_diaghistlist.colRef("ordfromdd")));
  337. model.makeValue("/root/send/clamym", grd_diaghistlist.valueMatrix(row, grd_diaghistlist.colRef("clamym")));
  338. model.makeValue("/root/send/clamdg", grd_diaghistlist.valueMatrix(row, grd_diaghistlist.colRef("clamdg")));
  339. model.makeValue("/root/send/pidsn", grd_diaghistlist.valueMatrix(row, grd_diaghistlist.colRef("pidsn")));
  340. submit("TRPIZ00102");
  341. if (grd_orddiaghist.rows > 1) {
  342. grd_orddiaghist.row = 1;
  343. fSelectOrdDiagHist(); // 진료상병이력을 선택한 경우
  344. }
  345. else if (grd_clamdiaghist.rows > 1) {
  346. grd_clamdiaghist.row = 1;
  347. fSelectClamDiagHist(); // 청구상병이력을 선택한 경우
  348. }
  349. }
  350. // 진료상병이력을 선택한 경우
  351. function fSelectOrdDiagHist() {
  352. var row = grd_orddiaghist.row;
  353. model.setValue("/root/hidden/selected/termcd", grd_orddiaghist.valueMatrix(row, grd_orddiaghist.colRef("termcd")));
  354. model.setValue("/root/hidden/selected/engdiagnm", grd_orddiaghist.valueMatrix(row, grd_orddiaghist.colRef("termengnm")));
  355. model.setValue("/root/hidden/selected/hngdiagnm", grd_orddiaghist.valueMatrix(row, grd_orddiaghist.colRef("termhngnm")));
  356. model.refresh();
  357. }
  358. // 청구상병이력을 선택한 경우
  359. function fSelectClamDiagHist() {
  360. var row = grd_clamdiaghist.row;
  361. model.setValue("/root/hidden/selected/termcd", "");
  362. model.setValue("/root/hidden/selected/engdiagnm", grd_clamdiaghist.valueMatrix(row, grd_clamdiaghist.colRef("diagengnm")));
  363. model.setValue("/root/hidden/selected/hngdiagnm", grd_clamdiaghist.valueMatrix(row, grd_clamdiaghist.colRef("diaghngnm")));
  364. model.refresh();
  365. }
  366. ]]>
  367. </script>
  368. </xhtml:head>
  369. <xhtml:body pagewidth="1211" pageheight="784" guideline="1,1195;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  370. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  371. <caption id="caption1" class="tit_1" style="left:0px; top:0px; width:98px; height:13px; ">상병이력 조회</caption>
  372. </group>
  373. <group id="grp_biz" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  374. <group id="grp_sea" style="left:0px; top:10px; width:1194px; height:35px; ">
  375. <shape id="roundrect1" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  376. <caption id="caption2" class="search_name" style="left:15px; top:9px; width:86px; height:17px; ">등록번호 :</caption>
  377. <input id="ipt_pid" ref="/root/send/pid" class="input_s_essential" navindex="1" format="####" style="left:104px; top:8px; width:90px; height:19px; ">
  378. <script type="javascript" ev:event="onkeypress">
  379. <![CDATA[
  380. if (event.keyCode == "13") {
  381. setInputNodeCurText(); // (tfHelper.js) 현재 인풋값 노드 반영
  382. fGetIODiagHistList(); // 등록번호 입력 후 Enter 입력으로 상병이력을 조회한다.
  383. }
  384. ]]>
  385. </script>
  386. </input>
  387. <button id="btn_srchpid" class="icon_search" navindex="2" style="left:195px; top:10px; width:19px; height:15px; ">
  388. <caption/>
  389. <script type="javascript" ev:event="DOMActivate">
  390. <![CDATA[
  391. var ipt_pid = model.getValue("/root/send/pid");
  392. if (ipt_pid) {
  393. /*
  394. if (ipt_pid.length < 8) {
  395. ipt_pid = ipt_pid.getLeftPad(8, "0"); // (stringHelper.js) 저장된 숫자 값에 원하는 길이만큼 '0'을 붙여 표현
  396. }
  397. */
  398. model.setValue("/root/hidden/sppmc02500/cond/srchcond", "1"); // 검색조건 : 등록번호로 설정
  399. model.setValue("/root/hidden/sppmc02500/cond/pid", ipt_pid);
  400. } else {
  401. model.resetInstanceNode("/root/hidden/sppmc02500/cond");
  402. }
  403. modal("SPPMC02500", 1, 150, 150, "SPPMC02500", "/root/hidden/sppmc02500/cond", "/root/send", "", "");
  404. var srch_pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  405. if (srch_pid) { // SPPMC02500_환자조회 화면에서 조회한 경우임
  406. model.removeNodeset("/root/main/patinfo/patinfolist"); // patinfolist가 제거됨 (resetInstanceNode의 경우 값은 지우고 노드는 남아있음)
  407. model.makeNode("/root/main/patinfo/patinfolist"); // SPPMC02500_환자조회 팝업을 다시 조회할 경우를 위해 다시 노드를 추가함
  408. model.setValue("/root/send/pid", srch_pid);
  409. }
  410. model.refresh();
  411. ]]>
  412. </script>
  413. </button>
  414. <caption id="caption3" class="search_name" visibility="hidden" style="left:790px; top:10px; width:86px; height:17px; ">진료기간 :</caption>
  415. <input id="ipt_ordfromdd" ref="/root/send/ordfromdd" class="input_search" navindex="3" visibility="hidden" inputtype="date" style="left:879px; top:9px; width:97px; height:19px; ">
  416. <script type="javascript" ev:event="xforms-value-changed">
  417. <![CDATA[
  418. if (model.getValue("/root/send/ordtodd") == "") {
  419. model.setValue("/root/send/ordtodd", model.getValue("/root/send/ordfromdd"));
  420. model.refresh();
  421. }
  422. ]]>
  423. </script>
  424. </input>
  425. <caption id="caption4" class="search_no_b" visibility="hidden" style="left:979px; top:10px; width:12px; height:17px; ">~</caption>
  426. <input id="ipt_ordtodd" ref="/root/send/ordtodd" class="input_search" navindex="4" visibility="hidden" inputtype="date" style="left:994px; top:9px; width:97px; height:19px; "/>
  427. <line id="line1" class="line_4" style="x1:1108px; y1:7px; x2:1108px; y2:29px; "/>
  428. <button id="btn_srch" class="btn1_letter2" navindex="5" style="left:1123px; top:7px; width:56px; height:22px; ">
  429. <caption>조회</caption>
  430. <script type="javascript" ev:event="DOMActivate">
  431. <![CDATA[
  432. fGetIODiagHistList(); // "조회" 버튼을 누르면 상병이력을 조회한다.
  433. ]]>
  434. </script>
  435. </button>
  436. <select1 id="rdo_refterm" ref="/root/send/refterm" appearance="full" cellspacing="5" cols="5" overflow="visible" style="left:315px; top:9px; width:235px; height:17px; border-style:none; ">
  437. <choices>
  438. <item>
  439. <label>전체</label>
  440. <value>-</value>
  441. </item>
  442. <item>
  443. <label>1개월</label>
  444. <value>1</value>
  445. </item>
  446. <item>
  447. <label>3개월</label>
  448. <value>2</value>
  449. </item>
  450. <item>
  451. <label>6개월</label>
  452. <value>3</value>
  453. </item>
  454. <item>
  455. <label/>
  456. <value>4</value>
  457. </item>
  458. </choices>
  459. <script type="javascript" ev:event="xforms-value-changed">
  460. <![CDATA[
  461. var refterm = model.getValue("/root/send/refterm");
  462. if (refterm == "4") {
  463. opt_fromdd.disabled = false;
  464. opt_todd.disabled = false;
  465. } else {
  466. opt_fromdd.disabled = true;
  467. opt_todd.disabled = true;
  468. fGetIODiagHistList(); // "조회" 버튼을 누르면 상병이력을 조회한다.
  469. }
  470. ]]>
  471. </script>
  472. </select1>
  473. <caption id="caption18" class="search_name" style="left:250px; top:9px; width:73px; height:17px; ">기간 :</caption>
  474. <caption id="caption19" style="left:645px; top:8px; width:12px; height:19px; ">~</caption>
  475. <input id="opt_todd" ref="/root/send/todd" class="input_search" disabled="true" inputtype="date" style="left:665px; top:8px; width:85px; height:19px; "/>
  476. <input id="opt_fromdd" ref="/root/send/fromdd" class="input_search" disabled="true" inputtype="date" style="left:555px; top:8px; width:85px; height:19px; "/>
  477. </group>
  478. <caption id="caption6" class="tit_2" style="left:5px; top:55px; width:69px; height:13px; ">환자정보</caption>
  479. <line id="line2" class="line_1" style="x1:0px; y1:70px; x2:340px; y2:70px; "/>
  480. <output id="opt_gender" ref="/root/main/diaghist/item1/pmcmptbs/gender" class="output_fix" style="left:116px; top:76px; width:20px; height:19px; "/>
  481. <output id="opt_age" ref="/root/main/diaghist/item1/pmcmptbs/age" class="output_fix" style="left:139px; top:76px; width:30px; height:19px; "/>
  482. <caption id="caption10" class="cell_1" style="left:0px; top:75px; width:35px; height:23px; ">이름</caption>
  483. <output id="opt_patnm" ref="/root/main/diaghist/item1/pmcmptbs/patnm" class="output_fix" style="left:38px; top:76px; width:75px; height:19px; "/>
  484. <caption id="caption11" class="cell_1" style="left:172px; top:75px; width:59px; height:23px; ">주민번호</caption>
  485. <output id="opt_patrrgstno" ref="/root/main/diaghist/item1/pmcmptbs/patrrgstno" class="output_fix" format="999999 - 9999999" style="left:234px; top:76px; width:106px; height:19px; "/>
  486. <caption id="caption12" class="tit_2" style="left:350px; top:55px; width:118px; height:14px; ">선택된 상병 정보</caption>
  487. <line id="line5" class="line_1" style="x1:345px; y1:70px; x2:1194px; y2:70px; "/>
  488. <caption id="caption13" class="cell_1" style="left:345px; top:99px; width:80px; height:23px; ">영문상병명</caption>
  489. <output id="opt_engdiagnm" ref="/root/hidden/selected/engdiagnm" class="output_fix" style="left:428px; top:100px; width:766px; height:19px; "/>
  490. <line id="line6" class="line_2" style="x1:345px; y1:121px; x2:1194px; y2:121px; "/>
  491. <caption id="caption14" class="cell_1" style="left:345px; top:123px; width:80px; height:23px; ">한글상병명</caption>
  492. <output id="opt_hngdiagnm" ref="/root/hidden/selected/hngdiagnm" class="output_fix" style="left:428px; top:124px; width:766px; height:19px; "/>
  493. <line id="line7" class="line_3" style="x1:345px; y1:145px; x2:1194px; y2:145px; "/>
  494. <caption id="caption15" class="tit_2" style="left:5px; top:156px; width:105px; height:13px; ">상병 이력 목록</caption>
  495. <line id="line8" class="line_1" style="x1:0px; y1:171px; x2:320px; y2:171px; "/>
  496. <line id="line10" class="line_1" style="x1:325px; y1:171px; x2:615px; y2:171px; "/>
  497. <line id="line11" class="line_1" style="x1:620px; y1:171px; x2:910px; y2:171px; "/>
  498. <caption id="caption5" class="tit_2" style="left:325px; top:156px; width:105px; height:13px; ">진료상병이력</caption>
  499. <caption id="caption16" class="tit_2" style="left:620px; top:156px; width:105px; height:13px; ">청구상병이력</caption>
  500. <datagrid id="grd_diaghistlist" nodeset="/root/main/diaghist/list1/diagdatelist" caption="청구년월^차수^진료개시일^구분^진료과^진료의^pid^ordfromdd^ioflag^pidsn" colsep="^" colwidth="55, 30, 68, 30, 70, 45, 50, 54, 45, 56" dataheight="23" ellipsis="true" explorerbar="sort" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" tooltip="true" style="left:0px; top:176px; width:320px; height:550px; ">
  501. <col ref="clamym" format="yyyy-mm" style="text-align:center; "/>
  502. <col ref="clamdg" style="text-align:center; "/>
  503. <col ref="ordfromdd" format="yyyy-mm-dd"/>
  504. <col ref="ioflag" style="text-align:center; "/>
  505. <col disabled="true" ref="orddeptcd" type="combo">
  506. <choices>
  507. <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
  508. <label ref="nm"/>
  509. <value ref="cd"/>
  510. </itemset>
  511. </choices>
  512. </col>
  513. <col disabled="true" ref="orddrid" type="combo">
  514. <choices>
  515. <itemset nodeset="/root/init/orddrid/orddridlist">
  516. <label ref="nm"/>
  517. <value ref="cd"/>
  518. </itemset>
  519. </choices>
  520. </col>
  521. <col ref="pid" visibility="hidden"/>
  522. <col ref="ordfromdd" visibility="hidden"/>
  523. <col ref="ioflagcd" visibility="hidden"/>
  524. <col ref="pidsn" visibility="hidden"/>
  525. <script type="javascript" ev:event="onclick">
  526. <![CDATA[
  527. if (grd_diaghistlist.isCell(event.target) && grd_diaghistlist.row >= grd_diaghistlist.fixedRows) {
  528. // 상병 이력 목록 Grid를 선택한 경우
  529. fPatIODiagHistList();
  530. }
  531. ]]>
  532. </script>
  533. </datagrid>
  534. <datagrid id="grd_orddiaghist" nodeset="/root/main/diaghist/list01/mmohdiag1" caption="R/O^상병코드^상병명(한글)^termcd^termengnm^termhngnm" colsep="^" colwidth="30, 54, 135, 35, 32, 39" dataheight="23" ellipsis="true" explorerbar="sort" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" tooltip="true" style="left:325px; top:176px; width:290px; height:550px; ">
  535. <col checkvalue="R,C" disabled="true" ref="diagkindcd" type="checkbox" style="text-align:center; "/>
  536. <col ref="diagcd" style="text-align:center; "/>
  537. <col ref="diaghngnm"/>
  538. <col ref="termcd" visibility="hidden"/>
  539. <col ref="termengnm" visibility="hidden"/>
  540. <col ref="termhngnm" visibility="hidden"/>
  541. <script type="javascript" ev:event="onclick">
  542. <![CDATA[
  543. if (isDataCell()) { // (tfHelper.js) datagrid click or dbclick 시점에 현재 click target이 data 영역인지 check
  544. fSelectOrdDiagHist();
  545. } else {
  546. grd_orddiaghist.row = 0;
  547. model.resetInstanceNode("/root/hidden/selected/termcd");
  548. model.resetInstanceNode("/root/hidden/selected/engdiagnm");
  549. model.resetInstanceNode("/root/hidden/selected/hngdiagnm");
  550. model.refresh();
  551. }
  552. ]]>
  553. </script>
  554. </datagrid>
  555. <datagrid id="grd_clamdiaghist" nodeset="/root/main/diaghist/list01/mmohdiag2" caption="R/O^상병코드^상병명(한글)^diagengnm" colsep="^" colwidth="30, 54, 135, 35" dataheight="23" ellipsis="true" explorerbar="sort" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" tooltip="true" style="left:620px; top:176px; width:290px; height:550px; ">
  556. <col checkvalue="R,C" disabled="true" ref="diagkindcd" type="checkbox" style="text-align:center; "/>
  557. <col ref="diagcd" style="text-align:center; "/>
  558. <col ref="diaghngnm"/>
  559. <col ref="diagengnm" visibility="hidden"/>
  560. <script type="javascript" ev:event="onclick">
  561. <![CDATA[
  562. if (isDataCell()) { // (tfHelper.js) datagrid click or dbclick 시점에 현재 click target이 data 영역인지 check
  563. fSelectClamDiagHist();
  564. } else {
  565. grd_clamdiaghist.row = 0;
  566. model.resetInstanceNode("/root/hidden/selected/termcd");
  567. model.resetInstanceNode("/root/hidden/selected/engdiagnm");
  568. model.resetInstanceNode("/root/hidden/selected/hngdiagnm");
  569. model.refresh();
  570. }
  571. ]]>
  572. </script>
  573. </datagrid>
  574. <line id="line12" class="line_1" style="x1:915px; y1:171px; x2:1195px; y2:171px; "/>
  575. <caption id="caption17" class="tit_2" style="left:915px; top:156px; width:109px; height:13px; ">의료정보 Index</caption>
  576. <datagrid id="grd_medinfoindex" nodeset="/root/main/diaghist/list01/mmohdiag3" caption="R/O^상병코드^상병명(한글)" colsep="^" colwidth="30, 54, 135" dataheight="23" ellipsis="true" explorerbar="sort" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" tooltip="true" style="left:915px; top:176px; width:280px; height:550px; ">
  577. <col checkvalue="R,C" disabled="true" ref="diagkindcd" type="checkbox" style="text-align:center; "/>
  578. <col ref="diagcd" style="text-align:center; "/>
  579. <col ref="diaghngnm"/>
  580. <script type="javascript" ev:event="onclick">
  581. <![CDATA[
  582. // if(grd_medinfoindex.row == 0) {
  583. // return false;
  584. // }
  585. // var row = grd_grd_medinfoindex.row;
  586. // opt_engdiagnm.value = model.getValue("/root/main/diaghist/list01/mmohdiag3["+row+"]/diagengnm");
  587. // opt_hngdiagnm.value = model.getValue("/root/main/diaghist/list01/mmohdiag3["+row+"]/diaghngnm");
  588. ]]>
  589. </script>
  590. </datagrid>
  591. <line id="line3" class="line_2" style="x1:0px; y1:97px; x2:340px; y2:97px; "/>
  592. <select1 id="rdo_ioflag" ref="/root/hidden/selected/rdoioflag" appearance="full" cols="3" vcellspacing="5" overflow="visible" style="left:38px; top:100px; width:130px; height:20px; border-style:none; ">
  593. <choices>
  594. <item>
  595. <label>전체</label>
  596. <value>-</value>
  597. </item>
  598. <item>
  599. <label>입원</label>
  600. <value>I</value>
  601. </item>
  602. <item>
  603. <label>외래</label>
  604. <value>O</value>
  605. </item>
  606. </choices>
  607. <script type="javascript" ev:event="xforms-value-changed">
  608. <![CDATA[
  609. // 입원외래구분 Radio / 진료과 Combo 필터링 적용
  610. fSelectedIODept();
  611. ]]>
  612. </script>
  613. </select1>
  614. <caption id="caption7" class="cell_1" style="left:172px; top:99px; width:59px; height:23px; ">진료과</caption>
  615. <select1 id="cmb_orddept" ref="/root/hidden/selected/cmborddept" class="combo_default" appearance="minimal" style="left:234px; top:100px; width:106px; height:19px; ">
  616. <choices>
  617. <itemset nodeset="/root/main/orddeptcd/orddeptlist">
  618. <label ref="nm"/>
  619. <value ref="cd"/>
  620. </itemset>
  621. </choices>
  622. <script type="javascript" ev:event="xforms-value-changed">
  623. <![CDATA[
  624. // 입원외래구분 Radio / 진료과 Combo 필터링 적용
  625. fSelectedIODept();
  626. ]]>
  627. </script>
  628. </select1>
  629. <caption id="caption8" class="cell_1" style="left:0px; top:99px; width:35px; height:23px; ">구분</caption>
  630. <line id="line4" class="line_3" style="x1:0px; y1:121px; x2:340px; y2:121px; "/>
  631. <line id="line13" class="line_2" style="x1:345px; y1:97px; x2:1194px; y2:97px; "/>
  632. <caption id="caption9" class="cell_1" style="left:345px; top:75px; width:80px; height:23px; ">확장상병</caption>
  633. <output id="opt_termcd" ref="/root/hidden/selected/termcd" class="output_fix" style="left:428px; top:76px; width:766px; height:19px; "/>
  634. </group>
  635. <group id="grp_btn" style="left:0px; top:757px; width:1195px; height:27px; ">
  636. <button id="btn_init" class="btn4_letter3" navindex="6" style="left:956px; top:5px; width:68px; height:22px; ">
  637. <caption>초기화</caption>
  638. <script type="javascript" ev:event="DOMActivate">
  639. <![CDATA[
  640. fInitialize();
  641. model.refresh();
  642. ]]>
  643. </script>
  644. </button>
  645. <line id="line9" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  646. <button id="btn_close" class="btn4_letter2" navindex="7" style="left:1134px; top:5px; width:56px; height:22px; ">
  647. <caption>닫기</caption>
  648. <close ev:event="DOMActivate"/>
  649. </button>
  650. <button id="btn_judgdiag" class="btn4_letter6" navindex="6" style="left:1027px; top:5px; width:104px; height:22px; ">
  651. <caption>심사상병전달</caption>
  652. <script type="javascript" ev:event="DOMActivate">
  653. <![CDATA[
  654. model.removeNodeset("/root/hidden/smpiz00100/rslt");
  655. var max = 1;
  656. for (var i = 0; i < grd_orddiaghist.selectedRows; i++) {
  657. var row = grd_orddiaghist.selectedrow(i);
  658. var diagcd = model.getValue("/root/main/diaghist/list01/mmohdiag1[" + row + "]/diagcd");
  659. if (diagcd) {
  660. model.makeValue("/root/hidden/smpiz00100/rslt/diag[" + max + "]/diagcd", diagcd);
  661. model.makeValue("/root/hidden/smpiz00100/rslt/diag[" + max + "]/diagkindcd", model.getValue("/root/main/diaghist/list01/mmohdiag1[" + row + "]/diagkindcd"));
  662. model.makeValue("/root/hidden/smpiz00100/rslt/diag[" + max + "]/diaghngnm", model.getValue("/root/main/diaghist/list01/mmohdiag1[" + row + "]/diaghngnm"));
  663. model.makeValue("/root/hidden/smpiz00100/rslt/diag[" + max + "]/diagengnm", model.getValue("/root/main/diaghist/list01/mmohdiag1[" + row + "]/diagengnm"));
  664. max++;
  665. }
  666. }
  667. for (var i = 0; i < grd_clamdiaghist.selectedRows; i++) {
  668. var row = grd_clamdiaghist.selectedrow(i);
  669. var diagcd = model.getValue("/root/main/diaghist/list01/mmohdiag2[" + row + "]/diagcd");
  670. if (diagcd) {
  671. model.makeValue("/root/hidden/smpiz00100/rslt/diag[" + max + "]/diagcd", diagcd);
  672. model.makeValue("/root/hidden/smpiz00100/rslt/diag[" + max + "]/diagkindcd", model.getValue("/root/main/diaghist/list01/mmohdiag2[" + row + "]/diagkindcd"));
  673. model.makeValue("/root/hidden/smpiz00100/rslt/diag[" + max + "]/diaghngnm", model.getValue("/root/main/diaghist/list01/mmohdiag2[" + row + "]/diaghngnm"));
  674. model.makeValue("/root/hidden/smpiz00100/rslt/diag[" + max + "]/diagengnm", model.getValue("/root/main/diaghist/list01/mmohdiag2[" + row + "]/diagengnm"));
  675. max++;
  676. }
  677. }
  678. opener.model.removeNodeset("/root/hidden/smpiz00100/rslt");
  679. opener.model.makeNode("/root/hidden/smpiz00100/rslt");
  680. model.copyNode(opener.root.hidden.smpiz00100.rslt, "/root/hidden/smpiz00100/rslt");
  681. window.close();
  682. ]]>
  683. </script>
  684. </button>
  685. </group>
  686. </xhtml:body>
  687. </xhtml:html>