SMPIB01400_자동상병등록관리.xrw 64 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>자동상병등록관리</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <list1>
  11. <listautd/>
  12. </list1>
  13. <list2>
  14. <listmech/>
  15. <listdiag/>
  16. <listedept/>
  17. </list2>
  18. </main>
  19. <send>
  20. <autogrup/>
  21. <autogrupnm/>
  22. <orddeptcd/>
  23. <snglcalcscorcd/>
  24. <diagcd/>
  25. <minage/>
  26. <maxage/>
  27. <sex/>
  28. <useyn/>
  29. <ioflag/>
  30. <updatedata>
  31. <gruplist/>
  32. <mechlist/>
  33. <diaglist/>
  34. <seldeptlist/>
  35. <edeptlist/>
  36. </updatedata>
  37. <item2>
  38. <grdsrchnm>
  39. <iptsearch/>
  40. <searchkind/>
  41. </grdsrchnm>
  42. </item2>
  43. <item3>
  44. <srchdiag>
  45. <basedd/>
  46. <diagcd/>
  47. <diagnm/>
  48. <selectedrdodiagkind/>
  49. </srchdiag>
  50. </item3>
  51. </send>
  52. <send2>
  53. <autogrup/>
  54. <orddeptcd/>
  55. </send2>
  56. <hidden>
  57. <sppiz00400>
  58. <rslt>
  59. <diagcd/>
  60. <diaghngnm/>
  61. <diagengnm/>
  62. </rslt>
  63. </sppiz00400>
  64. <mode/>
  65. <smpic00200>
  66. <cond>
  67. <calcnm/>
  68. </cond>
  69. </smpic00200>
  70. <seldeptlist>
  71. <selyn/>
  72. <deptcd/>
  73. <deptnm/>
  74. <oldselyn/>
  75. </seldeptlist>
  76. <seldeptbase>
  77. <autogrup/>
  78. <autogrupnm/>
  79. <orddeptcd/>
  80. </seldeptbase>
  81. </hidden>
  82. <init>
  83. <orddeptcd>
  84. <nm>전체</nm>
  85. <cd>-</cd>
  86. </orddeptcd>
  87. </init>
  88. <temp>
  89. <calcdiagnm>
  90. <hngnm/>
  91. </calcdiagnm>
  92. <picmmech>
  93. <picmmech_calcscorcd/>
  94. <picmmech_hngnm/>
  95. </picmmech>
  96. </temp>
  97. <init3>
  98. </init3>
  99. </root>
  100. </instance>
  101. <submission id="TRPIB01401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list1"/>
  102. <submission id="TXPIB01401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updatedata" resultref="/root/result"/>
  103. <submission id="TRPIB01402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/item2/grdsrchnm" resultref="/root/temp"/>
  104. <submission id="TRPIB01403" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send2" resultref="/root/main/list2"/>
  105. <submission id="TRPAM00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" add="bottom" resultref="/root/hidden/tmp"/>
  106. <submission id="TRPIB00202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/item2/grdsrchnm" resultref="/root/temp"/>
  107. <submission id="TXPIB01402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updatedata" replace="instance" resultref="/root/result"/>
  108. </model>
  109. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  110. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  111. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  112. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
  113. <script type="javascript" ev:event="xforms-ready">
  114. <![CDATA[
  115. fInitialize();
  116. ]]>
  117. </script>
  118. <script type="javascript">
  119. <![CDATA[
  120. function fInitialize() {
  121. // grid를 인스턴스에 mapping후 인스턴스에 해당하는 빈줄 1줄이 생기므로 grid 초기화
  122. model.removeNodeset("/root/main/list1/listautd");
  123. model.removeNodeset("/root/main/list2/listmech");
  124. model.removeNodeset("/root/main/list2/listdiag");
  125. model.removeNodeset("/root/main/list2/listedept");
  126. // (PAM.js) submission id="TRPAM00101" 를 사용하여 Combo item을 가져온다.
  127. pamGetDeptCDDrIDList();
  128. model.makeValue("/root/hidden/orddeptcd/orddeptcdlist/cd","-");
  129. model.makeValue("/root/hidden/orddeptcd/orddeptcdlist/nm","전체");
  130. model.makeValue("/root/hidden/orddeptcd/orddeptcdlist/deptengabbgr","-");
  131. model.makeValue("/root/hidden/orddeptcd/orddeptcdlist/reqdeptno","-");
  132. copyNodeType("/root/init/orddeptcd","/root/hidden/orddeptcd","before");
  133. // 김용민 지저분해서 삭제
  134. model.removeNodeset("/root/init/orddrid");
  135. model.removeNodeset("/root/init/centcd");
  136. model.removeNodeset("/root/init/subdeptcd");
  137. /*
  138. var nodelist = instance1.selectNodes("/root/init/orddeptcd/orddeptcdlist");
  139. var length = nodelist.length;
  140. model.makeValue("/root/init/orddeptcd/orddeptcdlist["+ (length+1) +"]/nm","전체");
  141. model.makeValue("/root/init/orddeptcd/orddeptcdlist["+ (length+1) +"]/cd","-");
  142. model.makeValue("/root/init/orddeptcd/orddeptcdlist["+ (length+2) +"]/nm"," ");
  143. model.makeValue("/root/init/orddeptcd/orddeptcdlist["+ (length+2) +"]/cd"," ");
  144. */
  145. /*
  146. ipt_snglcalcscorcd.attribute("_chartype") = "upper"; // 수가코드 대문자
  147. ipt_diagcd.attribute("_chartype") = "upper"; // 상병코드 대문자
  148. // 코드명(처방,상병)은 대문자로
  149. grd_autmech.colAttribute ( 1, "_chartype" ) = "upper";
  150. grd_autdiag.colAttribute ( 1, "_chartype" ) = "upper";
  151. */
  152. // 김용민 추가 - 과별 선택기능을 위한 진료과 리스트 작업
  153. model.removeNodeset("/root/hidden/seldeptlist");
  154. for( i = 1; i <= model.getXPathValue( "count(/root/init/orddeptcd/orddeptcdlist)" ) ; i++ ) {
  155. model.makeNode("root/hidden/seldeptlist[" + i + "]/selyn");
  156. model.makeNode("root/hidden/seldeptlist[" + i + "]/deptcd");
  157. model.makeNode("root/hidden/seldeptlist[" + i + "]/deptnm");
  158. model.makeNode("root/hidden/seldeptlist[" + i + "]/oldselyn");
  159. model.setValue("/root/hidden/seldeptlist[" + i + "]/deptcd", model.getValue("/root/init/orddeptcd/orddeptcdlist[" + i + "]/cd") );
  160. model.setValue("/root/hidden/seldeptlist[" + i + "]/deptnm", model.getValue("/root/init/orddeptcd/orddeptcdlist[" + i + "]/nm") );
  161. }
  162. model.makeValue("/root/hidden/orddeptcd/orddeptcdlist/cd","");
  163. model.makeValue("/root/hidden/orddeptcd/orddeptcdlist/nm","");
  164. model.makeValue("/root/hidden/orddeptcd/orddeptcdlist/deptengabbgr","-");
  165. model.makeValue("/root/hidden/orddeptcd/orddeptcdlist/reqdeptno","-");
  166. copyNodeType("/root/init/orddeptcd","/root/hidden/orddeptcd","before");
  167. cmb_orddeptcd.refresh();
  168. }
  169. // 처방이나 상병코드로 명칭을 검색 결과가 단일일때 명칭을 표기 아닐경우는 상병조회,수가조회 팝업과 연동
  170. function fSearchNm(mode) {
  171. var srchkind = model.getValue("/root/send/searchkind");
  172. var hngnm = model.getValue("/root/temp/calcdiagnm/hngnm");
  173. var calc_col = grd_autdiagrgst.colRef("calcscorcd");
  174. var frd_col = grd_autdiagrgst.colRef("diagcd");
  175. model.resetInstanceNode("/root/main/temp");
  176. model.resetInstanceNode("/root/hidden/sppiz00400");
  177. model.setValue("/root/hidden/mode",mode);
  178. // srchkind - 1 : 수가 , 2 : 상병 , 3 : 처방
  179. // mode - 1 : 검색조건 , 2 : 그리드
  180. if ( (srchkind == 1 && mode == 1) || (grd_autdiagrgst.col == calc_col && mode == 2) ) { // 수가검색
  181. if (grd_autdiagrgst.col == calc_col && mode == 2) {
  182. model.setValue("/root/main/list1/listautd["+grd_autdiagrgst.row+"]/calcscornm",model.getValue("/root/temp/calcdiagnm/hngnm"));
  183. }
  184. if (hngnm == "") { // 검색된 건수가 2건이상이면 팝업을 통해 조회한다.
  185. var trgtManWindow = getChildWindow("SMPIC00200"); // 수가 조회
  186. if (trgtManWindow == null) {
  187. if (mode == 1) { // 조회창에서 검색
  188. modal("SMPIC00200" ,"", "10", "10", "SMPIC00200", "/root/send/iptsearch", "/root/temp", "", "");
  189. model.setValue("/root/send/iptsearch",model.getValue("/root/temp/picmmech/picmmech_calcscorcd"));
  190. model.setValue("/root/send/srchnm",model.getValue("/root/temp/picmmech/picmmech_hngnm"));
  191. }
  192. else if (mode == 2 && grd_autdiagrgst.col == calc_col) { // 그리드에서 검색
  193. modal("SMPIC00200" ,"", "10", "10", "SMPIC00200", "/root/main/list1/listautd["+grd_autdiagrgst.row+"]/calcscorcd", "/root/temp", "", "");
  194. model.setValue("/root/main/list1/listautd["+grd_autdiagrgst.row+"]/calcscorcd",model.getValue("/root/temp/picmmech/picmmech_calcscorcd"));
  195. model.setValue("/root/main/list1/listautd["+grd_autdiagrgst.row+"]/calcscornm",model.getValue("/root/temp/picmmech/picmmech_hngnm"));
  196. var srchnm = model.getValue("/root/temp/picmmech/picmmech_hngnm");
  197. if (srchnm == "") {
  198. //model.setValue("/root/main/list1/listautd["+grd_autdiagrgst.row+" ]/calcscorcd","");
  199. //model.setValue("/root/main/list1/listautd["+grd_autdiagrgst.row+" ]/calcscornm","");
  200. }
  201. }
  202. } else {
  203. trgtManWindow.javascript.fSearchDiag();
  204. activateChild("SMPIC00200");
  205. }
  206. model.refresh();
  207. }
  208. } else if ( (srchkind == 2 && mode == 1) || (grd_autdiagrgst.col == frd_col && mode == 2)) { // 상병조회
  209. model.setValue("/root/main/list1/listautd["+grd_autdiagrgst.row+"]/diagnm",model.getValue("/root/temp/calcdiagnm/hngnm"));
  210. if (hngnm == "") { // 검색된 건수가 2건이상이면 팝업을 통해 조회한다.
  211. var trgtManWindow = getChildWindow("SPPIZ00400"); // 상병 조회
  212. if (trgtManWindow == null) {
  213. model.setValue("/root/send/item1/srchdiag/basedd", model.getValue("/root/send/badd"));
  214. if (mode == 1) { // 조회창에서 검색
  215. model.setValue("/root/send/item1/srchdiag/diagcd", model.getValue("/root/send/iptsearch"));
  216. } else if (mode == 2) { // 그리드에서 검색
  217. model.setValue("/root/send/item1/srchdiag/diagcd", model.getValue("/root/main/list1/listautd["+grd_autdiagrgst.row+"]/diagcd"));
  218. }
  219. model.setValue("/root/send/item1/srchdiag/selectedrdodiagkind","1"); // icd10으로
  220. modal("SPPIZ00400" ,"", "10", "10", "SPPIZ00400", "/root/send/item1/srchdiag", "/root/init", "", "");
  221. var srchnm = model.getValue("/root/hidden/sppiz00400/rslt/diaghngnm");
  222. if (srchnm == "") {
  223. //model.setValue("/root/main/list1/listautd[" +grd_autdiagrgst.row+ " ]/diagcd","");
  224. //model.setValue("/root/main/list1/listautd[" +grd_autdiagrgst.row+ " ]/diagnm","");
  225. }
  226. } else {
  227. trgtManWindow.javascript.fSearchDiag();
  228. activateChild("SPPIZ00400");
  229. }
  230. model.refresh();
  231. }
  232. }
  233. }
  234. // 상병조회 팝업에서 상병을 더블클릭 했을경우 상병 그리드에 반영, 상병명은 상병조회팝업의 상병명을 사용하지 않고 ICD10 사용
  235. function fSetDiagCdNm() {
  236. var mode = model.getValue("/root/hidden/mode");
  237. if (mode == 1) {
  238. model.setValue("/root/send/iptsearch",model.getValue("/root/hidden/sppiz00400/rslt/diagcd"));
  239. model.setValue("/root/send/srchnm",model.getValue("/root/hidden/sppiz00400/rslt/diaghngnm"));
  240. } else if (mode == 2) {
  241. model.setValue("/root/main/list1/listautd["+grd_autdiagrgst.row+"]/diagcd", model.getValue("/root/hidden/sppiz00400/rslt/diagcd"));
  242. model.setValue("/root/main/list1/listautd["+grd_autdiagrgst.row+"]/diagnm", model.getValue("/root/hidden/sppiz00400/rslt/diaghngnm"));
  243. }
  244. model.refresh();
  245. }
  246. // 조회시 데이터의 유효성체크
  247. function fCheckSrchData() {
  248. var srchkind = model.getValue("/root/send/searchkind");
  249. var iptsearch = model.getValue("/root/send/iptsearch");
  250. if (srchkind == "-") {
  251. return true;
  252. }
  253. if (iptsearch == "") {
  254. if (srchkind == "1") {
  255. messageBox("처방코드는","I003"); // 처방코드는 필수입력입니다.
  256. return false;
  257. }
  258. if (srchkind == "2") {
  259. messageBox("상병코드는","I003"); // 상병코드는 필수입력입니다.
  260. return false;
  261. }
  262. return true;
  263. }
  264. return true;
  265. }
  266. // 저장시 데이터의 유효성체크
  267. function fCheckSaveData() {
  268. var gupdtdata = getGridUpdateData(grd_autdiagrgst);
  269. var mupdtdata = getGridUpdateData(grd_autmech);
  270. var cupdtdata = getGridUpdateData(grd_autdiag);
  271. var eupdtdata = getGridUpdateData(grd_autedept);
  272. if (gupdtdata == "" && mupdtdata =="" && cupdtdata == ""&& eupdtdata == "") {
  273. messageBox("변경된 데이터가","I004");
  274. return false;
  275. }
  276. for(var i = 1 ; i < grd_autdiagrgst.rows ; i++) {
  277. var status = grd_autdiagrgst.rowStatus(i);
  278. if(status == "1" || status == "2" || status =="3" ) {
  279. if ( model.getValue("/root/main/list1/listautd[" + i + "]/autogrupnm") == "" ) {
  280. messageBox("그룹명칭은","I003");
  281. return false;
  282. }
  283. }
  284. }
  285. for(var i = 1 ; i < grd_autmech.rows ; i++) {
  286. var status = grd_autmech.rowStatus(i);
  287. if(status == "1" || status == "2" || status =="3" ) {
  288. if ( model.getValue("/root/main/list2/listmech[" + i + "]/snglcalcscorcd") == "" ) {
  289. messageBox("수가코드는","I003");
  290. return false;
  291. }
  292. }
  293. }
  294. for(var i = 1 ; i < grd_autdiag.rows ; i++) {
  295. var status = grd_autdiag.rowStatus(i);
  296. if(status == "1" || status == "2" || status =="3" ) {
  297. if ( model.getValue("/root/main/list2/listdiag[" + i + "]/diagcd") == ""
  298. || model.getValue("/root/main/list2/listdiag[" + i + "]/diagcd") == "-"
  299. )
  300. {
  301. messageBox("시작상병코드는","I003");
  302. return false;
  303. }
  304. }
  305. }
  306. return true;
  307. }
  308. function fCallSubList() {
  309. var rtn = null;
  310. model.removeNodeset("/root/main/list2/listmech");
  311. model.removeNodeset("/root/main/list2/listdiag");
  312. model.removeNodeset("/root/main/list2/listedept");
  313. if ( model.getValue("root/main/list1/listautd[ "+ grd_autdiagrgst.row + "]/autogrup") == "9999" ) {
  314. grd_autdiag.colAttribute(grd_autdiag.colRef("orddeptcd"),"disabled") = "false";
  315. grd_autdiag.colAttribute(grd_autdiag.colRef("chgdiagcd"),"disabled") = "false";
  316. } else {
  317. grd_autdiag.colAttribute(grd_autdiag.colRef("orddeptcd"),"disabled") = "true";
  318. grd_autdiag.colAttribute(grd_autdiag.colRef("chgdiagcd"),"disabled") = "true";
  319. }
  320. // grd_autdiag.refresh();
  321. //if (grd_autdiagrgst.isCell(event.target) && grd_autdiagrgst.row >= grd_autdiagrgst.fixedRows) {
  322. var row = grd_autdiagrgst.selectedRow(0);
  323. var autogrup = grd_autdiagrgst.textmatrix(row, grd_autdiagrgst.colRef("autogrup")); // 그룹코드
  324. var orddeptcd = grd_autdiagrgst.textmatrix(row, grd_autdiagrgst.colRef("orddeptcd")); // 적용과
  325. model.setValue( "/root/send2/autogrup" , autogrup);
  326. model.setValue( "/root/send2/orddeptcd", orddeptcd);
  327. if ( autogrup == "" || orddeptcd == "" ) {
  328. grd_autmech.refresh();
  329. grd_autdiag.refresh();
  330. return; // 조회할 코드 없으면 그냥 리턴
  331. }
  332. rtn = submit("TRPIB01403");
  333. //}
  334. }
  335. function fSrchSnglCalcscorNm() {
  336. var col = grd_autmech.col;
  337. var row = grd_autmech.row;
  338. model.setValue("/root/send/item2/grdsrchnm/iptsearch",model.getValue("/root/main/list2/listmech["+row+"]/snglcalcscorcd"));
  339. model.setValue("/root/send/item2/grdsrchnm/searchkind","1");
  340. submit("TRPIB00202");
  341. var hngnm = model.getValue("/root/temp/calcdiagnm/hngnm");
  342. if (hngnm == "") {
  343. setParameter("openflag", "hngnm"); // 검색 조건을 한글명으로 세팅
  344. setParameter("iParam_mother_view", "SMPPI00100_사전심사제어코드관리");
  345. //modal("SMPIC00200" ,"", "10", "10", "SMPIC00200","/root/send/item2/grdsrchnm/iptsearch", "/root/temp", "", "");
  346. modal("../../../pam/calcscormngtweb/xrw/SMPIC00202_수가조회", "", "200", "200" ,"SMPIC00202_수가조회", "", "");
  347. var sugainfo = getParameter("SMPIC00202");
  348. setCSVToNode("/root/init3", sugainfo, "grd_autmech");
  349. fSettingList("/root/init3", "grd_autmech");
  350. model.removeNodeset("/root/init3/grd_autmech");
  351. model.refresh();
  352. } else {
  353. model.setValue("/root/main/list2/listmech["+row+"]/hngnm",model.getValue("/root/temp/calcdiagnm/hngnm"));
  354. }
  355. }
  356. function fSettingList(pnode, grdName)
  357. {
  358. var datagrid = document.controls(grdName);
  359. var codynode = instance1.selectNodes(pnode + "/*");
  360. var addRow = datagrid.rows - datagrid.fixedRows;
  361. for (var j = 1; j <= codynode.length ; j++)
  362. {
  363. if(addRow > datagrid.rows - datagrid.fixedRows)
  364. {
  365. datagrid.addRow(false,true);;
  366. datagrid.select(datagrid.row, datagrid.col) = true;
  367. addRow = datagrid.rows - datagrid.fixedRows;
  368. }
  369. model.setValue(datagrid.nodeset + "["+addRow+"]/orddeptcd",model.getValue("/root/main/list1/listautd["+grd_autdiagrgst.row+"]/orddeptcd"));
  370. model.setValue(datagrid.nodeset + "["+addRow+"]/autogrup",model.getValue("/root/main/list1/listautd["+grd_autdiagrgst.row+"]/autogrup"));
  371. model.setValue(datagrid.nodeset + "["+addRow+"]/snglcalcscorcd", model.getValue(pnode +"/" + grdName + "[" + j + "]/picmmech_calcscorcd"));
  372. model.setValue(datagrid.nodeset + "["+addRow+"]/hngnm",model. getValue(pnode +"/" + grdName + "[" + j + "]/picmmech_hngnm"));
  373. addRow = addRow + 1;
  374. }
  375. model.recalculate();
  376. model.refresh();
  377. }
  378. function fSrchDiagNm(fromto) {
  379. var col = grd_autdiag.col;
  380. var row = grd_autdiag.row;
  381. if ( fromto == "FROM" ) {
  382. // '-' 기호 null 로 처리
  383. if ( model.getValue("/root/main/list2/listdiag["+row+"]/diagcd") == '-' ) {
  384. model.setValue("/root/main/list2/listdiag["+row+"]/diagcd","");
  385. }
  386. model.setValue("/root/send/item2/grdsrchnm/iptsearch",model.getValue("/root/main/list2/listdiag["+row+"]/diagcd"));
  387. } else if ( fromto == "TO" ) {
  388. // '-' 기호 null 로 처리
  389. if ( model.getValue("/root/main/list2/listdiag["+row+"]/diagcdto") == '-' ) {
  390. model.setValue("/root/main/list2/listdiag["+row+"]/diagcdto","");
  391. }
  392. model.setValue("/root/send/item2/grdsrchnm/iptsearch",model.getValue("/root/main/list2/listdiag["+row+"]/diagcdto"));
  393. } else if ( fromto == "CHG" ) {
  394. // '-' 기호 null 로 처리
  395. if ( model.getValue("/root/main/list2/listdiag["+row+"]/chgdiagcd") == '-' ) {
  396. model.setValue("/root/main/list2/listdiag["+row+"]/chgdiagcd","");
  397. }
  398. model.setValue("/root/send/item2/grdsrchnm/iptsearch",model.getValue("/root/main/list2/listdiag["+row+"]/chgdiagcd"));
  399. } else if ( fromto == "CHKF" ) {
  400. // '-' 기호 null 로 처리
  401. if ( model.getValue("/root/main/list2/listdiag["+row+"]/chkdiagcd") == '-' ) {
  402. model.setValue("/root/main/list2/listdiag["+row+"]/chkdiagcd","");
  403. }
  404. model.setValue("/root/send/item2/grdsrchnm/iptsearch",model.getValue("/root/main/list2/listdiag["+row+"]/chkdiagcd"));
  405. } else if ( fromto == "CHKT" ) {
  406. // '-' 기호 null 로 처리
  407. if ( model.getValue("/root/main/list2/listdiag["+row+"]/chkdiagcdto") == '-' ) {
  408. model.setValue("/root/main/list2/listdiag["+row+"]/chkdiagcdto","");
  409. }
  410. model.setValue("/root/send/item2/grdsrchnm/iptsearch",model.getValue("/root/main/list2/listdiag["+row+"]/chkdiagcdto"));
  411. }
  412. model.setValue("/root/send/item2/grdsrchnm/searchkind","2");
  413. submit("TRPIB00202");
  414. var hngnm = model.getValue("/root/temp/calcdiagnm/hngnm");
  415. if (hngnm == "") {
  416. var today = getCurrentDate(); // 현재 날짜를 얻어옴
  417. model.setValue("/root/send/item3/srchdiag/basedd", today);
  418. if ( fromto == "FROM" ) {
  419. model.setValue("/root/send/item3/srchdiag/diagcd",model.getValue("/root/main/list2/listdiag["+row+"]/diagcd"));
  420. } else if ( fromto == "TO" ) {
  421. model.setValue("/root/send/item3/srchdiag/diagcd",model.getValue("/root/main/list2/listdiag["+row+"]/diagcdto"));
  422. } else if ( fromto == "CHG" ) {
  423. model.setValue("/root/send/item3/srchdiag/diagcd",model.getValue("/root/main/list2/listdiag["+row+"]/chgdiagcd"));
  424. } else if ( fromto == "CHKF" ) {
  425. model.setValue("/root/send/item3/srchdiag/diagcd",model.getValue("/root/main/list2/listdiag["+row+"]/chkdiagcd"));
  426. } else if ( fromto == "CHKT" ) {
  427. model.setValue("/root/send/item3/srchdiag/diagcd",model.getValue("/root/main/list2/listdiag["+row+"]/chkdiagcdto"));
  428. }
  429. model.setValue("/root/send/item3/srchdiag/selectedrdodiagkind","1"); // icd10으로
  430. model.resetInstanceNode("/root/hidden/sppiz00400/rslt"); // 20100313 초기화
  431. modal("SPPIZ00400" ,"", "10", "10", "SPPIZ00400", "/root/send/item3/srchdiag", "/root/init", "", "");
  432. var diagcd = model.getValue("/root/hidden/sppiz00400/rslt/diagcd");
  433. if ( fromto == "FROM" ) {
  434. if (diagcd == "") {
  435. model.setValue("/root/main/list2/listdiag[" + row + " ]/diagcd","-");
  436. model.setValue("/root/main/list2/listdiag[" + row + " ]/diagnm","-");
  437. } else {
  438. model.setValue("/root/main/list2/listdiag[" + row + " ]/diagcd",model.getValue("/root/hidden/sppiz00400/rslt/diagcd"));
  439. model.setValue("/root/main/list2/listdiag[" + row + " ]/diagnm",model.getValue("/root/hidden/sppiz00400/rslt/diaghngnm"));
  440. }
  441. } else if ( fromto == "TO" ) {
  442. if (diagcd == "") {
  443. model.setValue("/root/main/list2/listdiag[" + row + " ]/diagcdto","-");
  444. model.setValue("/root/main/list2/listdiag[" + row + " ]/diagnmto","-");
  445. } else {
  446. model.setValue("/root/main/list2/listdiag[" + row + " ]/diagcdto",model.getValue("/root/hidden/sppiz00400/rslt/diagcd"));
  447. model.setValue("/root/main/list2/listdiag[" + row + " ]/diagnmto",model.getValue("/root/hidden/sppiz00400/rslt/diaghngnm"));
  448. }
  449. } else if ( fromto == "CHG" ) {
  450. if (diagcd == "") {
  451. model.setValue("/root/main/list2/listdiag[" + row + " ]/chgdiagcd","-");
  452. model.setValue("/root/main/list2/listdiag[" + row + " ]/chgdiagnm","-");
  453. } else {
  454. model.setValue("/root/main/list2/listdiag[" + row + " ]/chgdiagcd",model.getValue("/root/hidden/sppiz00400/rslt/diagcd"));
  455. model.setValue("/root/main/list2/listdiag[" + row + " ]/chgdiagnm",model.getValue("/root/hidden/sppiz00400/rslt/diaghngnm"));
  456. }
  457. } else if ( fromto == "CHKF" ) {
  458. if (diagcd == "") {
  459. model.setValue("/root/main/list2/listdiag[" + row + " ]/chkdiagcd","-");
  460. model.setValue("/root/main/list2/listdiag[" + row + " ]/chkdiagnm","-");
  461. } else {
  462. model.setValue("/root/main/list2/listdiag[" + row + " ]/chkdiagcd",model.getValue("/root/hidden/sppiz00400/rslt/diagcd"));
  463. model.setValue("/root/main/list2/listdiag[" + row + " ]/chkdiagnm",model.getValue("/root/hidden/sppiz00400/rslt/diaghngnm"));
  464. }
  465. } else if ( fromto == "CHKT" ) {
  466. if (diagcd == "") {
  467. model.setValue("/root/main/list2/listdiag[" + row + " ]/chkdiagcdto","-");
  468. model.setValue("/root/main/list2/listdiag[" + row + " ]/chkdiagnmto","-");
  469. } else {
  470. model.setValue("/root/main/list2/listdiag[" + row + " ]/chkdiagcdto",model.getValue("/root/hidden/sppiz00400/rslt/diagcd"));
  471. model.setValue("/root/main/list2/listdiag[" + row + " ]/chkdiagnmto",model.getValue("/root/hidden/sppiz00400/rslt/diaghngnm"));
  472. }
  473. }
  474. } else {
  475. if ( fromto == "FROM" ) {
  476. model.setValue("/root/main/list2/listdiag["+row+"]/diagnm",model.getValue("/root/temp/calcdiagnm/hngnm"));
  477. } else if ( fromto == "TO" ) {
  478. model.setValue("/root/main/list2/listdiag["+row+"]/diagnmto",model.getValue("/root/temp/calcdiagnm/hngnm"));
  479. } else if ( fromto == "CHG" ) {
  480. model.setValue("/root/main/list2/listdiag["+row+"]/chgdiagnm",model.getValue("/root/temp/calcdiagnm/hngnm"));
  481. } else if ( fromto == "CHKF" ) {
  482. model.setValue("/root/main/list2/listdiag["+row+"]/chkdiagnm",model.getValue("/root/temp/calcdiagnm/hngnm"));
  483. } else if ( fromto == "CHKT" ) {
  484. model.setValue("/root/main/list2/listdiag["+row+"]/chkdiagnmto",model.getValue("/root/temp/calcdiagnm/hngnm"));
  485. }
  486. }
  487. }
  488. // 김용민 ... 진료과 선택창 띄위기전에 초기작업을 한다.
  489. function fSelectDeptInit() {
  490. model.setValue("/root/hidden/seldeptbase/autogrup" , model.getValue("/root/main/list1/listautd[" + grd_autdiagrgst.row + "]/autogrup") );
  491. model.setValue("/root/hidden/seldeptbase/autogrupnm", model.getValue("/root/main/list1/listautd[" + grd_autdiagrgst.row + "]/autogrupnm") );
  492. model.setValue("/root/hidden/seldeptbase/orddeptcd", model.getValue("/root/main/list1/listautd[" + grd_autdiagrgst.row + "]/orddeptcd") );
  493. // 일단 기존꺼 지우고
  494. //for( i = 1; i <= model.getXPathValue( "count(/root/init/orddeptcd/orddeptcdlist)" ) ; i++ ) {
  495. for( i = 1; i <= model.getXPathValue( "count(/root/hidden/seldeptlist)" ) ; i++ ) {
  496. model.setValue("/root/hidden/seldeptlist[" + i + "]/selyn", "false" );
  497. model.setValue("/root/hidden/seldeptlist[" + i + "]/oldselyn", "false" );
  498. grd_seldeptlist.clearStatus();
  499. }
  500. for( i = grd_autdiagrgst.fixedRows; i < grd_autdiagrgst.rows ; i++ ) {
  501. if ( model.getValue("/root/hidden/seldeptbase/autogrup") == model.getValue("/root/main/list1/listautd[" + i + "]/autogrup") ) {
  502. var tmpDeptcd = model.getValue("/root/main/list1/listautd[" + i + "]/orddeptcd");
  503. for( j = grd_seldeptlist.fixedRows; j < grd_seldeptlist.rows ; j++ ) {
  504. if ( tmpDeptcd == grd_seldeptlist.valueMatrix(j, grd_seldeptlist.colRef("deptcd")) ) {
  505. model.setValue("/root/hidden/seldeptlist[" + j + "]/selyn","true");
  506. model.setValue("/root/hidden/seldeptlist[" + j + "]/oldselyn","true");
  507. }
  508. }
  509. }
  510. }
  511. model.refresh();
  512. }
  513. // 김용민 ... 진료과 선택창 완료시 체크
  514. function fSelectDeptChk() {
  515. var changecnt = 0;
  516. var alldept = 0;
  517. var etcdept = 0;
  518. for( i = grd_seldeptlist.fixedRows; i < grd_seldeptlist.rows ; i++ ) {
  519. if ( model.getValue("/root/hidden/seldeptlist[" + i + "]/selyn") != model.getValue("/root/hidden/seldeptlist[" + i + "]/oldselyn") )
  520. {
  521. changecnt++;
  522. }
  523. if ( model.getValue("/root/hidden/seldeptlist[" + i + "]/selyn") == "true" ) {
  524. if ( model.getValue("/root/hidden/seldeptlist[" + i + "]/deptcd") == "-" ) {
  525. alldept++;
  526. } else {
  527. etcdept++;
  528. }
  529. }
  530. }
  531. if ( changecnt == 0 ) {
  532. messageBox("변경된 데이터가","I004");
  533. return false;
  534. }
  535. if ( alldept != 0 && etcdept != 0 ) {
  536. messageBox("전체과와 타과를 같이 선택할수","I004");
  537. return false;
  538. }
  539. if ( alldept == 0 && etcdept == 0 ) {
  540. messageBox("선택된 진료과가 하나도","I004");
  541. return false;
  542. }
  543. return true;
  544. }
  545. // 김용민 - 선택된 진료과를 입력한다.
  546. function fSelectDeptInput() {
  547. var jobrow = 0;
  548. model.removeNodeset("/root/temp/save/seldeptlist");
  549. for( i = grd_seldeptlist.fixedRows; i < grd_seldeptlist.rows ; i++ ) {
  550. if ( model.getValue("root/hidden/seldeptlist[" + i + "]/selyn") == "true"
  551. && model.getValue("root/hidden/seldeptlist[" + i + "]/oldselyn") == "false"
  552. )
  553. {
  554. // 신규입력
  555. jobrow++;
  556. model.makeNode("/root/temp/save/seldeptlist[" + jobrow + "]/autogrup");
  557. model.makeNode("/root/temp/save/seldeptlist[" + jobrow + "]/basedept");
  558. model.makeNode("/root/temp/save/seldeptlist[" + jobrow + "]/orddeptcd");
  559. model.makeNode("/root/temp/save/seldeptlist[" + jobrow + "]/status");
  560. model.setValue("/root/temp/save/seldeptlist[" + jobrow+ "]/autogrup", model.getValue("/root/hidden/seldeptbase/autogrup") );
  561. model.setValue("/root/temp/save/seldeptlist[" + jobrow + "]/basedept", model.getValue("/root/hidden/seldeptbase/orddeptcd") );
  562. model.setValue("/root/temp/save/seldeptlist[" + jobrow + "]/orddeptcd", model.getValue("/root/hidden/seldeptlist[" + i + "]/deptcd") );
  563. model.setValue("/root/temp/save/seldeptlist[" + jobrow+ "]/status", "i" );
  564. } else if ( model.getValue("root/hidden/seldeptlist[" + i + "]/selyn") == "false"
  565. && model.getValue("root/hidden/seldeptlist[" + i + "]/oldselyn") == "true"
  566. )
  567. {
  568. // 삭제
  569. jobrow++;
  570. model.makeNode("/root/temp/save/seldeptlist[" + jobrow + "]/autogrup");
  571. model.makeNode("/root/temp/save/seldeptlist[" + jobrow + "]/basedept");
  572. model.makeNode("/root/temp/save/seldeptlist[" + jobrow + "]/orddeptcd");
  573. model.makeNode("/root/temp/save/seldeptlist[" + jobrow + "]/status");
  574. model.setValue("/root/temp/save/seldeptlist[" + jobrow+ "]/autogrup", model.getValue("/root/hidden/seldeptbase/autogrup") );
  575. model.setValue("/root/temp/save/seldeptlist[" + jobrow + "]/basedept", "" );
  576. model.setValue("/root/temp/save/seldeptlist[" + jobrow + "]/orddeptcd", model.getValue("/root/hidden/seldeptlist[" + i + "]/deptcd") );
  577. model.setValue("/root/temp/save/seldeptlist[" + jobrow+ "]/status", "d" );
  578. }
  579. }
  580. model.setValue("/root/send/updatedata/seldeptlist", getNodeListCSV(instance1.selectNodes("/root/temp/save/seldeptlist")) );
  581. }
  582. // 김용민 - 화면 display 버튼 사용여부 제어
  583. function fSetDisplayDisable(iFlag) {
  584. if ( iFlag == true ) {
  585. grd_autdiagrgst.disabled = true;
  586. grd_autmech.disabled = true;
  587. grd_autdiag.disabled = true;
  588. btn_search.disabled = true;
  589. btn_save.disabled = true;
  590. btn_init.disabled = true;
  591. btn_sel_dept.disabled = true;
  592. btn_addrow.disabled = true;
  593. btn_delrow.disabled = true;
  594. btn_copy.disabled = true;
  595. btn_autdiag_insrow.disabled = true;
  596. btn_autdiag_delrow.disabled = true;
  597. btn_autmech_insrow.disabled = true;
  598. btn_autmech_delrow.disabled = true;
  599. } else {
  600. grd_autdiagrgst.disabled = false;
  601. grd_autmech.disabled = false;
  602. grd_autdiag.disabled = false;
  603. btn_search.disabled = false;
  604. btn_save.disabled = false;
  605. btn_init.disabled = false;
  606. btn_sel_dept.disabled = false;
  607. btn_addrow.disabled = false;
  608. btn_delrow.disabled = false;
  609. btn_copy.disabled = false;
  610. btn_autdiag_insrow.disabled = false;
  611. btn_autdiag_delrow.disabled = false;
  612. btn_autmech_insrow.disabled = false;
  613. btn_autmech_delrow.disabled = false;
  614. }
  615. }
  616. ]]>
  617. </script>
  618. </xhtml:head>
  619. <xhtml:body pagewidth="1211" pageheight="784" guideline="1,1194;1,331;1,242;1,240;1,242;1,240;1,215;1,247;1,247;" style="vertical-align:bottom; margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  620. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  621. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:119px; height:13px; ">자동상병등록관리</caption>
  622. </group>
  623. <group id="group3" scroll="auto" style="left:0px; top:13px; width:1195px; height:771px; ">
  624. <group id="group2" style="left:0px; top:10px; width:1194px; height:58px; vertical-align:top; ">
  625. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:55px; "/>
  626. <caption id="caption2" class="search_name" style="left:15px; top:9px; width:86px; height:17px; ">그룹코드 :</caption>
  627. <button id="btn_search" class="btn1_letter2" style="left:1124px; top:7px; width:56px; height:22px; ">
  628. <caption>조회</caption>
  629. <script type="javascript" ev:event="DOMActivate">
  630. <![CDATA[
  631. // 1. 자동상병등록 목록 조회
  632. model.removenode("/root/main/list1");
  633. model.removeNodeset("/root/main/list2/listmech"); // 조회시 처방 그리드도 지운다
  634. model.removeNodeset("/root/main/list2/listdiag"); // 조회시 상병 그리드도 지운다.
  635. model.makeNode("/root/main/list1");
  636. submit("TRPIB01401");
  637. ]]>
  638. </script>
  639. </button>
  640. <line id="line13" class="line_4" style="x1:1106px; y1:7px; x2:1106px; y2:49px; "/>
  641. <caption id="caption11" class="search_name" style="left:180px; top:9px; width:98px; height:17px; ">그룹명칭 :</caption>
  642. <input id="ipt_srchspclcd" ref="/root/send/autogrupnm" class="input_search" style="left:270px; top:8px; width:225px; height:19px; "/>
  643. <input id="input1" ref="/root/send/autogrup" class="input_search" imemode="disabled" _chartype="upper" style="left:110px; top:8px; width:65px; height:19px; "/>
  644. <select1 id="cmb_orddeptcd" ref="/root/send/orddeptcd" navindex="4" appearance="minimal" style="left:580px; top:8px; width:140px; height:19px; ">
  645. <choices>
  646. <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
  647. <label ref="nm"/>
  648. <value ref="cd"/>
  649. </itemset>
  650. </choices>
  651. </select1>
  652. <caption id="caption7" class="search_name" style="left:502px; top:9px; width:86px; height:17px; ">진료과 :</caption>
  653. <caption id="caption3" class="search_name" style="left:730px; top:9px; width:86px; height:17px; ">수가코드 :</caption>
  654. <input id="ipt_snglcalcscorcd" ref="/root/send/snglcalcscorcd" class="input_search" imemode="disabled" inputtype="button" _chartype="upper" style="left:825px; top:8px; width:100px; height:19px; ">
  655. <script type="javascript" ev:event="onkeyup">
  656. <![CDATA[
  657. inputEnterKey("btn_search", "DOMActivate");
  658. ]]>
  659. </script>
  660. <script type="javascript" ev:event="onbuttonclick">
  661. <![CDATA[
  662. setParameter("openflag", "hngnm");
  663. modal("SMPIC00200" ,"", "10", "10", "SMPIC00200", "/root/send/snglcalcscorcd", "/root/temp", "", "");
  664. var calcscorcd = model.getValue("/root/temp/picmmech/picmmech_calcscorcd");
  665. if (calcscorcd != "") {
  666. model.setValue("/root/send/snglcalcscorcd", calcscorcd);
  667. ipt_snglcalcscorcd.refresh();
  668. }
  669. ]]>
  670. </script>
  671. </input>
  672. <caption id="caption8" class="search_name" style="left:930px; top:9px; width:86px; height:17px; ">상병코드 :</caption>
  673. <input id="ipt_diagcd" ref="/root/send/diagcd" class="input_search" imemode="disabled" _chartype="upper" style="left:1025px; top:8px; width:75px; height:19px; "/>
  674. <caption id="caption9" class="search_name" style="left:180px; top:33px; width:86px; height:17px; ">최소나이 :</caption>
  675. <input id="input4" ref="/root/send/minage" class="input_search" imemode="disabled" _chartype="upper" style="left:270px; top:32px; width:65px; height:19px; "/>
  676. <input id="input5" ref="/root/send/maxage" class="input_search" imemode="disabled" _chartype="upper" style="left:430px; top:32px; width:65px; height:19px; "/>
  677. <caption id="caption10" class="search_name" style="left:340px; top:33px; width:86px; height:17px; ">최대나이 :</caption>
  678. <caption id="caption12" class="search_name" style="left:502px; top:33px; width:86px; height:17px; ">성 별 :</caption>
  679. <caption id="caption13" class="search_name" style="left:730px; top:33px; width:86px; height:17px; ">사용여부 :</caption>
  680. <select1 id="combo1" ref="/root/send/sex" navindex="4" appearance="minimal" style="left:580px; top:32px; width:75px; height:19px; ">
  681. <choices>
  682. <item>
  683. <label/>
  684. <value/>
  685. </item>
  686. <item>
  687. <label>전체</label>
  688. <value>-</value>
  689. </item>
  690. <item>
  691. <label>남자</label>
  692. <value>M</value>
  693. </item>
  694. <item>
  695. <label>여자</label>
  696. <value>F</value>
  697. </item>
  698. </choices>
  699. </select1>
  700. <select1 id="combo2" ref="/root/send/useyn" navindex="4" appearance="minimal" style="left:825px; top:32px; width:75px; height:19px; ">
  701. <choices>
  702. <item>
  703. <label/>
  704. <value/>
  705. </item>
  706. <item>
  707. <label>사용</label>
  708. <value>Y</value>
  709. </item>
  710. <item>
  711. <label>미사용</label>
  712. <value>N</value>
  713. </item>
  714. </choices>
  715. </select1>
  716. <select1 id="combo3" ref="/root/send/ioflag" navindex="4" appearance="minimal" style="left:1025px; top:32px; width:75px; height:19px; ">
  717. <choices>
  718. <item>
  719. <label/>
  720. <value/>
  721. </item>
  722. <item>
  723. <label>외래</label>
  724. <value>O</value>
  725. </item>
  726. <item>
  727. <label>입원</label>
  728. <value>I</value>
  729. </item>
  730. </choices>
  731. </select1>
  732. <caption id="caption17" class="search_name" style="left:930px; top:33px; width:86px; height:17px; ">구 분 :</caption>
  733. </group>
  734. <caption id="caption1" class="tit_2" style="left:5px; top:75px; width:131px; height:13px; ">자동상병 그룹 목록</caption>
  735. <line id="line1" class="line_1" style="x1:5px; y1:90px; x2:900px; y2:90px; "/>
  736. <button id="btn_delrow" class="btn2_letter3" style="left:793px; top:70px; width:53px; height:19px; ">
  737. <caption>행삭제</caption>
  738. <script type="javascript" ev:event="DOMActivate">
  739. <![CDATA[
  740. if ( model.getValue("root/main/list1/listautd[ "+ grd_autdiagrgst.row + "]/autogrup") == "9999" ) {
  741. messageBox("9999 (제외상병) 은 행삭제","E001");
  742. return;
  743. }
  744. var row = grd_autdiagrgst.row;
  745. var rowstatus = grd_autdiagrgst.rowstatus(row);
  746. // 행추가를 한 행을 [행삭제]하면 행을 그리드에서 삭제, 기존에 존재하는 행을 [행삭제]하면 플래그를 D로 변경
  747. if (rowstatus == 1 || rowstatus == 3) {
  748. grd_autdiagrgst.deleteRow(row,true);
  749. } else {
  750. grd_autdiagrgst.rowstatus(row) = 4;
  751. }
  752. ]]>
  753. </script>
  754. </button>
  755. <button id="btn_addrow" class="btn2_letter3" style="left:739px; top:70px; width:53px; height:19px; ">
  756. <caption>행추가</caption>
  757. <script type="javascript" ev:event="DOMActivate">
  758. <![CDATA[
  759. grd_autdiagrgst.addRow(false);
  760. model.setValue("/root/main/list1/listautd["+grd_autdiagrgst.row+"]/orddeptcd","-");
  761. model.setValue("/root/main/list1/listautd["+grd_autdiagrgst.row+"]/sex","-");
  762. model.setValue("/root/main/list1/listautd["+grd_autdiagrgst.row+"]/minage","0");
  763. model.setValue("/root/main/list1/listautd["+grd_autdiagrgst.row+"]/maxage","999");
  764. model.setValue("/root/main/list1/listautd["+grd_autdiagrgst.row+"]/useyn","Y");
  765. model.setValue("/root/main/list1/listautd["+grd_autdiagrgst.row+"]/ioflag","O");
  766. grd_autdiagrgst.col = 1; // 추가된 row로 이동
  767. fCallSubList(); // 행추가시 처방,상병 목록을 다시 조회해 온다.
  768. ]]>
  769. </script>
  770. </button>
  771. <datagrid id="grd_autmech" nodeset="/root/main/list2/listmech" caption="No^그룹^처방코드^처방명^적용과^수정자^최종수정일자" colsep="^" colwidth="28, 35, 80, 180, 55, 59, 100" dataheight="23" defaultrows="0" ellipsis="true" explorerbar="sortshow" frozencols="2" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:5px; top:347px; width:340px; height:395px; ">
  772. <col ref="rn"/>
  773. <col ref="autogrup" type="output"/>
  774. <col imemode="disabled" ref="snglcalcscorcd" type="inputbutton" _chartype="upper"/>
  775. <col ref="hngnm" type="output"/>
  776. <col disabled="true" ref="orddeptcd" type="combo" visibility="hidden">
  777. <choices>
  778. <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
  779. <label ref="nm"/>
  780. <value ref="cd"/>
  781. </itemset>
  782. </choices>
  783. </col>
  784. <col ref="lastupdtrid" type="output"/>
  785. <col ref="lastupdtdt" type="output" format="yyyy-mm-dd hh:nn"/>
  786. <script type="javascript" ev:event="onendedit">
  787. <![CDATA[
  788. var col = grd_autmech.col;
  789. var row = grd_autmech.row;
  790. // 처방코드나 상병코드이면
  791. if (col == grd_autmech.colRef("snglcalcscorcd")) {
  792. fSrchSnglCalcscorNm();
  793. }
  794. ]]>
  795. </script>
  796. <script type="javascript" ev:event="onbuttonclick">
  797. <![CDATA[
  798. var col = grd_autmech.col;
  799. var row = grd_autmech.row;
  800. // 처방코드이면
  801. if (col == grd_autmech.colRef("snglcalcscorcd")) {
  802. fSrchSnglCalcscorNm();
  803. }
  804. ]]>
  805. </script>
  806. <script type="javascript" ev:event="onaftersort">
  807. <![CDATA[
  808. grd_autmech.gridToInstance();
  809. ]]>
  810. </script>
  811. </datagrid>
  812. <button id="btn_copy" class="btn2_letter3" style="left:847px; top:70px; width:53px; height:19px; ">
  813. <caption>행복사</caption>
  814. <script type="javascript" ev:event="DOMActivate">
  815. <![CDATA[
  816. if ( model.getValue("root/main/list1/listautd[ "+ grd_autdiagrgst.row + "]/autogrup") == "9999" ) {
  817. messageBox("9999 (제외상병) 은 행복사","E001");
  818. return;
  819. }
  820. var oldrow = grd_autdiagrgst.row;
  821. if (oldrow <= 0) return;
  822. grd_autdiagrgst.addRow();
  823. var newrow = grd_autdiagrgst.row;
  824. //model.setValue("/root/main/list1/listautd[" + newrow + "]/autogrupcd", model.getValue("/root/main/list1/listautd[" + oldrow + "]/autogrupcd"));
  825. //model.setValue("/root/main/list1/listautd[" + newrow + "]/autogrup", model.getValue("/root/main/list1/listautd[" + oldrow + "]/autogrup"));
  826. model.setValue("/root/main/list1/listautd[" + newrow + "]/autogrupnm", model.getValue("/root/main/list1/listautd[" + oldrow + "]/autogrupnm"));
  827. model.setValue("/root/main/list1/listautd[" + newrow + "]/orddeptcd", model.getValue("/root/main/list1/listautd[" + oldrow + "]/orddeptcd"));
  828. //model.setValue("/root/main/list1/listautd[" + newrow + "]/snglcalcscorcd", model.getValue("/root/main/list1/listautd[" + oldrow + "]/snglcalcscorcd"));
  829. //model.setValue("/root/main/list1/listautd[" + newrow + "]/orddeptcd", model.getValue("/root/main/list1/listautd[" + oldrow + "]/orddeptcd"));
  830. //model.setValue("/root/main/list1/listautd[" + newrow + "]/diagcd", model.getValue("/root/main/list1/listautd[" + oldrow + "]/diagcd"));
  831. model.setValue("/root/main/list1/listautd[" + newrow + "]/minage", model.getValue("/root/main/list1/listautd[" + oldrow + "]/minage"));
  832. model.setValue("/root/main/list1/listautd[" + newrow + "]/maxage", model.getValue("/root/main/list1/listautd[" + oldrow + "]/maxage"));
  833. model.setValue("/root/main/list1/listautd[" + newrow + "]/sex", model.getValue("/root/main/list1/listautd[" + oldrow + "]/sex"));
  834. model.setValue("/root/main/list1/listautd[" + newrow + "]/useyn", model.getValue("/root/main/list1/listautd[" + oldrow + "]/useyn"));
  835. model.setValue("/root/main/list1/listautd[" + newrow + "]/ioflag", model.getValue("/root/main/list1/listautd[" + oldrow + "]/ioflag"));
  836. grd_autdiagrgst.col = 1; // 복사된 곳으로 이동
  837. ]]>
  838. </script>
  839. </button>
  840. <datagrid id="grd_autdiag" nodeset="/root/main/list2/listdiag" caption="그룹^R/O^시작상병^시작상병명^종료상병^종료상병명^체크시작^상병명^체크종료^상병명^적용과^체크^대체상병^대체상병명^seqno" colsep="^" colwidth="35, 30, 60, 180, 60, 145, 60, 180, 60, 171, 55, 50, 55, 180, 47" dataheight="23" defaultrows="0" ellipsis="true" explorerbar="sortshow" frozencols="2" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:347px; top:348px; width:845px; height:394px; ">
  841. <col ref="autogrup" type="output"/>
  842. <col checkvalue="R,C" ref="diagkindcd" type="checkbox"/>
  843. <col imemode="disabled" ref="diagcd" type="inputbutton" _chartype="upper"/>
  844. <col ref="diagnm" type="output"/>
  845. <col imemode="disabled" ref="diagcdto" type="inputbutton" _chartype="upper"/>
  846. <col ref="diagnmto" type="output"/>
  847. <col imemode="disabled" ref="chkdiagcd" type="inputbutton" _chartype="upper"/>
  848. <col ref="chkdiagnm" type="output"/>
  849. <col imemode="disabled" ref="chkdiagcdto" type="inputbutton" _chartype="upper"/>
  850. <col ref="chkdiagnmto" type="output"/>
  851. <col disabled="true" ref="orddeptcd" type="combo">
  852. <choices>
  853. <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
  854. <label ref="nm"/>
  855. <value ref="cd"/>
  856. </itemset>
  857. </choices>
  858. </col>
  859. <col ref="chkflag" type="combo">
  860. <choices>
  861. <item>
  862. <label>둘다</label>
  863. <value>-</value>
  864. </item>
  865. <item>
  866. <label>체크만</label>
  867. <value>C</value>
  868. </item>
  869. <item>
  870. <label>발생만</label>
  871. <value>M</value>
  872. </item>
  873. </choices>
  874. </col>
  875. <col imemode="disabled" ref="chgdiagcd" type="inputbutton" _chartype="upper"/>
  876. <col ref="chgdiagnm" type="output"/>
  877. <col ref="seqno" type="output"/>
  878. <script type="javascript" ev:event="onendedit">
  879. <![CDATA[
  880. var col = grd_autdiag.col;
  881. var row = grd_autdiag.row;
  882. if ( col == grd_autdiag.colRef("diagcd") ) {
  883. fSrchDiagNm("FROM");
  884. }
  885. else if ( col == grd_autdiag.colRef("diagcdto") ) {
  886. fSrchDiagNm("TO");
  887. }
  888. else if ( col == grd_autdiag.colRef("chgdiagcd") ) {
  889. fSrchDiagNm("CHG");
  890. }
  891. else if ( col == grd_autdiag.colRef("chkdiagcd") ) {
  892. fSrchDiagNm("CHKF");
  893. }
  894. else if ( col == grd_autdiag.colRef("chkdiagcdto") ) {
  895. fSrchDiagNm("CHKT");
  896. }
  897. ]]>
  898. </script>
  899. <script type="javascript" ev:event="onbuttonclick">
  900. <![CDATA[
  901. var col = grd_autdiag.col;
  902. var row = grd_autdiag.row;
  903. var oldvalue = grd_autdiag.valueMatrix(row,col);
  904. var status = grd_autdiag.rowStatus(row);
  905. if ( col == grd_autdiag.colRef("diagcd") ) {
  906. fSrchDiagNm("FROM");
  907. }
  908. else if ( col == grd_autdiag.colRef("diagcdto") ) {
  909. fSrchDiagNm("TO");
  910. }
  911. else if ( col == grd_autdiag.colRef("chgdiagcd") ) {
  912. fSrchDiagNm("CHG");
  913. }
  914. else if ( col == grd_autdiag.colRef("chkdiagcd") ) {
  915. fSrchDiagNm("CHKF");
  916. }
  917. else if ( col == grd_autdiag.colRef("chkdiagcdto") ) {
  918. fSrchDiagNm("CHKT");
  919. }
  920. var newvalue = grd_autdiag.valueMatrix(row,col);
  921. if ( oldvalue == "-" ) { oldvalue = ""; }
  922. if ( newvalue == "-" ) { newvalue = ""; }
  923. if ( oldvalue != newvalue ) {
  924. if (status == 0) { grd_autdiag.rowstatus(row) = 2; }
  925. }
  926. ]]>
  927. </script>
  928. <script type="javascript" ev:event="onaftersort">
  929. <![CDATA[
  930. grd_autdiag.gridToInstance();
  931. ]]>
  932. </script>
  933. </datagrid>
  934. <datagrid id="grd_autdiagrgst" nodeset="/root/main/list1/listautd" caption="그룹코드^그룹명칭^적용과^성별^최소나이^최대나이^사용여부^구분" colsep="^" colwidth="68, 306, 153, 71, 62, 62, 67, 64" dataheight="23" defaultrows="0" explorerbar="sortshow" frozencols="2" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:5px; top:96px; width:895px; height:224px; ">
  935. <col ref="autogrup" type="output" maxlength="12" _key="true"/>
  936. <col ref="autogrupnm" type="input"/>
  937. <col disabled="true" ref="orddeptcd" type="combo" _key="true">
  938. <choices>
  939. <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
  940. <label ref="nm"/>
  941. <value ref="cd"/>
  942. </itemset>
  943. </choices>
  944. </col>
  945. <col ref="sex" type="combo">
  946. <choices>
  947. <item>
  948. <label>전체</label>
  949. <value>-</value>
  950. </item>
  951. <item>
  952. <label>남자</label>
  953. <value>M</value>
  954. </item>
  955. <item>
  956. <label>여자</label>
  957. <value>F</value>
  958. </item>
  959. </choices>
  960. </col>
  961. <col ref="minage" type="input" format="###"/>
  962. <col ref="maxage" type="input" format="###"/>
  963. <col ref="useyn" type="combo">
  964. <choices>
  965. <item>
  966. <label>사용</label>
  967. <value>Y</value>
  968. </item>
  969. <item>
  970. <label>미사용</label>
  971. <value>N</value>
  972. </item>
  973. </choices>
  974. </col>
  975. <col ref="ioflag" type="combo">
  976. <choices>
  977. <item>
  978. <label>외래</label>
  979. <value>O</value>
  980. </item>
  981. <item>
  982. <label>입원</label>
  983. <value>I</value>
  984. </item>
  985. <item>
  986. <label>전체</label>
  987. <value>A</value>
  988. </item>
  989. </choices>
  990. </col>
  991. <script type="javascript" ev:event="onbuttonclick">
  992. <![CDATA[
  993. var col = grd_autdiagrgst.col;
  994. if (col == grd_autdiagrgst.colRef("detail")) { // 그룹코드
  995. //if ( model.getValue("root/main/list1/listautd[ "+ grd_autdiagrgst.row + "]/orddeptcd") == "" ) { return; }
  996. /*
  997. if ( model.getValue("root/main/list1/listautd[ "+ grd_autdiagrgst.row + "]/autogrup") == "9999" ) {
  998. grd_autdiag.colAttribute(4,"disabled") = "false";
  999. } else {
  1000. grd_autdiag.colAttribute(4,"disabled") = "true";
  1001. }
  1002. */
  1003. fCallSubListfCallSubList();
  1004. }
  1005. ]]>
  1006. </script>
  1007. <script type="javascript" ev:event="onaftersort">
  1008. <![CDATA[
  1009. grd_autdiagrgst.gridToInstance();
  1010. ]]>
  1011. </script>
  1012. <script type="javascript" ev:event="xforms-value-changed">
  1013. <![CDATA[
  1014. var row = grd_autdiagrgst.row;
  1015. var col = grd_autdiagrgst.col;
  1016. if (col == grd_autdiagrgst.colRef("orddeptcd")) { // 적용과가 변경된 경우
  1017. var mupdtdata = getGridUpdateData(grd_autmech);
  1018. var cupdtdata = getGridUpdateData(grd_autdiag);
  1019. if ( mupdtdata != "" || cupdtdata != "") {
  1020. messageBox("작업중인 처방, 상병 내역이 있습니다. 변경된 진료과로 내역을 변경합니다.","");
  1021. var base_autogrup = model.getValue("/root/main/list1/listautd[" + row + "]/autogrup");
  1022. var base_orddeptcd = model.getValue("/root/main/list1/listautd[" + row + "]/orddeptcd");
  1023. for( i = grd_autmech.fixedRows; i < grd_autmech.rows ; i++ ) {
  1024. var rowstat = grd_autmech.rowStatus(i);
  1025. if (
  1026. model.getValue("/root/main/list2/listmech[" + i + "]/autogrup") == base_autogrup
  1027. && model.getValue("/root/main/list2/listmech[" + i + "]/orddeptcd") != base_orddeptcd
  1028. && ( rowstat == 1 || rowstat == 2 || rowstat == 3 )
  1029. ) {
  1030. model.setValue("/root/main/list2/listmech[" + i + "]/orddeptcd", base_orddeptcd);
  1031. }
  1032. }
  1033. for( i = grd_autdiag.fixedRows; i < grd_autdiag.rows ; i++ ) {
  1034. var rowstat = grd_autdiag.rowStatus(i);
  1035. if (
  1036. model.getValue("/root/main/list2/listdiag[" + i + "]/autogrup") == base_autogrup
  1037. && model.getValue("/root/main/list2/listdiag[" + i + "]/orddeptcd") != base_orddeptcd
  1038. && ( rowstat == 1 || rowstat == 2 || rowstat == 3 )
  1039. ) {
  1040. model.setValue("/root/main/list2/listdiag[" + i + "]/orddeptcd", base_orddeptcd);
  1041. }
  1042. }
  1043. } else {
  1044. fCallSubList();
  1045. }
  1046. }
  1047. ]]>
  1048. </script>
  1049. <script type="javascript" ev:event="ondblclick">
  1050. <![CDATA[
  1051. //if ( model.getValue("root/main/list1/listautd[ "+ grd_autdiagrgst.row + "]/orddeptcd") == "" ) { return; }
  1052. if (grd_autdiagrgst.isCell(event.target) && grd_autdiagrgst.row >= grd_autdiagrgst.fixedRows) {
  1053. var cur_row = grd_autdiagrgst.row ;
  1054. if (cur_row > 0) {
  1055. fCallSubList();
  1056. }
  1057. }
  1058. ]]>
  1059. </script>
  1060. </datagrid>
  1061. <line id="line2" class="line_1" style="x1:5px; y1:345px; x2:343px; y2:344px; "/>
  1062. <caption id="caption4" class="tit_2" style="left:10px; top:326px; width:136px; height:13px; ">자동상병 처방 목록</caption>
  1063. <caption id="caption5" class="tit_2" style="left:351px; top:326px; width:136px; height:13px; ">자동상병 질병 목록</caption>
  1064. <line id="line3" class="line_1" style="x1:349px; y1:345px; x2:1194px; y2:344px; "/>
  1065. <button id="btn_autmech_delrow" class="btn2_letter3" style="left:292px; top:322px; width:53px; height:19px; ">
  1066. <caption>행삭제</caption>
  1067. <script type="javascript" ev:event="DOMActivate">
  1068. <![CDATA[
  1069. var row = grd_autmech.row;
  1070. var rowstatus = grd_autmech.rowstatus(row);
  1071. // 행추가를 한 행을 [행삭제]하면 행을 그리드에서 삭제, 기존에 존재하는 행을 [행삭제]하면 플래그를 D로 변경
  1072. if (rowstatus == 1 || rowstatus == 3) {
  1073. grd_autmech.deleteRow(row,true);
  1074. } else {
  1075. grd_autmech.rowstatus(row) = 4;
  1076. }
  1077. ]]>
  1078. </script>
  1079. </button>
  1080. <button id="btn_autmech_insrow" class="btn2_letter3" style="left:236px; top:322px; width:53px; height:19px; ">
  1081. <caption>행추가</caption>
  1082. <script type="javascript" ev:event="DOMActivate">
  1083. <![CDATA[
  1084. if ( model.getValue("root/main/list1/listautd[ "+ grd_autdiagrgst.row + "]/orddeptcd") == "" ) { return; }
  1085. grd_autmech.addRow(false,true);
  1086. model.setValue("/root/main/list2/listmech["+grd_autmech.row+"]/orddeptcd",model.getValue("/root/main/list1/listautd["+grd_autdiagrgst.row+"]/orddeptcd"));
  1087. model.setValue("/root/main/list2/listmech["+grd_autmech.row+"]/autogrup",model.getValue("/root/main/list1/listautd["+grd_autdiagrgst.row+"]/autogrup"));
  1088. grd_autmech.col = 1; // 추가된 row로 이동
  1089. ]]>
  1090. </script>
  1091. </button>
  1092. <button id="btn_autdiag_delrow" class="btn2_letter3" style="left:1132px; top:322px; width:53px; height:19px; ">
  1093. <caption>행삭제</caption>
  1094. <script type="javascript" ev:event="DOMActivate">
  1095. <![CDATA[
  1096. var row = grd_autdiag.row;
  1097. var rowstatus = grd_autdiag.rowstatus(row);
  1098. // 행추가를 한 행을 [행삭제]하면 행을 그리드에서 삭제, 기존에 존재하는 행을 [행삭제]하면 플래그를 D로 변경
  1099. if (rowstatus == 1 || rowstatus == 3) {
  1100. grd_autdiag.deleteRow(row,true);
  1101. } else {
  1102. grd_autdiag.rowstatus(row) = 4;
  1103. }
  1104. ]]>
  1105. </script>
  1106. </button>
  1107. <button id="btn_autdiag_insrow" class="btn2_letter3" style="left:1076px; top:322px; width:53px; height:19px; ">
  1108. <caption>행추가</caption>
  1109. <script type="javascript" ev:event="DOMActivate">
  1110. <![CDATA[
  1111. if ( model.getValue("root/main/list1/listautd[ "+ grd_autdiagrgst.row + "]/orddeptcd") == "" ) { return; }
  1112. grd_autdiag.addRow(false,true);
  1113. model.setValue("/root/main/list2/listdiag["+grd_autdiag.row+"]/orddeptcd",model.getValue("/root/main/list1/listautd["+grd_autdiagrgst.row+"]/orddeptcd"));
  1114. model.setValue("/root/main/list2/listdiag["+grd_autdiag.row+"]/autogrup",model.getValue("/root/main/list1/listautd["+grd_autdiagrgst.row+"]/autogrup"));
  1115. model.setValue("/root/main/list2/listdiag["+grd_autdiag.row+"]/chkflag","-"); // 적용과 전체
  1116. model.setValue("/root/main/list2/listdiag["+grd_autdiag.row+"]/diagcd","-");
  1117. model.setValue("/root/main/list2/listdiag["+grd_autdiag.row+"]/diagnm","-");
  1118. model.setValue("/root/main/list2/listdiag["+grd_autdiag.row+"]/diagcdto","-");
  1119. model.setValue("/root/main/list2/listdiag["+grd_autdiag.row+"]/diagnmto","-");
  1120. model.setValue("/root/main/list2/listdiag["+grd_autdiag.row+"]/chgdiagcd","-");
  1121. model.setValue("/root/main/list2/listdiag["+grd_autdiag.row+"]/chgdiagnm","-");
  1122. model.setValue("/root/main/list2/listdiag["+grd_autdiag.row+"]/chkdiagcd","-");
  1123. model.setValue("/root/main/list2/listdiag["+grd_autdiag.row+"]/chkdiagnm","-");
  1124. model.setValue("/root/main/list2/listdiag["+grd_autdiag.row+"]/chkdiagcdto","-");
  1125. model.setValue("/root/main/list2/listdiag["+grd_autdiag.row+"]/chkdiagnmto","-");
  1126. grd_autdiag.col = 1; // 추가된 row로 이동
  1127. ]]>
  1128. </script>
  1129. </button>
  1130. <caption id="caption14" class="tit_2" style="left:140px; top:75px; width:460px; height:13px; color:#0000ff; ">동일내역을 과별로 적용시 진료과선택 또는 행복사 기능을 이용하세요</caption>
  1131. <button id="btn_sel_dept" class="btn2_letter5" navindex="5" style="left:663px; top:70px; width:75px; height:19px; ">
  1132. <caption>진료과선택</caption>
  1133. <script type="javascript" ev:event="DOMActivate">
  1134. <![CDATA[
  1135. if ( model.getValue("root/main/list1/listautd[ "+ grd_autdiagrgst.row + "]/orddeptcd") == "" ) { return; }
  1136. if ( model.getValue("root/main/list1/listautd[ "+ grd_autdiagrgst.row + "]/autogrup") == "9999" ) {
  1137. messageBox("9999 (제외상병) 은 과별선택을","E001");
  1138. return;
  1139. }
  1140. var gupdtdata = getGridUpdateData(grd_autdiagrgst);
  1141. var mupdtdata = getGridUpdateData(grd_autmech);
  1142. var cupdtdata = getGridUpdateData(grd_autdiag);
  1143. if (gupdtdata != "" || mupdtdata != "" || cupdtdata != "") {
  1144. messageBox("작업중인 내역을 저장후","I008");
  1145. return false;
  1146. }
  1147. fSelectDeptInit();
  1148. grp_dept_select.attribute("top") = 110;
  1149. grp_dept_select.attribute("left") = 380;
  1150. grd_seldeptlist.row = 1;
  1151. grp_dept_select.visible = true;
  1152. fSetDisplayDisable(true); // 화면 사용여부 제어
  1153. ]]>
  1154. </script>
  1155. </button>
  1156. <caption id="caption16" class="tit_2" style="left:490px; top:327px; width:385px; height:13px; color:#0000ff; ">청구생성시 종료상병이 없는경우 시작상병으로만 사용합니다.</caption>
  1157. <caption id="caption18" class="tit_2" style="left:910px; top:75px; width:136px; height:13px; ">자동상병 제외과</caption>
  1158. <line id="line5" class="line_1" style="x1:906px; y1:92px; x2:1191px; y2:91px; "/>
  1159. <button id="btn_edept_add" class="btn2_letter3" style="left:1079px; top:70px; width:53px; height:19px; ">
  1160. <caption>행추가</caption>
  1161. <script type="javascript" ev:event="DOMActivate">
  1162. <![CDATA[
  1163. if ( model.getValue("root/main/list1/listautd[ "+ grd_autdiagrgst.row + "]/orddeptcd") == "" ) { return; }
  1164. if ( model.getValue("root/main/list1/listautd[ "+ grd_autdiagrgst.row + "]/orddeptcd") != "-" ) {
  1165. messageBox("제외과는 적용과가 전체일 때만 등록 가능합니다","");
  1166. return false;
  1167. }
  1168. grd_autedept.addRow(false,true);
  1169. model.setValue("/root/main/list2/listedept["+grd_autedept.row+"]/autogrup",model.getValue("/root/main/list1/listautd["+grd_autdiagrgst.row+"]/autogrup"));
  1170. grd_autedept.col = 1; // 추가된 row로 이동
  1171. ]]>
  1172. </script>
  1173. </button>
  1174. <button id="btn_edept_del" class="btn2_letter3" style="left:1135px; top:70px; width:53px; height:19px; ">
  1175. <caption>행삭제</caption>
  1176. <script type="javascript" ev:event="DOMActivate">
  1177. <![CDATA[
  1178. var row = grd_autedept.row;
  1179. var rowstatus = grd_autedept.rowstatus(row);
  1180. // 행추가를 한 행을 [행삭제]하면 행을 그리드에서 삭제, 기존에 존재하는 행을 [행삭제]하면 플래그를 D로 변경
  1181. if (rowstatus == 1 || rowstatus == 3) {
  1182. grd_autedept.deleteRow(row,true);
  1183. } else {
  1184. grd_autedept.rowstatus(row) = 4;
  1185. }
  1186. ]]>
  1187. </script>
  1188. </button>
  1189. <datagrid id="grd_autedept" nodeset="/root/main/list2/listedept" caption="그룹코드^제외과^seqno" colsep="^" colwidth="60, 164, 39" dataheight="23" defaultrows="0" explorerbar="sortshow" frozencols="2" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:905px; top:95px; width:287px; height:224px; ">
  1190. <col ref="autogrup" type="output" maxlength="12" _key="true"/>
  1191. <col disabled="false" ref="orddeptcd" type="combo" _key="true">
  1192. <choices>
  1193. <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
  1194. <label ref="nm"/>
  1195. <value ref="cd"/>
  1196. </itemset>
  1197. </choices>
  1198. </col>
  1199. <col ref="seqno"/>
  1200. </datagrid>
  1201. <button id="btn_sort" class="btn2_letter5" navindex="5" style="left:587px; top:70px; width:75px; height:19px; ">
  1202. <caption>우선순위</caption>
  1203. <script type="javascript" ev:event="onclick">
  1204. <![CDATA[
  1205. modal("SMPIB01410" ,"", "10", "10", "SMPIB01410", "/root/send", "/root/init", "", "");
  1206. ]]>
  1207. </script>
  1208. </button>
  1209. <button id="btn_excelsave" class="btn2_letter4" style="left:522px; top:70px; width:64px; height:19px; ">
  1210. <caption>엑셀저장</caption>
  1211. <script type="javascript" ev:event="DOMActivate">
  1212. <![CDATA[
  1213. if (grd_autdiagrgst.rows > 1) {
  1214. var fileName = window.fileDialog("save", "", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  1215. if (fileName != "") {
  1216. //datagrid.saveExcel의 7번째 인자 값(boolean) : 그리드의 col type=combo일 경우 엑셀저장내용이 lable 또는 value로 설정 함
  1217. // grd_clbsmast.saveExcel(fileName, "SheetName", true, true, "", "", true);
  1218. grd_autdiagrgst.saveExcel(fileName, "sheetname:;colhiddenextend:false;rowhiddenextend:false;col_1:label;col_2:label;col_3:label;col_4:label;col_5:label;", true, true, "", "", true);
  1219. }
  1220. } else {
  1221. messageBox("엑셀저장할 대상자가", "I004"); ///엑셀저장할 대상자가 없습니다.
  1222. }
  1223. ]]>
  1224. </script>
  1225. </button>
  1226. </group>
  1227. <group id="group4" scroll="auto" style="left:0px; top:755px; width:1194px; height:27px; ">
  1228. <line id="line23" class="line_6" style="x1:0px; y1:0px; x2:700px; y2:0px; "/>
  1229. <button id="btn_init" class="btn4_letter3" style="left:1126px; top:4px; width:68px; height:22px; ">
  1230. <caption>초기화</caption>
  1231. <script type="javascript" ev:event="DOMActivate">
  1232. <![CDATA[
  1233. fInitialize();
  1234. ]]>
  1235. </script>
  1236. </button>
  1237. <button id="btn_save" class="btn4_letter2" style="left:1068px; top:4px; width:56px; height:22px; ">
  1238. <caption>저장</caption>
  1239. <script type="javascript" ev:event="DOMActivate">
  1240. <![CDATA[
  1241. // 1. 저장데이터 유효성 체크
  1242. if (!fCheckSaveData()) return;
  1243. // 2. 저장하시겠습니까?
  1244. var rtn = messageBox("자동상병등록 기준정보를", "Q002");
  1245. if (rtn != 6) {
  1246. return;
  1247. }
  1248. // 3. 저장
  1249. model.setValue("/root/send/updatedata/gruplist",grd_autdiagrgst.getupdatedata());
  1250. model.setValue("/root/send/updatedata/mechlist",grd_autmech.getupdatedata());
  1251. model.setValue("/root/send/updatedata/diaglist",grd_autdiag.getupdatedata());
  1252. model.setValue("/root/send/updatedata/edeptlist",grd_autedept.getupdatedata());
  1253. if (submit("TXPIB01401")) {
  1254. messageBox("저장", "I002");
  1255. }
  1256. /*
  1257. // 4. 재조회
  1258. model.removeNodeset("/root/main/list2/listmech"); // 조회시 처방 그리드도 지운다
  1259. model.removeNodeset("/root/main/list2/listdiag"); // 조회시 상병 그리드도 지운다.
  1260. model.removeNodeset("/root/main/list2/listedept"); // 조회시 상병 그리드도 지운다.
  1261. submit("TRPIB01401"); */
  1262. // model.removeNodeset("/root/main/list2/listmech");
  1263. // model.removeNodeset("/root/main/list2/listdiag");
  1264. ]]>
  1265. </script>
  1266. </button>
  1267. </group>
  1268. <group id="grp_dept_select" visibility="hidden" style="left:385px; top:215px; width:360px; height:530px; border-color:#333333; border-style:solid; ">
  1269. <datagrid id="grd_seldeptlist" nodeset="/root/hidden/seldeptlist" caption="선택^진료과코드^진료과명^기존선택" colsep="^" colwidth="56, 88, 162, 9, 100, 100, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:14px; top:74px; width:330px; height:400px; border-color:#333333; ">
  1270. <col ref="selyn" type="checkbox"/>
  1271. <col ref="deptcd"/>
  1272. <col ref="deptnm"/>
  1273. <col ref="oldselyn" visibility="hidden"/>
  1274. </datagrid>
  1275. <caption id="caption15" class="tit_2" style="left:5px; top:5px; width:344px; height:13px; ">자동메모 진료과 선택 (그룹코드로 조회후 사용하세요)</caption>
  1276. <button id="button6" class="btn4_letter2" style="left:281px; top:492px; width:56px; height:22px; ">
  1277. <caption>취소</caption>
  1278. <script type="javascript" ev:event="DOMActivate">
  1279. <![CDATA[
  1280. grp_dept_select.visible = false;
  1281. fSetDisplayDisable(false); // 화면 사용여부 제어
  1282. ]]>
  1283. </script>
  1284. </button>
  1285. <button id="button7" class="btn4_letter2" style="left:216px; top:492px; width:56px; height:22px; ">
  1286. <caption>확인</caption>
  1287. <script type="javascript" ev:event="DOMActivate">
  1288. <![CDATA[
  1289. if ( fSelectDeptChk() == false ) return;
  1290. if ( messageBox("선택된 진료과로 수가코드, 상병이 복사됩니다.", "Q003") != 6 ) return;
  1291. fSelectDeptInput(); // 저장 데이타 생성
  1292. grp_dept_select.visible = false;
  1293. fSetDisplayDisable(false); // 화면 사용여부 제어
  1294. if (submit("TXPIB01402")) {
  1295. messageBox("저장", "I002");
  1296. }
  1297. // 4. 재조회
  1298. model.removeNodeset("/root/main/list2/listmech"); // 조회시 처방 그리드도 지운다
  1299. model.removeNodeset("/root/main/list2/listdiag"); // 조회시 상병 그리드도 지운다.
  1300. submit("TRPIB01401");
  1301. ]]>
  1302. </script>
  1303. </button>
  1304. <line id="line4" class="line_1" style="x1:4px; y1:20px; x2:354px; y2:20px; "/>
  1305. <output id="opt_seldeptcd" ref="/root/hidden/seldeptbase/autogrup" class="output_fix" appearance="output" style="left:14px; top:29px; width:75px; height:19px; color:#ff00ff; "/>
  1306. <output id="opt_seldeptnm" ref="/root/hidden/seldeptbase/autogrupnm" class="output_fix" appearance="output" style="left:94px; top:29px; width:245px; height:19px; color:#ff00ff; "/>
  1307. <button id="btn_selall" class="btn2_letter4" navindex="5" style="left:214px; top:51px; width:64px; height:19px; ">
  1308. <caption>전체선택</caption>
  1309. <script type="javascript" ev:event="DOMActivate">
  1310. <![CDATA[
  1311. for( i = grd_seldeptlist.fixedRows; i < grd_seldeptlist.rows ; i++ ) {
  1312. model.setValue("/root/hidden/seldeptlist[" + i + "]/selyn","true");
  1313. }
  1314. model.refresh();
  1315. ]]>
  1316. </script>
  1317. </button>
  1318. <button id="btn_selno" class="btn2_letter4" navindex="5" style="left:279px; top:51px; width:64px; height:19px; ">
  1319. <caption>전체취소</caption>
  1320. <script type="javascript" ev:event="DOMActivate">
  1321. <![CDATA[
  1322. for( i = grd_seldeptlist.fixedRows; i < grd_seldeptlist.rows ; i++ ) {
  1323. model.setValue("/root/hidden/seldeptlist[" + i + "]/selyn","false");
  1324. }
  1325. model.refresh();
  1326. ]]>
  1327. </script>
  1328. </button>
  1329. <output id="opt_seldeptorddeptcd" ref="/root/hidden/seldeptbase/orddeptcd" class="output_fix" visibility="hidden" appearance="output" style="left:14px; top:52px; width:145px; height:19px; color:#ff00ff; "/>
  1330. </group>
  1331. </xhtml:body>
  1332. </xhtml:html>