ACDWRP2 ;IHS/ADC/EDE/KML - REPORT GENERATOR;
;;4.1;CHEMICAL DEPENDENCY MIS;;MAY 11, 1998
;Reports 200,201,203
I '$D(^TMP("ACD",ACDJOB,ACDBT,ACDTGSUB,"VAL")) D ^ACDWK Q
S ACDTOT=0
D C
S ACDP1=""
F ACDPL=0:0 S ACDP1=$O(^TMP("ACD",ACDJOB,ACDBT,ACDTGSUB,"VAL",ACDP1)) Q:ACDP1="" W !,ACDP1,?65,^(ACDP1),! S ACDTOT=ACDTOT+^(ACDP1)
W !?65,"=======",!?65,ACDTOT
D ^ACDWK
Q
F ;Form feed
I $Y+4>IOSL D F^ACDWUTL,C
Q
C ;Columns
W !!,ACDC(1),?65,ACDC(2),!,ACDH(1)
ACDWRP2 ;IHS/ADC/EDE/KML - REPORT GENERATOR;
+1 ;;4.1;CHEMICAL DEPENDENCY MIS;;MAY 11, 1998
+2 ;Reports 200,201,203
+3 IF '$DATA(^TMP("ACD",ACDJOB,ACDBT,ACDTGSUB,"VAL"))
DO ^ACDWK
QUIT
+4 SET ACDTOT=0
+5 DO C
+6 SET ACDP1=""
+7 FOR ACDPL=0:0
SET ACDP1=$ORDER(^TMP("ACD",ACDJOB,ACDBT,ACDTGSUB,"VAL",ACDP1))
IF ACDP1=""
QUIT
WRITE !,ACDP1,?65,^(ACDP1),!
SET ACDTOT=ACDTOT+^(ACDP1)
+8 WRITE !?65,"=======",!?65,ACDTOT
+9 DO ^ACDWK
+10 QUIT
F ;Form feed
+1 IF $Y+4>IOSL
DO F^ACDWUTL
DO C
+2 QUIT
C ;Columns
+1 WRITE !!,ACDC(1),?65,ACDC(2),!,ACDH(1)