ACDPCD2 ;IHS/ADC/EDE/KML - PRINT CD2 REPORT;
;;4.1;CHEMICAL DEPENDENCY MIS;;MAY 11, 1998
;
; This routine prints the CDMIS 2 REPORT for one selected site.
;
START ;
D GETSITE
I ACDQ D EOJ Q
D REPORT
D EOJ
Q
;
GETSITE ; GET SITE
S ACDQ=1
S DIC="^ACDQAN(",DIC(0)="AEMQ" D DIC^ACDFMC
Q:Y<0
S ACDPSITE=+Y
S ACDQ=0
Q
;
REPORT ; PRINT REPORT
S DIC="^ACDQAN(",FLDS="[ACD CDMIS-2 REPORT]",BY="@NUMBER",FR=ACDPSITE,TO=ACDPSITE,L=0 D EN1^DIP
Q
;
EOJ ;
D ^ACDKILL
Q
ACDPCD2 ;IHS/ADC/EDE/KML - PRINT CD2 REPORT;
+1 ;;4.1;CHEMICAL DEPENDENCY MIS;;MAY 11, 1998
+2 ;
+3 ; This routine prints the CDMIS 2 REPORT for one selected site.
+4 ;
START ;
+1 DO GETSITE
+2 IF ACDQ
DO EOJ
QUIT
+3 DO REPORT
+4 DO EOJ
+5 QUIT
+6 ;
GETSITE ; GET SITE
+1 SET ACDQ=1
+2 SET DIC="^ACDQAN("
SET DIC(0)="AEMQ"
DO DIC^ACDFMC
+3 IF Y<0
QUIT
+4 SET ACDPSITE=+Y
+5 SET ACDQ=0
+6 QUIT
+7 ;
REPORT ; PRINT REPORT
+1 SET DIC="^ACDQAN("
SET FLDS="[ACD CDMIS-2 REPORT]"
SET BY="@NUMBER"
SET FR=ACDPSITE
SET TO=ACDPSITE
SET L=0
DO EN1^DIP
+2 QUIT
+3 ;
EOJ ;
+1 DO ^ACDKILL
+2 QUIT