APSPDDUE ; IHS/DSD/ENM - PRINTS DRUGS USED IN STUDY ; [ 09/03/97 1:30 PM ]
;;6.0;IHS PHARMACY MODIFICATIONS;;09/03/97
START ;
W !,"The following drugs are part of this study: ",!!
S APSPDDUE("CNT")=0
F APSPDDUE=0:0 S APSPDDUE=$O(^PSDRUG("APSPCN",D0,APSPDDUE)) Q:APSPDDUE'=+APSPDDUE D PRINT
END D EOJ ; Clean up variables
Q
;
PRINT ;
I $D(^PSDRUG(APSPDDUE,0))#2,$P(^(0),U,1)]"" W:'APSPDDUE("CNT") ! W:APSPDDUE("CNT") ?40 W $P(^(0),U,1) S APSPDDUE("CNT")=(APSPDDUE("CNT")+1) S:APSPDDUE("CNT")=2 APSPDDUE("CNT")=0
Q
;
EOJ ;
K APSPDDUE
Q
APSPDDUE ; IHS/DSD/ENM - PRINTS DRUGS USED IN STUDY ; [ 09/03/97 1:30 PM ]
+1 ;;6.0;IHS PHARMACY MODIFICATIONS;;09/03/97
START ;
+1 WRITE !,"The following drugs are part of this study: ",!!
+2 SET APSPDDUE("CNT")=0
+3 FOR APSPDDUE=0:0
SET APSPDDUE=$ORDER(^PSDRUG("APSPCN",D0,APSPDDUE))
IF APSPDDUE'=+APSPDDUE
QUIT
DO PRINT
END ; Clean up variables
DO EOJ
+1 QUIT
+2 ;
PRINT ;
+1 IF $DATA(^PSDRUG(APSPDDUE,0))#2
IF $PIECE(^(0),U,1)]""
IF 'APSPDDUE("CNT")
WRITE !
IF APSPDDUE("CNT")
WRITE ?40
WRITE $PIECE(^(0),U,1)
SET APSPDDUE("CNT")=(APSPDDUE("CNT")+1)
IF APSPDDUE("CNT")=2
SET APSPDDUE("CNT")=0
+2 QUIT
+3 ;
EOJ ;
+1 KILL APSPDDUE
+2 QUIT