PSSPOID2 ;BIR/RTR/WRT-Get drugs, additives, solutions ;02/14/00
;;1.0;PHARMACY DATA MANAGEMENT;**38**;9/30/97
CHECK(PSSROIT) ;
;PSSDACT = ARRAY OF ACTIVE DISPENSE DRUGS
;PSSDACTI = ARRAY OF INACTIVE DISPENSE DRUGS
;PSSSACT = ARRAY OF ACTIVE SOLUTIONS
;PSSSACTI = ARRAY OF INACTIVE SOLUTIONS
;PSSAACT = ARRAY OF ACTIVE ADDITIVES
;PSSAACTI = ARRAY OF INACTIVE ADDITIVES
K PSSDACT,PSSDACTI,PSSSACT,PSSSACTI,PSSAACT,PSSAACTI
N PSSRDATE,PSSRFLAG,PSSAI
Q:'$G(PSSROIT)
I $D(^PS(50.7,PSSROIT,0)) D
.F PSSAI=0:0 S PSSAI=$O(^PS(52.7,"AOI",PSSROIT,PSSAI)) Q:'PSSAI I $D(^PS(52.7,PSSAI,0)) D
..S PSSRDATE=$P($G(^PS(52.7,PSSAI,"I")),"^") D DTE
..I PSSRFLAG S PSSSACT(PSSAI)="" Q
..S PSSSACTI(PSSAI)=""
.F PSSAI=0:0 S PSSAI=$O(^PS(52.6,"AOI",PSSROIT,PSSAI)) Q:'PSSAI I $D(^PS(52.6,PSSAI,0)) D
..S PSSRDATE=$P($G(^PS(52.6,PSSAI,"I")),"^") D DTE
..I PSSRFLAG S PSSAACT(PSSAI)="" Q
..S PSSAACTI(PSSAI)=""
.F PSSAI=0:0 S PSSAI=$O(^PSDRUG("ASP",PSSROIT,PSSAI)) Q:'PSSAI I $D(^PSDRUG(PSSAI,0)) D
..S PSSRDATE=$P($G(^PSDRUG(PSSAI,"I")),"^") D DTE
..I PSSRFLAG S PSSDACT(PSSAI)="" Q
..S PSSDACTI(PSSAI)=""
Q
DTE ;
S PSSRFLAG=0
I '$G(PSSRDATE)!(+$G(PSSRDATE)>DT) S PSSRFLAG=1
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSSPOID2 1215 printed Nov 22, 2024@17:43:56 Page 2
PSSPOID2 ;BIR/RTR/WRT-Get drugs, additives, solutions ;02/14/00
+1 ;;1.0;PHARMACY DATA MANAGEMENT;**38**;9/30/97
CHECK(PSSROIT) ;
+1 ;PSSDACT = ARRAY OF ACTIVE DISPENSE DRUGS
+2 ;PSSDACTI = ARRAY OF INACTIVE DISPENSE DRUGS
+3 ;PSSSACT = ARRAY OF ACTIVE SOLUTIONS
+4 ;PSSSACTI = ARRAY OF INACTIVE SOLUTIONS
+5 ;PSSAACT = ARRAY OF ACTIVE ADDITIVES
+6 ;PSSAACTI = ARRAY OF INACTIVE ADDITIVES
+7 KILL PSSDACT,PSSDACTI,PSSSACT,PSSSACTI,PSSAACT,PSSAACTI
+8 NEW PSSRDATE,PSSRFLAG,PSSAI
+9 if '$GET(PSSROIT)
QUIT
+10 IF $DATA(^PS(50.7,PSSROIT,0))
Begin DoDot:1
+11 FOR PSSAI=0:0
SET PSSAI=$ORDER(^PS(52.7,"AOI",PSSROIT,PSSAI))
if 'PSSAI
QUIT
IF $DATA(^PS(52.7,PSSAI,0))
Begin DoDot:2
+12 SET PSSRDATE=$PIECE($GET(^PS(52.7,PSSAI,"I")),"^")
DO DTE
+13 IF PSSRFLAG
SET PSSSACT(PSSAI)=""
QUIT
+14 SET PSSSACTI(PSSAI)=""
End DoDot:2
+15 FOR PSSAI=0:0
SET PSSAI=$ORDER(^PS(52.6,"AOI",PSSROIT,PSSAI))
if 'PSSAI
QUIT
IF $DATA(^PS(52.6,PSSAI,0))
Begin DoDot:2
+16 SET PSSRDATE=$PIECE($GET(^PS(52.6,PSSAI,"I")),"^")
DO DTE
+17 IF PSSRFLAG
SET PSSAACT(PSSAI)=""
QUIT
+18 SET PSSAACTI(PSSAI)=""
End DoDot:2
+19 FOR PSSAI=0:0
SET PSSAI=$ORDER(^PSDRUG("ASP",PSSROIT,PSSAI))
if 'PSSAI
QUIT
IF $DATA(^PSDRUG(PSSAI,0))
Begin DoDot:2
+20 SET PSSRDATE=$PIECE($GET(^PSDRUG(PSSAI,"I")),"^")
DO DTE
+21 IF PSSRFLAG
SET PSSDACT(PSSAI)=""
QUIT
+22 SET PSSDACTI(PSSAI)=""
End DoDot:2
End DoDot:1
+23 QUIT
DTE ;
+1 SET PSSRFLAG=0
+2 IF '$GET(PSSRDATE)!(+$GET(PSSRDATE)>DT)
SET PSSRFLAG=1
+3 QUIT