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

DGODOP2.m

Go to the documentation of this file.
DGODOP2 ;ALB/EG - OUTPUT TOT VISITS,CAT B&C, NON-VETS FROM OPC FILE ; JAN 9 1989 @ 1507
 ;;5.3;Registration;;Aug 13, 1993
 ;;V 4.5
 S U="^",ZRT=1,%DT="T",X="N" D ^%DT S (T2,DGGE)=Y X ^DD("DD") S T2=Y
 S I5("V")="SC 50-100%^A&A/HB/WW1/POW/MEX^SC<50%^NSC/PEN^NSC^DOM^",I5("N")="CHAMPVA^COLLATERAL^EMPLOYEE^OTHER FED^ALLIED VET^HUMANITARIAN^SHARING^REIMB INSURANCE^"
 D ET^DGODUTL F K=1:1:A2 Q:ZRT[U  F K1=1:1:DGTN Q:ZRT[U  D PRI,TOTO^DGODTOT
 D ^DGODOSM W !,?1,"Elapsed time for this run: ",DGTOUT,!
END K DGDV,DGEL,DGGE,DGTOUT,I,I1,I2,I3,I5,K,L,T2,X,Y,ZRT,ZRT1 Q
PRI Q:ZRT[U  S DGDV=$E($P(A(K),U,2)_"     ",1,5) Q:^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)=0  D HDR W !,?1,"DIVISION: ",$P(A(K),U,2),?20,$P(A(K),U,1),?40,"TOTAL VISITS: ",?50,^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV),!
 W !,?30,"AS",?40,"AN",?50,"B0",?60,"C0",?70,"N0",?80,"X0",?90,"U0",?100,"TOTAL",?110,"%",!
 F I=30:10:110 W ?I,"------"
 F I1="V","N" W !,?1,$S(I1="V":"VETERAN ELIGIBILITY",I1="N":"NON-VETERAN ELIGIBILITY",1:0),!,?1,"-----------------------",! F I2=1:1:8,"*" Q:ZRT[U  D PRI1
 Q
PRI1 ;print each row
 S ZRT1="Hit RETURN to continue" I (IOST["C-")&(IO=IO(0))&(IOSL-$Y<4) W !,?IOM-$L(ZRT1)-2,ZRT1 R ZRT:DTIME S:'$T ZRT=U D:$D(ZRT) HDR Q:ZRT[U
 W:'((I1="V")&(I2>6)) !,?1,$P(I5(I1),U,I2)
 W:I2="*" ?1,"ERROR"
 W:'((I1="V")&(I2>6)) ?30,^UTILITY("DGOD",$J,DGJB,K1,DGDV,I1,"AS",I2),?40,^UTILITY("DGOD",$J,DGJB,K1,DGDV,I1,"AN",I2),?50,^UTILITY("DGOD",$J,DGJB,K1,DGDV,I1,"B",I2),?60,^UTILITY("DGOD",$J,DGJB,K1,DGDV,I1,"C",I2)
 W:'((I1="V")&(I2>6)) ?70,^UTILITY("DGOD",$J,DGJB,K1,DGDV,I1,"N",I2),?80,^UTILITY("DGOD",$J,DGJB,K1,DGDV,I1,"X",I2),?90,^UTILITY("DGOD",$J,DGJB,K1,DGDV,I1,"U",I2)
 W:'((I1="V")&(I2>6)) ?100,^UTILITY("DGOD",$J,DGJB,K1,DGDV,I1,"TOT",I2),?110,"("_$J(^UTILITY("DGOD",$J,DGJB,K1,DGDV,I1,"TOT",I2)/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2)_")",!
 D:I2="*" TOT1
 Q
 ;
TOT1 ;print subtotal
 Q:ZRT[U  F I=30:10:110 W ?I,"------"
 W !,?1,"SUBTOTAL",?30,^UTILITY("DGOD",$J,DGJB,K1,DGDV,I1,"TOT","AS"),?40,^("AN"),?50,^("B"),?60,^("C"),?70,^("N"),?80,^("X"),?90,^("U")
 W ?100,^UTILITY("DGOD",$J,DGJB,K1,DGDV,"TOT",I1),?110,"("_$J(^UTILITY("DGOD",$J,DGJB,K1,DGDV,"TOT",I1)/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2)_")"
 W !,?1,"SUBTOTAL %",?30,$J(^UTILITY("DGOD",$J,DGJB,K1,DGDV,I1,"TOT","AS")/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2),?40,$J(^UTILITY("DGOD",$J,DGJB,K1,DGDV,I1,"TOT","AN")/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2)
 W ?50,$J(^UTILITY("DGOD",$J,DGJB,K1,DGDV,I1,"TOT","B")/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2),?60,$J(^UTILITY("DGOD",$J,DGJB,K1,DGDV,I1,"TOT","C")/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2)
 W ?70,$J(^UTILITY("DGOD",$J,DGJB,K1,DGDV,I1,"TOT","N")/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2),?80,$J(^UTILITY("DGOD",$J,DGJB,K1,DGDV,I1,"TOT","X")/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2)
 W ?90,$J(^UTILITY("DGOD",$J,DGJB,K1,DGDV,I1,"TOT","U")/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2)
 W ?100,$J(^UTILITY("DGOD",$J,DGJB,K1,DGDV,"TOT",I1)/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2),!
 Q
 ;
HDR U IO W @IOF,!,?1,$P($T(TXT+K1),";;",2),?IOM-20,T2 S $P(L,"-",IOM-1)="" W !,L,!
 W !,?1,"DATE RANGE: FROM  " S Y=DGBD X ^DD("DD") W Y,"  TO  " S Y=DGND X ^DD("DD") W Y,!
 W !,?(IOM-26\2),"MEANS TEST CLASSIFICATION",!
 Q
 ;
TXT ;;
 ;;OUTPATIENT VISIT WORKLOAD REPORT
 ;;OUTPATIENT 10/10 VISIT WORKLOAD REPORT
 ;;OUTPATIENT VISIT - RESEARCH WORKLOAD REPORT