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

PSSPOID2.m

Go to the documentation of this file.
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