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

PSDFILM.m

Go to the documentation of this file.
  1. PSDFILM ;BIR/JPW-File/Adj TRAKKER Mail Msg ; 29 Aug 94
  1. ;;3.0; CONTROLLED SUBSTANCES ;;13 Feb 97
  1. MSG ;send mailman message with trakker adj info
  1. S PHARMN1=$S($P($G(^VA(200,+PHARM1,0)),"^")]"":$P(^(0),"^"),1:"UNKNOWN"),PSDRN=$S($P($G(^PSDRUG(+PSDR,0)),"^")]"":$P(^(0),"^"),1:"UNKNOWN")
  1. K XMY,^TMP("PSDTAMSG",$J) S Y=PSDT X ^DD("DD") S RDT=Y S ^TMP("PSDTAMSG",$J,1,0)="CS PHARM TRAKKER adjustment/error has been filed."
  1. S ^TMP("PSDTAMSG",$J,2,0)="Adjustment/Error Date/Time: "_RDT,^TMP("PSDTAMSG",$J,3,0)=""
  1. S ^TMP("PSDTAMSG",$J,4,0)="Dispensing Site: "_$S($G(PSDSN)]"":PSDSN,1:"UNKNOWN"),^TMP("PSDTAMSG",$J,5,0)="Drug: "_PSDRN
  1. S ^TMP("PSDTAMSG",$J,6,0)="Quantity Adjusted: "_QTY
  1. S ^TMP("PSDTAMSG",$J,7,0)="Adjusted by: "_PHARMN1
  1. S XMSUB="CS PHARM TRAKKER ADJUSTMENT",XMTEXT="^TMP(""PSDTAMSG"",$J,",XMDUZ="CONTROLLED SUBSTANCES PHARMACY"
  1. F JJ=0:0 S JJ=$O(^XUSEC("PSD ERROR",JJ)) Q:'JJ S XMY(JJ)=""
  1. S:'$D(XMY) XMY(.5)="" D ^XMD K XMY,^TMP("PSDTAMSG",$J)
  1. K JJ,PHARMN1,PSDRN,RDT,X,XMDUZ,XMSUB,XMTEXT,XMY,Y
  1. Q