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

DGJOPRT3.m

Go to the documentation of this file.
DGJOPRT3 ;ALB/MAF - TOTALS PAGE FOR REPORTS ; SEP 26 1991@1100
 ;;5.3;Registration;**163,1015**;Aug 13, 1993;Build 21
 ;
 D HEAD1 S DGJTOTAL=0 F DGJTTO=0:0 S DGJTOTAL=$O(DGJTOT(DGJTOTAL)) Q:DGJTOTAL']""  W !,DGJTOTAL,?40,$J(DGJTOT(DGJTOTAL),4)
 Q
HEAD1 W @IOF,"TOTALS PAGE BY DIVISION",!,"DIVISION",?37,"TOTAL DELINQ",!,DGJTLN Q
RET1 F X=$Y:1:(IOSL-3) W !
 S X=$O(^DG(40.8,"B",DGJTDV1,0)) I $D(^DG(40.8,+X,"DT")) S DGJTDEL=^("DT") W $P(DGJTDEL,"^",9),!
 Q:IOST'?1"C-".E
 R ?22,"Enter <RET> to continue or ^ to QUIT ",X:DTIME S:X["^"!('$T) DGU=1 Q:DGU  S DGFLAG=1 Q
 W @IOF,$S(DGJTDIR=1:"UNDICTATED ",1:"INCOMPLETE ")_"RECORDS LISTING BY "_$S(DGJTL="DAT":"EVENT DATE",DGJTL="PAT":"PATIENT",DGJTL="PHY":"PHYSICIAN",1:"SERVICE/SPECIALTY"),?99,DGJTDAT,"  ","PAGE " S DGJTPAG=DGJTPAG+1 W DGJTPAG
 I DGJTL="DAT" W !,"EVT DATE",?11,"PATIENT",?28,"PT ID"
 I DGJTL'="DAT" W !,"PATIENT",?18,"PT ID",?26,"EVT DATE"
 W ?39,"D/C TYPE",?53,"LOCATION",?69,"BORROWER"
 I DGJTL'="PHY" W ?87,"PHYSICIAN",?106,"TYP" W:DGJTDIR=2 ?112,"STATUS" W ?120,"TOTAL DAYS",!,DGJTLN,!
 I DGJTL="PHY" W ?87,"TYP" W:DGJTDIR=2 ?94,"STATUS" W ?110,"TOTAL DAYS",!,DGJTLN,!
 Q
QUIT K DFN,DGJTBEG,DGJTBG,DGJTEND,DGJFL,DGJTDT,DGJTDV,DGJTDVN,DGJTF,DGJTFF,DGJTFLAG,DGJ,DGJJ,DGJP,DGJSPTOT,DGJSVTOT,DGJTLN,DGJTL,DGJTMUL,DGJTNODE,DGJTPC,DGJTPHY,DGJTPT,DGJTSP,DGJTSV,DGJY,DGU,DIC,IFN,VAUTD,VAUTN,VAUTNI,VAUTSTR,VAUTVB,VAUTT,X,Y
 K %,DIR,DGFLAG,DGJTAD,DGJTCK,DGJTDAT,DGJTDEL,DGJTDIR,DGJTDIS,DGJTDIV,DGJTDL,DGJTDV1,DGJTMESS,DGJTNODT,DGJTNOW,DGJTOT,DGJTOTAL,DGJTPAG,DGJTPAR,DGJPHTOT,DGJTSR,DGJTSR1,DGJTSTAT,DGJTTO,DGJTTYP,DGPGM,DGVAR,POP,VAR,VA,VADAT,VADATE,VAERR
 K RT,RTDATA,RTE,RTYPE,VAUTY,^UTILITY("VAS",$J)
 D CLOSE^DGUTQ Q
PH Q:$O(^UTILITY("VAS",$J,DGJTDV,DGJTPHY,DGJTPT))]""  Q:$O(^UTILITY("VAS",$J,DGJTDV,DGJTPHY,DGJTPT,DFN,IFN))]""  W !,"------------------------",!,"COUNT: ",DGJPHTOT(DGJTDV,DGJTPHY) D RET1:(IOST'?1"C-".E) Q
SV Q:$O(^UTILITY("VAS",$J,DGJTDV,DGJTSV,DGJTSP,DGJTPT))]""  Q:$O(^UTILITY("VAS",$J,DGJTDV,DGJTSV,DGJTSP,DGJTPT,DFN,IFN))]""  W !,"------------------------",!,"COUNT: ",DGJSPTOT(DGJTDV,DGJTSV,DGJTSP)
 Q:$O(^UTILITY("VAS",$J,DGJTDV,DGJTSV,DGJTSP))]""  W !,"------------------------",!,"SERVICE SUBTOTAL: ",DGJSVTOT(DGJTDV,DGJTSV),! D RET1:(IOST'?1"C-".E) Q
 Q
HD1 W ?87,$S($P(DGJTNODE,"^",2)]""&($D(^VAS(393.3,+$P(DGJTNODE,"^",2),0))):$E($P(^VAS(393.3,$P(DGJTNODE,"^",2),0),"^",1),1,3),1:"")
 I DGJTDIR=2 W ?94,$S($P(DGJTNODE,"^",11)&($D(^DG(393.2,+$P(DGJTNODE,"^",11),0))):$E($P(^DG(393.2,$P(DGJTNODE,"^",11),0),"^",1),1,10),1:"")
 W ?110,$J(DGJTDL,4)
 Q