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

ACDRR3P.m

Go to the documentation of this file.
ACDRR3P ;IHS/ADC/EDE/KML - PRINT REPORT;
 ;;4.1;CHEMICAL DEPENDENCY MIS;;MAY 11, 1998
 ;
START ;
 U IO
 D HEAD
 D BODY
 K ^TMP("ACDRR1",ACDJOB,ACDBTH)
 Q
 ;
 I '$D(ZTQUEUED),'$D(IO("S")),$E(IOST,1,2)="C-" W @IOF
 W !,$$CTR^ACD("CDMIS PATIENT OUTCOME STAGE REPORT",80),!!
 W "Run at ",ACDSITE," for ",$$USR^ACD()," on ",$$FMTE^XLFDT(DT),!
 W "for date range ",$$FMTE^XLFDT(ACDDTLO)," through ",$$FMTE^XLFDT(ACDDTHI),!
 W $$REPEAT^XLFSTR("=",80),!!
 Q
 ;
BODY ; WRITE BODY OF REPORT
 W "PATIENT: ",ACDDFN,!!
 W "C1 = ALC/SUB STAGE",!
 W "C2 = PHYSICAL STAGE",!
 W "C3 = EMOTIONL STAGE",!
 W "C4 = SOCIAL STAGE",!
 W "C5 = CUL/SPIRIT STAGE",!
 W "C6 = BEHAVIORAL STAGE",!
 W "C7 = VOC/ED STAGE",!!
 W ?10,"C",?20,"C",?30,"C",?40,"C",?50,"C",?60,"C",?70,"C",!
 W ?10,"1",?20,"2",?30,"3",?40,"4",?50,"5",?60,"6",?70,"7",!!
 S ACDVDATE=0
 F  S ACDVDATE=$O(^TMP("ACDRR3",ACDJOB,ACDBTH,"V",ACDVDATE)) Q:ACDVDATE=""  D  Q:ACDQ
 .  S ACDVCNT=0
 .  F  S ACDVCNT=$O(^TMP("ACDRR3",ACDJOB,ACDBTH,"V",ACDVDATE,ACDVCNT)) Q:ACDVCNT=""  D  Q:ACDQ
 ..  W ACDVDATE
 ..  F ACDCOL=1:1:7 D
 ...  W ?(ACDCOL*10),^TMP("ACDRR3",ACDJOB,ACDBTH,"V",ACDVDATE,ACDVCNT,"COL",ACDCOL)
 ...  Q
 ..  W !
 ..  Q
 .  Q
 Q