SMMND03100.js 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. 처방정보조회 (SMMND03100.xrw - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. */
  6. /**
  7. * @group :
  8. * @ver : 2007.06.30
  9. * @by : 김진아
  10. * @---------------------------------------------------
  11. * @type : function
  12. * @access : public
  13. * @desc : 화면 초기화
  14. * @param :
  15. * @return :
  16. * @---------------------------------------------------
  17. */
  18. function fDone(){
  19. //** 처방조회일자 초기화 **//
  20. var sCurrentDate = getCurrentDate();
  21. var currentDate = new Date();
  22. /*
  23. var year = sCurrentDate.substr(0,4);
  24. var month = sCurrentDate.substr(4,2);
  25. with(new Date(year, month, 1, 12)) { //MM = 1 .. 12
  26. setDate(0);
  27. var lstdate = getDate(); //해당월의 마지막 일
  28. }
  29. */
  30. // model.setValue("/root/main/condition/prcpfromdd", getDateCalc(sCurrentDate, 30));
  31. model.setValue("/root/main/condition/prcptodd" , sCurrentDate);
  32. //20150206 by kya 시작일자를 종료일자와 동일하도록 수정
  33. //model.setValue("/root/main/condition/prcpfromdd", ((currentDate.getAddDate(-1, "M"))).getDateFormat());
  34. model.setValue("/root/main/condition/prcpfromdd" , sCurrentDate);
  35. //** **//
  36. model.setValue("/root/main/condition/pid" , model.getValue("/root/temp/pid" ));
  37. model.setValue("/root/main/condition/prcpflag", model.getValue("/root/temp/prcpflag"));
  38. model.setValue("/root/main/condition/ioflag" , model.getValue("/root/temp/ioflag" ));
  39. model.setValue("/root/main/condition/indd" , model.getValue("/root/temp/indd" ));
  40. //** 그리드 초기화 **//
  41. model.removeNodeset("/root/main/prcplist"); // 처방정보 리스트 초기화
  42. //처치및투약일경우 투약번호컬럼 visible, 임상검사일경우 상태컬럼visible-20091015-kys추가
  43. var prcpflag = model.getValue("/root/main/condition/prcpflag");
  44. if(prcpflag == "cruedrug") { // 처치 및 투약
  45. grd_prcpinfo.colHidden(grd_prcpinfo.colRef("drugno")) = false; //투약번호
  46. grd_prcpinfo.colHidden(grd_prcpinfo.colRef("prcpstatnm")) = true; //상태
  47. }else if (prcpflag == "nbpsinsp") { // 임상검사`
  48. grd_prcpinfo.colHidden(grd_prcpinfo.colRef("drugno")) = true; //투약번호
  49. grd_prcpinfo.colHidden(grd_prcpinfo.colRef("prcpstatnm")) = false; //상태
  50. }
  51. model.refresh();
  52. }
  53. /**
  54. * @group :
  55. * @ver : 2007.06.30
  56. * @by : 김진아
  57. * @---------------------------------------------------
  58. * @type : function
  59. * @access : public
  60. * @desc : 처치 및 투약 / 임상검사 처방정보조회
  61. * @param :
  62. * @return :
  63. * @---------------------------------------------------
  64. */
  65. function fSrchPrcp(){
  66. model.removenode("/root/send");
  67. model.makeNode("/root/send");
  68. model.makeValue("/root/send/reqdata/pid" , model.getValue("/root/main/condition/pid" )); // 등록번호
  69. model.makeValue("/root/send/reqdata/ioflag" , model.getValue("/root/main/condition/ioflag" )); // 입원외래구분
  70. model.makeValue("/root/send/reqdata/prcpflag" , model.getValue("/root/main/condition/prcpflag" )); // 처방구분 ( cruedrug:처치 및 투약 / nbpsinsp:임상검사 )
  71. model.makeValue("/root/send/reqdata/prcpfromdd", model.getValue("/root/main/condition/prcpfromdd")); // 처방조회시작일자
  72. model.makeValue("/root/send/reqdata/prcptodd" , model.getValue("/root/main/condition/prcptodd" )); // 처방조회종료일자
  73. model.makeValue("/root/send/reqdata/indd" , model.getValue("/root/main/condition/indd" )); // 입원일자
  74. model.removeNodeset("/root/main/prcplist"); // 처방정보 리스트 초기화
  75. submit("TRMND03101");
  76. }