DGODTOT ;ALB/EG - PRINT TOTALS FOR OUTPUT REPORTS ; 2/22/89 1420
;;5.3;Registration;**1015**;Aug 13, 1993;Build 21
;;V 4.5
TOTI ;grand total
Q:ZRT[U F I=30:10:110 W ?I,"======"
W !,?1,"TOTAL",?30,^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV,"AS"),?40,^("AN"),?50,^("B"),?60,^("C"),?70,^("N"),?80,^("X"),?90,^("U")
W ?100,^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV),?110,"("_$J(^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2)_")"
W !,?1,"%",?30,$J(^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV,"AS")/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2),?40,$J(^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV,"AN")/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2)
W ?50,$J(^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV,"B")/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2),?60,$J(^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV,"C")/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2)
W ?70,$J(^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV,"N")/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2),?80,$J(^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV,"X")/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2)
W ?90,$J(^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV,"U")/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2)
W ?100,$J(^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2),!
S ZRT1="Hit RETURN to continue" I (IOST["C-")&(IO=IO(0)) W !,?IOM-$L(ZRT1)-2,ZRT1 R ZRT:DTIME
Q
HDR ;header
U IO W @IOF,!,?1,"INPATIENT DISCHARGES REPORT",?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
;
TOTO ;print total for division
S ^UTILITY("DGOD",$J,DGJB,K1,DGDV)=$C(35)_U_DGGE_U_DGDV_U_DGJB_U_DGBD_U_DGND_U_DGTOUT
Q:ZRT[U Q:^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)=0 F I=30:10:110 W ?I,"======"
W !,?1,"TOTAL",?30,^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV,"AS"),?40,^("AN"),?50,^("B"),?60,^("C"),?70,^("N"),?80,^("X"),?90,^("U")
W ?100,^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV),?110,"("_$J(^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2)_")"
W !,?1,"%",?30,$J(^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV,"AS")/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2),?40,$J(^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV,"AN")/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2)
W ?50,$J(^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV,"B")/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2),?60,$J(^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV,"C")/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2)
W ?70,$J(^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV,"N")/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2),?80,$J(^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV,"X")/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2)
W ?90,$J(^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV,"U")/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2)
W ?100,$J(^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)/^UTILITY("DGOD",$J,DGJB,K1,"TOT",DGDV)*100,2,2),!
S ^UTILITY("DGOD",$J,DGJB,K1,DGDV)=$C(35)_U_DGGE_U_DGDV_U_DGJB_U_DGBD_U_DGND_U_DGTOUT
S ZRT1="Hit RETURN to continue" I (IOST["C-")&(IO=IO(0)) W !,?IOM-$L(ZRT1)-2,ZRT1 R ZRT:DTIME
Q
;
DGODTOT ;ALB/EG - PRINT TOTALS FOR OUTPUT REPORTS ; 2/22/89 1420
+1 ;;5.3;Registration;**1015**;Aug 13, 1993;Build 21
+2 ;;V 4.5
TOTI ;grand total
+1 IF ZRT[U
QUIT
FOR I=30:10:110
WRITE ?I,"======"
+2 WRITE !,?1,"TOTAL",?30,^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV,"AS"),?40,^("AN"),?50,^("B"),?60,^("C"),?70,^("N"),?80,^("X"),?90,^("U")
+3 WRITE ?100,^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV),?110,"("_$JUSTIFY(^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV)/^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV)*100,2,2)_")"
+4 WRITE !,?1,"%",?30,$JUSTIFY(^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV,"AS")/^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV)*100,2,2),?40,$JUSTIFY(^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV,"AN")/^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV)*100,2,2)
+5 WRITE ?50,$JUSTIFY(^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV,"B")/^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV)*100,2,2),?60,$JUSTIFY(^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV,"C")/^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV)*100,2,2)
+6 WRITE ?70,$JUSTIFY(^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV,"N")/^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV)*100,2,2),?80,$JUSTIFY(^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV,"X")/^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV)*100,2,2)
+7 WRITE ?90,$JUSTIFY(^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV,"U")/^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV)*100,2,2)
+8 WRITE ?100,$JUSTIFY(^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV)/^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV)*100,2,2),!
+9 SET ZRT1="Hit RETURN to continue"
IF (IOST["C-")&(IO=IO(0))
WRITE !,?IOM-$LENGTH(ZRT1)-2,ZRT1
READ ZRT:DTIME
+10 QUIT
HDR ;header
+1 USE IO
WRITE @IOF,!,?1,"INPATIENT DISCHARGES REPORT",?IOM-20,T2
SET $PIECE(L,"-",IOM-1)=""
WRITE !,L,!
+2 WRITE !,?1,"DATE RANGE: FROM "
SET Y=DGBD
XECUTE ^DD("DD")
WRITE Y," TO "
SET Y=DGND
XECUTE ^DD("DD")
WRITE Y,!
+3 WRITE !,?(IOM-26\2),"MEANS TEST CLASSIFICATION",!
+4 QUIT
+5 ;
TOTO ;print total for division
+1 SET ^UTILITY("DGOD",$JOB,DGJB,K1,DGDV)=$CHAR(35)_U_DGGE_U_DGDV_U_DGJB_U_DGBD_U_DGND_U_DGTOUT
+2 IF ZRT[U
QUIT
IF ^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV)=0
QUIT
FOR I=30:10:110
WRITE ?I,"======"
+3 WRITE !,?1,"TOTAL",?30,^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV,"AS"),?40,^("AN"),?50,^("B"),?60,^("C"),?70,^("N"),?80,^("X"),?90,^("U")
+4 WRITE ?100,^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV),?110,"("_$JUSTIFY(^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV)/^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV)*100,2,2)_")"
+5 WRITE !,?1,"%",?30,$JUSTIFY(^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV,"AS")/^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV)*100,2,2),?40,$JUSTIFY(^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV,"AN")/^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV)*100,2,2)
+6 WRITE ?50,$JUSTIFY(^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV,"B")/^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV)*100,2,2),?60,$JUSTIFY(^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV,"C")/^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV)*100,2,2)
+7 WRITE ?70,$JUSTIFY(^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV,"N")/^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV)*100,2,2),?80,$JUSTIFY(^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV,"X")/^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV)*100,2,2)
+8 WRITE ?90,$JUSTIFY(^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV,"U")/^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV)*100,2,2)
+9 WRITE ?100,$JUSTIFY(^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV)/^UTILITY("DGOD",$JOB,DGJB,K1,"TOT",DGDV)*100,2,2),!
+10 SET ^UTILITY("DGOD",$JOB,DGJB,K1,DGDV)=$CHAR(35)_U_DGGE_U_DGDV_U_DGJB_U_DGBD_U_DGND_U_DGTOUT
+11 SET ZRT1="Hit RETURN to continue"
IF (IOST["C-")&(IO=IO(0))
WRITE !,?IOM-$LENGTH(ZRT1)-2,ZRT1
READ ZRT:DTIME
+12 QUIT
+13 ;