SMMND03100.xjs 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Script type ="xscript4.0"><![CDATA[/*
  3. 처방정보조회 (SMMND03100.xrw - JScript )
  4. - Version :
  5. 1) : Ver.1.00.01
  6. */
  7. /**
  8. * _group :
  9. * _ver : 2007.06.30
  10. * _by : 김진아
  11. * _---------------------------------------------------
  12. * _type : function
  13. * _access : public
  14. * _desc : 화면 초기화
  15. * _param :
  16. * _return :
  17. * _---------------------------------------------------
  18. */
  19. function fDone(){
  20. //** 처방조회일자 초기화 **//
  21. var sCurrentDate = utlf_getCurrentDate();
  22. var currentDate = new Date();
  23. /*
  24. var year = sCurrentDate.substr(0,4);
  25. var month = sCurrentDate.substr(4,2);
  26. with(new Date(year, month, 1, 12)) { //MM = 1 .. 12
  27. setDate(0);
  28. var lstdate = getDate(); //해당월의 마지막 일
  29. }
  30. */
  31. // ds_main_condition.setColumn( 0, "prcpfromdd", getDateCalc(sCurrentDate, 30));
  32. ds_main_condition.setColumn( 0, "prcptodd" , sCurrentDate);
  33. //20150206 by kya 시작일자를 종료일자와 동일하도록 수정
  34. //ds_main_condition.setColumn( 0, "prcpfromdd", ((currentDate.getAddDate(-1, "M"))).getDateFormat());
  35. ds_main_condition.setColumn( 0, "prcpfromdd" , sCurrentDate);
  36. //** **//
  37. ds_main_condition.setColumn( 0, "pid" , ds_temp.getColumn(0, "pid"));
  38. ds_main_condition.setColumn( 0, "prcpflag", ds_temp.getColumn(0, "prcpflag"));
  39. ds_main_condition.setColumn( 0, "ioflag" , ds_temp.getColumn(0, "ioflag"));
  40. ds_main_condition.setColumn( 0, "indd" , ds_temp.getColumn(0, "indd"));
  41. //** 그리드 초기화 **//
  42. ds_main_prcplist.clearData(); // 처방정보 리스트 초기화
  43. //처치및투약일경우 투약번호컬럼 visible, 임상검사일경우 상태컬럼visible-20091015-kys추가
  44. var prcpflag = ds_main_condition.getColumn(0, "prcpflag");
  45. if(prcpflag == "cruedrug") { // 처치 및 투약
  46. grd_prcpinfo.colHidden(grd_prcpinfo.colRef("drugno")) = false; //투약번호
  47. grd_prcpinfo.colHidden(grd_prcpinfo.colRef("prcpstatnm")) = true; //상태
  48. }else if (prcpflag == "nbpsinsp") { // 임상검사`
  49. grd_prcpinfo.colHidden(grd_prcpinfo.colRef("drugno")) = true; //투약번호
  50. grd_prcpinfo.colHidden(grd_prcpinfo.colRef("prcpstatnm")) = false; //상태
  51. }
  52. //model.refresh();
  53. }
  54. /**
  55. * _group :
  56. * _ver : 2007.06.30
  57. * _by : 김진아
  58. * _---------------------------------------------------
  59. * _type : function
  60. * _access : public
  61. * _desc : 처치 및 투약 / 임상검사 처방정보조회
  62. * _param :
  63. * _return :
  64. * _---------------------------------------------------
  65. */
  66. function fSrchPrcp(){
  67. ds_send.clearData();
  68. dsf_makeValue( ds, "send", "string", "" );
  69. dsf_makeValue( ds_send_reqdata, "pid", "string", ds_main_condition.getColumn(0, "pid")); // 등록번호
  70. dsf_makeValue( ds_send_reqdata, "ioflag", "string", ds_main_condition.getColumn(0, "ioflag")); // 입원외래구분
  71. dsf_makeValue( ds_send_reqdata, "prcpflag", "string", ds_main_condition.getColumn(0, "prcpflag")); // 처방구분 ( cruedrug:처치 및 투약 / nbpsinsp:임상검사 )
  72. dsf_makeValue( ds_send_reqdata, "prcpfromdd", "string", ds_main_condition.getColumn(0, "prcpfromdd")); // 처방조회시작일자
  73. dsf_makeValue( ds_send_reqdata, "prcptodd", "string", ds_main_condition.getColumn(0, "prcptodd")); // 처방조회종료일자
  74. dsf_makeValue( ds_send_reqdata, "indd", "string", ds_main_condition.getColumn(0, "indd")); // 입원일자
  75. ds_main_prcplist.clearData(); // 처방정보 리스트 초기화
  76. // submit("TRMND03101");
  77. var oParam = {};
  78. oParam.id = "TRMND03101";
  79. oParam.service = "dialapp.DialRec";
  80. oParam.method = "reqGetPrcpInfo";
  81. oParam.inds = "req=ds_";
  82. oParam.outds = "ds_=prcpinfo";
  83. oParam.async = false;
  84. oParam.callback = "cf_TRMND03101";
  85. tranf_submit(oParam);
  86. /*
  87. function cf_TRMND03101(sSvcId, nErrorCode, sErrorMsg) {
  88. if(nErrorCode < 0) return;
  89. }
  90. function cf_TRMND03101(sSvcId, nErrorCode, sErrorMsg) {
  91. arErrorCode.push(sSvcId, nErrorCode);
  92. }
  93. arErrorCode.pop("TRMND03101") > -1
  94. arErrorCode.pop("TRMND03101") < 0
  95. */
  96. }
  97. ]]></Script>