SMMNW03.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. /**
  2. * @desc : 간호파트 전자동의서 처리 공통 모듈
  3. * @param : pid, cretno, indd, instcd, formcd, rexnm
  4. * @return : 없음
  5. * @authur : 김지선 2013.03.14
  6. */
  7. function fElecPrint(pid, cretno, indd, instcd, formcd, ocrtag, rexnm) {
  8. var flag = "";
  9. if (rexnm.length > 1) { // Rex로 만들어지는 동의서의 경우에만 이미지로 전환
  10. //기존파일 삭제
  11. var fso, folderspec;
  12. folderspec = "c:\\report";
  13. fso = new ActiveXObject("Scripting.FileSystemObject");
  14. if (fso.FolderExists(folderspec)) {
  15. fso.DeleteFolder(folderspec);
  16. }
  17. var a = fso.CreateFolder(folderspec);
  18. var fileType = "jpeg"; //hwp, bmp, jpeg, pdf
  19. exeReportPreview(rexnm, "XMLSTR", "", "", "false", "false", fileType, pid+"_"+rexnm, "0", "true", "", "", "", "", "", "");
  20. setParameter("SSMRC03160_param_imgpath", folderspec);
  21. setParameter("SSMRC03160_param_signpageformcd","1300013787");
  22. setParameter("SSMRC03160_param_ocrtag", ocrtag);
  23. flag = "Q";
  24. } else {
  25. flag = rexnm;
  26. }
  27. setParameter("SSMRC03160_param_patid", pid);
  28. setParameter("SSMRC03160_param_cretno", cretno);
  29. setParameter("SSMRC03160_param_indate", indd);
  30. setParameter("SSMRC03160_param_instcd", instcd);
  31. setParameter("SSMRC03160_param_class", "I");
  32. setParameter("SSMRC03160_param_docucd", formcd);
  33. setParameter("SSMRC03160_param_cuser", getUserId());
  34. setParameter("SSMRC03160_param_flag", flag);
  35. setParameter("SSMRC03160_param_tmflag", "N");
  36. open("SSMRC03160");
  37. //---------------------------------------------
  38. }
  39. function fClickPrintBtn(formcd, elecflag) {
  40. var pid = model.getValue("/root/temp/cond/list/pid");
  41. var cretno = model.getValue("/root/temp/cond/list/cretno");
  42. var indd = model.getValue("/root/temp/cond/list/indd");
  43. var ocrtag = "" ;
  44. model.makeValue("/root/send/req/formcd", formcd);
  45. model.makeValue("/root/send/req/pid", pid);
  46. model.makeValue("/root/send/req/cretno", cretno);
  47. model.makeValue("/root/send/req/orddd", indd);
  48. if (elecflag == "Y") { // 전자 동의서의 경우 무조건 신규 출력 2013.04.08 KJS
  49. fPrintDschInfo("newprint", ocrtag, elecflag);
  50. } else { // 출력 동의서의 경우 규칙에 따라 (출력 유무, 스캔 유무에 따라 신규출력 or 재출력)
  51. if (submit("TRMNW15101") == true){
  52. if(getNodesetCount("/root/duplocrprnt/msginfo/list") > 0 ) { // 출력했던 건인 경우
  53. if(model.getValue("/root/duplocrprnt/msginfo/list/scanyn") == "N"){ // 스캔된건이 없는경우
  54. if(model.getValue("/root/duplocrprnt/msginfo/list/statcd") == "D" || model.getValue("/root/duplocrprnt/msginfo/list/statcd") == "CP"){ // 삭제/출력취소 된 건인 경우
  55. //신규출력
  56. fPrintDschInfo("newprint", ocrtag, elecflag);
  57. }else{
  58. // 재출력
  59. ocrtag = model.getValue("/root/duplocrprnt/msginfo/list/ocrtag");
  60. fPrintDschInfo("reprint", ocrtag, elecflag);
  61. }
  62. }else if(model.getValue("/root/duplocrprnt/msginfo/list/scanyn") == "Y"){ // 스캔된건이 있는경우
  63. //신규출력
  64. var rtnval = messageBox("스캔 완료된 출력물이 있습니다. 신규출력하시겠습니까?\n(신규출력할 경우 의무기록실에 이전에 스캔된 퇴원간호계획지 삭제를 요청하시기 바랍니다.)", "Q"); // return : yes=6
  65. if(rtnval == "6"){ // yes
  66. fPrintDschInfo("newprint", ocrtag, elecflag);
  67. }else{
  68. return;
  69. }
  70. }
  71. }else{
  72. // 신규출력
  73. fPrintDschInfo("newprint", ocrtag, elecflag);
  74. }
  75. }
  76. }
  77. }
  78. /**
  79. * @desc : 간호파트 퇴원교육확인서 OCR 처리 공통 모듈
  80. * @param : left, top, pid, indd, cretno, ordtype, formcd
  81. * @return : 없음
  82. * @authur : 김지선 2013.05.16
  83. */
  84. function fOCRPrint(left, top, pid, indd, cretno, ordtype, formcd) {
  85. setParameter("formcd",formcd);
  86. setParameter("pid", pid);
  87. setParameter("orddd", indd);
  88. setParameter("cretno", cretno);
  89. setParameter("ordtype", ordtype);
  90. open("SSMRF03700",1,left,top);
  91. }