ACDWRP4 ;IHS/ADC/EDE/KML - REPORT GENERATOR;
;;4.1;CHEMICAL DEPENDENCY MIS;;MAY 11, 1998
;Reports 59,61
I '$D(^TMP("ACD",ACDJOB,ACDBT,ACDTGSUB,"VAL")) D ^ACDWK Q
S ACDTOT=0,ACDTOT1=0
D C F ACDP1=0:0 S ACDP1=$O(^TMP("ACD",ACDJOB,ACDBT,ACDTGSUB,"VAL",ACDP1)) Q:'ACDP1 S ACDTOT=ACDTOT+1,ACDTOT1=ACDTOT1+^(ACDP1)
W !,ACDTOT,?20,ACDTOT1,?44,$J(ACDTOT1/ACDTOT,6,2)
D ^ACDWK Q
F ;Form feed
I $Y+4>IOSL D F^ACDWUTL D:'$D(DIRUT) C
Q
C ;Columns
W !!,ACDC(1),?20,ACDC(2),?44,ACDC(3),!,ACDH(1)
ACDWRP4 ;IHS/ADC/EDE/KML - REPORT GENERATOR;
+1 ;;4.1;CHEMICAL DEPENDENCY MIS;;MAY 11, 1998
+2 ;Reports 59,61
+3 IF '$DATA(^TMP("ACD",ACDJOB,ACDBT,ACDTGSUB,"VAL"))
DO ^ACDWK
QUIT
+4 SET ACDTOT=0
SET ACDTOT1=0
+5 DO C
FOR ACDP1=0:0
SET ACDP1=$ORDER(^TMP("ACD",ACDJOB,ACDBT,ACDTGSUB,"VAL",ACDP1))
IF 'ACDP1
QUIT
SET ACDTOT=ACDTOT+1
SET ACDTOT1=ACDTOT1+^(ACDP1)
+6 WRITE !,ACDTOT,?20,ACDTOT1,?44,$JUSTIFY(ACDTOT1/ACDTOT,6,2)
+7 DO ^ACDWK
QUIT
F ;Form feed
+1 IF $Y+4>IOSL
DO F^ACDWUTL
IF '$DATA(DIRUT)
DO C
+2 QUIT
C ;Columns
+1 WRITE !!,ACDC(1),?20,ACDC(2),?44,ACDC(3),!,ACDH(1)