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

ACDWRP14.m

Go to the documentation of this file.
ACDWRP14 ;IHS/ADC/EDE/KML - OUTPUT GENERATOR;
 ;;4.1;CHEMICAL DEPENDENCY MIS;;MAY 11, 1998
 ;Runs reports 9,10,57,58
 I '$D(^TMP("ACD",$J)) D ^ACDWK Q
 ;counts clients with 0 days used alc/drug for averaging
 D C
 S ACDP1=""
 F ACDPL=0:0 S (ACDCLI,ACDNUM)=0,ACDP1=$O(^TMP("ACD",ACDJOB,ACDBT,ACDTGSUB,"VAL",ACDP1)) Q:ACDP1=""  D
 . W !,ACDP1
 . F ACDP2=0:0 S ACDP2=$O(^TMP("ACD",ACDJOB,ACDBT,ACDTGSUB,"VAL",ACDP1,ACDP2)) W:'ACDP2 ?65,$J(ACDNUM/ACDCLI,8,2) Q:ACDP2'>0  D SUM
 . Q
 D ^ACDWK
 Q
F ;Form feed
 I $Y+4>IOSL D F^ACDWUTL D:'$D(DIRUT) C
 Q
C ;Column
 W !!,ACDC(1),?50,ACDC(2),!,ACDH(1)
 Q
SUM ;
 S ACDTIME=ACDP2 S:ACDTIME=.1 ACDTIME=0
 S ACDNUM=ACDNUM+(ACDTIME*^TMP("ACD",ACDJOB,ACDBT,ACDTGSUB,"VAL",ACDP1,ACDP2)),ACDCLI=ACDCLI+^(ACDP2)