SMMRH00100.js 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. /**
  2. * @desc : 화면초기화
  3. *
  4. * @param :
  5. * @return :
  6. * @author : 경북대학교
  7. * @---------------------------------------------------
  8. */
  9. function fIni(){
  10. var screen_kind = parent.window.javascript.fGetMenuParam();
  11. var currentdate = getCurrentDate();
  12. model.setValue("/root/send/cent/ioflag","-");
  13. model.setValue("/root/send/cent/termflag","1");
  14. model.setValue("/root/send/cent/inputday", currentdate);
  15. model.setValue("/root/send/cent/inputday2", currentdate);
  16. zbcfGetCodeList(new Array("M381"), new Array("/root/init/status"));
  17. fSelectGubun(screen_kind);
  18. grd_1.frozenCols = grd_1.colRef("age");
  19. model.refresh();
  20. }
  21. function fGetIndxPat(){
  22. var screen_kind = parent.window.javascript.fGetMenuParam();
  23. model.makeValue("/root/send/reqdata/recflag",screen_kind);
  24. model.makeValue("/root/send/reqdata/pid",model.getValue("/root/send/cent/pid"));
  25. model.makeValue("/root/send/reqdata/ioflag",model.getValue("/root/send/cent/ioflag"));
  26. model.makeValue("/root/send/reqdata/termflag",model.getValue("/root/send/cent/termflag"));
  27. model.makeValue("/root/send/reqdata/inputday",model.getValue("/root/send/cent/inputday"));
  28. model.makeValue("/root/send/reqdata/inputday2",model.getValue("/root/send/cent/inputday2"));
  29. model.makeValue("/root/send/reqdata/cpyn",model.getValue("/root/send/cent/cpyn"));
  30. model.makeValue("/root/send/reqdata/cdstyn",model.getValue("/root/send/cent/cdstyn"));
  31. model.makeValue("/root/send/reqdata/fuyn",model.getValue("/root/send/cent/fuyn"));
  32. submit("TRMRH00110");
  33. model.refresh();
  34. fSelectGubun(screen_kind);
  35. }
  36. function fSelectPat()
  37. {
  38. var selectedRow = grd_1.row;
  39. var pid = model.getValue("/root/main/patinfo["+selectedRow+"]/pid");
  40. var orddd = model.getValue("/root/main/patinfo["+selectedRow+"]/orddd");
  41. var dschdd = model.getValue("/root/main/patinfo["+selectedRow+"]/dschdd");
  42. var cretno = model.getValue("/root/main/patinfo["+selectedRow+"]/cretno");
  43. var orddrid = model.getValue("/root/main/patinfo["+selectedRow+"]/orddrid");
  44. var orddeptcd = model.getValue("/root/main/patinfo["+selectedRow+"]/orddeptcd");
  45. var ioflag = model.getValue("/root/main/patinfo["+selectedRow+"]/ioflag");
  46. var patnm = model.getValue("/root/main/patinfo["+selectedRow+"]/hngnm");
  47. var age = model.getValue("/root/main/patinfo["+selectedRow+"]/age");
  48. var sex = model.getValue("/root/main/patinfo["+selectedRow+"]/sex");
  49. var juso = model.getValue("/root/main/patinfo["+selectedRow+"]/juso");
  50. var rrgstno = model.getValue("/root/main/patinfo["+selectedRow+"]/rrgstno");
  51. var hometel = model.getValue("/root/main/patinfo["+selectedRow+"]/hometel");
  52. var mpphontel = model.getValue("/root/main/patinfo["+selectedRow+"]/mpphontel");
  53. var diag = model.getValue("/root/main/patinfo["+selectedRow+"]/diag");
  54. var status = model.getValue("/root/main/patinfo["+selectedRow+"]/status");
  55. var futel = model.getValue("/root/main/patinfo["+selectedRow+"]/futel");
  56. model.setValue("/root/main/dpatinfo/pid",pid);
  57. model.setValue("/root/main/dpatinfo/orddd",orddd);
  58. model.setValue("/root/main/dpatinfo/cretno",cretno);
  59. model.setValue("/root/main/dpatinfo/dschdd",dschdd);
  60. model.setValue("/root/main/dpatinfo/age",age);
  61. model.setValue("/root/main/dpatinfo/sex",sex);
  62. model.setValue("/root/main/dpatinfo/juso",juso);
  63. model.setValue("/root/main/dpatinfo/rrgstno",rrgstno);
  64. model.setValue("/root/main/dpatinfo/hngnm",patnm);
  65. model.setValue("/root/main/dpatinfo/hometel",hometel);
  66. model.setValue("/root/main/dpatinfo/mpphontel",mpphontel);
  67. model.setValue("/root/main/dpatinfo/diag",diag);
  68. model.setValue("/root/main/dpatinfo/futel",futel);
  69. model.setValue("/root/main/dpatinfo/status",status);
  70. model.refresh();
  71. var recflag = model.getValue("/root/send/reqdata/recflag");
  72. var patinfo = pid+"▦"+orddd+"▦"+cretno+"▦"+orddrid+"▦"+ioflag+"▦"+orddeptcd+"▦"+patnm+"▦"+recflag;
  73. opener.window.javascript.fSelectPat(patinfo);
  74. }
  75. /* 항목 구분 */
  76. function fSelectGubun(screen_kind)
  77. {
  78. if ( screen_kind == "A") {
  79. grd_1.colHidden(grd_1.colRef("cpyn")) = false;
  80. model.toggle("case1");
  81. }
  82. else if ( screen_kind == "B" || screen_kind == "C" ) {
  83. grd_1.colHidden(grd_1.colRef("cdstyn")) = false;
  84. model.toggle("case2");
  85. }
  86. else if ( screen_kind == "D" || screen_kind == "E") {
  87. grd_1.colHidden(grd_1.colRef("fuyn")) = false;
  88. model.toggle("case3");
  89. }
  90. }
  91. function fsaveGridToExcel(grdObj){
  92. var sTitle = "지표관리 환자리스트";
  93. var fileName = window.fileDialog("save", ",", false, sTitle, "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  94. if (fileName != ""){
  95. grdObj.saveExcel(fileName, sTitle, true, true, "", "", true);
  96. }
  97. }
  98. function fSave(status){
  99. var recflag = parent.window.javascript.fGetMenuParam();
  100. var pid = model.getValue("/root/main/dpatinfo/pid");
  101. var orddd = model.getValue("/root/main/dpatinfo/orddd");
  102. var cretno = model.getValue("/root/main/dpatinfo/cretno");
  103. var futel = model.getValue("/root/main/dpatinfo/futel");
  104. model.makeValue("/root/send/reqdata/recflag",recflag);
  105. model.makeValue("/root/send/reqdata/pid",pid);
  106. model.makeValue("/root/send/reqdata/orddd",orddd);
  107. model.makeValue("/root/send/reqdata/cretno",cretno);
  108. model.makeValue("/root/send/reqdata/status",status);
  109. model.makeValue("/root/send/reqdata/futel",futel);
  110. submit("TXMRH00110");
  111. var indxcnt = model.getValue("/root/hidden/indxcnt/cnt") ;
  112. if (indxcnt == 1) {
  113. messageBox("정상적으로 처리되었습니다","I099");
  114. }
  115. }