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

PSIVCSED.m

Go to the documentation of this file.
PSIVCSED ;BIR/PR-EDIT DRUG COST AND BROADCAST ;04 OCT 94 / 9:42 AM
 ;;5.0; INPATIENT MEDICATIONS ;;16 DEC 97
R1 ;Get the file, the drug, and edit the cost.
 R !!,"Indicate if drug is an ADDITIVE (enter A) or a SOLUTION (enter S): ",FI:DTIME G:"^"[FI K S:'$T FI="" G:'$T K I FI["?" S HELP="AORS" D ^PSIVHLP1 G R1
 S FI=$E(FI),FI=$S(FI="S":52.7,FI="A":52.6,1:"??") W:'FI $C(7),FI G:'FI R1 S DIC=FI,DIC(0)="AEQM" D ^DIC G:Y<0 K S DA=+Y,DRUG=$P(Y,U,2),DIE=FI,DR=7,C1=$P(^PS(FI,DA,0),U,7) D ^DIE S C2=$P(^PS(FI,DA,0),U,7) G:C1=C2 K
 ;
MAIL ;Send mail to holders of PSJI MGR key if drug cost was changed.
 S XMDUZ=$P(^VA(200,DUZ,0),U),XMSUB="IV DRUG COST CHANGED IN THE "_$S(FI[6:"ADDITIVES",1:"SOLUTIONS")_" FILE.",MESS(1,0)=DRUG_" HAS BEEN CHANGED FROM "_$S(C1="":"''",1:C1)_" TO "_$S(C2="":"''",1:C2),XMTEXT="MESS("
 K XMY I $D(^XUSEC("PSJI MGR")) F PDUZ=0:0 S PDUZ=$O(^XUSEC("PSJI MGR",PDUZ)) Q:'PDUZ  S:'$D(^XUSEC("XUPROG",PDUZ)) XMY(PDUZ)=""
 D:$D(XMY) ^XMD
K ;
 K D,D0,D1,DI,DQ,DZ,I,Z,DIC,DIE,C1,C2,DA,DR,XMSUB,XMTEXT,XMY,XCNP,XMDUZ,XMZ,PDUZ,DRUG,X,Y,MESS G:FI'=""&(FI'="^") R1 K FI Q