SMMNA02100.js 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. /*
  2. APU 스케쥴 조회
  3. - Version :
  4. 1) : Ver.1.00.01
  5. */
  6. // --------------------------------------------------
  7. // 화면 read
  8. // --------------------------------------------------
  9. function finit() {
  10. //그리드 초기화
  11. fInitGrid();
  12. //오늘 날짜로 초기화 하는 부분.(진료일자를 default로 오늘 날짜로 선택함)
  13. var tempdate = getCurrentDate();
  14. model.setValue("/root/main/cond/ischefrdd", tempdate);
  15. model.setValue("/root/main/cond/ischetodd", tempdate);
  16. model.refresh();
  17. //공통코드
  18. zbcfGetCodeList(new Array( "L0089", "L0089", "L0096" ), new Array("/root/init/L00891list1", "/root/init/L00891list2", "/root/init/L00961list3"), true);
  19. //병동콤보
  20. submit("TRMNA00811");
  21. //진료과콤보
  22. var instcd = getUserInfo("dutplceinstcd");
  23. var standard_yn = "orduseyn";
  24. var ord_deptflag = ''; //D:외래진료실만,'W':병동,X:기타
  25. var rslt_ref = "/root/main/cond/orddeptlist";
  26. zbcfGetDeptCodeList(instcd, standard_yn, ord_deptflag, rslt_ref,'asc');
  27. datagrid1.frozenCols = datagrid1.colRef("scheprcpflagnm");
  28. }
  29. function fInitGrid() {
  30. model.removeNodeset("/root/main/scheinfo/schelist"); //초기화시 그리드 1번째 row 삭제
  31. model.refresh();
  32. }
  33. /* --------------------------------------------------*/
  34. /* type : function */
  35. /* access : public */
  36. /* desc : 환자정보 가져오기 */
  37. /* param : 검색구분 */
  38. /* return : */
  39. /* --------------------------------------------------*/
  40. function fSearchPatInfo(qryflag) {
  41. modal("../../../pam/patinfomngtweb/xrw/SPPMC02500", qryflag,"150", "150", "SPPMC02500", "/root/source", "/root/send");
  42. var popupendflag = model.getValue("/root/main/popupendflag");
  43. if (popupendflag == "ok"){
  44. model.setValue("/root/main/cond/ipid",model.getValue("/root/main/patinfo/patinfolist/pid"));
  45. model.setValue("/root/main/cond/ihngnm",model.getValue("/root/main/patinfo/patinfolist/hngnm"));
  46. // model.setValue("/root/main/cond/igndrage",model.getValue("/root/main/patinfo/patinfolist/pid"));
  47. model.setValue("/root/main/cond/irrgstno", model.getValue("/root/main/patinfo/patinfolist/rrgstno1") + "-" +
  48. model.getValue("/root/main/patinfo/patinfolist/rrgstno2") );
  49. model.refresh();
  50. // var pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  51. // if (pid != null && pid != "" && pid != " " && pid != "-"){
  52. // fpidref();
  53. // }
  54. }
  55. }
  56. //-------------------------------------------------
  57. //처방구분변동에 따른 처방종류
  58. //-------------------------------------------------
  59. function fPrcpKindComboMake(flag) {
  60. //초기화
  61. var xPathSendReqdata = "/root/send/reqdata";
  62. model.removeNodeset(xPathSendReqdata);
  63. model.makeNode(xPathSendReqdata);
  64. var Instcd = "";
  65. var cdgrupid = "";
  66. if (flag == "1") {
  67. Instcd = getUserInfo("dutplceinstcd");
  68. cdgrupid = model.getValue("/root/main/cond/iprcpflag");
  69. } else {
  70. Instcd = getUserInfo("dutplceinstcd");
  71. cdgrupid = model.getValue("/root/main/scheinfo/schelist/scheprcpflag");
  72. }
  73. switch (cdgrupid) {
  74. case "1": cdgrupid = "L0091"; break;
  75. case "2": cdgrupid = "L0090"; break;
  76. case "3": cdgrupid = "L0092"; break;
  77. default : cdgrupid = "L0091"; break;
  78. }
  79. model.makeValue(xPathSendReqdata + "/instcd", Instcd); //병원코드
  80. model.makeValue(xPathSendReqdata + "/cdgrupid", cdgrupid); //그룹코드
  81. //조회
  82. if (flag == "1")
  83. submit("TRMNA00804");
  84. else
  85. submit("TRMNA00805");
  86. model.refresh();
  87. }
  88. // --------------------------------------------------
  89. // 확정 스케쥴 조회
  90. // --------------------------------------------------
  91. function fScheQuery() {
  92. //초기화
  93. var xPathSendReqdata = "/root/send/reqdata";
  94. model.removeNodeset(xPathSendReqdata);
  95. model.makeNode(xPathSendReqdata);
  96. var instcd = getUserInfo("dutplceinstcd");
  97. var ioflag = model.getValue("/root/main/cond/ijob");
  98. var wardcd = model.getValue("/root/main/cond/iwardcd");
  99. var prcpflag = model.getValue("/root/main/cond/iprcpflag");
  100. var prcpkindcd = model.getValue("/root/main/cond/iprcpkindcd");
  101. var orddeptcd = model.getValue("/root/main/cond/orddeptcd");
  102. var scheddfr = model.getValue("/root/main/cond/ischefrdd");
  103. var scheddto = model.getValue("/root/main/cond/ischetodd");
  104. var pid = model.getValue("/root/main/cond/ipid");
  105. //20090117 dhkim
  106. var plcecd = model.getValue("/root/main/cond/plcecd");
  107. //값설정
  108. model.makeValue(xPathSendReqdata + "/instcd", instcd); //병원코드
  109. model.makeValue(xPathSendReqdata + "/ioflag", ioflag); //입원외래
  110. model.makeValue(xPathSendReqdata + "/wardcd", wardcd); //병동
  111. model.makeValue(xPathSendReqdata + "/prcpflag", prcpflag); //처방구분
  112. model.makeValue(xPathSendReqdata + "/prcpkindcd", prcpkindcd); //처방종류
  113. model.makeValue(xPathSendReqdata + "/orddeptcd", orddeptcd); //진료과
  114. model.makeValue(xPathSendReqdata + "/scheddfr", scheddfr); //확정스케쥴일자
  115. model.makeValue(xPathSendReqdata + "/scheddto", scheddto); //확정스케쥴일자
  116. model.makeValue(xPathSendReqdata + "/pid", pid); //환자id
  117. //20090117 dhkim
  118. //장소조회추가
  119. model.makeValue(xPathSendReqdata + "/plcecd", plcecd); //성분헌혈장소
  120. //조회
  121. submit("TRMNA02101");
  122. model.refresh();
  123. }
  124. //---------------------------------------
  125. // 등록번호로 환자의 상세정보 추출
  126. //---------------------------------------
  127. function fPatInfo() {
  128. //초기화
  129. var xPathSendReqdata = "/root/send/reqdata";
  130. model.removeNodeset(xPathSendReqdata);
  131. model.makeNode(xPathSendReqdata);
  132. var Instcd = getUserInfo("dutplceinstcd");
  133. var pid = model.getValue("/root/main/scheinfo/schelist/pid");
  134. model.makeValue(xPathSendReqdata + "/instcd", Instcd); //병원코드
  135. model.makeValue(xPathSendReqdata + "/pid", pid); //환자id
  136. //조회
  137. //submit("TRMNA00806");
  138. var xPathFr = "/root/main/patinfo/patinfolist";
  139. var xPathTo = "/root/main/scheinfo/schelist";
  140. model.setValue(xPathTo + "/tnsrpid", model.getValue(xPathFr + "/pid"));
  141. model.setValue(xPathTo + "/hngnm", model.getValue(xPathFr + "/hngnm"));
  142. model.setValue(xPathTo + "/age", model.getValue(xPathFr + "/sex") + "/" + model.getValue(xPathFr + "/age"));
  143. model.setValue(xPathTo + "/ptbsrrgstno", model.getValue(xPathFr + "/rrgstno1") + "/" + model.getValue(xPathFr + "/rrgstno2"));
  144. // model.setValue(xPathTo + "/patnm",model.getValue(xPathFr + "/hngnm"));
  145. // model.setValue(xPathTo + "/patnm",model.getValue(xPathFr + "/hngnm"));
  146. // model.setValue(xPathTo + "/patnm",model.getValue(xPathFr + "/hngnm"));
  147. // model.setValue(xPathTo + "/patnm",model.getValue(xPathFr + "/hngnm"));
  148. // model.setValue(xPathTo + "/patnm",model.getValue(xPathFr + "/hngnm"));
  149. // model.setValue(xPathTo + "/patnm",model.getValue(xPathFr + "/hngnm"));
  150. model.refresh();
  151. }