Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: A1B2OSR4

A1B2OSR4.m

Go to the documentation of this file.
  1. A1B2OSR4 ;ALB/AAS - ODS SUMMARY REPORT ; 11-JAN-91
  1. ;;Version 1.55 (local for MAS v5 sites);;
  1. ;
  1. ; - Description of Utility Array
  1. ; - ^Utility($j,"ods-fac",fac)= facility indicator
  1. ; - ^Utility($j,"ods-adm",facility)=total admissions for facility
  1. ; ,"ods-adm-nat") =national count
  1. ; ,"ods-pt-adm",dfn,fac)="" for tracking uniques
  1. ; ,"ods-pt-adm-bos",bos,dfn,fac)="" Branch of Service
  1. ; ,"ods-pt-adm-spc",spc,dfn,fac)="" admitting specialty
  1. ; ,"ods-unq-adm",fac)=count unique admissions
  1. ; ,"ods-unq-adm-nat")=count unique adms. nationally
  1. ; ,"ods-unq-adm-bos",fac,bos)=unique admissions by branch of service
  1. ; ,"ods-unq-adm-bos-nat",bos)=national "
  1. ; ,"ods-unq-adm-spc",fac,spc)=unique admissions by admitting specialty
  1. ; ,"ods-unq-adm-spc-nat",spc)=national "
  1. ;
  1. ; ,"ods-dis",fac)=count total discharges
  1. ; ,"ods-dis-nat")=national totol discharges
  1. ; ,"ods-trf-nva",fac)= ods patients transfered to non-va care
  1. ; ,"ods-trf-nva-nat")= national ""
  1. ; ,"ods-ptrm",fac) = patients remaining
  1. ; ,"ods-ptrm-nat) = national patients remaining
  1. ; ,"ods-dis-nva",fac) = va patients displaced to non va care
  1. ; ,"ods-dis-nva-nat") = national ""
  1. ; ,"ods-dis-va",fac) = va patients displaced to va care
  1. ;
  1. % S U="^",A1B2QUIT=0 D HOME^%ZIS
  1. W @IOF,?28,"OPERATION DESERT SHIELD",!?26,"STATISTICAL SUMMARY REPORT",!!
  1. ;
  1. BDT ;Get beginning date of report
  1. S %DT="AEPX",%DT("A")="Start with DATE: " D ^%DT G END:Y<0 S A1B2BDT=Y
  1. ;
  1. EDT ;Get ending date of report
  1. S %DT="EX" R !,"Go to DATE: ",X:DTIME S:X=" " X=A1B2BDT G END:(X="")!(X["^") D ^%DT G BDT:Y<0 S A1B2EDT=Y I Y<A1B2BDT W *7," ??",!,"ENDING DATE must follow BEGINNING DATE." G BDT
  1. ;
  1. NSR K DIR S DIR(0)="Y",DIR("A")="Print Total Statistical Summary Only",DIR("B")="NO" D ^DIR S A1B2NSR=Y K DIR I A1B2NSR S A1B2ONE="" G DEV
  1. ;
  1. ONE R !,"Print Statistical Summary for Medical Center: ALL// ",X:DTIME S:X="" X="ALL" G ONE1:X="ALL"
  1. I X="?" W !!,"Enter station name or number to select a Statistical Summary Report",!,"for one Medical Center or 'ALL' to print the report for all Medical Centers.",! G ONE
  1. I X'="ALL" S DIC=4,DIC(0)="QEM" D ^DIC G:$D(DUOUT)!($D(DTOUT)) END G:Y<1 ONE S X=$S($D(^DIC(4,+Y,99)):+^(99),1:"") I 'X W !,"This facility has no station number - required" G ONE
  1. ONE1 S A1B2ONE=X
  1. ;
  1. DEV ;Get device for output.
  1. S %IS="QMP" D ^%ZIS G:POP END
  1. I $D(IO("Q")) S ZTSAVE("A1B2*")="",ZTDESC="ODS SUMMARY REPORT",ZTRTN="DQ^A1B2OSR4" D ^%ZTLOAD W !,"Request ",$S('$D(ZTSK):"not",1:"")," Queued" G:$D(ZTSK) END K ZTSK
  1. ;
  1. U IO
  1. ;
  1. DQ S CNTF=0,PAGE=0,TAB=IOM/2,A1B2QUIT=0 S Y=DT D D^DIQ S A1B2DATE=Y S:'$D(A1B2NSR) A1B2NSR=0
  1. D ^A1B2OSR1 I 'A1B2NSR,A1B2ONE="ALL" D ^A1B2OSR2 S A1B2NSR=1
  1. I A1B2NSR,'A1B2QUIT D ^A1B2OSR3 G END
  1. G:A1B2QUIT END
  1. I +A1B2ONE S FAC=A1B2ONE I '$D(^UTILITY($J,"ODS-FAC",FAC)) W !!,"No matches found for facility number ",FAC G END
  1. D RPRT^A1B2OSR2
  1. END X:$D(ZTQUEUED) ^%ZIS("C") K ZTSK,A1B2BDT,A1B2EDT,%DT,A1B2ONE
  1. K ^UTILITY($J)
  1. K A1B2DATE,A1B2NSR,A1B2QUIT,BOS,DFN,DIC,DIR,M,N,P,PAGE,SPC,T,TAB,TYPE,X,Y,X1,Y1,CNTF,FAC,I,J,A1B2X,A1B2Y,A1B2ONE,PAGE
  1. Q