SMMND02900.js 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. /*
  2. 복막투석 유지환자 등록(SMMND02900.xrw - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. */
  6. /**
  7. * @group :
  8. * @ver : 2007.05.16
  9. * @by : 김진아
  10. * @---------------------------------------------------
  11. * @type : function
  12. * @access : public
  13. * @desc : 등록번호로 환자를 검색한다.(예약생성시)
  14. * @param :
  15. * @return : 환자명, 환자주민등록번호, 입원외래구분
  16. * @---------------------------------------------------
  17. */
  18. function fSrchPat()
  19. {
  20. model.removenode("/root/send");
  21. model.makeNode("/root/send");
  22. model.makeValue("/root/send/reqdata/pid",model.getValue("/root/main/cretlist/cretinfo/pid"));
  23. model.makeValue("/root/send/reqdata/dialflag", "P");
  24. model.removeNodeset("/root/main/cretlist/getcreinfo");
  25. submit("TRMND02901"); //환자기본정보 및 입원내역테이블을 조회한다.
  26. if(model.getValue("/root/main/cretlist/getcreinfo/hngnm") == ""){
  27. messageBox("환자정보를 찾을 수", "I004", "");
  28. fInit(); // 초기화
  29. return;
  30. }else {
  31. if(model.getValue("/root/main/cretlist/getcreinfo/matndialflag") == "H"){
  32. messageBox("혈액투석 유지환자로 등록되어 있는 환자", "E008", "");
  33. fInit(); // 초기화
  34. return;
  35. }
  36. /*
  37. if(model.getValue("/root/main/cretlist/getcreinfo/prcpfalg") != "Y") { // 지시처방이 없는 경우
  38. messageBox("지시처방이 존재 하지 않습니다.", "E", "복막투석 유지환자 등록을 할 수 없습니다.");
  39. fInit(); // 초기화
  40. return;
  41. }
  42. */
  43. }
  44. }
  45. /**
  46. * @group :
  47. * @ver : 2007.05.16
  48. * @by : 김진아
  49. * @---------------------------------------------------
  50. * @type : function
  51. * @access : public
  52. * @desc : 복막투석 환자 유지환자에 저장
  53. * @param :
  54. * @return :
  55. * @---------------------------------------------------
  56. */
  57. function fSaveMatn()
  58. {
  59. if(model.getValue("/root/main/cretlist/getcreinfo/matndialflag") == "H"){
  60. messageBox("혈액투석 유지환자로 등록되어 있는 환자", "E008", "");
  61. fInit();
  62. } else {
  63. if(model.getValue("/root/main/cretlist/cretinfo/pid") == "") {
  64. messageBox("등록번호는", "I003", "");
  65. return;
  66. }
  67. if(model.getValue("/root/main/cretlist/getcreinfo/hngnm")=="") {
  68. messageBox("환자기본 정보 조회 수행을 하지", "E007", "(등록번호 입력 후 엔터키를 누르십시오.)");
  69. return;
  70. }
  71. if(model.getValue("/root/main/cretlist/getcreinfo/matnflag") != "1"){ //유지구분(1:유지)
  72. model.removenode("/root/send");
  73. model.makeNode("/root/send");
  74. model.makeValue("/root/send/savedata/pid",model.getValue("/root/main/cretlist/cretinfo/pid"));
  75. model.makeValue("/root/send/savedata/status", "i"); //상태값 지정(insert)
  76. model.makeValue("/root/send/savedata/dialflag", "P");
  77. model.makeValue("/root/send/savedata/rsrvcnts", "");
  78. if(submit("TXMND02901") == true){ //복막투석 유지환자 등록
  79. messageBox("유지환자관리 등록이 ", "I001", "간호정보조사지를 작성하십시오.");
  80. model.close();
  81. }
  82. }else if(model.getValue("/root/main/cretlist/getcreinfo/matnflag") == "1"){
  83. messageBox("이미 유지환자에 등록 되어있는 환자", "E008", "");
  84. fInit();
  85. }
  86. }
  87. }
  88. /**
  89. * @group :
  90. * @ver : 2007.06.30
  91. * @by : 김진아
  92. * @---------------------------------------------------
  93. * @type : function
  94. * @access : public
  95. * @desc : 컨트롤 초기화
  96. * @param :
  97. * @return :
  98. * @---------------------------------------------------
  99. */
  100. function fInit(){
  101. if(getNodesetCount("/root/main/cretlist/cretinfo")>0){
  102. fClearChildNode("/root/main/cretlist/cretinfo");
  103. }
  104. if(getNodesetCount("/root/main/cretlist/getcreinfo")>0){
  105. fClearChildNode("/root/main/cretlist/getcreinfo");
  106. }
  107. model.refresh();
  108. }
  109. function fUseridPopup(pPath, pNodeID, pNodeNM, pNodeRrgsNo1, pNodeRrgsNo2, pDOC) {
  110. model.removeNodeset("/root/properties/parameters/SendData/SendDatavalue");
  111. modal("SMMNE03700", 1, event.screenX-100, event.screenY-100, "SMMNE03700", "/root/main/cretlist/cretinfo/pid", "/root/init/searchitem");
  112. var pParam = model.getValue("/root/properties/parameters/SendData/SendDatavalue");
  113. var pParamValue = pParam.split("|");
  114. model.setValue("/root/main/cretlist/cretinfo/pid", pParamValue[0]);
  115. ipt_pid.refresh();
  116. }