SPMRD02100_원무희귀난치등록.xrw 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858
  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. <rareobstrgst>
  11. <rareobstrgst>
  12. <flag1/>
  13. <flag2/>
  14. <status/>
  15. <genrdd/>
  16. <genrno/>
  17. <histno/>
  18. <instcd/>
  19. <histcd/>
  20. <anohosprgstflag/>
  21. <genrflagcd/>
  22. <pid/>
  23. <insukind/>
  24. <rareobstcnfmdd/>
  25. <orddeptcd/>
  26. <orddrid/>
  27. <rareobstno/>
  28. <rareobstfromdd/>
  29. <rareobsttodd/>
  30. <genrorddd/>
  31. <genrcretno/>
  32. <ediflag/>
  33. <editretdd/>
  34. <editrettm/>
  35. <maindiagcd/>
  36. <prntyn/>
  37. <signyn/>
  38. <rcptremfact/>
  39. <maindiagnm/>
  40. <zipcdhead/>
  41. <zipcdfoot/>
  42. <seqno/>
  43. <infromdd/>
  44. <intodd/>
  45. <acptplcebaseaddr/>
  46. <acptplceaddr/>
  47. <acptplcetel/>
  48. <acptplcempphon/>
  49. <hngnm/>
  50. <sex/>
  51. <brthdd/>
  52. <addr/>
  53. <roomcd/>
  54. <remfact/>
  55. <ioflag/>
  56. <lastupdttrnm/>
  57. <mig/>
  58. <maincd/>
  59. <report/>
  60. </rareobstrgst>
  61. </rareobstrgst>
  62. <rgstinfo>
  63. <rareobstrgstlist>
  64. <rareobstrgstlist>
  65. <status/>
  66. <genrdd/>
  67. <genrno/>
  68. <histno/>
  69. <instcd/>
  70. <histcd/>
  71. <anohosprgstflag/>
  72. <genrflagcd/>
  73. <pid/>
  74. <insukind/>
  75. <rareobstcnfmdd/>
  76. <orddeptcd/>
  77. <orddrid/>
  78. <rareobstno/>
  79. <rareobstfromdd/>
  80. <rareobsttodd/>
  81. <genrorddd/>
  82. <genrcretno/>
  83. <ediflag/>
  84. <editretdd/>
  85. <editrettm/>
  86. <maindiagcd/>
  87. <prntyn/>
  88. <signyn/>
  89. <rcptremfact/>
  90. <maindiagnm/>
  91. <zipcdhead/>
  92. <zipcdfoot/>
  93. <seqno/>
  94. <infromdd/>
  95. <intodd/>
  96. <acptplcebaseaddr/>
  97. <acptplceaddr/>
  98. <acptplcetel/>
  99. <acptplcempphon/>
  100. <flag1/>
  101. <flag2/>
  102. <remfact/>
  103. <ioflag/>
  104. <lastupdttrnm/>
  105. <maincd/>
  106. <mig/>
  107. <report/>
  108. </rareobstrgstlist>
  109. </rareobstrgstlist>
  110. <rareddinfo/>
  111. <rareobstdelinfo/>
  112. </rgstinfo>
  113. <patinfo>
  114. <patinfo>
  115. <flag1/>
  116. <flag2/>
  117. <pid/>
  118. <hngnm/>
  119. <sex/>
  120. <brthdd/>
  121. <addr/>
  122. <indd/>
  123. <dschdd/>
  124. <insukind/>
  125. <roomcd/>
  126. <acptplcebaseaddr/>
  127. <acptplceaddr/>
  128. <acptplcetel/>
  129. <acptplcempphon/>
  130. <zipcdhead/>
  131. <zipcdfoot/>
  132. <seqno/>
  133. <rcptremfact/>
  134. </patinfo>
  135. </patinfo>
  136. <hardno>
  137. <trgtcd/>
  138. </hardno>
  139. </main>
  140. <send>
  141. <reqdata/>
  142. <flag/>
  143. </send>
  144. <init>
  145. <P0008/>
  146. <insukind/>
  147. <genrflagcd/>
  148. <orddept>
  149. <dept>
  150. <deptcd>-</deptcd>
  151. <depthngnm>전체</depthngnm>
  152. </dept>
  153. </orddept>
  154. </init>
  155. <temp>
  156. <terminfo>
  157. <tplinfo/>
  158. <icdo3info/>
  159. <icd10info/>
  160. <selectdiaginfo>
  161. <selectdiaglist/>
  162. </selectdiaginfo>
  163. </terminfo>
  164. <rareobstcalc/>
  165. <apchlist/>
  166. </temp>
  167. </root>
  168. </instance>
  169. <script type="javascript" ev:event="xforms-ready">
  170. <![CDATA[
  171. if ( checkOpener() ) {
  172. model.setValue("/root/main/rareobstrgst/rareobstrgst/pid", opener.javascript.getParameter("SPMRD02100_pid"));
  173. model.setValue("/root/init/genrflagcd", opener.javascript.getParameter("SPMRD02100_genrflagcd"));
  174. if (opener.javascript.getParameter("SPMRD02100_pid") == ""){
  175. messageBox("등록번호가 입력되지", "E007" );
  176. model.setFocus("ipt_pid");
  177. } else {
  178. submit("TRMRD02104", false);
  179. btn_search.dispatch("DOMActivate");
  180. model.setFocus("ipt_rareobstfromdd");
  181. }
  182. }else{
  183. model.setFocus("ipt_pid");
  184. }
  185. model.setValue("/root/main/rareobstrgst/rareobstrgst/status", "I");
  186. zbcfGetCodeList(new Array("P0008"), new Array("/root/init/P0008"));
  187. copyNodesetType("/root/init/insukind", "/root/init/P0008/P0008[cdid >=11 and cdid<=22]", "replace"); //희귀난치 보험만 적용 20090701 희귀난치 의료급여까지 적용 20101124 이은영
  188. // if ( getUserInfo("dutplcecd").getTrim() == "4040300000" || getUserInfo("dutplcecd").getTrim() == "4040304000" ||
  189. // getUserInfo("dutplcecd").getTrim() == "4041000000" || getUserInfo("dutplcecd").getTrim() == "4041002000" ||
  190. // getUserInfo("dutplcecd").getTrim() == "4040307010" || getUserInfo("dutplcecd").getTrim() == "4040307020" ||
  191. // getUserInfo("dutplcecd").getTrim() == "4100907000" || getUserInfo("dutplcecd").getTrim() == "2280211000" ||
  192. // getUserInfo("dutplcecd").getTrim() == "4040400000" || getUserInfo("dutplcecd").getTrim() == "4040500000") {
  193. // btn_insert.disabled = false; //입력
  194. // btn_update.disabled = false; //수정
  195. // btn_del.disabled = false; //삭제
  196. // } else {
  197. // btn_insert.disabled= true;
  198. // btn_update.disabled = true;
  199. // btn_del.disabled = true;
  200. // }
  201. submit("TRMRD02106");
  202. //if ( getUserInfo("dutplcecd").getTrim() == "3230000000") {
  203. if(model.getValue("/root/main/hardno/trgtcd") != ""){
  204. btn_insert.disabled = true; //입력
  205. btn_update.disabled = true; //수정
  206. btn_del.disabled = true; //삭제
  207. } else {
  208. btn_insert.disabled= false;
  209. btn_update.disabled = false;
  210. btn_del.disabled = false;
  211. }
  212. btn_small.visible = false;
  213. model.refresh();
  214. ]]>
  215. </script>
  216. <submission id="TRZBC00101" method="post" mediatype="application/x-www-form-urlencoded"/>
  217. <submission id="TRMRD02101" ref="/root/main/rareobstrgst/rareobstrgst/pid" method="post" mediatype="application/x-www-form-urlencoded" resultref="/root/main/rgstinfo"/>
  218. <submission id="TRMRD02103" ref="/root/main/rareobstrgst/rareobstrgst" method="post" mediatype="application/x-www-form-urlencoded" resultref="/root/temp/apchlist"/>
  219. <submission id="TXMRD02101" ref="/root/main/rareobstrgst/rareobstrgst" method="post" mediatype="application/x-www-form-urlencoded"/>
  220. <submission id="TRMRD02102" ref="/root/main/rareobstrgst/rareobstrgst" method="post" mediatype="application/x-www-form-urlencoded" resultref="/root/main/rgstinfo"/>
  221. <submission id="TRMRD02104" ref="/root/main/rareobstrgst/rareobstrgst/pid" method="post" mediatype="application/x-www-form-urlencoded" resultref="/root/main/rareobstrgst/rareobstrgst"/>
  222. <submission id="TRMRD02105" ref="/root/main/rareobstrgst/rareobstrgst" method="post" mediatype="application/x-www-form-urlencoded" resultref="/root/main/rgstinfo/rareobstdelinfo"/>
  223. <submission id="TRMRD02106" method="post" mediatype="application/x-www-form-urlencoded" resultref="/root/main/hardno"/>
  224. </model>
  225. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  226. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  227. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  228. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  229. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  230. <script type="javascript">
  231. <![CDATA[
  232. function fSrchTerm(flag, code, ref, resref, nmref){
  233. if(flag == "toph"){
  234. //model.makeValue("/root/send/reqdata/flag", "toph");
  235. //model.makeValue("/root/send/reqdata/tophcd", model.getValue(ref));
  236. //submit("TRMRD00104");
  237. //copyNodeset(resref, "/root/temp/terminfo/tplinfo");
  238. model.removeNodeset("/root/temp/terminfo/tplinfo");
  239. setParameter("SPMRT01500_param_nodepath", "/root/temp/terminfo/tplinfo");
  240. setParameter("SPMRT01500_SEARCHDATA", code);
  241. setParameter("SPMRT01500_FLAG", "3");
  242. modal("SPMRT01500");
  243. if(getParameter("SPMRT01500_FLAG") == ""){
  244. return;
  245. }
  246. model.setValue(ref, model.getValue("/root/temp/terminfo/tplinfo/tophlgcd"));
  247. model.setValue(nmref, model.getValue("/root/temp/terminfo/tplinfo/engnm"));
  248. model.setValue(resref, model.getValue("/root/temp/terminfo/tplinfo/seqno"));
  249. } else if(flag == "morph1"){
  250. //model.makeValue("/root/send/reqdata/flag", "morph");
  251. //model.makeValue("/root/send/reqdata/morphcd", model.getValue(ref));
  252. //submit("TRMRD00104");
  253. //copyNodeset(resref, "/root/temp/terminfo/icdo3info")
  254. model.removeNodeset("/root/temp/terminfo/icdo3info");
  255. setParameter("SPMRT01500_param_nodepath", "/root/temp/terminfo/icdo3info");
  256. setParameter("SPMRT01500_SEARCHDATA", code);
  257. setParameter("SPMRT01500_FLAG", "2");
  258. modal("SPMRT01500");
  259. if(getParameter("SPMRT01500_FLAG") == ""){
  260. return;
  261. }
  262. model.setValue(ref, model.getValue("/root/temp/terminfo/icdo3info/histlgccd"));
  263. model.setValue(nmref, model.getValue("/root/temp/terminfo/icdo3info/engnm"));
  264. model.setValue(resref, model.getValue("/root/temp/terminfo/icdo3info/seqno"));
  265. } else if(flag == "morph2"){
  266. //model.makeValue("/root/send/reqdata/flag", "morph");
  267. //model.makeValue("/root/send/reqdata/morphcd", model.getValue(ref));
  268. //submit("TRMRD00104");
  269. //copyNodeset(resref, "/root/temp/terminfo/icdo3info")
  270. //model.resetInstanceNode("/root/temp/terminfo/icdo3info");
  271. model.removeNodeset("/root/temp/terminfo/icdo3info");
  272. setParameter("SPMRT01500_param_nodepath", "/root/temp/terminfo/icdo3info");
  273. setParameter("SPMRT01500_SEARCHDATA", code);
  274. setParameter("SPMRT01500_FLAG", "2");
  275. modal("SPMRT01500");
  276. if(getParameter("SPMRT01500_FLAG") == ""){
  277. return;
  278. }
  279. model.setValue(ref, model.getValue("/root/temp/terminfo/icdo3info/histlgccd"));
  280. model.setValue(nmref, model.getValue("/root/temp/terminfo/icdo3info/engnm"));
  281. model.setValue(resref, model.getValue("/root/temp/terminfo/icdo3info/seqno"));
  282. }else if(flag == "icd10"){
  283. //model.makeValue("/root/send/reqdata/flag", "icd10");
  284. //model.makeValue("/root/send/reqdata/icd10cd", code);
  285. //submit("TRMRD00104");
  286. //model.makeValue(resref, model.getValue("/root/temp/terminfo/icd10info/icd10engnm"));
  287. model.removeNodeset("/root/temp/terminfo/icd10info");
  288. setParameter("SPMRT01500_param_nodepath", "/root/temp/terminfo/icd10info");
  289. setParameter("SPMRT01500_SEARCHDATA", code);
  290. setParameter("SPMRT01500_FLAG", "1");
  291. modal("SPMRT01500");
  292. if(getParameter("SPMRT01500_FLAG") == ""){
  293. return;
  294. }
  295. model.setValue(ref, model.getValue("/root/temp/terminfo/icd10info/selectdiaglist/diagcd"));
  296. model.setValue(nmref, model.getValue("/root/temp/terminfo/icd10info/selectdiaglist/diagengnm"));
  297. }
  298. model.removeNodeset("/root/send/reqdata");
  299. model.refresh();
  300. }
  301. function fOpenTop(flag)
  302. {
  303. if (flag == "true") {
  304. btn_small.visible = true;
  305. btn_big.visible = false;
  306. textarea1.attribute("style") = "left:85px; top:180px; width:475px; height:200px; ";
  307. } else {
  308. btn_small.visible = false;
  309. btn_big.visible = true;
  310. textarea1.attribute("style") = "left:85px; top:180px; width:475px; height:48px; ";
  311. }
  312. }
  313. /**
  314. * @desc : Source Node의 갯수를 구한다.
  315. * @
  316. * @param : path - node path
  317. * @return :
  318. * @authur : 김선태 2007. 5. 8
  319. * @---------------------------------------------------
  320. */
  321. function getNodeSetCnt(path)
  322. {
  323. var insXml = model.instances(0);
  324. var nodeList = insXml.selectNodes(path);
  325. return nodeList.length;
  326. }
  327. ]]>
  328. </script>
  329. </xhtml:head>
  330. <xhtml:body pagewidth="600" pageheight="430" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  331. <line id="line1" class="line_1" style="x1:0px; y1:15px; x2:560px; y2:15px; "/>
  332. <caption id="caption14" class="tit_2" style="left:0px; top:0px; width:152px; height:14px; vertical-align:middle; ">희귀난치환자 등록</caption>
  333. <caption id="caption1" class="cell_1" style="left:205px; top:25px; width:79px; height:23px; text-align:center; vertical-align:middle; ">환자명</caption>
  334. <caption id="caption2" class="cell_1" style="left:205px; top:50px; width:79px; height:23px; text-align:center; vertical-align:middle; ">주소</caption>
  335. <caption id="caption3" class="cell_1" style="left:446px; top:25px; width:49px; height:23px; text-align:center; vertical-align:middle; ">성별</caption>
  336. <caption id="caption13" class="cell_1" style="left:1px; top:50px; width:79px; height:23px; text-align:center; vertical-align:middle; ">생년월일</caption>
  337. <caption id="caption26" class="cell_1" style="left:1px; top:25px; width:79px; height:23px; text-align:center; vertical-align:middle; ">등록번호</caption>
  338. <caption id="caption4" class="tit_2" style="left:0px; top:84px; width:152px; height:13px; vertical-align:middle; ">희귀난치환자 등록사항</caption>
  339. <caption id="caption5" class="cell_1" style="left:1px; top:129px; width:79px; height:23px; text-align:center; vertical-align:middle; ">종료일자</caption>
  340. <caption id="caption6" class="cell_1" style="left:1px; top:104px; width:79px; height:23px; text-align:center; vertical-align:middle; ">시작일자</caption>
  341. <caption id="caption7" class="cell_1" style="left:295px; top:104px; width:104px; height:23px; text-align:center; vertical-align:middle; ">희귀난치등록번호</caption>
  342. <caption id="caption8" class="cell_1" style="left:295px; top:129px; width:104px; height:23px; text-align:center; vertical-align:middle; ">보험구분</caption>
  343. <caption id="caption9" class="cell_1" style="left:1px; top:154px; width:79px; height:23px; text-align:center; vertical-align:middle; ">진단상병</caption>
  344. <input id="input3" ref="/root/main/rareobstrgst/rareobstrgst/maindiagnm" style="left:160px; top:156px; width:400px; height:19px; "/>
  345. <caption id="caption10" class="tit_2" style="left:0px; top:233px; width:152px; height:13px; vertical-align:middle; ">희귀난치환자 등록내역</caption>
  346. <input id="input4" ref="/root/main/rareobstrgst/rareobstrgst/maincd" style="left:85px; top:156px; width:70px; height:19px; ">
  347. <script type="javascript" ev:event="onkeyup">
  348. <![CDATA[
  349. //inputEnterKey("btn_diagsrch", "DOMActivate");
  350. if(event.keyCode == 13){
  351. setInputNodeCurText();
  352. //var code = model.getValue("/root/main/rareobstrgst/rareobstrgst/maindiagcd");
  353. var code = model.getValue("/root/main/rareobstrgst/rareobstrgst/maincd");
  354. code = code.toUpperCase();
  355. var resref = "/root/main/rareobstrgst/rareobstrgst/maindiagnm";
  356. //var ref = "/root/main/rareobstrgst/rareobstrgst/maindiagcd";
  357. var ref = "/root/main/rareobstrgst/rareobstrgst/maincd";
  358. var nmref = "/root/main/rareobstrgst/rareobstrgst/maindiagnm";
  359. fSrchTerm("icd10", code, ref, resref, nmref);
  360. //model.makeValue("/root/main/rareobstinfo/rareobstinfo/maindiagcd",model.getValue("/root/main/rareobstrgst/rareobstrgst/maincd"));
  361. model.makeValue("/root/main/rareobstrgst/rareobstrgst/maindiagcd",model.getValue("/root/main/rareobstrgst/rareobstrgst/maincd"));
  362. model.refresh();
  363. }
  364. ]]>
  365. </script>
  366. </input>
  367. <datagrid id="grd_rareobstrgstlist" nodeset="/root/main/rgstinfo/rareobstrgstlist/rareobstrgstlist" caption="시작일자^종료일자^희귀난치등록번호^보험구분^취소여부^진단상병^출력여부^사인여부^수납비고^상병명^환자명^성별^생년월일^주소^flag2^삭제자" colwidth="58, 58, 105, 76, 54, 68, 54, 54, 100, 100, 100, 100, 100, 100, 100, 56" mergecellsfixedrows="bycolrec" rowsep="|" colsep="^" style="left:0px; top:254px; width:560px; height:171px; ">
  368. <col ref="rareobstfromdd"/>
  369. <col ref="rareobsttodd"/>
  370. <col ref="rareobstno"/>
  371. <col ref="insukind" type="combo" disabled="true">
  372. <choices>
  373. <itemset nodeset="/root/init/insukind">
  374. <label ref="cdnm"/>
  375. <value ref="cdid"/>
  376. </itemset>
  377. </choices>
  378. </col>
  379. <col ref="histcd" type="combo" disabled="true">
  380. <choices>
  381. <item>
  382. <label>등록</label>
  383. <value>O</value>
  384. </item>
  385. <item>
  386. <label>삭제</label>
  387. <value>H</value>
  388. </item>
  389. </choices>
  390. </col>
  391. <col ref="maindiagcd"/>
  392. <col ref="prntyn"/>
  393. <col ref="signyn" style="left:496px; top:23px; width:59px; height:23px; "/>
  394. <col ref="rcptremfact" visibility="hidden"/>
  395. <col ref="maindiagnm" visibility="hidden"/>
  396. <col ref="hngnm" visibility="hidden"/>
  397. <col ref="sex" visibility="hidden"/>
  398. <col ref="brthdd" visibility="hidden"/>
  399. <col ref="addr" visibility="hidden"/>
  400. <col ref="flag2" visibility="hidden"/>
  401. <col ref="lastupdttrnm"/>
  402. <script type="javascript" ev:event="onclick">
  403. <![CDATA[
  404. var currow = grd_rareobstrgstlist.row;
  405. if( grd_rareobstrgstlist.isCell(event.target) && grd_rareobstrgstlist.row >= grd_rareobstrgstlist.fixedRows ) {
  406. model.copyNode("/root/main/rareobstrgst/rareobstrgst", "/root/main/rgstinfo/rareobstrgstlist/rareobstrgstlist["+currow+"]");
  407. //200810071500 원무 김은정 선생님 요청
  408. if(model.getValue("/root/main/rgstinfo/rareobstrgstlist/rareobstrgstlist/rareobstno") == "의뢰서작성"){
  409. model.setValue("/root/main/rareobstrgst/rareobstrgst/rareobstno", "-");
  410. }
  411. if(model.getValue("/root/main/rareobstrgst/rareobstrgst/histcd") == "H"){
  412. messageBox("삭제된 데이터가 ", "E005" );
  413. }
  414. model.refresh();
  415. }
  416. ]]>
  417. </script>
  418. </datagrid>
  419. <button id="btn_update" class="btn4_letter2" style="left:447px; top:77px; width:56px; height:22px; ">
  420. <caption>수정</caption>
  421. <script type="javascript" ev:event="DOMActivate">
  422. <![CDATA[
  423. // 삭제된 데이터 수정일 경우
  424. if(model.getValue("/root/main/rareobstrgst/rareobstrgst/histcd") == "H"){
  425. messageBox("삭제된 데이터는 수정할 수 ", "I004" );
  426. return;
  427. }
  428. if (model.getValue("/root/main/rareobstrgst/rareobstrgst/flag2") == "Y") {
  429. var ioflagcd = "I";
  430. } else {
  431. var ioflagcd = "O";
  432. model.setValue("/root/main/rareobstrgst/rareobstrgst/infromdd", "00000000");
  433. model.setValue("/root/main/rareobstrgst/rareobstrgst/intodd", "00000000");
  434. }
  435. //model.setValue("/root/main/rareobstrgst/rareobstrgst/pid", model.getValue("/root/main/patinfo/patinfo/pid") );
  436. //model.setValue("/root/main/rareobstrgst/rareobstrgst/genrflagcd", model.getValue("/root/init/genflagcd") );
  437. model.setValue("/root/main/rareobstrgst/rareobstrgst/genrflagcd", ioflagcd );
  438. model.setValue("/root/main/rareobstrgst/rareobstrgst/ioflag", ioflagcd );
  439. if(model.getValue("/root/main/rareobstrgst/rareobstrgst/pid") == ""){
  440. messageBox("등록번호가 입력되지", "E007" );
  441. return;
  442. }
  443. if (model.getValue("/root/main/rareobstrgst/rareobstrgst/rareobstfromdd") =="") {
  444. messageBox("시작일자가 입력되지", "E007" );
  445. return;
  446. }
  447. //if (model.getValue("/root/main/rareobstrgst/rareobstrgst/rareobstno") =="") {
  448. // messageBox("희귀난치등록번호가 입력되지", "E007" );
  449. // return;
  450. //}
  451. //희귀난치등록시 희귀난치번호가 null이거나 '-'인 경우에는 희귀난치등록이 가능하도록 요청.
  452. //희귀난치번호에 숫자가 들어있는 경우에는 보험구분에 따라 희귀난치자릿수를 체크할 것 - 200810071430 원무팀 김은정 선생님 요청
  453. //alert(model.getValue("/root/main/rareobstrgst/rareobstrgst/rareobstno"));
  454. if(model.getValue("/root/main/rareobstrgst/rareobstrgst/rareobstno") != "" && model.getValue("/root/main/rareobstrgst/rareobstrgst/rareobstno") != '-'){
  455. if (model.getValue("/root/main/rareobstrgst/rareobstrgst/insukind") >= "21" && model.getValue("/root/main/rareobstrgst/rareobstrgst/insukind") <= "25"
  456. && model.getValue("/root/main/rareobstrgst/rareobstrgst/rareobstno").length != "15") {
  457. messageBox("희귀난치등록번호가 정확히 입력되지", "E007" );
  458. model.setFocus("ipt_rareobstno");
  459. return;
  460. } else if (model.getValue("/root/main/rareobstrgst/rareobstrgst/insukind") >= "10" && model.getValue("/root/main/rareobstrgst/rareobstrgst/insukind") <= "20"
  461. && model.getValue("/root/main/rareobstrgst/rareobstrgst/rareobstno").length != "10") {
  462. messageBox("희귀난치등록번호가 정확히 입력되지", "E007" );
  463. model.setFocus("ipt_rareobstno");
  464. return;
  465. }
  466. }
  467. if (model.getValue("/root/main/rareobstrgst/rareobstrgst/insukind") =="") {
  468. messageBox("보험구분이 입력되지", "E007" );
  469. return;
  470. }
  471. if (model.getValue("/root/main/rareobstrgst/rareobstrgst/maindiagcd") =="") {
  472. //messageBox("진단상병이 입력되지", "E007" );
  473. //return;
  474. //model.setValue("/root/main/rareobstrgst/rareobstrgst/genrflagcd","-" );
  475. }
  476. //if (submit("TRMRD02103")) { // 희귀난치 시작/종료일자 비교
  477. //alert("값이 중복되어 저장되지 않았습니다.");
  478. //return;
  479. //} else {
  480. model.setValue("/root/main/rareobstrgst/rareobstrgst/status", "U");
  481. submit("TXMRD02101"); // Update
  482. if (model.getValue("/root/send/flag") != 'Y'){
  483. alert("수정이 완료되었습니다.");
  484. }
  485. btn_search.dispatch("DOMActivate");
  486. //model.resetInstanceNode("/root/main/rareobstrgst/rareobstrgst");
  487. model.refresh();
  488. //}
  489. //}
  490. ]]>
  491. </script>
  492. </button>
  493. <button id="btn_del" class="btn4_letter2" style="left:504px; top:77px; width:56px; height:22px; ">
  494. <caption>삭제</caption>
  495. <script type="javascript" ev:event="DOMActivate">
  496. <![CDATA[
  497. if ( messageBox("해당 자료를", "Q001") == 6 ) {
  498. submit("TRMRD02105");
  499. var cnt = getNodeSetCnt("/root/main/rgstinfo/rareobstdelinfo");
  500. if (cnt > 0){
  501. alert("이미 삭제 처리된 자료입니다.");
  502. return;
  503. } else {
  504. if(model.getValue("/root/main/rareobstrgst/rareobstrgst/rcptremfact") != ""){
  505. model.makeValue("/root/send/flag","Y");
  506. btn_update.dispatch("DOMActivate"); //수정
  507. model.setValue("/root/main/rareobstrgst/rareobstrgst/status", "D");
  508. model.setValue("/root/main/rareobstrgst/rareobstrgst/pid", model.getValue("/root/main/rareobstrgst/rareobstrgst/pid") );
  509. model.setValue("/root/main/rareobstrgst/rareobstrgst/genrflagcd", model.getValue("/root/init/genflagcd") );
  510. if (submit("TXMRD02101")){
  511. alert("삭제가 완료되었습니다.");
  512. btn_search.dispatch("DOMActivate");
  513. //model.resetInstanceNode("/root/main/rareobstrgst/rareobstrgst");
  514. model.refresh();
  515. } else {
  516. alert("삭제가 취소되었습니다.");
  517. return;
  518. }
  519. }else{
  520. messageBox("삭제사유를 비고란에 ","C001");
  521. model.setFocus("textarea1");
  522. return;
  523. }
  524. }
  525. }
  526. ]]>
  527. </script>
  528. </button>
  529. <button id="btn_search" class="btn1_letter2" visibility="hidden" style="left:140px; top:75px; width:56px; height:22px; ">
  530. <caption>조회</caption>
  531. <script type="javascript" ev:event="DOMActivate">
  532. <![CDATA[
  533. submit("TRMRD02104");
  534. model.setValue("/root/main/rareobstrgst/rareobstrgst/status", "I");
  535. if(model.getValue("/root/main/rareobstrgst/rareobstrgst/flag1") == "N"){
  536. model.makeNode("/root/main/rareobstrgst/rareobstrgst/pid");
  537. messageBox("없는 환자 번호 입니다.", "E999", "");
  538. model.setFocus("ipt_pid");
  539. return;
  540. } else {
  541. //if(!submit("TRMRD02101",false)){
  542. submit("TRMRD02101");
  543. var cnt = getNodeSetCnt("/root/main/rgstinfo/rareobstrgstlist/rareobstrgstlist");
  544. //if (grd_rareobstrgstlist.rows > 0){
  545. if (cnt > 0) {
  546. model.copyNode("/root/main/rareobstrgst/rareobstrgst", "/root/main/rgstinfo/rareobstrgstlist/rareobstrgstlist[1]");
  547. model.refresh();
  548. // }
  549. } else {
  550. submit("TRMRD02104");
  551. }
  552. //200810071500 원무 김은정 선생님 요청
  553. if(model.getValue("/root/main/rareobstrgst/rareobstrgst/rareobstno") == "의뢰서작성"){
  554. model.setValue("/root/main/rareobstrgst/rareobstrgst/rareobstno", "-");
  555. }
  556. model.refresh();
  557. }
  558. ]]>
  559. </script>
  560. </button>
  561. <button id="btn_clear" class="btn4_letter3" style="left:321px; top:77px; width:68px; height:22px; ">
  562. <caption>초기화</caption>
  563. <script type="javascript" ev:event="DOMActivate">
  564. <![CDATA[
  565. model.resetInstanceNode("/root/main/rgstinfo/rareobstrgstlist/rareobstrgstlist");
  566. model.resetInstanceNode("/root/main/patinfo/patinfo");
  567. model.resetInstanceNode("/root/main/rareobstrgst/rareobstrgst");
  568. model.setValue("/root/main/rareobstrgst/rareobstrgst/pid", model.getValue("/root/main/rareobstrgst/rareobstrgst/pid") );
  569. model.setValue("/root/main/rareobstrgst/rareobstrgst/status", "I" );
  570. model.refresh();
  571. ]]>
  572. </script>
  573. </button>
  574. <input id="ipt_pid" ref="/root/main/rareobstrgst/rareobstrgst/pid" class="input_s_essential" autonext="false" appearance="output" style="left:82px; top:25px; width:113px; height:19px; ">
  575. <script type="javascript" ev:event="onkeyup">
  576. <![CDATA[
  577. // if(event.keyCode == "13") {
  578. // setInputNodeCurText();
  579. // var pid = model.getValue("/root/main/rgstinfo/patinfo/patinfo/pid");
  580. // //if (model.getValue("/root/main/rgstinfo/patinfo/patinfo/pid") == ""){
  581. // if (pid == "") {
  582. // messageBox("등록번호가 입력되지", "E007" );
  583. // model.setFocus("ipt_pid");
  584. // return;
  585. // } else {
  586. // inputEnterKey("btn_search", "DOMActivate");
  587. // }
  588. // }
  589. //등록번호 입력후 바로 엔터가능 하게 수정
  590. if(event.keyCode == 13) {
  591. inputEnterKey("btn_search", "DOMActivate");
  592. }
  593. ]]>
  594. </script>
  595. </input>
  596. <output id="opt_hngnm" ref="/root/main/rareobstrgst/rareobstrgst/hngnm" class="output_fix" style="left:287px; top:26px; width:96px; height:19px; "/>
  597. <output id="opt_sex" ref="/root/main/rareobstrgst/rareobstrgst/sex" class="output_fix" style="left:498px; top:26px; width:62px; height:19px; "/>
  598. <output id="opt_brthdd" ref="/root/main/rareobstrgst/rareobstrgst/brthdd" class="output_fix" format="yyyy-mm-dd" style="left:82px; top:51px; width:114px; height:19px; "/>
  599. <output id="opt_addr" ref="/root/main/rareobstrgst/rareobstrgst/addr" class="output_fix" style="left:287px; top:51px; width:273px; height:19px; "/>
  600. <input id="ipt_rareobstfromdd" ref="/root/main/rareobstrgst/rareobstrgst/rareobstfromdd" inputtype="date" format="yyyy-mm-dd" style="left:85px; top:106px; width:135px; height:19px; ">
  601. <script type="javascript" ev:event="xforms-value-changed">
  602. <![CDATA[
  603. if (model.getValue("/root/main/rareobstrgst/rareobstrgst/rareobsttodd") == "" || model.getValue("/root/main/rareobstrgst/rareobstrgst/rareobsttodd") == "00000000"){
  604. if(model.getValue("/root/main/rareobstrgst/rareobstrgst/rareobstfromdd") > getCurrentDate()){
  605. messageBox("희귀난치 시작일자가 현재일자를 ", "E003" );
  606. return;
  607. }else{
  608. model.setValue("/root/main/rareobstrgst/rareobstrgst/rareobsttodd", ((model.getValue("/root/main/rareobstrgst/rareobstrgst/rareobstfromdd").toDate()).getAddDate(5, "Y").getAddDate(-1)).getDateFormat() );
  609. model.refresh();
  610. }
  611. }else{
  612. if(model.getValue("/root/main/rareobstrgst/rareobstrgst/rareobstfromdd") > getCurrentDate()){
  613. messageBox("희귀난치 시작일자가 현재일자를 ", "E003" );
  614. return;
  615. }
  616. }
  617. ]]>
  618. </script>
  619. </input>
  620. <input id="ipt_rareobsttodd" ref="/root/main/rareobstrgst/rareobstrgst/rareobsttodd" inputtype="date" format="yyyy-mm-dd" style="left:85px; top:131px; width:135px; height:19px; "/>
  621. <input id="ipt_rareobstno" ref="/root/main/rareobstrgst/rareobstrgst/rareobstno" style="left:405px; top:106px; width:155px; height:19px; ">
  622. <script type="javascript" ev:event="onkeyup">
  623. <![CDATA[
  624. if(event.keyCode == 13){
  625. model.setFocus("caption7");
  626. var datano = model.getValue("/root/main/rareobstrgst/rareobstrgst/rareobstno" );
  627. datano = datano.getLeftPad( 10, "0");
  628. model.setValue("/root/main/rareobstrgst/rareobstrgst/rareobstno", datano);
  629. model.refresh();
  630. }
  631. ]]>
  632. </script>
  633. </input>
  634. <select1 id="cbo_insukind" ref="/root/main/rareobstrgst/rareobstrgst/insukind" appearance="minimal" style="left:405px; top:129px; width:155px; height:19px; ">
  635. <choices>
  636. <itemset nodeset="/root/init/insukind">
  637. <label ref="cdnm"/>
  638. <value ref="cdid"/>
  639. </itemset>
  640. </choices>
  641. <script type="javascript" ev:event="xforms-value-changed">
  642. <![CDATA[
  643. //model.setValue("/root/main/rareobstrgst/rareobstrgst/prntyn",model.getValue("/root/main/rareobstrgst/rareobstrgst/signyn"));
  644. model.setValue("/root/main/rareobstrgst/rareobstrgst/insukind",model.getValue("/root/main/rareobstrgst/rareobstrgst/insukind"));
  645. ]]>
  646. </script>
  647. </select1>
  648. <line id="line2" class="line_1" style="x1:0px; y1:100px; x2:560px; y2:100px; "/>
  649. <line id="line4" class="line_1" style="x1:0px; y1:248px; x2:560px; y2:248px; "/>
  650. <caption id="caption11" class="cell_1" style="left:1px; top:179px; width:79px; height:48px; text-align:center; vertical-align:top; ">비고</caption>
  651. <textarea id="textarea1" ref="/root/main/rareobstrgst/rareobstrgst/rcptremfact" style="left:85px; top:180px; width:475px; height:48px; "/>
  652. <button id="button1" class="btn3_letter8" style="left:191px; top:77px; width:109px; height:22px; ">
  653. <caption>희귀난치환자관리</caption>
  654. <script type="javascript" ev:event="DOMActivate">
  655. <![CDATA[
  656. setParameter("SMMRD02000_pid", model.getValue("/root/main/rareobstrgst/rareobstrgst/pid"));
  657. setParameter("SMMRD02000_orddeptcd", model.getValue("/root/init/orddept/dept")) ;
  658. modal("SMMRD02000");
  659. ]]>
  660. </script>
  661. </button>
  662. <button id="btn_diagsrch" class="icon_search" visibility="hidden" style="left:150px; top:145px; width:16px; height:16px; ">
  663. <caption/>
  664. <script type="javascript" ev:event="DOMActivate">
  665. <![CDATA[
  666. // if (model.getValue("/root/main/rareobstrgst/rareobstrgst/maindiagcd") ==""){
  667. // messageBox("진단상병이 입력되지", "E007" );
  668. // model.setFocus("input4");
  669. // return;
  670. // } else { //SPMMO00800
  671. // setParameter("SPMRT01500_cond1", 1);
  672. // setParameter("SPMRT01500_cond2", 1);
  673. // setParameter("SPMRT01500_cond3", "E");
  674. // setParameter("SPMRT01500_cond4", getCurrentDate());
  675. //// setParameter("SPMMO00800_cond5", model.getValue("/root/main/rareobstinfo/rareobstinfo/healcarediagcd"));
  676. // //setParameter("SPMMO00800_cond5", model.getValue("/root/main/rareobstinfo/rareobstinfo/maindiagcd"));
  677. // setParameter("SPMRT01500_cond5", model.getValue("/root/main/rareobstrgst/rareobstrgst/maindiagcd"));
  678. //
  679. // modal("SPMRT01500");
  680. // var rtnparam = getParameter("SPMMO00800_rtn");
  681. //
  682. // if ( rtnparam.getTrim() != "") {
  683. // rtnparam = rtnparam.split("▩");
  684. // var tmpstr = rtnparam[1];
  685. //
  686. // tmpstr = tmpstr.split("▦");
  687. //
  688. //// model.setValue("/root/main/rareobstinfo/rareobstinfo/healcarediagcd", tmpstr[9]);
  689. //// model.setValue("/root/main/rareobstinfo/rareobstinfo/healcarediagnm", tmpstr[2]);
  690. // //model.setValue("/root/main/rareobstinfo/rareobstinfo/maindiagcd", tmpstr[9]);
  691. // model.setValue("/root/main/rareobstrgst/rareobstrgst/maindiagcd", tmpstr[8]);
  692. // model.setValue("/root/main/rareobstrgst/rareobstrgst/maindiagnm", tmpstr[2]);
  693. //
  694. // model.refresh();
  695. // }
  696. // }
  697. ]]>
  698. </script>
  699. </button>
  700. <output id="output1" ref="/root/main/rareobstrgst/rareobstrgst/flag2" class="output_fix" visibility="hidden" style="left:394px; top:26px; width:35px; height:19px; "/>
  701. <button id="btn_small" class="btn2_letter3" style="left:15px; top:200px; width:53px; height:19px; ">
  702. <caption>접히기</caption>
  703. <script type="javascript" ev:event="onclick">
  704. <![CDATA[
  705. fOpenTop("false");
  706. ]]>
  707. </script>
  708. </button>
  709. <button id="btn_big" class="btn2_letter3" style="left:15px; top:200px; width:53px; height:19px; ">
  710. <caption>펼치기</caption>
  711. <script type="javascript" ev:event="onclick">
  712. <![CDATA[
  713. fOpenTop("true");
  714. ]]>
  715. </script>
  716. </button>
  717. <button id="btn_insert" class="btn4_letter2" style="left:390px; top:77px; width:56px; height:22px; ">
  718. <caption>입력</caption>
  719. <script type="javascript" ev:event="DOMActivate">
  720. <![CDATA[
  721. if (model.getValue("/root/main/rareobstrgst/rareobstrgst/flag2") == "Y") {
  722. var ioflagcd = "I";
  723. } else {
  724. var ioflagcd = "O";
  725. model.setValue("/root/main/rareobstrgst/rareobstrgst/infromdd", "00000000");
  726. model.setValue("/root/main/rareobstrgst/rareobstrgst/intodd", "00000000");
  727. model.refresh();
  728. }
  729. //model.setValue("/root/main/rareobstrgst/rareobstrgst/pid", model.getValue("/root/main/patinfo/patinfo/pid") );
  730. //model.setValue("/root/main/rareobstrgst/rareobstrgst/genrflagcd", model.getValue("/root/init/genflagcd") );
  731. model.setValue("/root/main/rareobstrgst/rareobstrgst/genrflagcd", ioflagcd );
  732. model.setValue("/root/main/rareobstrgst/rareobstrgst/ioflag", ioflagcd );
  733. model.setValue("/root/main/rareobstrgst/rareobstrgst/report", "1");
  734. if(model.getValue("/root/main/rareobstrgst/rareobstrgst/pid") == ""){
  735. messageBox("등록번호가 입력되지", "E007" );
  736. return;
  737. }
  738. if (model.getValue("/root/main/rareobstrgst/rareobstrgst/rareobstfromdd") =="") {
  739. messageBox("시작일자가 입력되지", "E007" );
  740. return;
  741. }
  742. if (model.getValue("/root/main/rareobstrgst/rareobstrgst/rareobstno") =="") {
  743. //messageBox("희귀난치등록번호가 입력되지", "E007" );
  744. //return;
  745. }
  746. if (model.getValue("/root/main/rareobstrgst/rareobstrgst/insukind") =="") {
  747. messageBox("보험구분이 입력되지", "E007" );
  748. return;
  749. }
  750. submit("TRMRD02103");
  751. //var cnt = getNodeSetCnt("/root/main/rgstinfo/rgstinfo/rareddinfo/rareddinfo");
  752. var cnt = getNodesetCount("/root/temp/apchlist");
  753. //if(cnt > 0){
  754. if (model.getValue("/root/main/rareobstrgst/rareobstrgst/insukind") >= "21" && model.getValue("/root/main/rareobstrgst/rareobstrgst/insukind") <= "25"
  755. && model.getValue("/root/main/rareobstrgst/rareobstrgst/rareobstno").length != "15") {
  756. messageBox("희귀난치등록번호가 정확히 입력되지", "E007" );
  757. model.setFocus("ipt_rareobstno");
  758. return;
  759. } else if (model.getValue("/root/main/rareobstrgst/rareobstrgst/insukind") >= "10" && model.getValue("/root/main/rareobstrgst/rareobstrgst/insukind") <= "20"
  760. && model.getValue("/root/main/rareobstrgst/rareobstrgst/rareobstno").length != "10") {
  761. messageBox("희귀난치등록번호가 정확히 입력되지", "E007" );
  762. model.setFocus("ipt_rareobstno");
  763. return;
  764. }
  765. //}
  766. if (model.getValue("/root/main/rareobstrgst/rareobstrgst/maindiagcd") =="") {
  767. //messageBox("진단상병이 입력되지", "E007" );
  768. //return;
  769. }
  770. // if (submit("TRMRD02103",false) == false) { // 희귀난치 시작/종료일자 비교
  771. // alert("값이 중복되어 저장되지 않았습니다.");
  772. // return;
  773. // } else {
  774. // model.setValue("/root/main/rareobstrgst/rareobstrgst/status", "I");
  775. //
  776. // submit("TXMRD02101"); // Insert
  777. // alert("저장이 완료되었습니다.");
  778. //
  779. // btn_search.dispatch("DOMActivate"); //조회버튼
  780. // model.refresh();
  781. // //model.resetInstanceNode("/root/main/rareobstrgst/rareobstrgst");
  782. // }
  783. if (cnt > 0) { // 희귀난치 시작/종료일자 비교
  784. alert("값이 중복되어 저장되지 않았습니다.");
  785. return;
  786. } else {
  787. model.makeValue("/root/main/rareobstrgst/rareobstrgst/status", "I");
  788. model.makeValue("/root/main/rareobstrgst/rareobstrgst/orddeptcd", "-");
  789. model.makeValue("/root/main/rareobstrgst/rareobstrgst/orddrid", "-");
  790. model.makeValue("/root/main/rareobstrgst/rareobstrgst/genrorddd", "-");
  791. if(model.getValue("/root/main/rareobstrgst/rareobstrgst/rareobstno") == ""){
  792. model.makeValue("/root/main/rareobstrgst/rareobstrgst/rareobstno", "-");
  793. }
  794. submit("TXMRD02101"); // Insert
  795. alert("저장이 완료되었습니다.");
  796. btn_search.dispatch("DOMActivate"); //조회버튼
  797. model.refresh();
  798. }
  799. ]]>
  800. </script>
  801. </button>
  802. </xhtml:body>
  803. </xhtml:html>