PSDSP ;BIR/JPW-Check for Disp Site - one or more ; 27 Jul 92
;;3.0; CONTROLLED SUBSTANCES ;;13 Feb 97
I '$D(PSDSITE) D ^PSDSET Q:'$D(PSDSITE)
EN S CNT=0 F LOC="M","S" F JJ=0:0 S JJ=$O(^PSD(58.8,"ASITE",+PSDSITE,LOC,JJ)) Q:'JJ S CNT=CNT+1,LOC(CNT)=JJ
I '$D(LOC(1)) W !!,"Please contact your Pharmacy Coordinator.",!,"You have not defined a pharmacy Dispensing Site",!! G END
S:'$D(LOC(2)) PSDS=+LOC(1),PSDSN=$P($G(^PSD(58.8,+PSDS,0)),"^")
END K CNT,JJ,LOC
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSDSP 467 printed Oct 16, 2024@17:49:50 Page 2
PSDSP ;BIR/JPW-Check for Disp Site - one or more ; 27 Jul 92
+1 ;;3.0; CONTROLLED SUBSTANCES ;;13 Feb 97
+2 IF '$DATA(PSDSITE)
DO ^PSDSET
if '$DATA(PSDSITE)
QUIT
EN SET CNT=0
FOR LOC="M","S"
FOR JJ=0:0
SET JJ=$ORDER(^PSD(58.8,"ASITE",+PSDSITE,LOC,JJ))
if 'JJ
QUIT
SET CNT=CNT+1
SET LOC(CNT)=JJ
+1 IF '$DATA(LOC(1))
WRITE !!,"Please contact your Pharmacy Coordinator.",!,"You have not defined a pharmacy Dispensing Site",!!
GOTO END
+2 if '$DATA(LOC(2))
SET PSDS=+LOC(1)
SET PSDSN=$PIECE($GET(^PSD(58.8,+PSDS,0)),"^")
END KILL CNT,JJ,LOC