SPMMP01200_CP검색.xrw 52 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SPMMP01200.xrw
  4. * 설 명 : CP검색
  5. * 설 계 자 : 조범준
  6. * 작 성 자 : 전지은
  7. * 작 성 일 : 2007
  8. * 수정이력 : 2008-06 /손주연 / 외래CP추가로 인한 CP/CPG정보조회시 IOFLAG추가 및 외래/입원별 CP선택시 CHECK 추가.
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  12. <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">
  13. <xhtml:head>
  14. <xhtml:title>CP 검색</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root xmlns="">
  18. <main>
  19. <search_cond>
  20. <cpgflagcd>ALL</cpgflagcd>
  21. <cpgorddeptcd/>
  22. <cpgnm/>
  23. <getflag/>
  24. <no/>
  25. <seq/>
  26. <authflag/>
  27. <delyn>N</delyn>
  28. <cpgtypecd/>
  29. <tmpyn>N</tmpyn>
  30. <indxyn>Y</indxyn>
  31. </search_cond>
  32. <cpglist>
  33. </cpglist>
  34. <temp/>
  35. <paminfo>
  36. <list/>
  37. </paminfo>
  38. <cpgappinfo>
  39. <info/>
  40. </cpgappinfo>
  41. </main>
  42. <hidden>
  43. </hidden>
  44. <send>
  45. </send>
  46. <init>
  47. <orddeptlist>
  48. <dept>
  49. <depthngnm/>
  50. <deptcd/>
  51. </dept>
  52. </orddeptlist>
  53. <cpmasterlist/>
  54. <cpgmasterlist/>
  55. </init>
  56. <temp>
  57. <getdata/>
  58. <reqdata>
  59. <cpgno/>
  60. <cpghistseq/>
  61. <cpgflagcd/>
  62. <cpgnm/>
  63. <selectindxcd/>
  64. <selectindxnm/>
  65. </reqdata>
  66. <rsltgetdata/>
  67. <selected>
  68. <cpgno/>
  69. <cpghistseq/>
  70. <cpgnm/>
  71. <cpgflagcd/>
  72. </selected>
  73. <appdata>
  74. <rtncase/>
  75. <prtlflagcd/>
  76. <cpgnm/>
  77. <appstat/>
  78. <trnsinptyn/>
  79. </appdata>
  80. <publcpglist/>
  81. </temp>
  82. </root>
  83. </instance>
  84. <script type="javascript" ev:event="xforms-model-construct-done">
  85. <![CDATA[
  86. grd_cpglist.explorerbar = "sortshow";
  87. if(getGlobalVariable("paminfo")){
  88. btn_app.disabled = false;
  89. }
  90. fGetCodeList(); //부서코드 조회
  91. fGetAuthFlag(); //사용자의 근무부서에 따른 권한 설정
  92. ivw_indxmngt.window.javascript.fInitialize(); //좌측 CP Tree 조회
  93. ivw_indxmngt.model.setValue("/root/temp/openeruid", getMyUID());
  94. fGetCPGInfo(); //우측 Grid 조회
  95. ivw_histlist.datagrid1.colhidden(4) = true;
  96. var scrnwnd = getOpenWindow("SPMMB08400");
  97. if(scrnwnd != null){
  98. scrnwnd.javascript.fCloseOpenEmrWnd();
  99. }
  100. ]]>
  101. </script>
  102. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
  103. <submission id="TRMMP01201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/cpglist"/>
  104. <submission id="TXMMP01201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/main/cpgappinfo"/>
  105. <submission id="TRMMP00807" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/pamdata" resultref="/root/temp/rsltgetdata"/>
  106. <submission id="TRMMB04101" mediatype="application/x-www-form-urlencoded" method="post"/>
  107. <submission id="TRMMB04105" mediatype="application/x-www-form-urlencoded" method="post"/>
  108. <bind id="bind1" ref="/root/main/cpglist/cpginfo/cpgorddeptcd" readonly="../status = &quot;S&quot;"/>
  109. </model>
  110. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  111. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  112. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  113. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  114. <script type="javascript" src="../../../emr/prcpmngtweb/js/SMMMO00100.js"/>
  115. <script type="javascript" src="../../../emr/prcpmngtweb/js/MMO001.js"/>
  116. <script type="javascript">
  117. <![CDATA[
  118. var flag = "1";
  119. var paminfo = "";
  120. var old_paminfo_pid = "";
  121. var srcMode = 1; //2008.06.16 pymi 추가
  122. var authFlag = "";
  123. var dutPlceCd = "";
  124. var dutPlceNm = "";
  125. /**
  126. * @group :
  127. * @ver : 2007.07
  128. * @by : 전지은
  129. * @---------------------------------------------------
  130. * @type : function
  131. * @access : public
  132. * @desc : 공통코드를 조회한다.
  133. * @param :
  134. * @return :
  135. * @---------------------------------------------------
  136. */
  137. function fGetCodeList() {
  138. var standard_yn = "orduseyn";
  139. var ord_deptflag = "D";
  140. var rslt_ref = "/root/init/orddeptlist";
  141. mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/orddeptlist" , "A"); //부서코드 콤보
  142. addComboItem( "cmb_cpgorddeptcd" , "전체", "");
  143. //마스터 권한 정보 조회 (2010.03.26 JJE)
  144. mmbfGetHardCodeInfoNm("/root/send/reqdata", "/root/init/cpmasterlist", 203); //CP
  145. mmbfGetHardCodeInfoNm("/root/send/reqdata", "/root/init/cpgmasterlist", 204); //CPG
  146. }
  147. /**
  148. * @group :
  149. * @ver : 2007.07
  150. * @by : 전지은
  151. * @---------------------------------------------------
  152. * @type : function
  153. * @access : public
  154. * @desc : 사용자의 권한을 설정한다
  155. * @param :
  156. * @return :
  157. * @---------------------------------------------------
  158. */
  159. function fGetAuthFlag(){
  160. //<<Rule>>
  161. // 1. 마스터 권한: [신규] [조회] [닫기] => true
  162. // 2. 사용자 권한: [조회] [선택] [닫기] => true (단 사용자 권한만 있는 경우, [미리보기]도 true)
  163. dutPlceCd = getUserInfo("dutplcecd");
  164. dutPlceNm = getUserInfo("dutplcenm"); //근무지명
  165. var dutPlceInstCd = getUserInfo("dutplceinstcd"); //근무기관코드
  166. var jobKindCd = getUserInfo("jobkindcd"); //직종코드(0330:의사, 0332:치과의사)
  167. var userId = getUserInfo("userid"); //사용자ID
  168. var Master_authYN = "N";
  169. var User_authYN = "N";
  170. var btn_XPos = parseInt(btn_cancel.attribute("left")) - 5;
  171. var hardcd1 = model.getValue("/root/init/cpmasterlist/hardcd[hardcd='" + dutPlceCd + "' or hardcd='" + jobKindCd + "']/hardcd");
  172. var hardcd2 = model.getValue("/root/init/cpgmasterlist/hardcd[hardcd='" + dutPlceCd + "' or hardcd='" + jobKindCd + "']/hardcd");
  173. if( !isNull(hardcd1) || !isNull(hardcd2) ){
  174. Master_authYN = "Y";
  175. }else{
  176. setSpclScrnAuth("R", false);
  177. }
  178. model.makeNode("/root/cpinitsrch");
  179. if( getOrderBasicInfo("/root/cpinitsrch") ){
  180. var trgtcd = model.getValue ( "/root/cpinitsrch/drjobkindcd[trgtcd='" + jobKindCd + "']/trgtcd" );
  181. if ( !isNull(trgtcd) ){
  182. User_authYN = "Y";
  183. setSpclScrnAuth("X", false);
  184. }
  185. }
  186. if( Master_authYN == "N" && User_authYN == "N" ){
  187. model.setValue("/root/main/search_cond/authflag", "S"); //select mode
  188. btn_srchver.attribute("left") = btn_XPos - parseInt(btn_srchver.attribute("width"));
  189. btn_srchver.visible = true;
  190. }
  191. else if( Master_authYN == "Y" && User_authYN == "Y" ){
  192. model.setValue("/root/main/search_cond/authflag", "U"); //user
  193. btn_newver.visible = true;
  194. btn_srchver.visible = true;
  195. btn_app.visible = true;
  196. }
  197. else if( Master_authYN == "Y" ){
  198. model.setValue("/root/main/search_cond/authflag", "M"); //administrator
  199. btn_XPos = btn_XPos - parseInt(btn_srchver.attribute("width"));
  200. btn_srchver.attribute("left") = btn_XPos;
  201. btn_XPos = btn_XPos - 3; //간격
  202. btn_XPos = btn_XPos - parseInt(btn_newver.attribute("width"));
  203. btn_newver.attribute("left") = btn_XPos;
  204. btn_srchver.visible = true;
  205. btn_newver.visible = true;
  206. }
  207. else if( User_authYN == "Y" ){
  208. model.setValue("/root/main/search_cond/authflag", "U"); //user
  209. btn_XPos = btn_XPos - parseInt(btn_app.attribute("width"));
  210. btn_app.attribute("left") = btn_XPos;
  211. btn_XPos = btn_XPos - 3; //간격
  212. btn_XPos = btn_XPos - parseInt(btn_srchver.attribute("width"));
  213. btn_srchver.attribute("left") = btn_XPos;
  214. btn_app.visible = true;
  215. btn_srchver.visible = true;
  216. }
  217. if( Master_authYN == "Y" ){
  218. btn_view.visible = true;
  219. btn_srchver.visible = true;
  220. }else{
  221. btn_view.visible = true;
  222. btn_srchver.visible = false;
  223. btn_controlsize.visible = false;
  224. btn_controlsize.dispatch("DOMActivate");
  225. bool1.disabled = true;
  226. bool2.disabled = true;
  227. cap_delyn.disabled = true;
  228. cap_tmpyn.disabled = true;
  229. }
  230. //부서 콤보 설정
  231. if( instance1.selectSingleNode("/root/init/orddeptlist/dept[deptcd='"+dutPlceCd+"']") != null ){
  232. model.setValue("/root/main/search_cond/cpgorddeptcd", dutPlceCd);
  233. }else{
  234. model.setValue("/root/main/search_cond/cpgorddeptcd", "");
  235. }
  236. cmb_cpgorddeptcd.refresh();
  237. }
  238. /**
  239. * @group :
  240. * @ver : 2007.07
  241. * @by : 전지은
  242. * @---------------------------------------------------
  243. * @type : function
  244. * @access : public
  245. * @desc : 윈도우 사이즈를 조정한다.
  246. * @param :
  247. * @return :
  248. * @---------------------------------------------------
  249. */
  250. function fControlWindowSize(){
  251. model.makeNode("/root/temp/size");
  252. if(flag == "!")
  253. flag = 2;
  254. else
  255. flag = 1;
  256. model.setValue("/root/temp/size", flag);
  257. modal("SPMMP01600", 1,1,1,"SPMMP01600", "/root/temp/size", "/root/temp/size");
  258. model.setValue("/root/temp/size", "");
  259. model.removeNodeset("/root/temp/size");
  260. }
  261. /**
  262. * @group :
  263. * @ver : 2007.08
  264. * @by : 전지은
  265. * @---------------------------------------------------
  266. * @type : function
  267. * @access : public
  268. * @desc : 변경이력 아이뷰어의 그리드를 초기화시킨다..
  269. * @param :
  270. * @return :
  271. * @---------------------------------------------------
  272. */
  273. function fClearHist(){
  274. ivw_histlist.model.removeNodeset("/root/main/cpglist/cpginfo");
  275. ivw_histlist.datagrid1.refresh();
  276. }
  277. /**
  278. * @group :
  279. * @ver : 2007.08
  280. * @by : 전지은
  281. * @---------------------------------------------------
  282. * @type : function
  283. * @access : public
  284. * @desc : generater가 열리면서 포커스가 이동하고, 현재 선택한 cp key 를 넘긴다.
  285. * @param : btnKind (버튼종류: 1-조회버튼, 2-미리보기버튼)
  286. * @return :
  287. * @---------------------------------------------------
  288. */
  289. function fOpenGenerator( btnKind ){
  290. //2008.06.16 pymi(s)
  291. //node가 refresh 되지 않고 밑으로 add되는 문제때문에 추가함
  292. model.removeNodeset("/root/main/temp");
  293. model.makeNode("/root/main/temp");
  294. //2008.06.16 pymi(e)
  295. var vRow = ivw_histlist.datagrid1.row;
  296. if( grd_cpglist.row > 0 || vRow > 0 ){
  297. //if( vRow >= ivw_histlist.datagrid1.fixedRows) {
  298. model.makeValue( "/root/main/temp/setdata/cpgno", ivw_histlist.model.getValue("/root/main/cpglist/cpginfo[" + vRow + "]/cpgno") );
  299. model.makeValue( "/root/main/temp/setdata/cpghistseq", ivw_histlist.model.getValue("/root/main/cpglist/cpginfo[" + vRow + "]/orghistseq") );
  300. //} else {
  301. // model.makeValue( "/root/main/temp/setdata/cpgno", model.getValue("/root/main/cpglist/cpginfo[" + grd_cpglist.row + "]/cpgno") );
  302. // model.makeValue( "/root/main/temp/setdata/cpghistseq", fModifyCpgHistSeq(model.getValue("/root/main/cpglist/cpginfo[" + grd_cpglist.row + "]/cpghistseq")) );
  303. //}
  304. vRow = ivw_indxmngt.treeview1.focusIndex + 1;
  305. model.makeValue("/root/main/temp/setdata/indxno", ivw_indxmngt.model.getValue("/root/main/indxlist/itemlist/item[" + vRow + "]/indxno"));
  306. model.makeValue("/root/main/temp/setdata/supindxno", ivw_indxmngt.model.getValue("/root/main/indxlist/itemlist/item[" + vRow + "]/supindxno"));
  307. model.makeValue("/root/main/temp/setdata/indxrefseq", ivw_indxmngt.model.getValue("/root/main/indxlist/itemlist/item[" + vRow + "]/indxrefseq"));
  308. model.makeValue("/root/main/temp/setdata/indxseq", ivw_indxmngt.model.getValue("/root/main/indxlist/itemlist/item[" + vRow + "]/indxseq"));
  309. model.makeValue("/root/main/temp/setdata/cpgnm", ivw_indxmngt.model.getValue("/root/main/indxlist/itemlist/item[" + vRow + "]/indxnm"));
  310. model.makeValue("/root/main/temp/setdata/authflag", model.getValue("/root/main/search_cond/authflag"));
  311. if( btnKind == 1 ){
  312. model.makeValue("/root/main/temp/setdata/saveasflag", "SR");
  313. }else{
  314. model.makeValue("/root/main/temp/setdata/saveasflag", "VW");
  315. }
  316. //팝업에서 메인을 타겟으로 네비게이트 하면, 메인뷰어의 프로그램이 리플레이스된다.
  317. //메인과 본화면(팝업)은 서로 다른 뷰어이기 때문에, 두 화면끼리 데이터 전달이 직접적으로 안된다.(메인은 메인끼리 데이터 전달)
  318. //메인이 reay 되기 전에 미리 메인에 값을 전달해 두었다가, 화면 로딩할때, 메인끼리 데이터를 주고 받으면 된다.
  319. var mainObj = getMainViewer();
  320. if( model.getValue("/root/main/search_cond/authflag") == "M" && btnKind == 1 ) {
  321. //관리자는 main viewer로 조회한다.
  322. mainObj.model.removeNodeset("/root/main/temp");
  323. mainObj.model.makeNode("/root/main/temp");
  324. copyNodesetType("/root/main/temp", "/root/main/temp", "replace", mainObj.model, model);
  325. mainObj.window.javascript.navigate("SMMQP00600", "1","0","0", "SMMQP00600", "/root/main/temp/setdata", "/root/temp/getdata", "X");
  326. window.close();
  327. }else{
  328. //의사/간호사 선생님은 팝업으로 조회한다.
  329. var mon = getCurrentMonitorNumber();
  330. model.removeNodeset("/root/main/temp/getdata");
  331. var node = instance1.selectSingleNode("/root/main/temp/setdata");
  332. node.nodeName = "getdata";
  333. //2008.06.16 pymi(시작)
  334. //popup으로 열리기 때문에 mainObj를 control 할 필요 없음
  335. //mainObj.model.removeNodeset("/root/main/temp");
  336. //mainObj.model.makeNode("/root/main/temp");
  337. //copyNodesetType("/root/main/temp", "/root/main/temp", "replace", mainObj.model, model);
  338. //생성기화면이 이미 열려있으면 재조회만 하도록 수정
  339. var openObj = getOpenWindow("SMMQP00600");
  340. if(openObj != null) {
  341. //생성기에서 fSizeControl() 처음 한번만 수행하도록 setting 하기 위해 srcMode setting
  342. model.makeValue("/root/main/temp/getdata/srcMode", srcMode);
  343. copyNodeType("/root/temp/getdata", "/root/main/temp/getdata", "replace", openObj.model, model);
  344. openObj.window.javascript.fInitialize();
  345. srcMode ++;
  346. } else {
  347. model.makeValue("/root/main/temp/getdata/srcMode", "1");
  348. //if( btnKind == 1 ){
  349. open("SMMQP00600", mon,"0","0", "SMMQP00600", "/root/main/temp/getdata", "/root/temp/getdata", "", false, "R");
  350. //}else{
  351. // open("SMMQP00600", mon,"0","0", "SMMQP00600", "/root/main/temp/getdata", "/root/temp/getdata", "", false, "R");
  352. //mainObj.window.javascript.open("SMMQP00600", mon,"0","0", "SMMQP00600", "/root/main/temp/getdata", "/root/temp/getdata", "", false, "R");
  353. //}
  354. srcMode ++;
  355. }
  356. //2008.06.16 pymi(완료)
  357. }
  358. } else {
  359. messageBox("CP를 ", "C002");
  360. }
  361. }
  362. /**
  363. * @group :
  364. * @ver : 2007.10
  365. * @by : 전지은
  366. * @---------------------------------------------------
  367. * @type : function
  368. * @access : public
  369. * @desc : 선택한 CP가 임시일 경우 이력순번 T 를 9999 로 치환한다
  370. * @param :
  371. * @return : cpghistseq
  372. * @---------------------------------------------------
  373. */
  374. function fModifyCpgHistSeq( selectHistSeq ){
  375. if( selectHistSeq == "임시" ){
  376. return "9999";
  377. }else{
  378. return selectHistSeq;
  379. }
  380. }
  381. /**
  382. * @group :
  383. * @ver : 2007.08
  384. * @by : 전지은
  385. * @---------------------------------------------------
  386. * @type : function
  387. * @access : public
  388. * @desc : 상단(session)에 환자 정보가 존재하는지 체크한다.
  389. * @param :
  390. * @return : true / false
  391. * @---------------------------------------------------
  392. */
  393. function fCheckSessionInfo(){
  394. var pamInfoCvs = getGlobalVariable("paminfo");
  395. model.removeNodeset("/root/main/paminfo/list");
  396. setCSVToNode("/root/main/paminfo", pamInfoCvs);
  397. var node = instance1.selectSingleNode("/root/main/paminfo/list/pid");
  398. var req_ioflag = model.getValue ( "/root/main/paminfo/list/ioflag" );
  399. if ( req_ioflag == "O" ) {
  400. var req_orddd = model.getValue ( "/root/main/paminfo/list/orddd" );
  401. }else{
  402. var req_orddd = model.getValue ( "/root/main/paminfo/list/indd" );
  403. }
  404. if( node != null ){ //cvs가 null이 아닌 경우에만 처리함.
  405. old_paminfo_pid = model.getValue("/root/main/paminfo/list/pid");
  406. return true;
  407. } else {
  408. messageBox("환자를 선택하지 ", "E007");
  409. return false;
  410. }
  411. if( req_orddd > getCurrentDate() ){
  412. messageBox("수진일이 미래인 환자에게는 CP를 적용", "E001");
  413. return;
  414. }
  415. }
  416. /**
  417. * @group :
  418. * @ver : 2007.09
  419. * @by : 전지은
  420. * @---------------------------------------------------
  421. * @type : function
  422. * @access : public
  423. * @desc : cpg 정보를 조회한다
  424. * @param :
  425. * @return :
  426. * @---------------------------------------------------
  427. */
  428. function fGetCPGInfo(){
  429. var getFlag = model.getValue("/root/main/search_cond/getflag");
  430. model.removeNodeset("/root/send/reqdata");
  431. model.makeNode("/root/send/reqdata");
  432. model.copyNode("/root/send/reqdata", "/root/main/search_cond");
  433. if(getFlag == ""){
  434. model.setValue("/root/send/reqdata/getflag", "S");
  435. }else if(getFlag == "C" || getFlag == "F"){
  436. model.setValue("/root/send/reqdata/cpgorddeptcd", "");
  437. }
  438. var srch_str = model.getValue("/root/main/search_cond/cpgnm");
  439. //if(srch_str.charCodeAt(0) >= 97){
  440. srch_str = "'%" + srch_str.toUpperCase() + "%'";
  441. //} else {
  442. // srch_str = "'%" + srch_str + "%'";
  443. //}
  444. //스페이스를 or 조건으로 해야 함 ( like 조건이므로 조건문을 미리 만들어서 보냄. ex: like %A% , and like %b%...)
  445. var str = srch_str.setReplaceWord(" ", "%' AND UPPER(cpgnm) like '%");
  446. model.setValue("/root/send/reqdata/cpgnm", str);
  447. //model.makeValue("/root/send/reqdata/authdept", dutPlceCd); //추가
  448. model.makeValue("/root/send/reqdata/authdept", cmb_cpgorddeptcd.value); //변경 (2010.03.29)
  449. submit("TRMMP01201", true);
  450. model.setValue("/root/main/search_cond/getflag", "");
  451. model.setValue("/root/main/search_cond/no", "");
  452. if( grd_cpglist.rows > 1 ){
  453. grd_cpglist.row = 1;
  454. grd_cpglist.dispatch("onclick");
  455. }else{
  456. fClearHist();
  457. }
  458. //@@공유 CP/CPG list를 따로 copy (2010.04.07 JJE)
  459. if( btn_app.visible == true && model.getValue("/root/main/search_cond/cpgorddeptcd") == dutPlceCd ){ //진료의 로그인하여 선택 버튼 활성화 시, (선택 버튼 클릭 시 이 리스트와 비교하여 타부서인지 확인)
  460. copyNodeListType( "/root/temp/publcpglist", "/root/main/cpglist/cpginfo[cpgtypecd='H']", "replace", model, model );
  461. }
  462. }
  463. /**
  464. * @group :
  465. * @ver : 2007.10
  466. * @by : 전지은
  467. * @---------------------------------------------------
  468. * @type : function
  469. * @access : public
  470. * @desc : 처방창 및 본 창을 닫는다
  471. * @param :
  472. * @return :
  473. * @---------------------------------------------------
  474. */
  475. function fClosePrcpWindow(){
  476. var prcpWindow = getOpenWindow("SMMMO00100");
  477. if( prcpWindow ){
  478. prcpWindow.javascript.fClose_SMMMO00100();
  479. //opener.model.close();
  480. }
  481. }
  482. /**
  483. * @group :
  484. * @ver : 2007.10
  485. * @by : 전지은
  486. * @---------------------------------------------------
  487. * @type : function
  488. * @access : public
  489. * @desc : 상단의 환자가 CP 적용 유효환자인지 조회
  490. * @param :
  491. * @return :
  492. * @---------------------------------------------------
  493. */
  494. function fGetCpAppPattValiYN(){
  495. model.resetInstanceNode("/root/temp/appdata");
  496. model.removeNodeSet ( "/root/send/pamdata" );
  497. model.makeNode( "/root/send/pamdata" );
  498. model.makeNode( "/root/temp/rsltgetdata" );
  499. var req_pid = model.getValue ( "/root/main/paminfo/list/pid" );
  500. var req_cretno = model.getValue ( "/root/main/paminfo/list/cretno" );
  501. var req_orddd = model.getValue ( "/root/main/paminfo/list/orddd" );
  502. var req_ioflag = model.getValue ( "/root/main/paminfo/list/ioflag" );
  503. if ( req_ioflag == "O" ) {
  504. req_orddd = model.getValue ( "/root/main/paminfo/list/orddd" );
  505. }else{
  506. req_orddd = model.getValue ( "/root/main/paminfo/list/indd" );
  507. }
  508. model.makeValue("/root/send/pamdata/pid", req_pid);
  509. model.makeValue("/root/send/pamdata/cretno",req_cretno );
  510. model.makeValue("/root/send/pamdata/orddd", req_orddd);
  511. model.makeValue("/root/send/pamdata/prcpgenrflag",req_ioflag );
  512. model.makeValue("/root/send/pamdata/getanticncryn", "Y" );
  513. if( submit("TRMMP00807", false) ){ //CP가 유효한지를 조회한다
  514. // 2008.09.05 pymi - 입원중
  515. if( model.getValue ( "/root/main/paminfo/list/ioflag" )== "O" ) {
  516. if( instance1.selectSingleNode("/root/temp/rsltgetdata/inptdata/pid") ) {
  517. model.setValue("/root/temp/appdata/rtncase", "1");
  518. model.setValue("/root/temp/appdata/trnsinptyn", "Y");
  519. return "_onInpt"; //(1) 외래 탭에서 선택 시 입원전환된 환자인 경우
  520. }
  521. }
  522. if( instance1.selectSingleNode("/root/temp/rsltgetdata/getdata/cpgappno") ){
  523. var appstat = model.getValue("/root/temp/rsltgetdata/getdata/appstat");
  524. var cpnm = model.getValue("/root/temp/rsltgetdata/getdata/cpgnm");
  525. var prtlflagcd = model.getValue("/root/temp/rsltgetdata/getdata/prtlflagcd"); //2008.09.30 프로토콜상태
  526. model.removeNodeset("/root/temp/rsltgetdata/getdata");
  527. /*
  528. if(prtlflagcd == "10"){
  529. model.setValue("/root/temp/appdata/prtlflagcd", "10");
  530. return "_onAntiCncr"; //(2) 제한항생제 진행중
  531. }
  532. */
  533. if(appstat != "52"){
  534. model.setValue("/root/temp/appdata/rtncase", "2");
  535. model.setValue("/root/temp/appdata/prtlflagcd", prtlflagcd);
  536. model.setValue("/root/temp/appdata/cpgnm", cpnm);
  537. model.setValue("/root/temp/appdata/appstat", appstat);
  538. return cpnm; //(3) 진행중인 CP
  539. }else{
  540. return "_empty";
  541. }
  542. }
  543. return "_empty";
  544. }else {
  545. return "_empty";
  546. }
  547. }
  548. /**
  549. * @group :
  550. * @ver : 2007.10
  551. * @by : 전지은
  552. * @---------------------------------------------------
  553. * @type : function
  554. * @access : public
  555. * @desc : 선택한 cp 적용하기
  556. * @param :
  557. * @return :
  558. * @---------------------------------------------------
  559. */
  560. function fAppCp(){
  561. if( fCheckSessionInfo() ){
  562. var cpgNo = model.getValue("/root/main/cpglist/cpginfo[" + grd_cpglist.row + "]/cpgno");
  563. var cpgFlagCd = model.getValue("/root/main/cpglist/cpginfo[" + grd_cpglist.row + "]/cpgflagcd");
  564. var cpgTypeCd = model.getValue("/root/main/cpglist/cpginfo[" + grd_cpglist.row + "]/cpgtypecd");
  565. var cpgDeptCd = model.getValue("/root/main/cpglist/cpginfo[" + grd_cpglist.row + "]/cpgorddeptcd");
  566. var appDD = model.getValue("/root/main/cpglist/cpginfo[" + grd_cpglist.row + "]/appdd"); //tmpyn 대신 미등록CP임을 알 수 있음 (2010.03.26 JJE)
  567. var toDD = model.getValue("/root/main/cpglist/cpginfo[" + grd_cpglist.row + "]/todd");
  568. var cpgFlagNm = "";
  569. if( cpgFlagCd == "01" ) cpgFlagNm = "CP";
  570. else if( cpgFlagCd == "02" ) cpgFlagNm = "CPG";
  571. //hardcoding.. 외과는 유방센터 포함..
  572. if(dutPlceCd == "2040000000" && cpgDeptCd == "2040400000") cpgDeptCd = "2040000000";
  573. if( cpgTypeCd != "H" && cpgDeptCd != dutPlceCd ){ //과코드로 비교 (2009.03.06)
  574. messageBox("타부서 " + cpgFlagNm + "는 적용할 수", "I004");
  575. return;
  576. }else if( cpgTypeCd == "H" ){
  577. var publcpgNode = instance1.selectSingleNode("/root/temp/publcpglist/cpginfo[cpgno='"+cpgNo+"']");
  578. if( publcpgNode == null ){
  579. messageBox("타부서의 공유 " + cpgFlagNm + "는 적용할 수", "I004");
  580. return;
  581. }
  582. }
  583. //미등록CP 적용 blocking (2010.03.26 JJE)
  584. if( isNull(appDD) ){ //과코드로 비교 (2009.03.06)
  585. messageBox("미등록 CP는 적용할 수", "I004");
  586. return;
  587. }
  588. if( getCurrentDate().toDate("YYYYMMDD") >= toDD.toDate("YYYYMMDD") ){ //과코드로 비교 (2009.03.06)
  589. messageBox("종료 CP는 적용할 수", "I004");
  590. return;
  591. }
  592. //이미 CP 적용 된 환자라면, 저장하지 않고, 메세지만 띄운다
  593. var cpName = fGetCpAppPattValiYN();
  594. //if( cpName != "_empty" && cpName != "_onInpt" && cpName != "_onAntiCncr" ){
  595. if( model.getValue("/root/temp/appdata/rtncase") == "2" ){
  596. if( model.getValue("/root/temp/appdata/prtlflagcd") == "01" ){
  597. messageBox("현재 '" + cpName + "' CP 진행중인 환자", "E008");
  598. return;
  599. }else if( model.getValue("/root/temp/appdata/prtlflagcd") == "10" ){
  600. messageBox("현재 항암프로토콜을 진행중인 환자", "E008");
  601. return;
  602. }
  603. }
  604. // 2008.09.05 pymi 외래환자가 당일 입원했을 경우 외래진료Tab 에서 CP 적용 불가처리
  605. //if( model.getValue ( "/root/main/paminfo/list/ioflag" )== "O" ) {
  606. //if( cpName == "_onInpt" && cpName != "_empty") {
  607. if( model.getValue("/root/temp/appdata/rtncase") == "1" ){
  608. messageBox("당일 입원되었습니다. 입원대상자리스트에서 CP를 적용", "I008");
  609. return;
  610. }
  611. var vRow = ivw_histlist.datagrid1.row;
  612. var sRow = "";
  613. var node = ivw_histlist.instance1.selectSingleNode("/root/main/cpglist/cpginfo[" + vRow + "]/cpghistseq");
  614. if( node != null && !isNull(node.text) ){ //if( !isNull(model.getValue("/root/main/search_cond/no")) )
  615. //var cpTimes = model.getValue("/root/main/cpglist/cpginfo[" + grd_cpglist.row + "]/times");
  616. var cpTimes = ivw_histlist.model.getValue("/root/main/cpglist/cpginfo[" + vRow + "]/times");
  617. if( cpgFlagCd == "01" ){
  618. //외래/입원 구분으로 인한 check 수정. 2008-06-26 by 손주연 시작.
  619. var cpIOFlag = ivw_histlist.model.getValue("/root/main/cpglist/cpginfo[" + vRow + "]/ioflag");
  620. if ( (model.getValue("/root/main/paminfo/list/ioflag") != "O" )
  621. && ( cpTimes == "D0" ) ){
  622. messageBox("외래환자가 아닐 경우 D0 CP를 적용 ", "E001");
  623. return;
  624. }
  625. else
  626. if( ( model.getValue("/root/main/paminfo/list/ioflag") != "O" )
  627. && (cpIOFlag == "O" ) ){
  628. messageBox("외래환자가 아닐 경우 외래CP를 적용 ", "E001");
  629. return;
  630. }
  631. else
  632. if ( (model.getValue("/root/main/paminfo/list/ioflag") == "O" )
  633. && ( cpTimes == "D1" )
  634. && (cpIOFlag == "I" ) ){
  635. messageBox("외래환자에게는 D1 CP를 적용 ", "E001");
  636. return;
  637. }
  638. /*
  639. if ( model.getValue("/root/main/paminfo/list/ioflag") != "O" && cpTimes == "D0" ){
  640. messageBox("외래환자가 아닐 경우 D0 CP를 적용 ", "E001");
  641. return;
  642. }
  643. if ( model.getValue("/root/main/paminfo/list/ioflag") == "O" && cpTimes == "D1" ){
  644. messageBox("외래환자에게는 D1 CP를 적용 ", "E001");
  645. return;
  646. }*/
  647. //외래/입원 구분으로 인한 check 수정. 2008-06-26 by 손주연 종료.
  648. }
  649. model.setValue("/root/main/search_cond/no", ivw_histlist.model.getValue("/root/main/cpglist/cpginfo[" + vRow + "]/cpgno"));
  650. //model.setValue("/root/main/search_cond/seq", fModifyCpgHistSeq(ivw_histlist.model.getValue("/root/main/cpglist/cpginfo[" + vRow + "]/cpghistseq")) );
  651. model.setValue("/root/main/search_cond/seq", ivw_histlist.model.getValue("/root/main/cpglist/cpginfo[" + vRow + "]/orghistseq") );
  652. var selectedCpgNm = model.getValue("/root/temp/selected/cpgnm");
  653. var selectedCpgFlag = "";
  654. if( model.getValue("/root/temp/selected/cpgflagcd") == "02" ) selectedCpgFlag = "CPG";
  655. else selectedCpgFlag = "CP";
  656. var msg = messageBox("[" + selectedCpgNm + "] " + selectedCpgFlag + "를", "Q013");
  657. if(msg == 6){
  658. model.makeValue( "/root/main/temp/getdata/cpgno", ivw_histlist.model.getValue("/root/main/cpglist/cpginfo[" + vRow + "]/cpgno") );
  659. model.makeValue( "/root/main/temp/getdata/cpghistseq", ivw_histlist.model.getValue("/root/main/cpglist/cpginfo[" + vRow + "]/orghistseq") );
  660. model.makeValue("/root/main/temp/getdata/indxno", ivw_indxmngt.model.getValue("/root/main/indxlist/itemlist/item[" + vRow + "]/indxno"));
  661. model.makeValue("/root/main/temp/getdata/supindxno", ivw_indxmngt.model.getValue("/root/main/indxlist/itemlist/item[" + vRow + "]/supindxno"));
  662. model.makeValue("/root/main/temp/getdata/indxrefseq", ivw_indxmngt.model.getValue("/root/main/indxlist/itemlist/item[" + vRow + "]/indxrefseq"));
  663. model.makeValue("/root/main/temp/getdata/indxseq", ivw_indxmngt.model.getValue("/root/main/indxlist/itemlist/item[" + vRow + "]/indxseq"));
  664. model.makeValue("/root/main/temp/getdata/cpgnm", ivw_indxmngt.model.getValue("/root/main/indxlist/itemlist/item[" + vRow + "]/indxnm"));
  665. model.makeValue("/root/main/temp/getdata/cpgappno", "");
  666. model.makeValue("/root/main/temp/getdata/histseq", "");
  667. model.makeValue("/root/main/temp/getdata/appdd", getCurrentDate());
  668. model.makeValue("/root/main/temp/getdata/pid", model.getValue("/root/main/paminfo/list/pid"));
  669. model.makeValue("/root/main/temp/getdata/cretno", model.getValue("/root/main/paminfo/list/cretno"));
  670. model.makeValue("/root/main/temp/getdata/ioflag", model.getValue("/root/main/paminfo/list/ioflag"));
  671. if (model.getValue("/root/main/paminfo/list/ioflag") == "O"){
  672. model.makeValue("/root/main/temp/getdata/orddd", model.getValue("/root/main/paminfo/list/orddd"));
  673. }else{
  674. model.makeValue("/root/main/temp/getdata/orddd", model.getValue("/root/main/paminfo/list/indd"));
  675. }
  676. model.makeValue("/root/main/temp/getdata/appstepstatflag", "i");
  677. model.makeValue("/root/main/temp/getdata/prcpgenrflag", "");
  678. model.makeValue("/root/main/temp/getdata/checkyn", "");
  679. model.makeValue("/root/main/temp/getdata/appstat", "00");
  680. model.makeValue("/root/main/temp/getdata/getformyn", "");
  681. model.makeValue("/root/main/temp/getdata/appyn", "N");
  682. model.makeValue("/root/main/temp/getdata/prtlflagcd", cpgFlagCd ); //프로토콜구분코드
  683. model.makeValue("/root/main/temp/getdata/orddeptcd", model.getValue("/root/main/paminfo/list/orddeptcd"));
  684. //MGPS 를 띄우는 수행 창을 메인으로 바꾸어서, MPGS(팝업)dml opener가 Main Viewer가 되도록 한다
  685. var mainObj = getMainViewer();
  686. //CP도 초기 blind 처리 하기 위해 수정-주석처리 (2009.03.16)
  687. /*
  688. var ordPatObj = getOpenWindow("SMMMO04100");
  689. if (ordPatObj != null) {
  690. ordPatObj.javascript.clearParameter("SMMMO04100_ANSWCNT");
  691. }
  692. */
  693. mainObj.model.removeNodeset("/root/main/temp/cpsetdata");
  694. mainObj.model.makeNode("/root/main/temp/cpsetdata");
  695. copyNodesetType("/root/main/temp/cpsetdata", "/root/main/temp/getdata", "replace", mainObj.model, model);
  696. mainObj.window.javascript.open("SMMMP00800", "2","0","0", "SMMMP00800", "/root/main/temp/cpsetdata", "/root/temp1/getdata", "", false);
  697. } else if(msg == 7){
  698. return;
  699. }
  700. } else{
  701. messageBox("적용할 CP를 ", "C002");
  702. return;
  703. }
  704. }
  705. }
  706. /**
  707. * @group :
  708. * @ver : 2007.10
  709. * @by : 전지은
  710. * @---------------------------------------------------
  711. * @type : function
  712. * @access : public
  713. * @desc : 창닫기
  714. * @param :
  715. * @return :
  716. * @---------------------------------------------------
  717. */
  718. function fCpSrchWndClose(){
  719. window.close();
  720. }
  721. ]]>
  722. </script>
  723. </xhtml:head>
  724. <xhtml:body pageheight="775" guideline="1,1194;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  725. <iviewer id="ivw_indxmngt" src="../../../emr/cpgweb/xrw/SPMMP01500_CP색인관리.xrw" style="left:0px; top:70px; width:350px; height:675px; margin-left:0; margin-top:0; margin-right:0; margin-bottom:0; "/>
  726. <iviewer id="ivw_histlist" src="../../../emr/cpgweb/xrw/SPMMP02000_변경이력조회.xrw" style="left:762px; top:70px; width:433px; height:675px; "/>
  727. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:1px; width:1195px; height:35px; "/>
  728. <group id="group1" scroll="auto" style="left:1px; top:748px; width:1194px; height:27px; ">
  729. <button id="btn_cancel" class="btn4_letter2" style="left:1137px; top:3px; width:56px; height:22px; ">
  730. <caption>닫기</caption>
  731. <script type="javascript" ev:event="DOMActivate">
  732. <![CDATA[
  733. fCpSrchWndClose();
  734. ]]>
  735. </script>
  736. </button>
  737. <button id="button2" class="btn3_letter5" visibility="hidden" style="left:361px; top:4px; width:92px; height:22px; ">
  738. <caption>새버전으로</caption>
  739. <script type="javascript" ev:event="DOMActivate">
  740. <![CDATA[
  741. //cpgno : 동일, cpghistno : +1
  742. model.makeValue("/root/main/temp/setdata/saveasflag", "VR");
  743. fOpenGenerator();
  744. ]]>
  745. </script>
  746. </button>
  747. <button id="button3" class="btn3_letter5" visibility="hidden" style="left:455px; top:4px; width:92px; height:22px; ">
  748. <caption>새이름으로</caption>
  749. <script type="javascript" ev:event="DOMActivate">
  750. <![CDATA[
  751. //cpgno: +1, cpghistno : +1
  752. model.makeValue("/root/main/temp/setdata/saveasflag", "NM");
  753. fOpenGenerator();
  754. ]]>
  755. </script>
  756. </button>
  757. <button id="btn_app" class="btn3_letter2" visibility="hidden" style="left:1078px; top:3px; width:56px; height:22px; ">
  758. <caption>선택</caption>
  759. <script type="javascript" ev:event="DOMActivate">
  760. <![CDATA[
  761. //상단(session)에 환자 정보가 존재하는지 체크 후, cp를 선택받고,
  762. //선택했다면, cp적용 테이블에 데이터를 저장
  763. if( grd_cpglist.row > 0 ){
  764. fAppCp();
  765. }
  766. ]]>
  767. </script>
  768. </button>
  769. <button id="btn_newver" class="btn3_letter2" visibility="hidden" style="left:962px; top:3px; width:56px; height:22px; ">
  770. <caption>신규</caption>
  771. <script type="javascript" ev:event="DOMActivate">
  772. <![CDATA[
  773. model.makeValue("/root/main/temp/setdata/saveasflag", "OP");
  774. model.makeValue("/root/main/temp/setdata/authflag", model.getValue("/root/main/search_cond/authflag"));
  775. model.makeNode("/root/main/temp/setdata/savedeptnm");
  776. model.makeNode("/root/main/temp/setdata/savedeptcd");
  777. model.makeNode("/root/main/temp/setdata/savesupindxno");
  778. model.makeNode("/root/main/temp/setdata/savesuprefseq");
  779. if( ivw_indxmngt.treeview1.focusIndex > -1 ){
  780. var tRow = ivw_indxmngt.treeview1.focusIndex + 1;
  781. if( ivw_indxmngt.model.getValue("/root/main/indxlist/itemlist/item[" + tRow + "]/cpgno") == "0" ){
  782. //선택한 색인(서브폴더 색인 포함)
  783. model.setValue("/root/main/temp/setdata/savesupindxno", ivw_indxmngt.model.getValue("/root/main/indxlist/itemlist/item[" + tRow + "]/indxno"));
  784. if( ivw_indxmngt.model.getValue("/root/main/indxlist/itemlist/item[" + tRow + "]/supindxno") != "0" ){
  785. //최상위폴더는 조회순서를 지정해 줄 필요가 없음. 서브폴더는 순번이 맨 끝이 아니므로, 지정해줌(서브폴더와 똑같은 순번..)
  786. model.setValue("/root/main/temp/setdata/savesuprefseq", ivw_indxmngt.model.getValue("/root/main/indxlist/itemlist/item[" + tRow + "]/indxrefseq"));
  787. }
  788. //색인-진료과
  789. var val = ivw_indxmngt.model.getValue("/root/main/indxlist/itemlist/item[" + tRow + "]/supfolderno");
  790. var no = ivw_indxmngt.window.javascript.fSrchItemIndxNo(val) + 1;
  791. var deptNm = ivw_indxmngt.model.getValue("/root/main/indxlist/itemlist/item[" + no + "]/indxnm");
  792. var deptCd = ivw_indxmngt.model.getValue("/root/main/indxlist/itemlist/item[" + no + "]/orgindxnm");
  793. model.setValue("/root/main/temp/setdata/savedeptnm", deptNm);
  794. model.setValue("/root/main/temp/setdata/savedeptcd", deptCd);
  795. }
  796. }
  797. if( model.getValue("/root/main/search_cond/authflag") == "M" ){
  798. var mainObj = getMainViewer();
  799. var scrnID = mainObj.javascript.getScreenID();
  800. mainObj.model.removeNodeset("/root/main/temp");
  801. mainObj.model.makeNode("/root/main/temp");
  802. copyNodesetType("/root/main/temp", "/root/main/temp", "replace", mainObj.model, model);
  803. mainObj.model.removeNodeset("/root/temp/getdata");
  804. mainObj.model.makeNode("/root/temp/getdata");
  805. mainObj.window.javascript.navigate("SMMQP00600", "1","0","0", "SMMQP00600", "/root/main/temp/setdata", "/root/temp/getdata", "", false, "X");
  806. model.removeNodeset("/root/main/temp/setdata");
  807. window.close();
  808. }else{
  809. var mon = getCurrentMonitorNumber();
  810. //model.removeNodeset("/root/main/temp/getdata");
  811. //var node = instance1.selectSingleNode("/root/main/temp/setdata");
  812. //node.nodeName = "getdata";
  813. //생성기화면이 이미 열려있으면 재조회만 하도록 수정
  814. var openObj = getOpenWindow("SMMQP00600");
  815. if(openObj != null) {
  816. model.makeValue("/root/main/temp/getdata/srcMode", srcMode);
  817. copyNodeType("/root/temp/getdata", "/root/main/temp/setdata", "replace", openObj.model, model);
  818. openObj.window.javascript.fInitialize();
  819. srcMode ++;
  820. }else{
  821. model.makeValue("/root/main/temp/getdata/srcMode", "1");
  822. open("SMMQP00600", mon,"0","0", "SMMQP00600", "/root/main/temp/setdata", "/root/temp/getdata", "", false, "R");
  823. srcMode ++;
  824. }
  825. }
  826. ]]>
  827. </script>
  828. </button>
  829. <button id="btn_srchver" class="btn3_letter2" visibility="hidden" style="left:1020px; top:3px; width:56px; height:22px; ">
  830. <caption>조회</caption>
  831. <script type="javascript" ev:event="DOMActivate">
  832. <![CDATA[
  833. fOpenGenerator( 1 );
  834. ]]>
  835. </script>
  836. </button>
  837. <button id="btn_view" class="btn3_letter4" visibility="hidden" style="left:4px; top:3px; width:56px; height:22px; ">
  838. <caption>미리보기</caption>
  839. <script type="javascript" ev:event="DOMActivate">
  840. <![CDATA[
  841. fOpenGenerator( 2 );
  842. ]]>
  843. </script>
  844. </button>
  845. </group>
  846. <select1 id="radio1" ref="/root/main/search_cond/cpgflagcd" navindex="1" appearance="full" cellspacing="5" cols="3" overflow="visible" style="left:75px; top:10px; width:95px; height:20px; border-style:none; ">
  847. <choices>
  848. <item>
  849. <label>CP</label>
  850. <value>01</value>
  851. </item>
  852. <item>
  853. <label>ALL</label>
  854. <value>ALL</value>
  855. </item>
  856. </choices>
  857. <script type="javascript" ev:event="xforms-value-changed">
  858. <![CDATA[
  859. //ivw_indxmngt.window.javascript.fInitialize();
  860. ivw_indxmngt.window.javascript.fGetIndxList("F");
  861. btn_srchindxcd.dispatch("DOMActivate");
  862. if( model.getValue("/root/main/search_cond/cpgflagcd") == "02" ){
  863. chk_cpgtypecd.disabled = true;
  864. }else{
  865. chk_cpgtypecd.disabled = false;
  866. }
  867. ]]>
  868. </script>
  869. </select1>
  870. <input id="ipt_cpgnm" ref="/root/main/search_cond/cpgnm" class="input_search" navindex="4" style="left:676px; top:9px; width:224px; height:19px; ">
  871. <script type="javascript" ev:event="onkeyup">
  872. <![CDATA[
  873. if(event.keyCode == "13") {
  874. inputEnterKey("btn_srchindxcd", "DOMActivate");
  875. }
  876. ]]>
  877. </script>
  878. </input>
  879. <button id="btn_srchindxcd" class="btn1_letter2" navindex="5" style="left:1125px; top:7px; width:56px; height:22px; ">
  880. <caption>조회</caption>
  881. <script type="javascript" ev:event="DOMActivate">
  882. <![CDATA[
  883. var srchStr = model.getValue("/root/main/search_cond/cpgnm");
  884. fGetCPGInfo();
  885. var indxyn = model.getValue("/root/main/search_cond/indxyn");
  886. if(indxyn == "Y"){
  887. ivw_indxmngt.window.javascript.fInitialize(); //좌측 CP Tree 조회
  888. }
  889. var cpgno = model.getValue("/root/main/search_cond/no");
  890. if( !isNull(cpgno) ){
  891. //조회 끝난 후, CP 수동으로 선택(focusing)
  892. var indxnoNode = ivw_indxmngt.instance1.selectSingleNode("/root/main/indxlist/itemlist/item" + "[cpgno='" + cpgno + "']/indxno");
  893. if( indxnoNode != null ){
  894. ivw_indxmngt.model.makeValue("/root/temp/reqdata/selectindxcd", indxnoNode.text);
  895. ivw_indxmngt.treeview1.refresh();
  896. }
  897. }
  898. //model.setValue("/root/main/search_cond/cpgnm", "");
  899. ]]>
  900. </script>
  901. </button>
  902. <line id="line27" class="line_4" style="x1:1107px; y1:9px; x2:1107px; y2:31px; "/>
  903. <button id="button40" class="btn_sw" visibility="hidden" group="tab" style="left:51px; top:43px; width:69px; height:22px; ">
  904. <caption>즐겨찾기</caption>
  905. <toggle case="Action" ev:event="onclick"/>
  906. </button>
  907. <caption id="caption15" class="search_name" style="left:251px; top:10px; width:82px; height:17px; ">진료과 :</caption>
  908. <caption id="cap_outlineinfo" class="tit_2" style="left:364px; top:50px; width:98px; height:14px; ">CP정보</caption>
  909. <line id="line1" class="line_1" style="x1:0px; y1:65px; x2:350px; y2:65px; "/>
  910. <line id="line2" class="line_1" style="x1:355px; y1:65px; x2:757px; y2:65px; "/>
  911. <line id="line3" class="line_1" style="x1:762px; y1:65px; x2:1194px; y2:65px; "/>
  912. <datagrid id="grd_cpglist" nodeset="/root/main/cpglist/cpginfo" class="datagrid2" autoresize="true" caption="구분^CP명^cpgorddeptcd^진료과^재원&#xA;일수^D^메모^Ver^생성일^적용일^종료일^CP&#xA;No^caption1^caption3^cpgflagcd^ioflag^cpgtypecd" colsep="^" colwidth="48, 182, 16, 100, 35, 14, 352, 32, 75, 75, 75, 24, 31, 30, 38, 39,10" ellipsis="true" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:355px; top:70px; width:402px; height:675px; ">
  913. <col ref="cpgflagnm" type="output"/>
  914. <col ref="cpgnm"/>
  915. <col disabled="true" ref="cpgorddeptcd" type="combo" visibility="hidden">
  916. <choices>
  917. <itemset nodeset="/root/init/orddeptlist/dept">
  918. <label ref="depthngnm"/>
  919. <value ref="deptcd"/>
  920. </itemset>
  921. </choices>
  922. </col>
  923. <col ref="cpgorddeptnm"/>
  924. <col ref="fcstinhospdayno" style="left:357px; top:32px; width:35px; height:23px; "/>
  925. <col ref="times" visibility="hidden"/>
  926. <col ref="cpgmemo"/>
  927. <col ref="cpghistseq"/>
  928. <col ref="cretdd" format="yyyy-mm-dd"/>
  929. <col ref="appdd" format="yyyy-mm-dd"/>
  930. <col ref="todd" format="yyyy-mm-dd"/>
  931. <col ref="cpgno"/>
  932. <col ref="cpghistseq" visibility="hidden"/>
  933. <col ref="cpglasthistyn" visibility="hidden"/>
  934. <col disabled="true" ref="cpgflagcd" type="combo" visibility="hidden">
  935. <choices>
  936. <item>
  937. <label>CP</label>
  938. <value>01</value>
  939. </item>
  940. <item>
  941. <label>CPG</label>
  942. <value>02</value>
  943. </item>
  944. </choices>
  945. </col>
  946. <col ref="ioflag" visibility="hidden"/>
  947. <col ref="cpgtypecd" visibility="hidden"/>
  948. <script type="javascript" ev:event="onclick">
  949. <![CDATA[
  950. //이력조회
  951. var vRow = ivw_histlist.datagrid1.row;
  952. if( grd_cpglist.row > 0 ){
  953. model.setValue( "/root/main/search_cond/no", model.getValue("/root/main/cpglist/cpginfo[" + grd_cpglist.row + "]/cpgno") );
  954. model.setValue( "/root/main/search_cond/seq" , ivw_histlist.model.getValue("/root/main/cpglist/cpginfo[" + vRow + "]/orghistseq") );
  955. model.setValue("/root/main/search_cond/getflag", "H");
  956. if( model.getValue("/root/main/cpglist/cpginfo[" + grd_cpglist.row + "]/todd") <= getCurrentDate() ){
  957. model.setValue("/root/main/search_cond/delyn", "Y");
  958. }else{
  959. model.setValue("/root/main/search_cond/delyn", "N");
  960. }
  961. ivw_histlist.window.javascript.fGetCpgHist();
  962. if( ivw_histlist.instance1.selectSingleNode("/root/main/cpglist/cpginfo[" + 1 + "]/cpgno") != null ){
  963. ivw_histlist.datagrid1.row = ivw_histlist.datagrid1.rows - ivw_histlist.datagrid1.fixedRows;
  964. ivw_histlist.datagrid1.isselected( ivw_histlist.datagrid1.rows - ivw_histlist.datagrid1.fixedRows ) = true;
  965. model.setValue("/root/temp/selected/cpgno", ivw_histlist.model.getValue("/root/main/cpglist/cpginfo[" + ivw_histlist.datagrid1.row + "]/cpgno"));
  966. model.setValue("/root/temp/selected/cpghistseq", ivw_histlist.model.getValue("/root/main/cpglist/cpginfo[" + ivw_histlist.datagrid1.row + "]/cpghistseq"));
  967. model.setValue("/root/temp/selected/cpgnm", ivw_histlist.model.getValue("/root/main/cpglist/cpginfo[" + ivw_histlist.datagrid1.row + "]/cpgnm"));
  968. model.setValue("/root/temp/selected/cpgflagcd", model.getValue("/root/main/cpglist/cpginfo[" + grd_cpglist.row + "]/cpgflagcd"));
  969. }
  970. } else {
  971. ivw_histlist.datagrid1.isselected(vRow) = false;
  972. }
  973. ]]>
  974. </script>
  975. <script type="javascript" ev:event="ondblclick">
  976. <![CDATA[
  977. if( grd_cpglist.row > 0 ){
  978. if( model.getValue("/root/main/search_cond/authflag") == "U" ){
  979. fAppCp();
  980. }else{
  981. //S or M : 생성기 조회
  982. if( ivw_histlist.instance1.selectSingleNode("/root/main/cpglist/cpginfo[" + 1 + "]/cpgno") != null ){
  983. ivw_histlist.datagrid1.row = ivw_histlist.datagrid1.rows - ivw_histlist.datagrid1.fixedRows;
  984. ivw_histlist.datagrid1.isselected( ivw_histlist.datagrid1.rows - ivw_histlist.datagrid1.fixedRows ) = true;
  985. model.setValue("/root/temp/selected/cpgno", ivw_histlist.model.getValue("/root/main/cpglist/cpginfo[" + ivw_histlist.datagrid1.row + "]/cpgno"));
  986. model.setValue("/root/temp/selected/cpghistseq", ivw_histlist.model.getValue("/root/main/cpglist/cpginfo[" + ivw_histlist.datagrid1.row + "]/cpghistseq"));
  987. model.setValue("/root/temp/selected/cpgnm", ivw_histlist.model.getValue("/root/main/cpglist/cpginfo[" + ivw_histlist.datagrid1.row + "]/cpgnm"));
  988. model.setValue("/root/temp/selected/cpgflagcd", model.getValue("/root/main/cpglist/cpginfo[" + grd_cpglist.row + "]/cpgflagcd"));
  989. }
  990. fOpenGenerator( 1 );
  991. }
  992. }
  993. ]]>
  994. </script>
  995. <script type="javascript" ev:event="onaftersort">
  996. <![CDATA[
  997. grd_cpglist.gridToInstance();
  998. ]]>
  999. </script>
  1000. </datagrid>
  1001. <caption id="caption4" class="search_name" style="left:10px; top:10px; width:62px; height:17px; ">구분 :</caption>
  1002. <line id="line4" class="line_3" style="x1:0px; y1:745px; x2:350px; y2:745px; "/>
  1003. <line id="line5" class="line_3" style="x1:355px; y1:745px; x2:758px; y2:745px; "/>
  1004. <line id="line6" class="line_3" style="x1:761px; y1:745px; x2:1194px; y2:745px; "/>
  1005. <button id="ivw_detail" class="btn2_letter2" visibility="hidden" style="left:307px; top:44px; width:42px; height:19px; ">
  1006. <caption>저장</caption>
  1007. <script type="javascript" ev:event="DOMActivate">
  1008. <![CDATA[
  1009. ivw_indxmngt.window.javascript.fSaveCpgIndxList();
  1010. ivw_indxmngt.window.javascript.fGetIndxList("A");
  1011. ]]>
  1012. </script>
  1013. </button>
  1014. <group id="grp_msg" visibility="hidden" style="left:0px; top:85px; width:220px; height:40px; ">
  1015. <shape id="roundrect2" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:0px; top:0px; width:220px; height:40px; background-color:#ffffff; border-color:#00ccff; "/>
  1016. <caption id="caption1" style="left:27px; top:12px; width:184px; height:18px; ">적용할 CP를 선택하십시오!</caption>
  1017. <img id="img1" src="D:\CMCProject\application\webapps\com\commonweb\images\icon_hand.gif" style="left:5px; top:16px; width:20px; height:9px; background-stretch:stretch; "/>
  1018. </group>
  1019. <select1 id="cmb_cpgorddeptcd" ref="/root/main/search_cond/cpgorddeptcd" class="combo_search" navindex="2" appearance="minimal" editmode="search" style="left:330px; top:10px; width:205px; height:19px; ">
  1020. <choices>
  1021. <itemset nodeset="/root/init/orddeptlist/dept">
  1022. <label ref="depthngnm"/>
  1023. <value ref="deptcd"/>
  1024. </itemset>
  1025. </choices>
  1026. </select1>
  1027. <button id="btn_controlsize" class="icon_right" style="left:731px; top:44px; width:26px; height:19px; ">
  1028. <caption/>
  1029. <script type="javascript" ev:event="DOMActivate">
  1030. <![CDATA[
  1031. //402 -> 839, 839 -> 402
  1032. if(btn_controlsize.attribute("class") == "icon_right"){
  1033. btn_controlsize.attribute("class") = "icon_left"
  1034. btn_controlsize.attribute("left") = 1167;
  1035. ivw_histlist.visible = false;
  1036. cap_history.visible = false;
  1037. line3.visible = false;
  1038. grd_cpglist.attribute("width") = 839;
  1039. grd_cpglist.colWidth(2) = grd_cpglist.colWidth(2) + 80;
  1040. line2.attribute("x2") = 1194;
  1041. }else{
  1042. btn_controlsize.attribute("class") = "icon_right"
  1043. btn_controlsize.attribute("left") = 731;
  1044. ivw_histlist.visible = true;
  1045. cap_history.visible = true;
  1046. line3.visible = true;
  1047. grd_cpglist.attribute("width") = 402;
  1048. grd_cpglist.colWidth(2) = grd_cpglist.colWidth(2) - 80;
  1049. line2.attribute("x2") = 757;
  1050. }
  1051. ]]>
  1052. </script>
  1053. </button>
  1054. <caption id="cap_history" class="tit_2" style="left:770px; top:50px; width:95px; height:13px; ">변경이력</caption>
  1055. <button id="brn_srchtree" class="btn2_letter2" visibility="hidden" style="left:262px; top:44px; width:42px; height:19px; ">
  1056. <caption>조회</caption>
  1057. <script type="javascript" ev:event="DOMActivate">
  1058. <![CDATA[
  1059. ivw_indxmngt.window.javascript.fInitialize();
  1060. ]]>
  1061. </script>
  1062. </button>
  1063. <script type="javascript" ev:event="onkeydown">
  1064. <![CDATA[
  1065. if(event.keyCode == "27") {
  1066. btn_app.disabled = false;
  1067. btn_app.visible = true;
  1068. btn_app.attribute("left") = "0px";
  1069. }
  1070. ]]>
  1071. </script>
  1072. <caption id="cap_cpgnm" class="search_name" style="left:570px; top:10px; width:102px; height:17px; ">CP명 :</caption>
  1073. <caption id="caption2" class="search_name" visibility="hidden" style="left:235px; top:10px; width:89px; height:17px; ">CPG종류 :</caption>
  1074. <select id="chk_cpgtypecd" ref="/root/main/search_cond/cpgtypecd" visibility="hidden" overflow="visible" appearance="full" cellspacing="5" cols="2" sep="|" style="left:330px; top:10px; width:150px; height:20px; border-style:none; ">
  1075. <choices>
  1076. <item>
  1077. <label>병원공유</label>
  1078. <value>H</value>
  1079. </item>
  1080. <item>
  1081. <label>과내공유</label>
  1082. <value>D</value>
  1083. </item>
  1084. </choices>
  1085. </select>
  1086. <shape id="roundrect3" visibility="hidden" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:466px; top:44px; width:170px; height:20px; background-color:#ffffff; border-color:#00ccff; "/>
  1087. <bool id="bool1" checkvalue="Y,N" ref="/root/main/search_cond/delyn" style="left:905px; top:2px; width:20px; height:20px; "/>
  1088. <bool id="bool2" checkvalue="Y,N" ref="/root/main/search_cond/tmpyn" style="left:905px; top:17px; width:20px; height:20px; "/>
  1089. <caption id="cap_delyn" style="left:922px; top:4px; width:73px; height:15px; ">
  1090. <![CDATA[삭제CP 포함]]>
  1091. <script type="javascript" ev:event="onclick">
  1092. <![CDATA[
  1093. if( bool1.disabled == false ){
  1094. if( model.getValue("/root/main/search_cond/delyn") != "Y" )
  1095. bool1.selected = true;
  1096. else bool1.selected = false;
  1097. }
  1098. ]]>
  1099. </script>
  1100. </caption>
  1101. <button id="btn_indexInitialize" class="btn_sw" group="tab" selected="true" style="left:0px; top:43px; width:50px; height:22px; ">
  1102. <caption>색인</caption>
  1103. <script type="javascript" ev:event="DOMActivate">
  1104. <![CDATA[
  1105. ivw_indxmngt.window.javascript.fInitialize(); //좌측 CP Tree 조회
  1106. // fGetCPGInfo(); //우측 Grid 조회
  1107. ]]>
  1108. </script>
  1109. </button>
  1110. <caption id="cap_tmpyn" style="left:922px; top:19px; width:83px; height:15px; ">
  1111. <![CDATA[미등록CP 포함]]>
  1112. <script type="javascript" ev:event="onclick">
  1113. <![CDATA[
  1114. if( bool2.disabled == false ){
  1115. if( model.getValue("/root/main/search_cond/tmpyn") != "Y" )
  1116. bool2.selected = true;
  1117. else bool2.selected = false;
  1118. }
  1119. ]]>
  1120. </script>
  1121. </caption>
  1122. <bool id="bool3" checkvalue="Y,N" ref="/root/main/search_cond/indxyn" style="left:1010px; top:2px; width:20px; height:20px; "/>
  1123. <caption id="caption5" style="left:1027px; top:4px; width:62px; height:18px; ">
  1124. <![CDATA[색인재조회]]>
  1125. <script type="javascript" ev:event="onclick">
  1126. <![CDATA[
  1127. if( bool3.disabled == false ){
  1128. if( model.getValue("/root/main/search_cond/indxyn") != "Y" )
  1129. bool3.selected = true;
  1130. else bool3.selected = false;
  1131. }
  1132. ]]>
  1133. </script>
  1134. </caption>
  1135. </xhtml:body>
  1136. </xhtml:html>