trnptcnst.js 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. /** -------------------------------------------------------------------------------------------
  2. * 우편번호 불러오기 (팝업 )
  3. ------------------------------------------------------------------------------------------- **/
  4. function fGetZipCode(){
  5. zbcfOpenZipCodeList('', '', '/root/main/tab1/item/zipcd1', '/root/main/tab1/item/zipcd2',
  6. '/root/main/tab1/item/zipcdseq', '/root/main/tab1/item/addr');
  7. }
  8. /**
  9. *
  10. */
  11. function fSearchPatInfo() {
  12. var ipt_pid = model.getValue("/root/send/data/pid");
  13. //환자등록번호 체크
  14. if(ipt_pid.length >= 1 ){
  15. fGetPatInfo();
  16. }else{
  17. messageBox("환자등록번호를 정확히", "C001");
  18. btn_save.disabled = true;
  19. btn_del.disabled = true;
  20. model.setFocus("ipt_pid");
  21. }
  22. }
  23. /*---------------------------------------------------------------------------------------
  24. * 과거상담환자 조회
  25. ----------------------------------------------------------------------------------------*/
  26. function fGetPopLiverWait() {
  27. model.makeValue("/root/temp/receiveref/kind", model.getValue("/root/send/data/cnstkind"));
  28. modal("../../../ast/organtransplantweb/xrw/SPAVO02200", "","150", "150", "SPAVO02200", "/root/temp/receiveref", "/root/temp/receivedata/receiveref");
  29. }
  30. function fSetPopTrnptPatBaseInfo() {
  31. model.setValue("/root/send/data/pid", model.getValue("/root/temp/receiveref/pid") );
  32. fSearchPatInfo();
  33. }
  34. /**--------------------------------------------------------------------------------------------
  35. * 대기자 정보조회
  36. ------------------------------------------------------------------------------------------------*/
  37. function fGetPatInfo() {
  38. model.setValue("/root/main/popupendflag", "");
  39. model.resetInstanceNode("/root/reqData");
  40. if(submit("TRAVO36001")) {
  41. if( getNodesetCount("/root/main/tab1/item") > 0 ){
  42. //신규일경우
  43. var iuflag = model.getValue("/root/main/tab1/item/iuflag");
  44. if(model.getValue("/root/main/tab1/item/pid") == "") {
  45. messageBox("없는 환자 번호", "I009");
  46. } else if(iuflag== "" || iuflag == "I") {
  47. messageBox("신규자료", "I009");
  48. }
  49. model.makeNode("/root/main/patinfo/item");
  50. model.copyNode("/root/main/patinfo/item", "/root/main/tab1/item");
  51. model.makeValue("/root/main/popupendflag", "ok");
  52. if (model.getValue("/root/main/tab1/item/iuflag") == "I"){
  53. btn_save.disabled = false;
  54. btn_del.disabled = true;
  55. }else{
  56. btn_save.disabled = false;
  57. btn_del.disabled = false;
  58. }
  59. }else{
  60. model.resetInstanceNode("/root/main/tab1");
  61. messageBox("없는 환자 번호 입니다.", "E999", "");
  62. model.resetInstanceNode("/root/main/patinfo/item");
  63. btn_save.disabled = true;
  64. btn_del.disabled = true;
  65. model.setFocus("ipt_pid");
  66. }
  67. var Yn = model.getValue("/root/main/tab1/item/pasttrnptyn");
  68. if(Yn == "Y") {
  69. txt_pasttrnptrem.disabled = false;
  70. }else {
  71. txt_pasttrnptrem.disabled = true;
  72. }
  73. Yn = model.getValue("/root/main/tab1/item/pastdonatyn");
  74. if(Yn == "Y") {
  75. txt_pastdonatrem.disabled = false;
  76. }else {
  77. txt_pastdonatrem.disabled = true;
  78. }
  79. model.refresh();
  80. }
  81. }
  82. function readfunc() {
  83. var gb = model.getValue("/root/casegb/gb");
  84. var subID = "";
  85. switch(gb) {
  86. case "2": subID = "TRAVO36002";
  87. break;
  88. case "3": subID = "TRAVO36003";
  89. break;
  90. case "4": subID = "TRAVO36004";
  91. break;
  92. case "5": subID = "TRAVO36005";
  93. break;
  94. default: subID = "";
  95. resultNode = "";
  96. break;
  97. }
  98. if (submit(subID)){
  99. //fSearch는 인적사항 화면을 임포트 해간 화면에서 구현해 주어야 하는 함수이다.
  100. if( getNodesetCount("/root/main/tab"+gb+"/item") > 0 ){
  101. }
  102. }
  103. }
  104. /**------------------------------------------------------------------------------------------------
  105. * 대기자 정보 저장
  106. ---------------------------------------------------------------------------------------------------*/
  107. function fSavePatInfo() {
  108. var gb = "1";
  109. model.copyNode("/root/send/data1", "/root/main/tab"+gb+"/item");
  110. model.makeValue("/root/send/data1/pid", model.getValue("/root/send/data/pid"));
  111. model.makeValue("/root/send/data1/cnstkind", model.getValue("/root/send/data/cnstkind"));
  112. var subID = "";
  113. //등록번호체크
  114. //등록일 필수 등록
  115. if(model.getValue("/root/main/tab1/item/rgstdd") == "") {
  116. messageBox("등록일은", "I003");
  117. model.setFocus("input3");
  118. return false;
  119. }
  120. //주민번호 구분저장
  121. var rrgstno = model.getValue("/root/main/tab1/item/rrgstno");
  122. if(rrgstno != "") {
  123. var rrgstno1 = rrgstno.substr(0, 6);
  124. var rrgstno2 = rrgstno.substr(6, rrgstno.lastIndex);
  125. model.makeValue("/root/send/data1/rrgstno1", rrgstno1);
  126. model.makeValue("/root/send/data1/rrgstno2", rrgstno2);
  127. }
  128. var nodeList = instance1.selectNodes("/root/main/tab2/item");
  129. var rCSV = getNodeListCSV(nodeList);
  130. model.makeValue("/root/send/data1/tab2", rCSV);
  131. nodeList = instance1.selectNodes("/root/main/tab3/item");
  132. rCSV = getNodeListCSV(nodeList);
  133. model.makeValue("/root/send/data1/tab3", rCSV);
  134. nodeList = instance1.selectNodes("/root/main/tab4/item");
  135. rCSV = getNodeListCSV(nodeList);
  136. model.makeValue("/root/send/data1/tab4", rCSV);
  137. nodeList = instance1.selectNodes("/root/main/tab5/item");
  138. rCSV = getNodeListCSV(nodeList);
  139. model.makeValue("/root/send/data1/tab5", rCSV);
  140. nodeList = instance1.selectNodes("/root/main/tab2/rsltlist");
  141. rCSV = getNodeListCSV(nodeList);
  142. model.makeValue("/root/send/data1/tab6", rCSV);
  143. subID = "TXAVO36001";
  144. /**
  145. model.copyNode("/root/send/data1", "/root/main/tab"+gb+"/item");
  146. model.makeValue("/root/send/data1/pid", model.getValue("/root/send/data/pid"));
  147. model.makeValue("/root/send/data1/cnstkind", model.getValue("/root/send/data/cnstkind"));
  148. var subID = "";
  149. if(gb == "1") {
  150. //등록번호체크
  151. //등록일 필수 등록
  152. if(model.getValue("/root/main/tab1/item/rgstdd") == "") {
  153. messageBox("등록일은", "I003");
  154. model.setFocus("input3");
  155. return false;
  156. }
  157. //주민번호 구분저장
  158. var rrgstno = model.getValue("/root/main/tab1/item/rrgstno");
  159. if(rrgstno != "") {
  160. var rrgstno1 = rrgstno.substr(0, 6);
  161. var rrgstno2 = rrgstno.substr(6, rrgstno.lastIndex);
  162. model.makeValue("/root/send/data1/rrgstno1", rrgstno1);
  163. model.makeValue("/root/send/data1/rrgstno2", rrgstno2);
  164. }
  165. subID = "TXAVO36001";
  166. }else if(gb == "2") {
  167. if(model.getValue("/root/send/data/cnstkind") == "LI") {
  168. model.duplicate("/root/send/data1", "/root/main/tab2/rsltlist");
  169. }
  170. subID = "TXAVO36003";
  171. }else if(gb == "3") {
  172. subID = "TXAVO36004";
  173. }else if(gb == "4") {
  174. subID = "TXAVO36005";
  175. }else if(gb == "5") {
  176. subID = "TXAVO36006";
  177. }
  178. */
  179. if(submit(subID)) {
  180. fGetPatInfo();
  181. }
  182. }
  183. /**-----------------------------------------------------------------------------------------------
  184. *
  185. -------------------------------------------------------------------------------------------------*/
  186. function fDelPatInfo() {
  187. var iuflag = model.getValue("/root/main/tab1/item/iuflag");
  188. if (iuflag == "I") {
  189. messageBox("삭제 할 자료가", "I004");
  190. } else {
  191. var msg = messageBox("", "Q001");
  192. if(msg == 6) {
  193. model.makeValue("/root/send/data1/pid", model.getValue("/root/send/data/pid"));
  194. model.makeValue("/root/send/data1/cnstkind", model.getValue("/root/send/data/cnstkind"));
  195. model.makeValue("/root/send/data1/iuflag", "D");
  196. if(submit("TXAVO36001")) {
  197. model.reset();
  198. model.refresh();
  199. }
  200. }
  201. }
  202. }