ACDWCD3 ;IHS/ADC/EDE/KML - CLIENT DET OP FOR CS 10:12;
;;4.1;CHEMICAL DEPENDENCY MIS;;MAY 11, 1998
;
START ;
S ACDP1="" F S ACDP1=$O(^TMP("ACD",ACDJOB,ACDBT,ACDTGSUB,"VAL",ACDP1)) Q:ACDP1="" D Q:$D(DIRUT)
. D F Q:$D(DIRUT) W !!!,"CLIENT NAME: ",ACDP1,!
. Q:$D(DIRUT)
. F ACDP2=0:0 S ACDP2=$O(^TMP("ACD",ACDJOB,ACDBT,ACDTGSUB,"VAL",ACDP1,ACDP2)) Q:'ACDP2 D Q:$D(DIRUT)
.. S ACDDA=ACDP2
.. D ^ACDWCS
.. S ACDDA=^ACDCS(ACDP2,"BWP")
.. D ^ACDWVIS
.. D P1
.. Q
. Q
D ^ACDWK
Q
;
P1 ;Print out
D F Q:$D(DIRUT) W !,ACDDAY,?5,$E(ACDSVAC,1,25),?33,$E(ACDLOTY,1,16),?50,ACDHOUR,?60,$E($J(ACDPROV,19),1,20)
Q
F ;Form feed
Q:$D(DIRUT)
I $Y+5>IOSL D F^ACDWUTL
ACDWCD3 ;IHS/ADC/EDE/KML - CLIENT DET OP FOR CS 10:12;
+1 ;;4.1;CHEMICAL DEPENDENCY MIS;;MAY 11, 1998
+2 ;
START ;
+1 SET ACDP1=""
FOR
SET ACDP1=$ORDER(^TMP("ACD",ACDJOB,ACDBT,ACDTGSUB,"VAL",ACDP1))
IF ACDP1=""
QUIT
Begin DoDot:1
+2 DO F
IF $DATA(DIRUT)
QUIT
WRITE !!!,"CLIENT NAME: ",ACDP1,!
+3 IF $DATA(DIRUT)
QUIT
+4 FOR ACDP2=0:0
SET ACDP2=$ORDER(^TMP("ACD",ACDJOB,ACDBT,ACDTGSUB,"VAL",ACDP1,ACDP2))
IF 'ACDP2
QUIT
Begin DoDot:2
+5 SET ACDDA=ACDP2
+6 DO ^ACDWCS
+7 SET ACDDA=^ACDCS(ACDP2,"BWP")
+8 DO ^ACDWVIS
+9 DO P1
+10 QUIT
End DoDot:2
IF $DATA(DIRUT)
QUIT
+11 QUIT
End DoDot:1
IF $DATA(DIRUT)
QUIT
+12 DO ^ACDWK
+13 QUIT
+14 ;
P1 ;Print out
+1 DO F
IF $DATA(DIRUT)
QUIT
WRITE !,ACDDAY,?5,$EXTRACT(ACDSVAC,1,25),?33,$EXTRACT(ACDLOTY,1,16),?50,ACDHOUR,?60,$EXTRACT($JUSTIFY(ACDPROV,19),1,20)
+2 QUIT
F ;Form feed
+1 IF $DATA(DIRUT)
QUIT
+2 IF $Y+5>IOSL
DO F^ACDWUTL