SMPIB03100_자동주석등록관리.xrw 66 KB

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