123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405 |
- /*
-
- 주사실통계(SMMNI00900.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- //20090717 dhkim 사용자부서정보 dddd
- var userdeptcd = getUserInfo("dutplcecd");
- //20090717 dhkim 주사실코드
- var injdeptcd;
- /**
- * 20090415 dhkim
- * 실시시행부서조회
- */
- function fPrcpExecDeptSrch(flag) {
- var prcpcd = model.getValue ( "/root/main/prcp/prcplist/prcpcd" );
- var prcpdd = opener.model.getValue ( "/root/init/prcpdd" );
- if ( isNull(prcpdd)) {
- prcpdd = model.getValue ( "/root/init/prcpdd" );
- if (isNull(prcpdd)) {
- prcpdd = getCurrentDate();
- }
- }
- model.makeValue("/root/send/cond1" , prcpcd);
- model.makeValue("/root/send/cond2" , prcpdd);
- model.makeValue("/root/send/cond3" , flag);
-
- if(submit("TRMNI00903")){
- return true;
- }else{
- return false;
- }
- }
- /*
- //SMY
- function testPopup() {
- htmlwindow.open("http://dev999.cmcnu.or.kr:9081/himed/webapps/emr/injroomweb/jsp/web_ocs.jsp", "testPop", "width='600', heigth='500'");
-
- }
- */
- /**
- * @group :
- * @ver : 2009.04.13
- * @by : 김달현
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInit(){
- // 간호하드코딩 테이블 조회_20090702_SMY
- var pCode = "'077'"; // 조회할 CdGrupID 코드정보
- var pDate = getCurrentDate(); //조회기준일자
- fGetNursHardCdInfo(pCode, pDate);
-
- //전체병원 버튼조회_20090727_SMY
- //성가일 경우만 예방접종등록 버튼 활성화
- if(model.getValue("/root/code/codeinfo/codelist[cdgrupid = '077' and supcdid = '03' and cdid = '"+ getUserInfo("dutplceinstcd") +"']/cdid")){ //supcdid='03' : 부천성가병원
- btn_test.visible = true;
- }
-
- //부서코드로드
- fPrcpExecDeptSrch();
-
-
-
- //20090717 dhkim 주사실코드 가져오기
- if(!submit("TRMNI00504")){
- messageBox("주사실코드조회를", "E009");
- return false;
- }
- injdeptcd = model.getValue("/root/hidden/injcdinfo/injdeptcd");
-
- //20090717 dhkim
- //로그인사용자부서가 주사실이 아닌경우 default시행부서조회로 세팅
- var srchflag;
- if(injdeptcd == userdeptcd){
- srchflag = 'I';
- }else{
- srchflag = 'D';
- }
-
- //model.setValue("/root/main/cond/srchflag", "I");//조회구분(디폴트:주사실)
- model.setValue("/root/main/cond/srchflag", srchflag);//조회구분(로그인한 부서에 따라 변경)
-
-
- model.setValue("/root/main/cond/fromdd", getCurrentDate());//기준일에 현재날짜(디폴트);
- model.setValue("/root/main/cond/todd", getCurrentDate());//기준일에 현재날짜(디폴트);
- model.setValue("/root/main/cond/execdeptcd", getUserInfo('dutplcecd'));//시행부서코드
-
- model.removeNodeset("/root/main/prcpdetl/prcpdetllist");
- model.refresh();
-
- }
- /**
- * @group :
- * @ver : 2007.08.14
- * @by : 신혁춘
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 통계건수 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fstatsdata(){
- var fromdd = model.getValue("/root/main/cond/fromdd");
- var todd = model.getValue("/root/main/cond/todd");
- var srchflag = model.getValue("/root/main/cond/srchflag");
- var execdeptcd = model.getValue("/root/main/cond/execdeptcd");
-
- //널값처리
- if(fromdd == null || fromdd == ''){
- fromdd = getCurrentDate();
- }
- if(todd == null || todd == ''){
- todd = getCurrentDate();
- }
- if(srchflag == null || srchflag == ''){
- srchflag = "I";//주사실
- }
-
-
- //주사실일때에 시행부서값 없애기
- if(srchflag != "D"){
- execdeptcd = '-';
- }
-
-
- //조회조건 화면세팅
- model.setValue("/root/main/cond/fromdd", fromdd);
- model.setValue("/root/main/cond/todd", todd);
- model.setValue("/root/main/cond/srchflag", srchflag);
- model.setValue("/root/main/cond/execdeptcd", execdeptcd);
-
- //파라미터세팅
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/fromdd", fromdd);
- model.makeValue("/root/send/todd", todd);
- model.makeValue("/root/send/srchflag", srchflag);
- model.makeValue("/root/send/execdeptcd", execdeptcd);
- model.refresh();
-
- if(submit("TRMNI00901")){
- model.removeNodeset("/root/main/prcpdetl/prcpdetllist");
- model.refresh();
- }
-
- grd_deptcntlist.subtotalposition = "below";
- grd_deptcntlist.subtotal("sum", -1, grd_deptcntlist.colRef("cnt"), "#,###", "background-color:#99ff99", grd_deptcntlist.colRef("deptnm"), "합계");
- }
- /**
- * @group :
- * @ver : 2008.01.05
- * @by : 신혁춘
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 건수별 내용 검색
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fStats(flag){
- var fromdd = model.getValue("/root/main/cond/fromdd");
- var todd = model.getValue("/root/main/cond/todd");
- var srchflag = model.getValue("/root/main/cond/srchflag");
- var execdeptcd = model.getValue("/root/main/cond/execdeptcd");
-
- //널값처리
- if(fromdd == null || fromdd == ''){
- fromdd = getCurrentDate();
- }
- if(todd == null || todd == ''){
- todd = getCurrentDate();
- }
- if(srchflag == null || srchflag == ''){
- srchflag = "I";//주사실
- }
-
- //주사실일때에 시행부서값 없애기
- if(srchflag != "D"){
- execdeptcd = '-';
- }
-
- //조회조건 화면세팅
- model.setValue("/root/main/cond/fromdd", fromdd);
- model.setValue("/root/main/cond/todd", todd);
- model.setValue("/root/main/cond/srchflag", srchflag);
- model.setValue("/root/main/cond/execdeptcd", execdeptcd);
-
- //파라미터세팅
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/todd", model.getValue("/root/main/cond/todd"));
- model.makeValue("/root/send/fromdd", model.getValue("/root/main/cond/fromdd"));
- model.makeValue("/root/send/flag", flag);
- model.makeValue("/root/send/srchflag", srchflag);
- model.makeValue("/root/send/execdeptcd", execdeptcd);
- if(!submit("TRMNI00902")){
- messageBox('건수별내역조회를', 'E009');
- return;
- }else{
-
- //20090603 dhkim
- //엑셀저장시 파일이름 변경을 위해 op_xlsnm에 파일이름을 임시저장함
- //파일이름 : 사용자부서 + (처방종류) + 조회구간
- //예) 주사실사용자의 경우 예방조회 -> 주사실(예방)통계(20090101~20090102).xls
- // bmt주사실사용자의경우 총건수 조회시 -> bmt주사실통계(20090101~20090102).xls
-
- var xlsnm = '주사실';
-
- if(srchflag == 'D'){
- //xlsnm = getUserInfo('dutplcenm');
- var selectDept = model.getValue('/root/main/cond/execdeptcd');
- xlsnm = model.getValue("/root/init/orddept/dept[deptcd='" + selectDept + "']/depthngnm");
- }
-
- if(flag == 'prvn'){
- xlsnm += '예방통계(' + fromdd + '~'+ todd + ')';
- }else if(flag == 'cncr'){
- xlsnm += '항암통계(' + fromdd + '~'+ todd + ')';
- }else if(flag == 'cncr2'){
- xlsnm += '임상항암통계(' + fromdd + '~'+ todd + ')';
- }else if(flag == 'bio'){
- xlsnm += '항생통계(' + fromdd + '~'+ todd + ')';
- }else if(flag == 'gnrl'){
- xlsnm += '일반통계(' + fromdd + '~'+ todd + ')';
- }else if(flag == 'sap'){
- xlsnm += '수액통계(' + fromdd + '~'+ todd + ')';
- }else if(flag == 'blod'){
- xlsnm += '혈액통계(' + fromdd + '~'+ todd + ')';
- }else if(flag == 'tret'){
- xlsnm += '처치통계(' + fromdd + '~'+ todd + ')';
- }else if(flag == 'etc'){
- xlsnm += '기타통계(' + fromdd + '~'+ todd + ')';
- //20150810 kya 추가
- }else if(flag == 'dump'){
- xlsnm += 'DUMP통계(' + fromdd + '~'+ todd + ')';
- }else if(flag == 'tot'){
- xlsnm += '통계(' + fromdd + '~'+ todd + ')';
- }
-
- model.removenode('/root/temp/xlsnm');
- model.makeValue('/root/temp/xlsnm', xlsnm);
- model.refresh();
-
- }
- }
-
-
- /**
- * @group :
- * @ver : 2007.08.14
- * @by : 신혁춘
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 주사실통계건수 출력
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fprintdata(){
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/rexdata/prvn" ,model.getValue("/root/main/statsdata/statsdatalist/prvn"));
- model.makeValue("/root/send/rexdata/cncr" ,model.getValue("/root/main/statsdata/statsdatalist/cncr"));
- model.makeValue("/root/send/rexdata/bio" ,model.getValue("/root/main/statsdata/statsdatalist/bio"));
- model.makeValue("/root/send/rexdata/gnrl" ,model.getValue("/root/main/statsdata/statsdatalist/gnrl"));
- model.makeValue("/root/send/rexdata/sap" ,model.getValue("/root/main/statsdata/statsdatalist/sap"));
- model.makeValue("/root/send/rexdata/blod" ,model.getValue("/root/main/statsdata/statsdatalist/blod"));
- model.makeValue("/root/send/rexdata/tret" ,model.getValue("/root/main/statsdata/statsdatalist/tret"));
- model.makeValue("/root/send/rexdata/etc" ,model.getValue("/root/main/statsdata/statsdatalist/etc"));
- model.makeValue("/root/send/rexdata/tot" ,model.getValue("/root/main/statsdata/statsdatalist/tot"));
- model.makeValue("/root/send/rexdata/todd" ,model.getValue("/root/main/cond/todd"));
- model.makeValue("/root/send/rexdata/fromdd" ,model.getValue("/root/main/cond/fromdd"));
-
- //20081216 dhkim
- //itc변경개발요청으로 예외용법테이블에 경구약추가
- model.makeValue("/root/send/rexdata/mouth" ,model.getValue("/root/main/statsdata/statsdatalist/mouth"));
-
- exeReportPreview("RPMNI00900", "XMLSTR", "", "", "false","","","","","false", "", "");//미리보기
- //exeReportPreview("RPMNI00900", "XMLSTR", "", "", "true","","","","","true", "", "");//미리보기안함
-
- }
-
- /**
- * @group :
- * @ver : 2008.01.14
- * @by : 신혁춘
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 세부내역 출력
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fprintlistdata(){
- if(datagrid1.rows == 1){
- messageBox('출력할 내역이 없습니다.', 'E999');
- return;
- }
-
- model.removeNodeset("/root/send");
- model.makeNode("/root/send/rexdata/prcpdetl");
- model.copyNode("/root/send/rexdata/prcpdetl", "/root/main/prcpdetl");
- exeReportPreview("RPMNI00901", "XMLSTR", "", "", "false","","","","","false", "", "");//미리보기
- // exeReportPreview("RPMNI00901", "XMLSTR", "", "", "true","","","","","true", "", "");//미리보기안함
- }
-
- /**
- * @group :
- * @ver : 2007.08.14
- * @by : 신혁춘
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 엑셀저장
- * @param :
- * @return :
- * @---------------------------------------------------
- function fsavexls(){
- var xStatsPath = '/root/main/statsdata/statsdatalist'; //20081124 dhkim 상황실에서 에러연락받고 수정
- // var xStatsPath = '/root/temp/exceldata/excellist'; //20081124 dhkim 상황실에서 에러연락받고 수정
- // var cut = model.getValue(xStatsPath+"["+1+"]/cut");
- var cut = model.getValue(xStatsPath+"["+1+"]/tot"); //20081124 dhkim 상황실에서 에러연락받고 수정
- if(cut == "" || datagrid1.rows < 2){
- messageBox("조회가 되지", "E007");
- return;
- }
-
- //20081231 파일이름을 '주사실통계(조회일자)' 로 변경
- var exNm = '주사실통계(' + ipt_fromdd.value + '~' + ipt_todd.value + ')';
-
- var fileName = window.fileDialog("save", ",", false, exNm, "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- if(fileName != ""){
- datagrid1.saveExcel(fileName, "SheetName", true, true, "", "", false);
- }
- }
- */
- /**
- * @group :
- * @ver : 20090604
- * @by : dhkim
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 건수별내역엑셀저장
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fsavexls(){
- var xStatsPath = '/root/main/statsdata/statsdatalist'; //20081124 dhkim 상황실에서 에러연락받고 수정
- // var xStatsPath = '/root/temp/exceldata/excellist'; //20081124 dhkim 상황실에서 에러연락받고 수정
- // var cut = model.getValue(xStatsPath+"["+1+"]/cut");
- var cut = model.getValue(xStatsPath+"["+1+"]/tot"); //20081124 dhkim 상황실에서 에러연락받고 수정
- if(cut == "" || datagrid1.rows < 2){
- messageBox("조회가 되지", "E007");
- return;
- }
-
- //20081231 파일이름을 '주사실통계(조회일자)' 로 변경
- //var exNm = '주사실통계(' + ipt_fromdd.value + '~' + ipt_todd.value + ')';
-
- //20090604 dhkim
- //엑셀저장시 파일이름 변경을 위해 op_xlsnm에 파일이름을 임시저장함
- //파일이름 : 사용자부서 + (처방종류) + 조회구간
- //예) 주사실사용자의 경우 예방조회 -> 주사실(예방)통계(20090101~20090102).xls
- // bmt주사실사용자의경우 총건수 조회시 -> bmt주사실통계(20090101~20090102).xls
- var exNm = model.getValue('root/temp/xlsnm');
-
- var fileName = window.fileDialog("save", ",", false, exNm, "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- if(fileName != ""){
- datagrid1.saveExcel(fileName, "SheetName", true, true, "", "", false);
- }
- }
|