SPMRJ00300.js 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. /* ---------------------------------------------------------------------
  2. 다학제간환자교육정보통합조회 (SMMRJ00200_다학제간환자교육정보통합조회.xrw - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. : Create By taebum
  6. : 2009-12-07 오전 10:05:51
  7. ---------------------------------------------------------------------- */
  8. /* --------------------------------------------------*/
  9. /* type : function */
  10. /* access : public */
  11. /* desc : xforms-ready시 수행한다 */
  12. /* return : */
  13. /* --------------------------------------------------*/
  14. function fInit() {
  15. var vPid ="";
  16. var vOrddd ="";
  17. var vCretno ="";
  18. if (isPopup()) {
  19. vPid = opener.javascript.getParameter("SPMRJ00300_pid");
  20. vOrddd = opener.javascript.getParameter("SPMRJ00300_orddd");
  21. vCretno = opener.javascript.getParameter("SPMRJ00300_cretno");
  22. group1.disabled = "true";
  23. group2.disabled = "true";
  24. btn_close.visible = "true";
  25. }else
  26. {
  27. // vPid = getParameter("SPMRJ00300_pid");
  28. // vOrddd = getParameter("SPMRJ00300_orddd");
  29. // vCretno = getParameter("SPMRJ00300_cretno");
  30. vPid = opener.javascript.getParameter("SPMRJ00300_pid");
  31. vOrddd = opener.javascript.getParameter("SPMRJ00300_orddd");
  32. vCretno = opener.javascript.getParameter("SPMRJ00300_cretno");
  33. }
  34. // 임시 처리
  35. //alert("임시로 인자값 세팅함");
  36. // vPid = "74";
  37. // vOrddd = "20071204";
  38. // vCretno = "800337293";
  39. if((vPid== "")||(vOrddd=="")||(vCretno=="")){
  40. alert("전달 인자값이 누락되었습니다.!");
  41. return;
  42. }
  43. model.makeValue("/root/init/pinfo/pid", vPid);
  44. model.makeValue("/root/init/pinfo/orddd", vOrddd);
  45. model.makeValue("/root/init/pinfo/cretno",vCretno);
  46. fSelectEducOrdList();
  47. }
  48. function fSelectEducOrdList(){
  49. model.makeValue("/root/send/pid", model.getValue("/root/init/pinfo/pid"));
  50. model.makeValue("/root/send/orddd", model.getValue("/root/init/pinfo/orddd"));
  51. model.makeValue("/root/send/cretno",model.getValue("/root/init/pinfo/cretno"));
  52. submit("TRMRJ00301"); // 입력화면으로 입력만 가능 하도록 처리 주석 풀면 조회하여 기존 데어터도 처리 가능
  53. fCheckOtherYn(ipt_eduwho9 ,chk_eduwho9.value);
  54. fCheckOtherYn(ipt_eduhandcap9 ,chk_eduhandcap9ck.value);
  55. fCheckOtherYn(ipt_eduway9 ,chk_eduway9ck.value);
  56. fCheckOtherYn(ipt_eduneed9 ,chk_eduneed9ck.value);
  57. fCheckOtherYn(ipt_descprocer9 ,chk_descprocer9ck.value);
  58. fCheckOtherYn(ipt_descplace9 ,chk_descplace9ck.value);
  59. fCheckOtherYn(ipt_descfcstneed9 ,chk_descfcstneed9ck.value);
  60. if(rdo_eduwill.value== "999"){
  61. fCheckOtherYn(ipt_eduwill9,"Y");
  62. }else{
  63. fCheckOtherYn(ipt_eduwill9,"N");
  64. }
  65. fRdoEduHandCapyn();
  66. }
  67. function fRdoEduHandCapyn(){
  68. if(rdo_eduhandcapyn.value=="N"){
  69. chk_eduhandcap1.value = "N";
  70. chk_eduhandcap1.disabled = "true";
  71. chk_eduhandcap2.value = "N";
  72. chk_eduhandcap2.disabled = "true";
  73. chk_eduhandcap3.value = "N";
  74. chk_eduhandcap3.disabled = "true";
  75. chk_eduhandcap4.value = "N";
  76. chk_eduhandcap4.disabled = "true";
  77. chk_eduhandcap5.value = "N";
  78. chk_eduhandcap5.disabled = "true";
  79. chk_eduhandcap6.value = "N";
  80. chk_eduhandcap6.disabled = "true";
  81. chk_eduhandcap9ck.value = "N";
  82. chk_eduhandcap9ck.disabled = "true";
  83. fCheckOtherYn(ipt_eduhandcap9,"N");
  84. }else{
  85. chk_eduhandcap1.disabled = "false";
  86. chk_eduhandcap2.disabled = "false";
  87. chk_eduhandcap3.disabled = "false";
  88. chk_eduhandcap4.disabled = "false";
  89. chk_eduhandcap5.disabled = "false";
  90. chk_eduhandcap6.disabled = "false";
  91. chk_eduhandcap9ck.disabled = "false";
  92. fCheckOtherYn(ipt_eduhandcap9,chk_eduhandcap9ck.value);
  93. }
  94. }
  95. function fCheckOtherYn(ipt, param){
  96. if(param=="Y"){
  97. ipt.visible = true;
  98. }else{
  99. ipt.visible = false;
  100. ipt.value = "";
  101. }
  102. }
  103. function fSave(){
  104. if (group1.visible){ // 교육요구도 사정 필수 체크
  105. if(!(chk_eduwho1.value == "Y" || chk_eduwho2.value == "Y" || chk_eduwho9.value == "Y")){
  106. messageBox("교육요구 항목이 누락 되었습니다.","I003");
  107. return;
  108. }
  109. if(chk_eduwho9.value == "Y" && ipt_eduwho9.value.getTrim() == "") { // 기타 항목 체크
  110. messageBox("교육요구의 기타 항목이 누락 되었습니다.","I003");
  111. return;
  112. }
  113. if(rdo_eduwill.value == ""){
  114. messageBox("교육에 대한 의지 항목이 누락 되었습니다.","I003");
  115. return;
  116. }
  117. if(rdo_eduwill.value == "999" && ipt_eduwill9.value.getTrim() == ""){ // 기타 항목 체크
  118. messageBox("교육에 대한 의지의 기타 항목이 누락 되었습니다.","I003");
  119. return;
  120. }
  121. if((rdo_eduhandcapyn.value == "Y")&&!(chk_eduhandcap1.value == "Y" || chk_eduhandcap2.value == "Y" || chk_eduhandcap3.value == "Y" || chk_eduhandcap4.value == "Y" || chk_eduhandcap5.value == "Y" || chk_eduhandcap6.value == "Y" || chk_eduhandcap9ck.value == "Y")){
  122. messageBox("교육 장애요인 항목이 누락 되었습니다.","I003");
  123. return;
  124. }
  125. if(chk_eduhandcap9ck.value == "Y" && ipt_eduhandcap9.value.getTrim() == ""){ // 기타 항목 체크
  126. messageBox("교육 장애요인의 기타 항목이 누락 되었습니다.","I003");
  127. return;
  128. }
  129. if(!(chk_eduway1.value == "Y" || chk_eduway2.value == "Y" || chk_eduway3.value == "Y" || chk_eduway4.value == "Y" || chk_eduway5.value == "Y" || chk_eduway9ck.value == "Y")){
  130. messageBox("교육방법 항목이 누락 되었습니다.","I003");
  131. return;
  132. }
  133. if(chk_eduway9ck.value == "Y"&& ipt_eduway9.value.getTrim() == ""){ // 기타 항목 체크
  134. messageBox("교육방법의 기타 항목이 누락 되었습니다.","I003");
  135. return;
  136. }
  137. if(!(chk_eduneed1.value == "Y" || chk_eduneed2.value == "Y" || chk_eduneed3.value == "Y" || chk_eduneed4.value == "Y" || chk_eduneed9ck.value == "Y")){
  138. messageBox("원하는 교육 내용 항목이 누락 되었습니다.","I003");
  139. return;
  140. }
  141. if(chk_eduneed9ck.value == "Y" && ipt_eduneed9.value.getTrim() == ""){ // 기타 항목 체크
  142. messageBox("원하는 교육 내용의 기타 항목이 누락 되었습니다.","I003");
  143. return;
  144. }
  145. }
  146. if (group2.visible){ // 퇴원계획 요구도 사정 필수 체크
  147. if(!(chk_descprocer1.value == "Y" || chk_descprocer2.value == "Y" || chk_descprocer3.value == "Y" || chk_descprocer4.value == "Y" || chk_descprocer5.value == "Y" || chk_descprocer6.value == "Y" || chk_descprocer7.value == "Y" || chk_descprocer8.value == "Y" || chk_descprocer9ck.value == "Y")){
  148. messageBox("퇴원 후 주 보호자 항목이 누락 되었습니다.","I003");
  149. return;
  150. }
  151. if(chk_descprocer9ck.value == "Y" && ipt_descprocer9.value.getTrim() == ""){
  152. messageBox("퇴원 후 주 보호자의 기타 항목이 누락 되었습니다.","I003");
  153. return;
  154. }
  155. if(!(chk_descplace1.value == "Y" || chk_descplace2.value == "Y" || chk_descplace3.value == "Y" || chk_descplace4.value == "Y" || chk_descplace5.value == "Y" || chk_descplace9ck.value == "Y")){
  156. messageBox("퇴원예정지 항목이 누락 되었습니다.","I003");
  157. return;
  158. }
  159. if(chk_descplace9ck.value == "Y" && ipt_descplace9.value.getTrim() == ""){
  160. messageBox("퇴원예정지의 기타 항목이 누락 되었습니다.","I003");
  161. return;
  162. }
  163. if(!(chk_descfcstneed1.value == "Y" || chk_descfcstneed2.value == "Y" || chk_descfcstneed3.value == "Y" || chk_descfcstneed4.value == "Y" || chk_descfcstneed5.value == "Y" || chk_descfcstneed6.value == "Y" || chk_descfcstneed9ck.value == "Y")){
  164. messageBox("예상되는 퇴원 시 요구내용 항목이 누락 되었습니다.","I003");
  165. return;
  166. }
  167. if(chk_descfcstneed9ck.value == "Y" && ipt_descfcstneed9.value.getTrim() == ""){
  168. messageBox("예상되는 퇴원 시 요구내용의 기타 항목이 누락 되었습니다.","I003");
  169. return;
  170. }
  171. }
  172. if(submit("TXMRJ00301")){
  173. fSelectEducOrdList();
  174. }else{
  175. messageBox("교육요구도 저장이 실패하였습니다.", "E");
  176. return false;
  177. }
  178. return true;
  179. }
  180. function fClose(){
  181. window.close();
  182. }