SMPIZ00200_청구상벙관리조회.xrw 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064
  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 type="text/css" href="../../../com/commonweb/css/common.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. <clamfromdd/>
  90. <clamtodd/>
  91. </send>
  92. <init>
  93. <!-- opener (예:SMPID20300_입원사후심사관리) 화면에서 설정된 검색조건을 보내는 경로임-->
  94. <pid/>
  95. <!--
  96. <ordfromdd/>
  97. <ordtodd/>
  98. <srchflag/>
  99. -->
  100. <P0322list/>
  101. </init>
  102. <hidden>
  103. <selected>
  104. <termcd/>
  105. <engdiagnm/>
  106. <hngdiagnm/>
  107. <rdoioflag/>
  108. <cmborddept/>
  109. </selected>
  110. <sppmc02500>
  111. <cond>
  112. <!-- SPPMC02500_환자조회 화면으로 검색조건을 보내는 경로임 -->
  113. <srchcond/>
  114. <pid/>
  115. <hngnm/>
  116. <rrgstno1/>
  117. <rrgstno2/>
  118. </cond>
  119. </sppmc02500>
  120. <smpiz00200>
  121. <rslt>
  122. <diag>
  123. <diagcd/>
  124. <diagkindcd/>
  125. <diaghngnm/>
  126. <diagengnm/>
  127. </diag>
  128. </rslt>
  129. </smpiz00200>
  130. <sppiz00600>
  131. <cond>
  132. <!-- 상병 Grid '치식' 컬럼 에서 SPPIZ00600_상병및처방별치식 에 전달하기 위한 조건 값 -->
  133. <clamym/>
  134. <clamdg/>
  135. <pid/>
  136. <pidsn/>
  137. <indd/>
  138. <cretno/>
  139. <toot/>
  140. <flag/>
  141. <list/>
  142. <popyn/>
  143. </cond>
  144. <rslt>
  145. <list/>
  146. </rslt>
  147. </sppiz00600>
  148. <base>
  149. <basedd/>
  150. </base>
  151. <popupmenu>
  152. <gridcldi>
  153. <item>
  154. <name>상병순서 위로</name>
  155. <func>fDiagSeqUp</func>
  156. </item>
  157. <item>
  158. <name>상병순서 아래로</name>
  159. <func>fDiagSeqDown</func>
  160. </item>
  161. <item>
  162. <name>-</name>
  163. <func/>
  164. </item>
  165. <item>
  166. <name>행 삽입</name>
  167. <func>fDiagGridInsertRow</func>
  168. </item>
  169. <item>
  170. <name>행 추가</name>
  171. <func>fDiagGridAddRow</func>
  172. </item>
  173. <item>
  174. <name>행 추가(5줄)</name>
  175. <func>fDiagGridInsertRowMulti</func>
  176. </item>
  177. <item>
  178. <name>행 삭제</name>
  179. <func>fDiagGridDeleteRow</func>
  180. </item>
  181. <!-- 2008-12-10 행 삭제시 rowHidden하므로 삭제취소 불필요하여 주석처리함.
  182. <delitem>
  183. <name>삭제 취소</name>
  184. <func>fDiagGridDeleteCancel</func>
  185. </delitem>
  186. -->
  187. </gridcldi>
  188. </popupmenu>
  189. <list1>
  190. <cldi>
  191. <oldseq/>
  192. <olddiagcd/>
  193. <olddiagnm/>
  194. <oldengnm/>
  195. <oldrowstat/>
  196. <oldordfromdd/>
  197. </cldi>
  198. </list1>
  199. <list3>
  200. <msgspclformat/>
  201. </list3>
  202. <sppiz00400>
  203. <cond/>
  204. </sppiz00400>
  205. </hidden>
  206. </root>
  207. </instance>
  208. <submission id="TRZBC00102" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  209. <submission id="TRPAM00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/hidden/tmp"/>
  210. <submission id="TRPIZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/diaghist"/>
  211. <submission id="TRPIZ00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/diaghist/list01"/>
  212. <submission id="TXPIZ00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/exepidhcldi" resultref="/root/main/diaghist"/>
  213. <submission id="TXPIZ00202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/diaghist/list01/mmohdiag2"/>
  214. <submission id="TRPID20313" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/hidden/getvcode/cond" resultref="/root/hidden/getvcode"/>
  215. <submission id="TRPID20306" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/hidden/sppiz00400/cond" resultref="/root/hidden/sppiz00400"/>
  216. <script type="javascript" ev:event="xforms-ready">
  217. <![CDATA[
  218. var today = new Date();
  219. var baseyear = today.getDateFormat("YYYY"); // (dateHelper.js)에서 제공하는 함수를 사용하여 해당 년를 구한다.
  220. var basemonth = today.getDateFormat("MM");
  221. var baseday = today.getDateFormat("DD");
  222. var currentdd = baseyear + basemonth + baseday;
  223. model.setValue("/root/hidden/base/basedd", currentdd);
  224. // (PAM.js) submission id="TRPAM00101" 를 사용하여 진료과 / 의사명 Combo item을 가져온다.
  225. // model.copyNode("root/init/orddeptcd", "root/hidden/tmp/orddeptcd"); model.copyNode("root/init/orddrid", "root/hidden/tmp/orddrid"); 처리가 이뤄짐
  226. pamGetDeptCDDrIDList();
  227. fInitialize(); // 화면을 초기화한다.
  228. fCheckAuth(); // 화면 권한을 설정한다.
  229. fCheckOpener(); // 심사화면에서 팝업용으로 호출한 경우, 조건값을 받아 조회한다.
  230. // // 기간 default 3개월 설정
  231. // model.makeValue("/root/send/refterm","2");
  232. // var currentdate = getCurrentDate();
  233. // model.makeValue("/root/send/fromdd", currentdate);
  234. // model.makeValue("/root/send/todd", currentdate);
  235. model.refresh();
  236. ]]>
  237. </script>
  238. </model>
  239. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  240. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  241. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  242. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  243. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
  244. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  245. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  246. <script type="javascript" src="../../../pam/insucomweb/js/SMPIZ00200.js"/>
  247. <script type="javascript">
  248. <![CDATA[
  249. var diagSelIdx = 0; //진료상병이력에 선택된 인덱스 정보
  250. var clamSelIdx = 0; //청구상병이력에 선택된 인덱스 정보
  251. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  252. function fInitialize() {
  253. //청구대상명세서 grid제목줄에 checkbox 생성
  254. grd_clamhistlist.fixedcellcheckbox(0,0) = true;
  255. model.setFocus("ipt_pid");
  256. // model.resetInstanceNode("/root/main"); 의 경우 이전 조회한 값들의 빈 node 가 남아 Grid에 빈줄이 남게 된다.
  257. model.resetInstanceNode("/root/main/diaghist/item1");
  258. model.removeNodeset("/root/main/diaghist/list1");
  259. model.removeNodeset("/root/main/diaghist/list01");
  260. if (isPopup()) { // (common.js) 자신이 팝업인지 아닌지를 리턴한다.
  261. // 심사화면 팝업용인 경우 "초기화" 하여도 pid 값을 유지하도록 변경함.
  262. var oldpid = model.getValue("/root/send/pid");
  263. model.resetInstanceNode("/root/send");
  264. model.setValue("/root/send/pid", oldpid);
  265. } else {
  266. model.resetInstanceNode("/root/send");
  267. }
  268. //model.setValue("/root/send/srchflag", "emr"); // 검색구분 Radio의 초기값을 설정한다.
  269. model.setValue("/root/send/ordtodd", model.getValue("/root/hidden/base/basedd"));
  270. //model.resetInstanceNode("/root/init"); 은 opener(예:SMPID20300_입원사후심사관리)에서 조회조건을 전달받는 경로임
  271. model.resetInstanceNode("/root/hidden/selected");
  272. model.setValue("/root/hidden/selected/rdoioflag", "-");
  273. // 기간 default 6개월 설정, 현재일 설정
  274. model.makeValue("/root/send/refterm","3");
  275. var currentdate = getCurrentDate();
  276. model.makeValue("/root/send/fromdd", currentdate);
  277. model.makeValue("/root/send/todd", currentdate);
  278. // SMPID20500_외래사후심사관리.xrw에서 전달한 청구년월 정보로 청구대상기간 조회 조건 정보를 셋팅(시작일: yyyy-mm-01, 종료일: yyyy-mm-달의 마지막날)
  279. var clamym = model.getValue("/root/init/clamym");
  280. model.makeValue("/root/send/clamfromdd", clamym + "01" );
  281. model.makeValue("/root/send/clamtodd", clamym + getDayCountForMonth(clamym.substr(0, 4), clamym.substr(4, 2)));
  282. model.makeNode("/root/init/P0322list/P0322");
  283. zbcfGetCodeList(
  284. new Array(
  285. "P0322" // 청구세부
  286. ),
  287. new Array(
  288. "/root/init/P0322list"
  289. ),
  290. false ); // minimum을 'false'로 설정한 경우에는 코드의 모든속성을 가져온다.
  291. }
  292. // 화면 권한을 설정한다.
  293. function fCheckAuth() {
  294. if (isPopup()) { // (common.js) 자신이 팝업인지 아닌지를 리턴한다.
  295. btn_judgdiag.disabled = false;
  296. btn_close.disabled = false;
  297. } else {
  298. btn_judgdiag.disabled = true;
  299. btn_close.disabled = true;
  300. }
  301. }
  302. // 심사화면에서 팝업용으로 호출한 경우, 조건값을 받아 조회한다.
  303. function fCheckOpener() {
  304. // roo/send 는 초기화 되므로 init 경로에 값을 전달받는다.
  305. if (model.getValue("/root/init/pid")) {
  306. model.makeValue("/root/send/pid", model.getValue("/root/init/pid"));
  307. // model.copyNode("/root/send", "/root/init");
  308. // 기간 default 6개월 설정
  309. model.makeValue("/root/send/refterm","3");
  310. var currentdate = getCurrentDate();
  311. model.makeValue("/root/send/fromdd", currentdate);
  312. model.makeValue("/root/send/todd", currentdate);
  313. submit("TRPIZ00101");
  314. // 상병이력에 해당되는 진료과만 보이도록 해준다.
  315. fSetOrdDeptCdList();
  316. }
  317. }
  318. // 등록번호 입력 후 Enter 또는 "조회" 버튼을 누르면 상병이력을 조회한다.
  319. function fGetIODiagHistList() {
  320. var ipt_pid = model.getValue("/root/send/pid");
  321. if (ipt_pid == "") {
  322. messageBox("검색할 등록번호를", "C001"); ///검색할 등록번호를 입력하십시오.
  323. return;
  324. }
  325. var fromdd = model.getValue("/root/send/fromdd");
  326. var todd = model.getValue("/root/send/todd");
  327. if (fromdd != "" && todd != "") {
  328. if (fromdd > todd) {
  329. messageBox("검색 시작날짜가 종료날짜 보다 클 수", "I004"); ///검색 시작날짜가 종료날짜 보다 클 수 없습니다.
  330. return;
  331. }
  332. }
  333. /*
  334. // [2007.03.23] Table Layout 상에는 pid가 VARCHAR(10) 이지만, 테스트용 data에서는 VARCHAR(8) 이므로 8자리로 구현함
  335. // [2007.04.27] 외래등록에서 입력한 테스트용 data의 pid가 8자리 미만인 경우가 많아서 입력된 pid 그대로 조회하도록 함.
  336. if (ipt_pid.length < 8) {
  337. ipt_pid = ipt_pid.getLeftPad(8, "0"); // (stringHelper.js) 저장된 숫자 값에 원하는 길이만큼 '0'을 붙여 표현
  338. model.setValue("/root/send/pid", ipt_pid);
  339. }
  340. */
  341. model.resetInstanceNode("/root/main/diaghist/item1/pmcmptbs");
  342. model.resetInstanceNode("/root/hidden/selected");
  343. model.setValue("/root/hidden/selected/rdoioflag", "-");
  344. grd_diaghistlist.attribute("nodeset") = "/root/main/diaghist/list1/diagdatelist";
  345. grd_diaghistlist.rebuild();
  346. submit("TRPIZ00101");
  347. fSetOrdDeptCdList();
  348. if (model.getValue("/root/main/diaghist/item1/pmcmptbs/pid") == "") {
  349. messageBox("입력된 등록번호의 환자정보가", "I004"); ///입력된 등록번호의 환자정보가 없습니다.
  350. }
  351. }
  352. // 진료과 Combo 목록을 작성한다.
  353. function fSetOrdDeptCdList() {
  354. model.removeNodeset("/root/main/orddeptcd");
  355. model.makeNode("/root/main/orddeptcd/orddeptlist/cd");
  356. model.makeNode("/root/main/orddeptcd/orddeptlist/nm");
  357. for (var i = 1; i < grd_diaghistlist.rows; i++) {
  358. var deptcd = model.getValue("/root/main/diaghist/list1/diagdatelist["+ i +"]/orddeptcd");
  359. var orddeptcNode = instance1.selectSingleNode("/root/main/orddeptcd");
  360. var nodeList = orddeptcNode.childNodes;
  361. var isFind = false;
  362. for (var j = 1; j <= nodeList.length; j++) {
  363. var cd = model.getValue("/root/main/orddeptcd/orddeptlist[" + j + "]/cd");
  364. if (deptcd == cd) { // 진료과 필터링 콤보에 이미 추가된 진료과인지 확인한다.
  365. isFind = true;
  366. j = nodeList.length + 1;
  367. }
  368. }
  369. if (!isFind) {
  370. var deptnm = grd_diaghistlist.labelMatrix(i, grd_diaghistlist.colRef("orddeptcd"));
  371. if (deptnm) {
  372. model.makeValue("/root/main/orddeptcd/orddeptlist[" + (nodeList.length + 1) + "]/nm", deptnm);
  373. } else { // 해당 진료과 명칭이 없는 경우 진료과코드로 대신한다.
  374. model.makeValue("/root/main/orddeptcd/orddeptlist[" + (nodeList.length + 1) + "]/nm", deptcd);
  375. }
  376. model.makeValue("/root/main/orddeptcd/orddeptlist[" + (nodeList.length + 1) + "]/cd", deptcd);
  377. }
  378. }
  379. // 상병이력목록 첫번째 날짜가 선택되도록 한다.
  380. grd_diaghistlist.row = 1;
  381. var pid = model.getValue("/root/main/diaghist/list1/diagdatelist/pid");
  382. if (pid) {
  383. // 상병 이력 목록 Grid를 선택한 경우
  384. fPatIODiagHistList();
  385. } else {
  386. model.refresh();
  387. }
  388. }
  389. // 입원외래구분 Radio / 진료과 Combo 필터링 적용
  390. function fSelectedIODept() {
  391. var ioflag = model.getValue("/root/hidden/selected/rdoioflag");
  392. var selCond = "";
  393. if (ioflag == "I") {
  394. selCond = "ioflagcd='I'";
  395. }
  396. else if (ioflag == "O") {
  397. selCond = "ioflagcd='O'";
  398. }
  399. var orddept = model.getValue("/root/hidden/selected/cmborddept");
  400. if (orddept != "") {
  401. if (selCond == "") {
  402. selCond = "orddeptcd='" + orddept + "'";
  403. } else {
  404. selCond += "and orddeptcd='" + orddept + "'";
  405. }
  406. }
  407. if (selCond) {
  408. grd_diaghistlist.attribute("nodeset") = "/root/main/diaghist/list1/diagdatelist[" + selCond + "]";
  409. grd_clamhistlist.attribute("nodeset") = "/root/main/diaghist/list2/clamhistlist[" + selCond + "]";
  410. grd_diaghistlist.rebuild();
  411. grd_clamhistlist.rebuild();
  412. model.resetInstanceNode("/root/hidden/selected/termcd");
  413. model.resetInstanceNode("/root/hidden/selected/engdiagnm");
  414. model.resetInstanceNode("/root/hidden/selected/hngdiagnm");
  415. model.removeNodeset("/root/main/diaghist/list01");
  416. model.refresh();
  417. } else{
  418. grd_diaghistlist.attribute("nodeset") = "/root/main/diaghist/list1/diagdatelist";
  419. grd_clamhistlist.attribute("nodeset") = "/root/main/diaghist/list2/clamhistlist";
  420. grd_diaghistlist.rebuild();
  421. // 상병이력목록 첫번째 날짜가 선택되도록 한다.
  422. grd_diaghistlist.row = 1;
  423. var pid = model.getValue("/root/main/diaghist/list1/diagdatelist/pid");
  424. if (pid) {
  425. // 상병 이력 목록 Grid를 선택한 경우
  426. fPatIODiagHistList();
  427. }
  428. }
  429. }
  430. // 상병 이력 목록 Grid를 선택한 경우
  431. function fPatIODiagHistList() {
  432. model.resetInstanceNode("/root/hidden/selected/termcd");
  433. model.resetInstanceNode("/root/hidden/selected/engdiagnm");
  434. model.resetInstanceNode("/root/hidden/selected/hngdiagnm");
  435. var row = grd_diaghistlist.row;
  436. model.makeValue("/root/send/pid", model.getValue("/root/main/diaghist/list1/diagdatelist["+ row +"]/pid"));
  437. model.makeValue("/root/send/ioflag", model.getValue("/root/main/diaghist/list1/diagdatelist["+ row +"]/ioflagcd"));
  438. model.makeValue("/root/send/deptcd", model.getValue("/root/main/diaghist/list1/diagdatelist["+ row +"]/orddeptcd"));
  439. model.makeValue("/root/send/orddd", model.getValue("/root/main/diaghist/list1/diagdatelist["+ row +"]/ordfromdd"));
  440. model.makeValue("/root/send/clamym", model.getValue("/root/main/diaghist/list1/diagdatelist["+ row +"]/clamym"));
  441. model.makeValue("/root/send/clamdg", model.getValue("/root/main/diaghist/list1/diagdatelist["+ row +"]/clamdg"));
  442. model.makeValue("/root/send/pidsn", model.getValue("/root/main/diaghist/list1/diagdatelist["+ row +"]/pidsn"));
  443. // 화면ID정보 전달
  444. model.makeValue("/root/send/screenid", getScreenID(null));
  445. submit("TRPIZ00102");
  446. if (grd_orddiaghist.rows > 1) {
  447. grd_orddiaghist.row = 1;
  448. fSelectOrdDiagHist(); // 진료상병이력을 선택한 경우
  449. }
  450. else if (grd_cldihist.rows > 1) {
  451. grd_cldihist.row = 1;
  452. fSelectClamDiagHist(); // 청구상병이력을 선택한 경우
  453. }
  454. }
  455. // 진료상병이력을 선택한 경우
  456. function fSelectOrdDiagHist() {
  457. var row = grd_orddiaghist.row;
  458. model.setValue("/root/hidden/selected/termcd", model.getValue("/root/main/diaghist/list01/mmohdiag1["+row+"]/termcd"));
  459. model.setValue("/root/hidden/selected/engdiagnm", model.getValue("/root/main/diaghist/list01/mmohdiag1["+row+"]/termengnm"));
  460. model.setValue("/root/hidden/selected/hngdiagnm", model.getValue("/root/main/diaghist/list01/mmohdiag1["+row+"]/termhngnm"));
  461. model.refresh();
  462. }
  463. // 청구상병이력을 선택한 경우
  464. function fSelectClamDiagHist() {
  465. var row = grd_cldihist.row;
  466. model.setValue("/root/hidden/selected/termcd", "");
  467. model.setValue("/root/hidden/selected/engdiagnm", model.getValue("/root/main/diaghist/list01/mmohdiag2["+row+"]/diagengnm"));
  468. model.setValue("/root/hidden/selected/hngdiagnm", model.getValue("/root/main/diaghist/list01/mmohdiag2["+row+"]/diaghngnm"));
  469. model.refresh();
  470. }
  471. ]]>
  472. </script>
  473. </xhtml:head>
  474. <xhtml:body pagewidth="1211" pageheight="784" guideline="1,950;1,296;2,663;2,140;1,740;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  475. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  476. <caption id="caption1" class="tit_1" style="left:0px; top:0px; width:98px; height:14px; ">청구상병 관리</caption>
  477. </group>
  478. <group id="grp_biz" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  479. <group id="grp_sea" style="left:0px; top:10px; width:1194px; height:35px; ">
  480. <shape id="roundrect1" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  481. <caption id="caption2" class="search_name" style="left:15px; top:9px; width:86px; height:17px; ">등록번호 :</caption>
  482. <input id="ipt_pid" ref="/root/send/pid" class="input_s_essential" navindex="1" format="####" style="left:104px; top:8px; width:90px; height:19px; ">
  483. <script type="javascript" ev:event="onkeypress">
  484. <![CDATA[
  485. if (event.keyCode == "13") {
  486. setInputNodeCurText(); // (tfHelper.js) 현재 인풋값 노드 반영
  487. fGetIODiagHistList(); // 등록번호 입력 후 Enter 입력으로 상병이력을 조회한다.
  488. }
  489. ]]>
  490. </script>
  491. </input>
  492. <button id="btn_srchpid" class="icon_search" navindex="2" style="left:195px; top:10px; width:19px; height:15px; ">
  493. <caption/>
  494. <script type="javascript" ev:event="DOMActivate">
  495. <![CDATA[
  496. var ipt_pid = model.getValue("/root/send/pid");
  497. if (ipt_pid) {
  498. /*
  499. if (ipt_pid.length < 8) {
  500. ipt_pid = ipt_pid.getLeftPad(8, "0"); // (stringHelper.js) 저장된 숫자 값에 원하는 길이만큼 '0'을 붙여 표현
  501. }
  502. */
  503. model.setValue("/root/hidden/sppmc02500/cond/srchcond", "1"); // 검색조건 : 등록번호로 설정
  504. model.setValue("/root/hidden/sppmc02500/cond/pid", ipt_pid);
  505. } else {
  506. model.resetInstanceNode("/root/hidden/sppmc02500/cond");
  507. }
  508. modal("SPPMC02500", 1, 150, 150, "SPPMC02500", "/root/hidden/sppmc02500/cond", "/root/send", "", "");
  509. var srch_pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  510. if (srch_pid) { // SPPMC02500_환자조회 화면에서 조회한 경우임
  511. model.removeNodeset("/root/main/patinfo/patinfolist"); // patinfolist가 제거됨 (resetInstanceNode의 경우 값은 지우고 노드는 남아있음)
  512. model.makeNode("/root/main/patinfo/patinfolist"); // SPPMC02500_환자조회 팝업을 다시 조회할 경우를 위해 다시 노드를 추가함
  513. model.setValue("/root/send/pid", srch_pid);
  514. }
  515. model.refresh();
  516. ]]>
  517. </script>
  518. </button>
  519. <caption id="caption3" class="search_name" style="left:770px; top:10px; width:102px; height:17px; ">청구대상기간</caption>
  520. <input id="ipt_ordfromdd" ref="/root/send/clamfromdd" class="input_search" navindex="3" inputtype="date" format="yyyy-mm-dd" style="left:879px; top:9px; width:97px; height:19px; "/>
  521. <caption id="caption4" class="search_no_b" style="left:979px; top:10px; width:12px; height:17px; ">~</caption>
  522. <input id="ipt_ordtodd" ref="/root/send/clamtodd" class="input_search" navindex="4" inputtype="date" format="yyyy-mm-dd" style="left:994px; top:9px; width:97px; height:19px; "/>
  523. <line id="line1" class="line_4" style="x1:1108px; y1:7px; x2:1108px; y2:29px; "/>
  524. <button id="btn_srch" class="btn1_letter2" navindex="5" style="left:1123px; top:7px; width:56px; height:22px; ">
  525. <caption>조회</caption>
  526. <script type="javascript" ev:event="DOMActivate">
  527. <![CDATA[
  528. fGetIODiagHistList(); // "조회" 버튼을 누르면 상병이력을 조회한다.
  529. ]]>
  530. </script>
  531. </button>
  532. <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; ">
  533. <choices>
  534. <item>
  535. <label>전체</label>
  536. <value>-</value>
  537. </item>
  538. <item>
  539. <label>1개월</label>
  540. <value>1</value>
  541. </item>
  542. <item>
  543. <label>3개월</label>
  544. <value>2</value>
  545. </item>
  546. <item>
  547. <label>6개월</label>
  548. <value>3</value>
  549. </item>
  550. <item>
  551. <label/>
  552. <value>4</value>
  553. </item>
  554. </choices>
  555. <script type="javascript" ev:event="xforms-value-changed">
  556. <![CDATA[
  557. var refterm = model.getValue("/root/send/refterm");
  558. if (refterm == "4") {
  559. opt_fromdd.disabled = false;
  560. opt_todd.disabled = false;
  561. } else {
  562. opt_fromdd.disabled = true;
  563. opt_todd.disabled = true;
  564. fGetIODiagHistList(); // "조회" 버튼을 누르면 상병이력을 조회한다.
  565. }
  566. ]]>
  567. </script>
  568. </select1>
  569. <caption id="caption18" class="search_name" style="left:250px; top:9px; width:73px; height:17px; ">기간 :</caption>
  570. <caption id="caption19" style="left:645px; top:8px; width:12px; height:19px; ">~</caption>
  571. <input id="opt_todd" ref="/root/send/todd" class="input_search" disabled="true" inputtype="date" style="left:665px; top:8px; width:85px; height:19px; "/>
  572. <input id="opt_fromdd" ref="/root/send/fromdd" class="input_search" disabled="true" inputtype="date" style="left:555px; top:8px; width:85px; height:19px; "/>
  573. </group>
  574. <caption id="caption6" class="tit_2" style="left:5px; top:55px; width:69px; height:13px; ">환자정보</caption>
  575. <line id="line2" class="line_1" style="x1:0px; y1:70px; x2:340px; y2:70px; "/>
  576. <output id="opt_gender" ref="/root/main/diaghist/item1/pmcmptbs/gender" class="output_fix" style="left:116px; top:76px; width:20px; height:19px; "/>
  577. <output id="opt_age" ref="/root/main/diaghist/item1/pmcmptbs/age" class="output_fix" style="left:139px; top:76px; width:30px; height:19px; "/>
  578. <caption id="caption10" class="cell_1" style="left:0px; top:75px; width:35px; height:23px; ">이름</caption>
  579. <output id="opt_patnm" ref="/root/main/diaghist/item1/pmcmptbs/patnm" class="output_fix" style="left:38px; top:76px; width:75px; height:19px; "/>
  580. <caption id="caption11" class="cell_1" style="left:172px; top:75px; width:59px; height:23px; ">주민번호</caption>
  581. <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; "/>
  582. <caption id="caption12" class="tit_2" style="left:350px; top:55px; width:118px; height:14px; ">선택된 상병 정보</caption>
  583. <line id="line5" class="line_1" style="x1:345px; y1:70px; x2:1194px; y2:70px; "/>
  584. <caption id="caption13" class="cell_1" style="left:345px; top:99px; width:80px; height:23px; ">영문상병명</caption>
  585. <output id="opt_engdiagnm" ref="/root/hidden/selected/engdiagnm" class="output_fix" style="left:428px; top:100px; width:766px; height:19px; "/>
  586. <line id="line6" class="line_2" style="x1:345px; y1:121px; x2:1194px; y2:121px; "/>
  587. <caption id="caption14" class="cell_1" style="left:345px; top:123px; width:80px; height:23px; ">한글상병명</caption>
  588. <output id="opt_hngdiagnm" ref="/root/hidden/selected/hngdiagnm" class="output_fix" style="left:428px; top:124px; width:766px; height:19px; "/>
  589. <line id="line7" class="line_3" style="x1:345px; y1:145px; x2:1194px; y2:145px; "/>
  590. <caption id="caption15" class="tit_2" style="left:5px; top:156px; width:105px; height:13px; ">상병 이력 목록</caption>
  591. <line id="line8" class="line_1" style="x1:0px; y1:172px; x2:538px; y2:171px; "/>
  592. <line id="line10" class="line_1" style="x1:0px; y1:513px; x2:346px; y2:514px; "/>
  593. <line id="line11" class="line_1" style="x1:356px; y1:513px; x2:1190px; y2:512px; "/>
  594. <caption id="caption5" class="tit_2" style="left:0px; top:497px; width:130px; height:13px; ">진료상병이력</caption>
  595. <caption id="caption16" class="tit_2" style="left:355px; top:497px; width:105px; height:13px; ">청구상병이력</caption>
  596. <datagrid id="grd_diaghistlist" nodeset="/root/main/diaghist/list1/diagdatelist" caption="청구년월^차수^진료개시일^구분^진료과^진료의" colsep="^" colwidth="97, 40, 89, 70, 103, 87" dataheight="23" ellipsis="true" explorerbar="sort" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" tooltip="true" style="left:0px; top:176px; width:540px; height:312px; ">
  597. <col ref="clamym" format="yyyy-mm" style="text-align:center; "/>
  598. <col ref="clamdg" style="text-align:center; "/>
  599. <col ref="ordfromdd" format="yyyy-mm-dd" style="text-align:center; "/>
  600. <col ref="ioflag" style="text-align:center; "/>
  601. <col disabled="true" ref="orddeptcd" type="combo" style="text-align:center; ">
  602. <choices>
  603. <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
  604. <label ref="nm"/>
  605. <value ref="cd"/>
  606. </itemset>
  607. </choices>
  608. </col>
  609. <col disabled="true" ref="orddrid" type="combo" style="text-align:center; ">
  610. <choices>
  611. <itemset nodeset="/root/init/orddrid/orddridlist">
  612. <label ref="nm"/>
  613. <value ref="cd"/>
  614. </itemset>
  615. </choices>
  616. </col>
  617. <script type="javascript" ev:event="onclick">
  618. <![CDATA[
  619. if (grd_diaghistlist.isCell(event.target) && grd_diaghistlist.row >= grd_diaghistlist.fixedRows) {
  620. // 상병 이력 목록 Grid를 선택한 경우
  621. fPatIODiagHistList();
  622. }
  623. ]]>
  624. </script>
  625. </datagrid>
  626. <datagrid id="grd_orddiaghist" nodeset="/root/main/diaghist/list01/mmohdiag1" caption="R/O^상병코드^상병명(한글)" colsep="^" colwidth="30, 54, 241" dataheight="23" ellipsis="true" explorerbar="sort" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" tooltip="true" style="left:1px; top:518px; width:346px; height:220px; ">
  627. <col checkvalue="R,C" disabled="true" ref="diagkindcd" type="checkbox" style="text-align:center; "/>
  628. <col ref="diagcd" style="text-align:center; "/>
  629. <col ref="diaghngnm"/>
  630. <script type="javascript" ev:event="onclick">
  631. <![CDATA[
  632. if(diagSelIdx == grd_orddiaghist.row){
  633. grd_orddiaghist.row = 0;
  634. diagSelIdx = 0;
  635. }else{
  636. diagSelIdx = grd_orddiaghist.row
  637. }
  638. if (isDataCell()) { // (tfHelper.js) datagrid click or dbclick 시점에 현재 click target이 data 영역인지 check
  639. fSelectOrdDiagHist();
  640. } else {
  641. grd_orddiaghist.row = 0;
  642. model.resetInstanceNode("/root/hidden/selected/termcd");
  643. model.resetInstanceNode("/root/hidden/selected/engdiagnm");
  644. model.resetInstanceNode("/root/hidden/selected/hngdiagnm");
  645. model.refresh();
  646. }
  647. ]]>
  648. </script>
  649. </datagrid>
  650. <datagrid id="grd_cldihist" nodeset="/root/main/diaghist/list01/mmohdiag2" caption="X^R/O^no^상병코드^상 병 명^청구과^MT002^치식EDI^치식^진료일자^특정기호^wundresncd^diagengnm^seqno^workflag^kcd6chk" colsep="^" colwidth="20, 30, 20, 56, 345, 67, 44, 30, 73, 118, 74, 68, 40, 60, 100, 100" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" tooltip="true" style="left:356px; top:517px; width:835px; height:221px; ">
  651. <col ref="rowstat"/>
  652. <col checkvalue="R,C" ref="diagkindcd" type="checkbox"/>
  653. <col imemode="disabled" ref="diagseq" type="input" format="##"/>
  654. <col imemode="disabled" ref="diagcd" type="input" _chartype="upper"/>
  655. <col ref="diagnm"/>
  656. <col disabled="true" ref="clamdeptcd" type="combo">
  657. <choices>
  658. <itemset nodeset="/root/init/P0322list/P0322">
  659. <label ref="cdnm"/>
  660. <value ref="cdid"/>
  661. </itemset>
  662. </choices>
  663. </col>
  664. <col ref="vcode" style="text-align:center; "/>
  665. <col ref="toot" visibility="hidden" style="background-color:#c0c0c0; "/>
  666. <col ref="toot1"/>
  667. <col ref="ordfromdd" type="inputdate" format="yyyy/mm/dd"/>
  668. <col ref="estmspclcd" visibility="hidden" style="background-color:#c0c0c0; "/>
  669. <col ref="wundresncd" visibility="hidden" style="background-color:#c0c0c0; "/>
  670. <col ref="diagengnm" visibility="hidden" style="background-color:#c0c0c0; "/>
  671. <col ref="seqno" visibility="hidden" style="background-color:#c0c0c0; "/>
  672. <col ref="workflag" visibility="hidden" style="background-color:#c0c0c0; "/>
  673. <col ref="kcd6chk" visibility="hidden" style="background-color:#c0c0c0; "/>
  674. <script type="javascript" ev:event="onstartedit">
  675. <![CDATA[
  676. var row = grd_cldihist.row;
  677. model.makeValue("/root/hidden/list1/cldi/oldseq", model.getValue(grd_cldihist.nodeset + "["+ row +"]/diagseq"));
  678. model.makeValue("/root/hidden/list1/cldi/olddiagcd", model.getValue(grd_cldihist.nodeset + "["+ row +"]/diagcd"));
  679. model.makeValue("/root/hidden/list1/cldi/olddiagnm", model.getValue(grd_cldihist.nodeset + "["+ row +"]/diagnm"));
  680. model.makeValue("/root/hidden/list1/cldi/oldengnm", model.getValue(grd_cldihist.nodeset + "["+ row +"]/diagengnm"));
  681. model.makeValue("/root/hidden/list1/cldi/oldrowstat", grd_cldihist.rowstatus(row));
  682. model.makeValue("/root/hidden/list1/cldi/oldordfromdd", model.getValue(grd_cldihist.nodeset + "["+ row +"]/ordfromdd"));
  683. ]]>
  684. </script>
  685. <script type="javascript" ev:event="onendedit">
  686. <![CDATA[
  687. // event="xforms-value-changed" 사용시에는 오류 발생한다.
  688. // 숫자 입력 후 마우스 커서 위치를 바꾸거나 Enter 입력 시에 호출된다.
  689. var col = grd_cldihist.col;
  690. if (col == grd_cldihist.colRef("diagseq")) { // no (상병순서)
  691. if (model.getValue(grd_cldihist.nodeset + "["+ grd_cldihist.row +"]/diagseq") != model.getValue("/root/hidden/list1/cldi/oldseq")) {
  692. // 사용자가 입력한 숫자를 기준으로 상병순서 부여
  693. fChangeDiagNo();
  694. }
  695. }
  696. /*
  697. else if (col == grd_cldihist.colRef("diagcd")) { // '상병코드'
  698. if (model.getValue(grd_cldihist.nodeset + "["+ grd_cldihist.row +"]/diagcd") != model.getValue("/root/hidden/list1/cldi/olddiagcd")) {
  699. model.resetInstanceNode(grd_cldihist.nodeset + "["+ grd_cldihist.row +"]/diagnm");
  700. model.resetInstanceNode(grd_cldihist.nodeset + "["+ grd_cldihist.row +"]/diagengnm");
  701. fSearchDiageCode();
  702. }
  703. }
  704. */
  705. ]]>
  706. </script>
  707. <script type="javascript" ev:event="onmousedown">
  708. <![CDATA[
  709. if (event.button == 3) { // 3 : 오른쪽 버튼
  710. if (grd_cldihist.isCell(event.target) && grd_cldihist.mouseRow >= grd_cldihist.fixedrows) {
  711. var rowstatus = grd_cldihist.rowstatus(grd_cldihist.mouseRow);
  712. if (rowstatus == 4) { // 4 : delete
  713. setPopupMenu("grd_cldihist", false, "/root/hidden/popupmenu/gridcldi/delitem", "name", "func"); // (tfHelper.js) 컨트롤에서 사용자 팝업 설정 함수
  714. } else {
  715. setPopupMenu("grd_cldihist", false, "/root/hidden/popupmenu/gridcldi/item", "name", "func"); // (tfHelper.js) 컨트롤에서 사용자 팝업 설정 함수
  716. }
  717. }
  718. // else {
  719. // // 상병이 한줄도 없는 경우에도 "행 추가"를 하기 위해 사용함
  720. // window.showPopupMenu(true);
  721. // window.setPopupMenu(true, "/root/hidden/popupmenu/gridcldi/inititem", "name", "func", false);
  722. // }
  723. } else {
  724. // if (grd_cldihist.isCell(event.target) && grd_cldihist.mouseRow >= grd_cldihist.fixedrows) {
  725. // // 해당 상병의 한글상병명과 영문상병명이 Message 용 output 컨트롤에 표시된다.
  726. // var diagcd = model.getValue(grd_cldihist.nodeset + "["+ grd_cldihist.mouseRow +"]/diagcd");
  727. // var diagnm = model.getValue(grd_cldihist.nodeset + "["+ grd_cldihist.mouseRow +"]/diagnm");
  728. // var diagengnm = model.getValue(grd_cldihist.nodeset + "["+ grd_cldihist.mouseRow +"]/diagengnm");
  729. // model.setValue("/root/hidden/list3/msgspclformat", "상병코드 - "+ diagcd +" / "+ diagnm +" / "+ diagengnm);
  730. // model.refresh();
  731. // }
  732. }
  733. ]]>
  734. </script>
  735. <script type="javascript" ev:event="DOMFocusOut">
  736. <![CDATA[
  737. initPopupMenu(); // (tfHelper.js) 사용자 팝업 설정 초기화
  738. ]]>
  739. </script>
  740. <script type="javascript" ev:event="ondblclick">
  741. <![CDATA[
  742. var row = grd_cldihist.mouseRow;
  743. grd_cldihist.row = row;
  744. if (grd_cldihist.isCell(event.target) && row >= grd_cldihist.fixedrows) {
  745. var col = grd_cldihist.mouseCol;
  746. if (col == grd_cldihist.colRef("diagnm")) { // '상병명'
  747. // 상병코드 조회를 위해 SPPIZ00400_상병코드조회.xrw 를 호출한다.
  748. fSearchSPPIZ00400();
  749. fSortDiagNo(true);
  750. }
  751. else if (col == grd_cldihist.colRef("toot1")) { // 상병 - 치식여부 (Y/N)
  752. fDiagOrderToothInput("Diag");
  753. }
  754. }
  755. ]]>
  756. </script>
  757. <script type="javascript" ev:event="onentercell">
  758. <![CDATA[
  759. // col@type = "input" 일 경우 onentercell시점에 EditMode 상태 만들기
  760. if (grd_cldihist.colType(grd_cldihist.col) == "input") {
  761. grd_cldihist.editCell();
  762. }
  763. ]]>
  764. </script>
  765. <script type="javascript" ev:event="xforms-value-changed">
  766. <![CDATA[
  767. var col = grd_cldihist.col;
  768. var row = grd_cldihist.row;
  769. if (col == grd_cldihist.colRef("ordfromdd")) { // 진료개시일이 변경된 경우
  770. var ordfromdd = model.getValue(grd_cldihist.nodeset + "["+ row +"]/ordfromdd");
  771. if (!isValidDateTime(ordfromdd)) { // (dateHelper.js) 유효한 날짜, 시간 인지 점검
  772. model.setValue(grd_cldihist.nodeset + "["+ row +"]/ordfromdd", model.getValue("/root/hidden/list1/cldi/oldordfromdd"));
  773. grd_cldihist.rowstatus(row) = model.getValue("/root/hidden/list1/cldi/oldrowstat");
  774. grd_cldihist.refresh();
  775. }
  776. }
  777. else if (col == grd_cldihist.colRef("diagcd")) { // '상병코드'
  778. if (model.getValue("/root/hidden/list1/cldi/olddiagcd") != model.getValue(grd_cldihist.nodeset + "["+ row +"]/diagcd")) {
  779. model.resetInstanceNode(grd_cldihist.nodeset + "["+ grd_cldihist.row +"]/diagnm");
  780. model.resetInstanceNode(grd_cldihist.nodeset + "["+ grd_cldihist.row +"]/diagengnm");
  781. fSearchDiageCode();
  782. }
  783. }
  784. ]]>
  785. </script>
  786. <!-- <script type="javascript" ev:event="onclick">
  787. <![CDATA[
  788. if (grd_cldihist.colType(grd_cldihist.col) == "input") {
  789. grd_cldihist.editCell();
  790. }
  791. ]]>
  792. </script>-->
  793. <script type="javascript" ev:event="onclick">
  794. <![CDATA[
  795. // if (grd_cldihist.isCell(event.target) && grd_cldihist.mouseRow >= grd_cldihist.fixedrows) {
  796. // var row = grd_cldihist.mouseRow;
  797. // // 해당 상병의 한글상병명과 영문상병명이 Message 용 output 컨트롤에 표시된다.
  798. // var diagcd = model.getValue(grd_cldihist.nodeset + "["+ row +"]/diagcd");
  799. // var diagnm = model.getValue(grd_cldihist.nodeset + "["+ row +"]/diagnm");
  800. // var diagengnm = model.getValue(grd_cldihist.nodeset + "["+ row +"]/diagengnm");
  801. // model.setValue("/root/hidden/list3/msgspclformat", "상병코드 - "+ diagcd +" / "+ diagnm +" / "+ diagengnm);
  802. // model.refreshpart("/root/hidden/list3/msgspclformat");
  803. // }
  804. ///////////////
  805. if(clamSelIdx == grd_cldihist.row){
  806. grd_cldihist.row = 0;
  807. clamSelIdx = 0;
  808. }else{
  809. clamSelIdx = grd_cldihist.row
  810. }
  811. if (isDataCell()) { // (tfHelper.js) datagrid click or dbclick 시점에 현재 click target이 data 영역인지 check
  812. fSelectClamDiagHist();
  813. } else {
  814. grd_cldihist.row = 0;
  815. model.resetInstanceNode("/root/hidden/selected/termcd");
  816. model.resetInstanceNode("/root/hidden/selected/engdiagnm");
  817. model.resetInstanceNode("/root/hidden/selected/hngdiagnm");
  818. model.refresh();
  819. }
  820. ]]>
  821. </script>
  822. <script type="javascript" ev:event="oncopy">
  823. <![CDATA[
  824. // 그리드 내용 복사
  825. if (grd_cldihist.selectedRows == 1) { // 한줄
  826. var row = grd_cldihist.row;
  827. var col = grd_cldihist.col;
  828. if (col == grd_cldihist.colRef("diagcd") || col == grd_cldihist.colRef("diagnm")) {
  829. // 상병코드/상병명
  830. // var clip = grd_cldihist.valueMatrix(row, col);
  831. var clip = grd_cldihist.labelMatrix(row, col);
  832. // var clip = grd_cldihist.labelMatrix(grd_cldihist.mouseRow, grd_cldihist.mouseCol);
  833. window.clipBoardData = clip;
  834. } else {
  835. grid_oncopy(); // (tfHelper.js) window.clipBoardData 복사 기능
  836. }
  837. }
  838. else if (grd_cldihist.selectedRows > 1) { // 여러줄
  839. grid_oncopy(); // (tfHelper.js) window.clipBoardData 복사 기능
  840. }
  841. ]]>
  842. </script>
  843. </datagrid>
  844. <line id="line3" class="line_2" style="x1:0px; y1:97px; x2:340px; y2:97px; "/>
  845. <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; ">
  846. <choices>
  847. <item>
  848. <label>전체</label>
  849. <value>-</value>
  850. </item>
  851. <item>
  852. <label>입원</label>
  853. <value>I</value>
  854. </item>
  855. <item>
  856. <label>외래</label>
  857. <value>O</value>
  858. </item>
  859. </choices>
  860. <script type="javascript" ev:event="xforms-value-changed">
  861. <![CDATA[
  862. // 입원외래구분 Radio / 진료과 Combo 필터링 적용
  863. fSelectedIODept();
  864. ]]>
  865. </script>
  866. </select1>
  867. <caption id="caption7" class="cell_1" style="left:172px; top:99px; width:59px; height:23px; ">진료과</caption>
  868. <select1 id="cmb_orddept" ref="/root/hidden/selected/cmborddept" class="combo_default" appearance="minimal" style="left:234px; top:100px; width:106px; height:19px; ">
  869. <choices>
  870. <itemset nodeset="/root/main/orddeptcd/orddeptlist">
  871. <label ref="nm"/>
  872. <value ref="cd"/>
  873. </itemset>
  874. </choices>
  875. <script type="javascript" ev:event="xforms-value-changed">
  876. <![CDATA[
  877. // 입원외래구분 Radio / 진료과 Combo 필터링 적용
  878. fSelectedIODept();
  879. ]]>
  880. </script>
  881. </select1>
  882. <caption id="caption8" class="cell_1" style="left:0px; top:99px; width:35px; height:23px; ">구분</caption>
  883. <line id="line4" class="line_3" style="x1:0px; y1:121px; x2:340px; y2:121px; "/>
  884. <line id="line13" class="line_2" style="x1:345px; y1:97px; x2:1194px; y2:97px; "/>
  885. <caption id="caption9" class="cell_1" style="left:345px; top:75px; width:80px; height:23px; ">확장상병</caption>
  886. <output id="opt_termcd" ref="/root/hidden/selected/termcd" class="output_fix" style="left:428px; top:76px; width:766px; height:19px; "/>
  887. <datagrid id="grd_clamhistlist" nodeset="/root/main/diaghist/list2/clamhistlist" caption="^청구년월^진료과^진료개시일^총진료비^본인부담금^청구액^원외처방금액" colsep="^" colwidth="21, 54, 104, 71, 79, 82, 80, 113" ellipsis="true" explorerbar="sort" mergecellsfixedrows="bycolrec" rowsep="|" style="left:550px; top:176px; width:641px; height:312px; ">
  888. <col ref="chkstatus" type="checkbox"/>
  889. <col ref="clamym" format="yyyy-mm" style="text-align:center; "/>
  890. <col disabled="true" ref="orddeptcd" type="combo" style="text-align:center; ">
  891. <choices>
  892. <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
  893. <label ref="nm"/>
  894. <value ref="cd"/>
  895. </itemset>
  896. </choices>
  897. </col>
  898. <col ref="ordfromdd" format="yyyy-mm-dd"/>
  899. <col ref="totordamt" format="#,###" style="text-align:right; "/>
  900. <col ref="ownbamt" format="#,###" style="text-align:right; "/>
  901. <col ref="insuclamamt" format="#,###" style="text-align:right; "/>
  902. <col ref="ediunitcost" format="#,###" style="text-align:right; "/>
  903. </datagrid>
  904. <line id="line12" class="line_1" style="x1:552px; y1:172px; x2:1190px; y2:173px; "/>
  905. <caption id="caption17" class="tit_2" style="left:552px; top:155px; width:138px; height:13px; ">청구대상명세서</caption>
  906. <button id="button3" class="btn5_letter6" style="left:1103px; top:491px; width:86px; height:19px; ">
  907. <caption>청구상병저장</caption>
  908. <script type="javascript" ev:event="DOMActivate">
  909. <![CDATA[
  910. if(grd_cldihist.rows == 0){
  911. return;
  912. }
  913. var exeNodePath = "/root/exepidhcldi";
  914. model.removeNodeset(exeNodePath);
  915. model.makeNode(exeNodePath);
  916. var chkstatus = "";
  917. model.makeValue(exeNodePath + "/clamhistlist/clamym", model.getValue(grd_diaghistlist.nodeset + "[" + grd_diaghistlist.row + "]/clamym"));
  918. model.makeValue(exeNodePath + "/clamhistlist/clamdg", model.getValue(grd_diaghistlist.nodeset + "[" + grd_diaghistlist.row + "]/clamdg"));
  919. model.makeValue(exeNodePath + "/clamhistlist/pid", model.getValue(grd_diaghistlist.nodeset + "[" + grd_diaghistlist.row + "]/pid"));
  920. model.makeValue(exeNodePath + "/clamhistlist/pidsn", model.getValue(grd_diaghistlist.nodeset + "[" + grd_diaghistlist.row + "]/pidsn"));
  921. model.makeValue(exeNodePath + "/clamhistlist/workflag", model.getValue(grd_diaghistlist.nodeset + "[" + grd_diaghistlist.row + "]/workflag"));
  922. model.makeValue(exeNodePath + "/clamhistlist/clamdeptcd", model.getValue(grd_diaghistlist.nodeset + "[" + grd_diaghistlist.row + "]/clamdeptcd"));
  923. model.makeValue(exeNodePath + "/clamhistlist/ordfromdd", model.getValue(grd_diaghistlist.nodeset + "[" + grd_diaghistlist.row + "]/ordfromdd"));
  924. model.makeValue(exeNodePath + "/clamhistlist/exist", "Y");
  925. // 진료상병 이력 정보에서 선택된 정보를 심사상병으로 저장
  926. var diaghCnt = 1;
  927. if(grd_cldihist.rows > 0){
  928. for(var idx=1; idx<grd_cldihist.rows; idx++){
  929. var status = model.getValue(grd_cldihist.nodeset + "[" + idx + "]/status");
  930. var diagcd = model.getValue(grd_cldihist.nodeset + "[" + idx + "]/diagcd");
  931. var diagnm = model.getValue(grd_cldihist.nodeset + "[" + idx + "]/diagnm");
  932. var diagseq = model.getValue(grd_cldihist.nodeset + "[" + idx + "]/diagseq");
  933. var rowstatus = grd_cldihist.rowstatus(idx);
  934. if(diagcd != "" && diagnm != "" && diagseq != "" && rowstatus != 4){
  935. model.makeValue(exeNodePath + "/diaglist[" + diaghCnt + "]/diagkindcd" , model.getValue(grd_cldihist.nodeset + "[" + idx + "]/diagkindcd"), true);
  936. model.makeValue(exeNodePath + "/diaglist[" + diaghCnt + "]/diagcd" , model.getValue(grd_cldihist.nodeset + "[" + idx + "]/diagcd"), true);
  937. model.makeValue(exeNodePath + "/diaglist[" + diaghCnt + "]/diagseq" , model.getValue(grd_cldihist.nodeset + "[" + idx + "]/diagseq"), true);
  938. model.makeValue(exeNodePath + "/diaglist[" + diaghCnt + "]/diagengnm" , model.getValue(grd_cldihist.nodeset + "[" + idx + "]/diagengnm"), true);
  939. model.makeValue(exeNodePath + "/diaglist[" + diaghCnt + "]/diaghngnm" , model.getValue(grd_cldihist.nodeset + "[" + idx + "]/diagnm"), true);
  940. model.makeValue(exeNodePath + "/diaglist[" + diaghCnt + "]/toot" , model.getValue(grd_cldihist.nodeset + "[" + idx + "]/toot"), true);
  941. model.makeValue(exeNodePath + "/diaglist[" + diaghCnt + "]/orddiagflag" , "N", true);
  942. }
  943. diaghCnt++;
  944. }
  945. }
  946. submit("TXPIZ00201");
  947. fGetIODiagHistList(); // "조회" 버튼을 누르면 상병이력을 조회한다.
  948. // 진료상병에서 선택된 정보가 없을 경우 청구상병에 선택된 정보를 심사상병에 저장
  949. ]]>
  950. </script>
  951. </button>
  952. </group>
  953. <group id="grp_btn" style="left:0px; top:757px; width:1195px; height:27px; ">
  954. <button id="btn_init" class="btn4_letter3" navindex="6" style="left:956px; top:5px; width:68px; height:22px; ">
  955. <caption>초기화</caption>
  956. <script type="javascript" ev:event="DOMActivate">
  957. <![CDATA[
  958. fInitialize();
  959. model.refresh();
  960. ]]>
  961. </script>
  962. </button>
  963. <line id="line9" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  964. <button id="btn_close" class="btn4_letter2" navindex="7" style="left:1134px; top:5px; width:56px; height:22px; ">
  965. <caption>닫기</caption>
  966. <close ev:event="DOMActivate"/>
  967. </button>
  968. <button id="btn_judgdiag" class="btn4_letter6" navindex="6" style="left:1027px; top:5px; width:104px; height:22px; ">
  969. <caption>일괄상병적용</caption>
  970. <script type="javascript" ev:event="DOMActivate">
  971. <![CDATA[
  972. if(grd_orddiaghist.row == 0 && grd_cldihist.row == 0){
  973. return;
  974. }
  975. if(grd_orddiaghist.selectedRows == 0 && grd_cldihist.selectedRows == 0){
  976. return;
  977. }
  978. var exeNodePath = "/root/exepidhcldi";
  979. model.removeNodeset(exeNodePath);
  980. model.makeNode(exeNodePath);
  981. var chkstatus = "";
  982. for(var rowIdx=0; rowIdx<grd_clamhistlist.rows; rowIdx++){
  983. chkstatus = model.getValue(grd_clamhistlist.nodeset + "[" + rowIdx + "]/chkstatus");
  984. if(chkstatus == "true"){
  985. copyNodeListType(exeNodePath, grd_clamhistlist.nodeset + "[" + rowIdx + "]", "after");
  986. }
  987. }
  988. // 진료상병 이력 정보에서 선택된 정보를 심사상병으로 저장
  989. var diaghCnt = 1;
  990. if(grd_orddiaghist.selectedRows > 0 && grd_orddiaghist.row != 0){
  991. for(var idx=0; idx<grd_orddiaghist.selectedRows; idx++){
  992. var selectedIdx = null;
  993. selectedIdx = grd_orddiaghist.selectedRow(idx);
  994. model.makeValue(exeNodePath + "/diaglist[" + diaghCnt + "]/diagkindcd" , model.getValue(grd_orddiaghist.nodeset + "[" + selectedIdx + "]/diagkindcd"), true);
  995. model.makeValue(exeNodePath + "/diaglist[" + diaghCnt + "]/diagcd" , model.getValue(grd_orddiaghist.nodeset + "[" + selectedIdx + "]/diagcd"), true);
  996. model.makeValue(exeNodePath + "/diaglist[" + diaghCnt + "]/diagengnm" , model.getValue(grd_orddiaghist.nodeset + "[" + selectedIdx + "]/diagengnm"), true);
  997. model.makeValue(exeNodePath + "/diaglist[" + diaghCnt + "]/diaghngnm" , model.getValue(grd_orddiaghist.nodeset + "[" + selectedIdx + "]/diaghngnm"), true);
  998. model.makeValue(exeNodePath + "/diaglist[" + diaghCnt + "]/orddiagflag" , "Y", true);
  999. model.makeValue(exeNodePath + "/diaglist[" + diaghCnt + "]/diagseq" , diaghCnt);
  1000. diaghCnt++;
  1001. }
  1002. }
  1003. if(grd_cldihist.selectedRows > 0 && grd_cldihist.row != 0){
  1004. for(var idx=0; idx<grd_cldihist.selectedRows; idx++){
  1005. var selectedIdx = null;
  1006. selectedIdx = grd_cldihist.selectedRow(idx);
  1007. model.makeValue(exeNodePath + "/diaglist[" + diaghCnt + "]/diagkindcd" , model.getValue(grd_cldihist.nodeset + "[" + selectedIdx + "]/diagkindcd"), true);
  1008. model.makeValue(exeNodePath + "/diaglist[" + diaghCnt + "]/diagcd" , model.getValue(grd_cldihist.nodeset + "[" + selectedIdx + "]/diagcd"), true);
  1009. model.makeValue(exeNodePath + "/diaglist[" + diaghCnt + "]/diagengnm" , model.getValue(grd_cldihist.nodeset + "[" + selectedIdx + "]/diagengnm"), true);
  1010. model.makeValue(exeNodePath + "/diaglist[" + diaghCnt + "]/diaghngnm" , model.getValue(grd_cldihist.nodeset + "[" + selectedIdx + "]/diagnm"), true);
  1011. model.makeValue(exeNodePath + "/diaglist[" + diaghCnt + "]/orddiagflag" , "N", true);
  1012. model.makeValue(exeNodePath + "/diaglist[" + diaghCnt + "]/diagseq" , diaghCnt);
  1013. diaghCnt++;
  1014. }
  1015. }
  1016. submit("TXPIZ00201");
  1017. fGetIODiagHistList();
  1018. // 진료상병에서 선택된 정보가 없을 경우 청구상병에 선택된 정보를 심사상병에 저장
  1019. ]]>
  1020. </script>
  1021. </button>
  1022. </group>
  1023. </xhtml:body>
  1024. </xhtml:html>