123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283 |
- /*
-
- 주사실통계(SMMNI01000.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- /**
- * @group :
- * @ver : 2007.08.16
- * @by : 신혁춘
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : grd_chospat 구분 내용 삽입
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fchospatstat(){
- for (i=0; i<9; i++){
- grd_chospat.insertRow(i,"below", "false", "true");
- }
- grd_chospat.rebuild();
- var xchospatPath = "/root/main/chospat/chospatlist";
- model.setValue(xchospatPath+"["+1+"]/flag" ,"예방");
- model.setValue(xchospatPath+"["+2+"]/flag" ,"항암");
- model.setValue(xchospatPath+"["+3+"]/flag" ,"항생");
- model.setValue(xchospatPath+"["+4+"]/flag" ,"일반");
- model.setValue(xchospatPath+"["+5+"]/flag" ,"수액");
- model.setValue(xchospatPath+"["+6+"]/flag" ,"혈액");
- model.setValue(xchospatPath+"["+7+"]/flag" ,"기타");
- model.setValue(xchospatPath+"["+8+"]/flag" ,"처치");
- model.setValue(xchospatPath+"["+9+"]/flag" ,"총 건수");
- grd_chospat.rebuild();
- fchospatvacn();
- }
- /**
- * @group :
- * @ver : 2007.08.16
- * @by : 신혁춘
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : grd_vacn 구분 내용 삽입
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fvacnstat(){
- var switc = switch1.selectedIndex;
- if (switc == "1"){
- model.removeNodeset("/root/send");
- var yearrefday = model.getValue("/root/main/yearref/yearrefday");
- if(yearrefday.length <= "4"){
- yearrefday=yearrefday+"0101";
- }
- model.makeValue("/root/send/yearrefday",yearrefday);
- if(submit("TRMNI01002")){
- model.refresh();
- fchospatvacn();
- }
- }
- //grd_vacn.insertRow(i,"below", "false", "true");
- //grd_vacn.textmatrix(21,0) = "월 총건수";
- }
- /**
- * @group :
- * @ver : 2007.08.17
- * @by : 신혁춘
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : grd_chospat, grd_vacn 통계 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fchospatvacn(){
- var switc = switch1.selectedIndex;
- model.removeNodeset("/root/send");
- var yearrefday = model.getValue("/root/main/yearref/yearrefday");
- if(yearrefday.length <= "4"){
- yearrefday=yearrefday+"0101";
- }
- model.makeValue("/root/send/yearrefday",yearrefday);
-
- if (switc == "0"){
- var kTitData = "prvn anticncr antibio gnrl sap blod inj cure totcnt";
- var tData = kTitData.split(" ");
- var MonData = "mar,apr,may,jun,jul,aug,sep,oct,nov,dec,jan,feb,prioryysum";
- var sMonData = MonData.split(",");
-
- if(submit("TRMNI01001")){
- var xchospatPath = "/root/main/chospat/chospatlist";
- var xhiddenchospatPath = "/root/hidden/chos/chosdata";
-
- for (i=1; i<10; i++){
- var total = 0;
- a = i-1;
-
- for (j=1; j<14; j++){
- k = j-1;
- var d= tData[a];
- var m= sMonData[k];
-
- if(j != 13){
- model.setValue(xchospatPath+"["+i+"]/"+m ,model.getValue(xhiddenchospatPath+"["+j+"]/"+d));
- total = total+eval(model.getValue(xhiddenchospatPath+"["+j+"]/"+d));
- }else{
- model.setValue(xchospatPath+"["+i+"]/"+m ,model.getValue(xhiddenchospatPath+"["+j+"]/"+d));
-
- if(model.getValue(xhiddenchospatPath+"["+j+"]/"+d) == "0"){
- var fluctuate = "-"
- }else{
- var fluctuate = ((total-eval(model.getValue(xhiddenchospatPath+"["+j+"]/"+d)))/(eval(model.getValue(xhiddenchospatPath+"["+j+"]/"+d))*100))+"%";
- }
-
- model.setValue(xchospatPath+"["+i+"]/total" ,total);
- model.setValue(xchospatPath+"["+i+"]/fluctuate" ,fluctuate);
- }
-
- }
-
- }
-
- }
-
- model.refresh();
- }
-
- if (switc == "1"){
- var vRow = grd_vacn.rows;
- if(vRow != "1"){
- if(submit("TRMNI01003")){
- var xvacnpatPath = "/root/main/vacnpat/vacnlist";
- var xhiddenvacnPath = "/root/hidden/vacn/vacndata";
- var iRow = grd_vacn.rows;
- var hRow = getNodesetCount("/root/hidden/vacn/vacndata");
- var Row = iRow-1;
-
- var MonData = "mar,apr,may,jun,jul,aug,sep,oct,nov,dec,jan,feb";
- var TonData = "mar,apr,may,jun,jul,aug,sep,oct,nov,dec,jan,feb,total,prioryysum,fluctuate";
- var sMonData = MonData.split(",");
- var sTonData = TonData.split(",");
-
- for(i=1; i<iRow-1; i++){
- var total = 0;
- var a = grd_vacn.textmatrix(i,0);
-
- for(h=1; h<15; h++){
- var s = sTonData[h-1];
- var aaa = 0;
- model.setValue(xvacnpatPath+"["+i+"]/"+s ,aaa);
- }
-
- for(h=1; h<hRow+1; h++){
- var b = model.getValue(xhiddenvacnPath+"["+h+"]/drugcdname");
- var c = model.getValue(xhiddenvacnPath+"["+h+"]/sorder");
- var z = sMonData[c-1];
-
- if(c <=12){
-
- if(a == b){
- model.setValue(xvacnpatPath+"["+i+"]/"+z ,model.getValue(xhiddenvacnPath+"["+h+"]/drugcdseq"));
- total = total + eval(model.getValue(xvacnpatPath+"["+i+"]/"+z));
- }
-
- }
-
- if (c==13){
- var d = model.getValue(xhiddenvacnPath+"["+h+"]/drugcdname");
-
- if(a==d){
- model.setValue(xvacnpatPath+"["+i+"]/prioryysum",model.getValue(xhiddenvacnPath+"["+h+"]/drugcdseq"));
- }
- }
-
- model.setValue(xvacnpatPath+"["+i+"]/total" ,total);
-
- if(model.getValue(xvacnpatPath+"["+i+"]/prioryysum") == "0"){
- var fluctuate = "-";
- }else{
- var fluctuate = (total-eval(model.getValue(xvacnpatPath+"["+i+"]/prioryysum"))/(eval(model.getValue(xvacnpatPath+"["+i+"]/prioryysum"))*100))+"%";
- }
-
- model.setValue(xvacnpatPath+"["+i+"]/fluctuate", fluctuate);
- }
-
- }
-
- for(z=1; z<15; z++){
- var moontotal = 0;
-
- for (t=1; t<iRow-1; t++){
- var as = sTonData[z-1];
- moontotal = moontotal + eval(model.getValue(xvacnpatPath+"["+t+"]/"+as));
- }
-
- model.setValue(xvacnpatPath+"["+Row+"]/"+as ,moontotal);
-
- if(model.getValue(xvacnpatPath+"["+Row+"]/prioryysum") == "0"){
- var fluctuate = "-"
- }else{
- var fluctuate = (total-eval(model.getValue(xvacnpatPath+"["+Row+"]/prioryysum"))/(eval(model.getValue(xvacnpatPath+"["+Row+"]/prioryysum"))*100))+"%";
- }
-
- model.setValue(xvacnpatPath+"["+Row+"]/fluctuate", fluctuate);
-
- }
- }
-
- model.refresh();
- }
- }
-
- }
- /**
- * @group :
- * @ver : 2007.08.29
- * @by : 신혁춘
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : grd_chospat, grd_vacn 엑셀 저장
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fsavexls(){
- var switc = switch1.selectedIndex;
- var fileName = window.fileDialog("save", ",", false, "excel", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- if (fileName != ""){
- if (switc=="0"){
- grd_chospat.saveExcel(fileName, "SheetName", true, true, "", "", false);
- }
- if (switc=="1"){
- grd_vacn.saveExcel(fileName, "SheetName", true, true, "", "", false);
- }
- }
- }
- /**
- * @group :
- * @ver : 2007.08.30
- * @by : 신혁춘
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : grd_chospat, grd_vacn 출력 연동
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function frexpert(){
- model.removeNodeset("/root/send");
- var switc = switch1.selectedIndex;
- var yearrefday = model.getValue("/root/main/yearref/yearrefday");
- if(yearrefday.length >= "5"){
- yearrefday=yearrefday.substring(0,4);
- }
- model.makeValue("/root/send/ref/switch",switc);
- model.makeValue("/root/send/ref/yearrefday",yearrefday);
- model.makeValue("/root/send/rexdata","");
-
- if(switc=="0"){
- model.copyNode("/root/send/rexdata","/root/main/chospat");
- exeReportPreview("RPMNI01001", "XMLSTR");
- }
-
- if(switc=="1"){
- model.copyNode("/root/send/rexdata","/root/main/vacnpat");
- exeReportPreview("RPMNI01002", "XMLSTR");
- }
-
- }
-
|