SMMNS00200.js 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. /*
  2. 전문간호 등록대상자관리 (SMMNS00200.xrw - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. */
  6. var suppdeptcd = '';//메뉴그룹에 등록된 사용부서코드
  7. //초기정보조회(전문분야, 공통코드)
  8. /***********************************************************************************************************************************************************
  9. * @author : dhkim
  10. * @desc : 전문분야 코드및 명칭을 조회한다.
  11. ***********************************************************************************************************************************************************/
  12. function fSpclCareSearch(suppdeptcd){
  13. //20090205 dhkim
  14. //전문간호/BMT전문간호 로 나눠지게 되면서 사용부서에 해당하는 분야로 각각 등록됨.
  15. model.removenode('/root/send');
  16. model.makeValue('/root/send/suppdeptcd', suppdeptcd);
  17. model.removenode('root/hidden/spclcarefildflaginfo');
  18. model.makenode('root/hidden/spclcarefildflaginfo');
  19. if(!submit('TRMNS00107')){
  20. messageBox('전문분야기준자료 조회를 실패하였습니다.', 'E999');
  21. }
  22. }
  23. /***********************************************************************************************************************************************************
  24. * @author : dhkim
  25. * @desc : 전문간호겸업부서 정보
  26. ***********************************************************************************************************************************************************/
  27. function fSpclSideJobSearch(){
  28. //20090128 dhkim
  29. //간호에 등록된 전문간호겸업부서 정보를 임시노드에 조회해 온다.
  30. //간호 테이블에 등록된 조회정보
  31. //전문분야코드 : 022, 전문간호팀코드 : 023, 전문간호겸업부서코드 : 024
  32. model.removenode('/root/send');
  33. model.makeValue('/root/send/cdgrupid', '024');
  34. model.removenode('/root/hidden/spclsideinfo');
  35. model.makenode('/root/hidden/spclsideinfo');
  36. if(!submit('TRMNS00110')){
  37. messageBox('간호에 등록된 전문분야겸업부서정보 조회를 실패하였습니다.', 'E999');
  38. return false;
  39. }
  40. }
  41. // emr.mnwmcode
  42. // cdgrupid 022, 023, 024
  43. // 022 : 전문분야리스트 (grupdetldesc : R <- 의뢰데이터구분)
  44. // 023 : 전문간호팀코드
  45. // 024 : 전문간호겸업부서 (상처/장요루)
  46. /**
  47. * 화면 초기화
  48. */
  49. function fInit(){
  50. //20090205 dhkim
  51. //전문간호/BMT전문간호 로 나눠지게 되면서 사용부서에 해당하는 분야로 각각 등록됨.
  52. suppdeptcd = aezfSetSuppDeptcd();//메뉴그룹에 등록된 사용부서코드
  53. fSpclCareSearch(suppdeptcd); //전문분야를 조회한다.
  54. fSpclSideJobSearch(); //전문분야 겸업 부서를 조회한다.
  55. cmb_spcl.select(0); //전문분야의 콤보 제일 첫번째로 선택된 상태
  56. }
  57. /**
  58. * @group :
  59. * @ver : 2007.05.16
  60. * @by : 정경화
  61. * @---------------------------------------------------
  62. * @type : function
  63. * @access : public
  64. * @desc : 조회일자 Setting
  65. * @param :
  66. * @return :
  67. * @---------------------------------------------------
  68. */
  69. function select_Date(){
  70. ipt_Fromdd.value = getCurrentDate();
  71. ipt_Enddd.value = getCurrentDate();
  72. }
  73. /**
  74. * @group :
  75. * @ver : 2007.06.15
  76. * @by : 정경화
  77. * @---------------------------------------------------
  78. * @type : function
  79. * @access : public
  80. * @desc : 전문간호 환자리스트를 조회한다.
  81. * @param :
  82. * @return :
  83. * @---------------------------------------------------
  84. */
  85. function select_educpatlist(){
  86. var endyn = model.getValue('/root/cond/endyn');
  87. var fromdd = model.getValue('/root/cond/fromdd');
  88. var todd = model.getValue('/root/cond/todd');
  89. if(fromdd == null || fromdd == ''){
  90. fromdd = getCurrentDate();
  91. }
  92. if(todd == null || todd == ''){
  93. todd = getCurrentDate();
  94. }
  95. //20090128 전문분야중 겸업인 부서를 찾는다.
  96. var spcl = model.getValue("/root/cond/spcl");
  97. spcl = fMakeSpclSideQuery(spcl);
  98. model.removeNodeSet("/root/eduinfo/edupatlist");
  99. model.removenode('/root/send');
  100. model.makeValue('/root/send/spcl', spcl);
  101. model.makeValue('/root/send/fromdd', fromdd);
  102. model.makeValue('/root/send/todd', todd);
  103. model.makeValue('/root/send/endyn', endyn);
  104. if(!submit("TRMNS00201")){
  105. messageBox('등록대상자 환자조회를 실패하였습니다.', 'E999');
  106. return false;
  107. }
  108. }
  109. /**
  110. * @group :
  111. * @ver : 2007.06.16
  112. * @by : 정경화
  113. * @---------------------------------------------------
  114. * @type : function
  115. * @access : public
  116. * @desc : 조회구분별 GridSetting
  117. * @param :
  118. * @return :
  119. * @---------------------------------------------------
  120. */
  121. function gridSetting(){
  122. var TitleLeft = 275;
  123. var TitleTop = 185;
  124. var TitleHeight = 515;
  125. // 환자등록 및 조회 Clear
  126. //clearGroup(grp_pat,0);
  127. // 조회구분에 따른 GridSetting
  128. caption4.text = "등록환자 리스트";
  129. grp_edu.visible = true;
  130. grp_edufg.visible = true;
  131. //grp_edufg.attribute ( "left" ) = TitleLeft;
  132. model.removeNodeSet("/root/main/eduinfo/edupatlist");
  133. model.refresh();
  134. }
  135. /**
  136. * @group :
  137. * @ver : 2007.06.18
  138. * @by : 정경화
  139. * @---------------------------------------------------
  140. * @type : function
  141. * @access : public
  142. * @desc : 진료구분별 날짜 Setting
  143. * @param :
  144. * @return :
  145. * @---------------------------------------------------
  146. */
  147. function select_refDate(){
  148. // 6개월이전 내분비내원
  149. if (rdo_reffg.value == "1") {
  150. // 조회일자 설정
  151. model.makeValue("/root/send/ffromdd", getAddDay(getCurrentDate(), -180)); // 365일 이전 일자
  152. model.makeValue("/root/send/ftodd", getCurrentDate()); // 현재일자
  153. model.refresh();
  154. }
  155. else // 6개월이내 내분비내원
  156. if (rdo_reffg.value == "2") {
  157. // 조회일자 설정
  158. model.makeValue("/root/send/ffromdd", getCurrentDate());
  159. model.makeValue("/root/send/ftodd", getCurrentDate()); // 현재일자
  160. model.refresh();
  161. }
  162. }
  163. /**
  164. * @group :
  165. * @ver : 2007.06.19
  166. * @by : 정경화
  167. * @---------------------------------------------------
  168. * @type : function
  169. * @access : public
  170. * @desc : 전문간호 마스터 기본정보조회
  171. * @param :
  172. * @return :
  173. * @---------------------------------------------------
  174. */
  175. function select_educpat(){
  176. var niRow = grd_edupatlist.row;
  177. model.removenode('/root/send');
  178. model.makeValue('/root/send/pid', model.getValue('/root/main/eduinfo/edupatlist[' + niRow + ']/pid'));
  179. model.makeValue('/root/send/spcl', model.getValue('/root/main/eduinfo/edupatlist[' + niRow + ']/spclcarefildflag'));
  180. model.makeValue('/root/send/fromdd', model.getValue('/root/main/eduinfo/edupatlist[' + niRow + ']/educfromdd'));
  181. submit("TRMNS00203");
  182. if(model.getValue("/root/main/edupat/edupatinfo/endyn")=="Y"){
  183. grp_end.visible = true;
  184. }else{
  185. grp_end.visible = false;
  186. }
  187. model.refresh();
  188. }
  189. /**
  190. * @group :
  191. * @ver : 2007.06.30
  192. * @by : 정경화
  193. * @---------------------------------------------------
  194. * @type : function
  195. * @access : public
  196. * @desc : 전문간호 참조대상관리 관리환자등록(입력/수정)
  197. * @param :
  198. * @return :
  199. * @---------------------------------------------------
  200. */
  201. function PidNewIns(){
  202. model.removenode("/root/send/pidins");
  203. model.makeValue("/root/send/pidins/newyn",model.getValue("/root/main/edupat/edupatinfo/newyn"));
  204. model.makeValue("/root/send/pidins/pid",model.getValue("/root/main/edupat/edupatinfo/pid"));
  205. var educfromdd;
  206. if(model.getValue("/root/main/edupat/edupatinfo/educfromdd") == ""){
  207. educfromdd = getCurrentDate();
  208. }else{
  209. educfromdd = model.getValue("/root/main/edupat/edupatinfo/educfromdd");
  210. }
  211. model.makeValue("/root/send/pidins/educfromdd",educfromdd);
  212. model.makeValue("/root/send/pidins/glycoskindflag",model.getValue("/root/main/edupat/edupatinfo/glycoskindflag"));
  213. model.makeValue("/root/send/pidins/endyn",model.getValue("/root/main/edupat/edupatinfo/endyn"));
  214. model.makeValue("/root/send/pidins/toreason",model.getValue("/root/main/edupat/edupatinfo/toreason"));
  215. model.makeValue("/root/send/pidins/remark",model.getValue("/root/main/edupat/edupatinfo/remark"));
  216. model.makeValue("/root/send/pidins/telno2",model.getValue("/root/main/edupat/edupatinfo/telno2"));
  217. model.makeValue("/root/send/pidins/spcl",model.getValue("/root/send/spcl"));
  218. submit("TXMNS00201");
  219. model.refresh();
  220. }
  221. /**
  222. * @group :
  223. * @ver : 2007.04.23
  224. * @by : 하재륜
  225. * @---------------------------------------------------
  226. * @type : function
  227. * @access : public
  228. * @desc : 화면 로드시
  229. * @param :
  230. * @return : 입력한날짜 + 날자
  231. * @---------------------------------------------------
  232. */
  233. function getAddDay(inputday,addend){
  234. var backDate ="";
  235. var rt = 0;
  236. var yyyy = inputday.substring(0,4) +"";
  237. var mm = inputday.substring(4,6) +"";
  238. var dd = inputday.substring(6,8) +"";
  239. var startDate = new Date(yyyy,(eval(mm)-1),dd);
  240. startDate.setTime(startDate.getTime()+(86400000*addend));
  241. NowYear = startDate.getYear();// 년
  242. NowMonth = startDate.getMonth()+1;// 월
  243. NowDay = startDate.getDate(); // 일
  244. backDate += NowYear ; //년도
  245. if (NowMonth < 10 ) backDate += "0" + NowMonth ;
  246. else backDate += (startDate.getMonth() + 1);
  247. if (NowDay < 10 ) backDate += "0" + NowDay ;
  248. else backDate += (startDate.getDate());
  249. return backDate ;
  250. }
  251. /***********************************************************************************************************************************************************
  252. * @author : dhkim
  253. * @create : 20090128
  254. * @desc : 상처/장요루 분야의 경우 상처, 장요루 코드를 함께 조회하도록 쿼리를 만들어서 조회한다.
  255. ***********************************************************************************************************************************************************/
  256. function fMakeSpclSideQuery(spclFildCd){
  257. var nodesetCnt = getNodesetCount("/root/hidden/spclsideinfo/spclsidelist");
  258. var deptcd = "";
  259. var qryStr = "";
  260. var sideYn = "f";
  261. var retSpclCd = '';
  262. for(var i = 1; i <= nodesetCnt; i++){
  263. deptcd = model.getValue("/root/hidden/spclsideinfo/spclsidelist[" + i + "]/deptcd");
  264. if(i == nodesetCnt){
  265. qryStr += deptcd;
  266. }else{
  267. qryStr += deptcd + "|";
  268. }
  269. if(spclFildCd == deptcd){
  270. sideYn = "t";
  271. break;
  272. }
  273. }
  274. if(sideYn == "t"){
  275. retSpclCd = qryStr;
  276. }else{
  277. retSpclCd = spclFildCd;
  278. }
  279. //alert(retSpclCd);
  280. return retSpclCd;
  281. }