SMMQR01600.js 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. /**
  2. * @---------------------------------------------------
  3. * @desc : HWCI 응급실재방문 -초기화
  4. * @param :
  5. * @return :
  6. * @---------------------------------------------------
  7. */
  8. function fInitialize(){
  9. zbcfGetCodeList(new Array("M0461", "M0462", "M0463", "M0466", "M0452"),
  10. new Array("/root/init/mainsympcd", "/root/init/revisitresncd", "/root/init/nonplanresncd", "/root/init/dschresncd", "/root/init/cpryncd"),
  11. true);
  12. var screenID = parent.window.javascript.getScreenID();
  13. if(screenID == "SMMQR02300"){
  14. btn_rgst.visible = false;
  15. btn_del.visible = false;
  16. }
  17. model.refresh();
  18. }
  19. /**
  20. * @---------------------------------------------------
  21. * @desc : HWCI 응급실재방문- 환자정보조회
  22. * @param :
  23. * @return :
  24. * @---------------------------------------------------
  25. */
  26. function fGetPatInfo(pid, indd, cretno, seqno, inptno){
  27. //조회에 필요한 조건들을 send에복사
  28. model.setValue("/root/send/patinfo/pid", pid);
  29. model.setValue("/root/send/patinfo/indd", indd);
  30. model.setValue("/root/send/patinfo/cretno", cretno);
  31. model.setValue("/root/send/patinfo/seqno", seqno);
  32. model.setValue("/root/send/patinfo/inptno", inptno);
  33. model.setValue("/root/send/patinfo/kind", model.getValue("/root/main/cond/kind"));
  34. //기존 데이터를 삭제
  35. model.removenode("/root/tmp/cond/patinfO");
  36. model.removenode("/root/tmp/cond/fst");
  37. model.removenode("/root/tmp/cond/scd");
  38. model.resetInstanceNode("/root/main/cond");
  39. model.removenode("/root/main/fst");
  40. model.removenode("/root/main/scd");
  41. model.makeNode("/root/main/fst");
  42. model.makeNode("/root/main/scd");
  43. model.removeNodeset("/root/main/valuColleague/row");
  44. if(inptno != ""){ //입력된 내용을 조회
  45. submit("TRMQR01201");
  46. copyNodeType("/root/main/cond", "/root/tmp/cond/patinfo", "replace");
  47. submit("TRMQR01200"); //환자 진료정보 불러오기
  48. copyNodeType("/root/main/fst", "/root/tmp/cond/fst", "replace");
  49. copyNodeType("/root/main/scd", "/root/tmp/cond/scd", "replace");
  50. submit("TRMQR02600");
  51. }
  52. else{ //ocs data조회
  53. submit("TRMQR01200"); //환자 진료정보 불러오기
  54. copyNodeType("/root/main/cond", "/root/tmp/cond/patinfo", "replace");
  55. copyNodeType("/root/main/fst", "/root/tmp/cond/fst", "replace");
  56. copyNodeType("/root/main/scd", "/root/tmp/cond/scd", "replace");
  57. }
  58. //다음조회를 위해서 E로 다시 setting
  59. model.makeValue("/root/main/cond/kind", "E");
  60. SetVisible("tar_bfmainsympetccnts", "/root/main/cond/bfmainsympcd", "13");
  61. SetVisible("tar_orgmainsympetccnts", "/root/main/cond/orgmainsympcd", "13");
  62. fRevisitresn();
  63. model.refresh();
  64. }
  65. /**
  66. * @---------------------------------------------------
  67. * @desc : HWCI 응급실재방문 - 저장을 위해 부모창으로 Node복사
  68. * @param :
  69. * @return :
  70. * @---------------------------------------------------
  71. */
  72. function fSetDetlnfo(){
  73. if(!isRequiredControls("opt_pid")){
  74. return false;
  75. }
  76. copyNodeType("/root/send/recinfo", "/root/main/cond", "replace", parent);
  77. parent.model.makeValue("/root/send/recinfo/fstinfo", grd_fst.getUpdateDataAll("s"));
  78. parent.model.makeValue("/root/send/recinfo/scdinfo", grd_scd.getUpdateDataAll("s"));
  79. parent.model.makeValue("/root/send/recinfo/valucolleague", getGridUpdateData(grd_valu));
  80. return true;
  81. }
  82. /**
  83. * @---------------------------------------------------
  84. * @desc : HWCI 응급실재방문 - 재입원사유 ComboBox Display 설정
  85. * @param :
  86. * @return :
  87. * @---------------------------------------------------
  88. */
  89. function fRevisitresn(){
  90. var fst = model.getValue("/root/main/cond/revisitresncd");
  91. var scd = model.getValue("/root/main/cond/nonplanresncd");
  92. var trd = model.getValue("/root/main/cond/nonplanresnscndcd");
  93. if(fst == "01"){
  94. cmb_nonplanresncd.visible = false;
  95. cmb_nonplanresnscndcd.visible = false;
  96. tar_revisitcnts.disabled = false;
  97. }
  98. else if(fst == "02"){
  99. cmb_nonplanresncd.visible = true;
  100. tar_revisitcnts.disabled = true;
  101. if(scd == "01"){
  102. model.removeNodeset("/root/init/nonplanresnscndcd/M0464");
  103. zbcfGetCodeList(new Array("M0464"), new Array("/root/init/nonplanresnscndcd"), true);
  104. cmb_nonplanresnscndcd.choices.itemset.attribute("nodeset") = "/root/init/nonplanresnscndcd/M0464";
  105. cmb_nonplanresnscndcd.visible = true;
  106. tar_revisitcnts.disabled = true;
  107. if(trd == "04"){
  108. tar_revisitcnts.disabled = false;
  109. }
  110. else{
  111. tar_revisitcnts.disabled = true;
  112. }
  113. }
  114. else if(scd == "02"){
  115. model.removeNodeset("/root/init/nonplanresnscndcd/M0465");
  116. zbcfGetCodeList(new Array("M0465"), new Array("/root/init/nonplanresnscndcd"), true);
  117. cmb_nonplanresnscndcd.choices.itemset.attribute("nodeset") = "/root/init/nonplanresnscndcd/M0465";
  118. cmb_nonplanresnscndcd.visible = true;
  119. tar_revisitcnts.disabled = true;
  120. if(trd == "04"){
  121. tar_revisitcnts.disabled = false;
  122. }
  123. else{
  124. tar_revisitcnts.disabled = true;
  125. }
  126. }
  127. else if(scd == "06"){
  128. cmb_nonplanresnscndcd.visible = false;
  129. tar_revisitcnts.disabled = false;
  130. }
  131. else{
  132. cmb_nonplanresnscndcd.visible = false;
  133. tar_revisitcnts.disabled = true;
  134. }
  135. }
  136. else{
  137. cmb_nonplanresncd.visible = false;
  138. cmb_nonplanresnscndcd.visible = false;
  139. tar_revisitcnts.disabled = true;
  140. }
  141. model.refresh();
  142. }