123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
- /* ---------------------------------------------------------------------
- 기간별수술집계환자조회 (SSMNP01300.xrw - JScript )
- - Version :
- 1) : Ver.1.00.01
- : Create By taebum
- : 2009-10-01 오전 10:45:03
- ---------------------------------------------------------------------- */
- /**
- * @group :
- * @ver : 2009-09-15 오후 6:45:47
- * @by :
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInit(){
- var currDate = getCurrentDate();
-
- model.setValue("/root/main/condition/fromdd" , fCalcDate(currDate,-1));
- model.setValue("/root/main/condition/todd" , currDate);
- model.refresh();
-
- model.removeNodeSet("/root/main/oppatlists/oppatlist");
- datagrid1.refresh();
-
- var instcd = getUserInfo("dutplceinstcd");
- var rslt_ref = "/root/init/orddeptlist";
-
- //model.setValue("/root/main/cond/orddeptcd", "%");
- model.setValue("/root/main/condition/orddrid", "");
- zsdfGetCareOutOrderDepartmentList(instcd, rslt_ref, currDate);
- //수술방 정보 조회
- fGetOproomList();
- addComboItem("cmb_subdept");
-
- //기초코드 조회
- zbcfGetCodeList(new Array("M0065"), new Array("/root/init/M0065list"), true);
- addComboItem("cmb_opstatcd");
- }
- /*
- * 1달을 자동 세팅되게 하는 함수
- * sDate : 일자(string)
- * iFlag : int 1/-1 (1달 이전/이후의 날짜 계산용도)
- */
- function fCalcDate(sDt,iFlag){
- var sDate = sDt.toDate("YYYYMMDD").getAddDate(iFlag, "M").getAddDate(-(iFlag), "D")
- //alert(sDt.toDate("YYYYMMDD").getAddDate(iFlag, "M").getAddDate(-(iFlag), "D").getDayOfWeek("K")); -- 해당요일
- rtnDate = sDate.getFullYear();
- rtnDate = rtnDate.toString() + (( sDate.getMonth() + 1 > 9 ) ? sDate.getMonth() + 1 : "0" + (sDate.getMonth() + 1));
- rtnDate = rtnDate.toString() + (( sDate.getDate() > 9 ) ? sDate.getDate() : "0" + sDate.getDate()) ;
- return rtnDate;
- }
- /**
- * @group :
- * @ver : 2009-09-15 오후 6:45:47
- * @by :
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fOnClickSearchBtn(){
- model.resetInstanceNode("/root/send");
- var todd = model.getValue("/root/main/condition/todd");
- var fromdd = model.getValue("/root/main/condition/fromdd");
- var oproomcd = model.getValue("/root/main/condition/oproomcd");
- var subdeptcd = model.getValue("/root/main/condition/subdeptcd");
- var orddrid = model.getValue("/root/main/condition/orddrid");
- var opstatcd = model.getValue("/root/main/condition/opstatcd");
-
- if(fromdd == "" || fromdd == "undefined" || fromdd == null){
- model.alert("시작일자는 필수 입력 항목입니다.");
- return;
- }
-
- if(todd == "" || todd == "undefined" || todd == null){
- model.alert("종료일자는 필수 입력 항목입니다.");
- return;
- }
-
- //현재시간을 비교하여 근무시간 이후일 경우 6개월이상 조회가능 하도록 설정
- var sCurrentTm = getCurrentTime().substr(0,4);
- var sCurrentDay = getCurrentDate().toDate("YYYYMMDD").getDayOfWeek("K");
-
- if(sCurrentDay == "월" || sCurrentDay == "화" || sCurrentDay == "수" ||
- sCurrentDay == "목" || sCurrentDay == "금"){
-
- //오후 5시 이전일 경우 조회 조건은 6달이상 조회되지 않도록 함.
- if(sCurrentTm < "1700"){
- var sSearchTerm = getDateInterval(fromdd, todd);
- if(sSearchTerm > 183){
- model.alert("근무시간에는 6개월 이상 조회할 수 없습니다.");
- return;
- }
- }
- }
-
- model.setValue("/root/send/todd" , todd );
- model.setValue("/root/send/fromdd" , fromdd );
- model.setValue("/root/send/oproomcd" , oproomcd );
- model.setValue("/root/send/subdeptcd", subdeptcd);
- model.setValue("/root/send/orddrid" , orddrid );
- model.setValue("/root/send/opstatcd" , opstatcd );
-
- model.removeNodeSet("/root/main/oppatlists/oppatlist");
- datagrid1.refresh();
-
- if(submit("TRSNP01300")){
-
- }
- }
- /**
- * @group :
- * @ver : 2009-09-15 오후 6:45:47
- * @by :
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 진료과 변경시 의사 조회 이벤트
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fValueChangedOrddrCombo(){
- var sordclsdeptflag = model.getValue("/root/init/orddeptlist/dept[deptcd = '"+model.getValue("/root/main/condition/subdeptcd")+"']/ordclsdeptflag"); // 대표/분과/서브 구분
- var sorddeptkind = model.getValue("/root/init/orddeptlist/dept[deptcd = '"+model.getValue("/root/main/condition/subdeptcd")+"']/orddeptkind"); // 센터/대표 구분
- var ssupdeptcd = model.getValue("/root/init/orddeptlist/dept[deptcd = '"+model.getValue("/root/main/condition/subdeptcd")+"']/supdeptcd"); // 상위부서코드
-
- var sorddeptflag = "";
-
- if (sorddeptkind == "C") { // 센터이면
- sorddeptflag = "C";
- } else if (sorddeptkind != "C" && sordclsdeptflag == "A") { // 센터가 아니면서 분과이면
- sorddeptflag = "A";
- } else { // 그외에 기타과
- sorddeptflag = "etc";
- }
-
- if(model.getValue("/root/main/condition/subdeptcd") == ""){
- model.setValue("/root/main/condition/orddrid","");
- cmb_orddrid.refresh();
- }
-
- model.makeValue("/root/send/reqdata/ordclsdeptflag", sorddeptflag);
- model.makeValue("/root/send/reqdata/supdeptcd", ssupdeptcd);
- model.makeValue("/root/send/reqdata/prcpspecflag", "Y");
-
- model.makeValue("/root/send/reqdata/orddd", getCurrentDate());
- model.makeValue("/root/send/reqdata/orddeptcd", model.getValue("/root/main/condition/subdeptcd"));
- submit("TRMNO00104"); // 의사리스트 조회
- addComboItem("cmb_orddrid");
- }
- /**
- * @group :
- * @ver : 2009-09-15 오후 6:45:47
- * @by :
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 수술방 정보 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetOproomList(){
- model.setValue("/root/send/fromdd" , getCurrentDate() );
- //현재일자에 유효한 수술방을 조회한다.
- submit("TRMCT00207");
- addComboItem("cmb_oproom");
- }
- /**
- * @group :
- * @ver : 2009-10-01 오후 3:07:17
- * @by :
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 엑셀저장
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSaveExcel(){
- fileName = window.fileDialog("save", ",", false, "수술집계환자상세내역_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- if (fileName != "" && fileName != null) {
- datagrid1.saveExcel(fileName, "SheetName", true, true, "", "", false);
- }
- }
|