Index: FOIAVistA/tag/r/CONTROLLED_SUBSTANCES-PSD/PSDACT1.m
===================================================================
--- FOIAVistA/trunk/r/CONTROLLED_SUBSTANCES-PSD/PSDACT1.m	(revision 631)
+++ FOIAVistA/tag/r/CONTROLLED_SUBSTANCES-PSD/PSDACT1.m	(revision 636)
@@ -1,4 +1,4 @@
 PSDACT1 ;BIR/JPW,BJW-Print Daily Activity Log (cont'd) ; 17 Jun 98
- ;;3.0; CONTROLLED SUBSTANCES ;**10,14,30,65**;13 Feb 97;Build 5
+ ;;3.0; CONTROLLED SUBSTANCES ;**10,14,30**;13 Feb 97
  ;Reference to ^PRC(442 supported by IA #682
  ;Reference to ^PRCS(410 supported by IA #198
@@ -96,5 +96,4 @@
 T14 S NUM="GS # ",TEXT="EDIT VERIFIED ORDER"
  I +$P(NODE,"^",17) S NUM=NUM_$P(NODE,"^",17)
- S:$D(^PSD(58.81,PSDA,8)) TEXT="EDIT VERIFIED INVOICE",NUM=$P(^PSD(58.81,PSDA,8),"^",1) ; <*65-RJS>
  S QTY=$P(^PSD(58.81,PSDA,4),"^",4),BFWD=$P(^(4),"^",7)
  Q
Index: FOIAVistA/tag/r/CONTROLLED_SUBSTANCES-PSD/PSDNRGS.m
===================================================================
--- FOIAVistA/trunk/r/CONTROLLED_SUBSTANCES-PSD/PSDNRGS.m	(revision 631)
+++ FOIAVistA/tag/r/CONTROLLED_SUBSTANCES-PSD/PSDNRGS.m	(revision 636)
@@ -1,4 +1,4 @@
 PSDNRGS ;BIR/JPW-Receive Green Sheet for NAOU ; 6 Jan 94
- ;;3.0; CONTROLLED SUBSTANCES ;**56,66,65**;13 Feb 97;Build 5
+ ;;3.0; CONTROLLED SUBSTANCES ;**56,66**;13 Feb 97;Build 3
  I '$D(PSDSITE) D ^PSDSET Q:'$D(PSDSITE)
  S OK=$S($D(^XUSEC("PSJ RNURSE",DUZ)):1,$D(^XUSEC("PSD NURSE",DUZ)):1,$D(^XUSEC("PSJ RPHARM",DUZ)):2,$D(^XUSEC("PSJ PHARM TECH",DUZ)):2,1:0)
@@ -18,20 +18,17 @@
 ORD S STAT=+$P(Y(0),"^",11),PSDPN=$P(Y(0),"^",17),STATN="" I STAT S STATN=$P($G(^PSD(58.82,STAT,0)),"^")
  S ORD=+$P(Y(0),"^",20),NAOU=+$P(Y(0),"^",18),NAOUN=$P($G(^PSD(58.8,NAOU,0)),"^"),PSDR=+$P(Y(0),"^",5),PSDRN=$P($G(^PSDRUG(PSDR,0)),"^"),QTY=+$P(Y(0),"^",6)
- ; >> RJS - *65
- L +^PSD(58.81,PSDA):$S($G(DILOCKTM)>0:DILOCKTM,1:3)
- I '$T W !,"The Green Sheet # ",PSDPN," is currently in use by another user",!,"Please select another Green Sheet.",! G GS
  I $D(^PSD(58.81,PSDA,4)),+$P(^(4),"^",3) S QTY=$P(^(4),"^",3)
- I AOU'=NAOU W $C(7),!!,"The Green Sheet # ",PSDPN," is assigned to ",NAOUN,".",!,"Please select another Green Sheet.",! L -^PSD(58.81,PSDA) G GS  ; <RJS - *65
- I '$D(^PSD(58.8,NAOU,1,PSDR,3,ORD,0)) W $C(7),!!,"There's no data on ",NAOUN," for Green Sheet # ",PSDPN,".",!,"Contact your Pharmacy Coordinator for assistance.",! L -^PSD(58.81,PSDA) G END  ; <RJS - *65
- I STAT'=3 W $C(7),!!,"This Green Sheet has a status of "_$S(STATN]"":STATN,1:"UNKNOWN")_".",!,"Please select another Green Sheet.",! L -^PSD(58.81,PSDA) G GS  ; RJS - *65
+ I AOU'=NAOU W $C(7),!!,"The Green Sheet # ",PSDPN," is assigned to ",NAOUN,".",!,"Please select another Green Sheet.",! G GS
+ I '$D(^PSD(58.8,NAOU,1,PSDR,3,ORD,0)) W $C(7),!!,"There's no data on ",NAOUN," for Green Sheet # ",PSDPN,".",!,"Contact your Pharmacy Coordinator for assistance.",! G END
+ I STAT'=3 W $C(7),!!,"This Green Sheet has a status of "_$S(STATN]"":STATN,1:"UNKNOWN")_".",!,"Please select another Green Sheet.",! G GS
  D NOW^%DTC S (RECD,Y)=+$E(%,1,12) X ^DD("DD") S RECDT=Y
 REC ;receive at order level in 58.8
  W !!,"Accessing ",PSDRN," information...",!!
- K DA,DIR,DIRUT S DIR(0)="58.81,27",DIR("B")=QTY D ^DIR K DIR I $D(DIRUT) W !!,"Quantity not entered.  No action taken.",!,"This order remains ",STATN,!! L -^PSD(58.81,PSDA) G END  ; < RJS - *65
- S RQTY=Y I RQTY'=QTY W $C(7),!!,"The quantity received does not match the quantity dispensed.",!,"This order must be returned to pharmacy for investigation.",!! L -^PSD(58.81,PSDA) G GS  ;< RJS - *65
+ K DA,DIR,DIRUT S DIR(0)="58.81,27",DIR("B")=QTY D ^DIR K DIR I $D(DIRUT) W !!,"Quantity not entered.  No action taken.",!,"This order remains ",STATN,!! G END
+ S RQTY=Y I RQTY'=QTY W $C(7),!!,"The quantity received does not match the quantity dispensed.",!,"This order must be returned to pharmacy for investigation.",!! G GS
  K DA,DIE,DR S DA=ORD,DA(1)=PSDR,DA(2)=NAOU
  S DIE="^PSD(58.8,"_DA(2)_",1,"_DA(1)_",3,"
  S DR=$S(OK=1:"6////"_PSDUZ,1:"6RECEIVED BY NURSE")_";20////"_QTY_";15////"_RECD_";10////4;22////"_$P($G(^PSD(58.8,NAOU,1,PSDR,0)),U,4)_";25////"_$P($G(^PSD(58.8,NAOU,1,PSDR,0)),U,4) D ^DIE K DA,DIE,DR
- I ($D(Y))!($D(DTOUT)) W $C(7),!!,"*** THIS ORDER HAS NOT BEEN RECEIVED ***",!,"Receiving nurses name must be entered.",!!,"The status remains "_STATN,! L -^PSD(58.81,PSDA) G END  ;< RJS - *65
+ I ($D(Y))!($D(DTOUT)) W $C(7),!!,"*** THIS ORDER HAS NOT BEEN RECEIVED ***",!,"Receiving nurses name must be entered.",!!,"The status remains "_STATN,! G END
 UPDATE ;update 58.8 and 58.81
  ;updating drug balance in 58.8
@@ -51,5 +48,4 @@
  W "done.",!!
  S STAT=$P($G(^PSD(58.81,PSDA,0)),"^",11) W ?5,"*** Your Green Sheet #"_PSDPN_" is now "_$S($P($G(^PSD(58.82,STAT,0)),"^")]"":$P(^(0),"^"),1:"UNKNOWN")_" ***",!
- L -^PSD(58.81,PSDA)  ;< RJS - *65
  G GS
 END K %,%DT,%H,%I,AOU,AOUN,D,DA,DIC,DIE,DR,DTOUT,DUOUT
Index: FOIAVistA/tag/r/CONTROLLED_SUBSTANCES-PSD/PSDSITE.m
===================================================================
--- FOIAVistA/trunk/r/CONTROLLED_SUBSTANCES-PSD/PSDSITE.m	(revision 631)
+++ FOIAVistA/tag/r/CONTROLLED_SUBSTANCES-PSD/PSDSITE.m	(revision 636)
@@ -1,6 +1,6 @@
 PSDSITE ;BIR/JPW,LTL-Site Parameters for CS ; 3 May 95
- ;;3.0; CONTROLLED SUBSTANCES ;**65**;13 Feb 97;Build 5
+ ;;3.0; CONTROLLED SUBSTANCES ;;13 Feb 97
 SITE ;entry for selecting inpatient sites in file 59.4
- K DIC,DLAYGO S DIC="^PS(59.4,",DLAYGO=59.4,DIC(0)="QEAL",D="B",DZ="??"
+ K DIC,DLAYGO S (DIC,DLAYGO)="^PS(59.4,",DIC(0)="QEAL",D="B",DZ="??"
  D DQ^DICQ K D,DZ W ! D ^DIC K DIC G:Y<0 END
  K DA,DIE,DR S DIE=59.4,DA=+Y,DR="31"_"Is "_$P(Y,U,2)_" selectable for Controlled Subs" W ! D ^DIE K DIE
