AMHRPTU ; IHS/CMI/LAB - REPORT UTILITIES ;
;;4.0;IHS BEHAVIORAL HEALTH;;MAY 14, 2010
;
;
DIQ ;
K AMHPRNT,AMHFILE,AMHFIEL
S AMHFILE=$P($P(^AMHSORT(AMHCRIT,0),U,4),","),AMHFIEL=$P($P(^(0),U,4),",",2)
S DIQ(0)="EN",DIQ="AMHPRNT(",DIC=AMHFILE,DR=AMHFIEL D EN^DIQ1 K DIC,DR,DIQ
I '$D(AMHPRNT(AMHFILE,DA,AMHFIEL,"E")) S AMHPRNT(AMHFILE,DA,AMHFIEL,"E")="--"
S AMHPRNT=AMHPRNT(AMHFILE,DA,AMHFIEL,"E")
Q
PAUSE ;EP
Q:$E(IOST)'="C"!(IO'=IO(0))
W ! S DIR(0)="EO",DIR("A")="Press enter to continue...." D ^DIR K DIR S:$D(DUOUT) DIRUT=1
Q
AMHRPTU ; IHS/CMI/LAB - REPORT UTILITIES ;
+1 ;;4.0;IHS BEHAVIORAL HEALTH;;MAY 14, 2010
+2 ;
+3 ;
DIQ ;
+1 KILL AMHPRNT,AMHFILE,AMHFIEL
+2 SET AMHFILE=$PIECE($PIECE(^AMHSORT(AMHCRIT,0),U,4),",")
SET AMHFIEL=$PIECE($PIECE(^(0),U,4),",",2)
+3 SET DIQ(0)="EN"
SET DIQ="AMHPRNT("
SET DIC=AMHFILE
SET DR=AMHFIEL
DO EN^DIQ1
KILL DIC,DR,DIQ
+4 IF '$DATA(AMHPRNT(AMHFILE,DA,AMHFIEL,"E"))
SET AMHPRNT(AMHFILE,DA,AMHFIEL,"E")="--"
+5 SET AMHPRNT=AMHPRNT(AMHFILE,DA,AMHFIEL,"E")
+6 QUIT
PAUSE ;EP
+1 IF $EXTRACT(IOST)'="C"!(IO'=IO(0))
QUIT
+2 WRITE !
SET DIR(0)="EO"
SET DIR("A")="Press enter to continue...."
DO ^DIR
KILL DIR
IF $DATA(DUOUT)
SET DIRUT=1
+3 QUIT