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

PSS1P126.m

Go to the documentation of this file.
  1. PSS1P126 ;SMT - PSS*1*126 POST INSTALL ; 8/21/07 10:48am
  1. ;;1.0; PHARMACY DATA MANAGEMENT;**126**; 4/26/07;Build 11
  1. ;
  1. ;This routine will send mail to anyone holding the "PSNMGR" key
  1. ; as well as the installing user, a list of drugs whos DEA code
  1. ; is subject to change as the result of PSS*1*126 and PSO*7*206
  1. ; DEA code changes.
  1. ;
  1. EN N XMDUZ,XMSUB,XMTEXT,DIFROM,XMY,X,CNT,OP,SPC,Y,VAR
  1. S X=0,CNT=8
  1. F S X=$O(^PSDRUG(X)) Q:'X I $G(^PSDRUG(X,0))]"",($P(^PSDRUG(X,0),"^",3)["3A")!($P(^PSDRUG(X,0),"^",3)["4A")!($P(^PSDRUG(X,0),"^",3)["5A") D S CNT=CNT+1
  1. .S SPC(0)=X,SPC(10)=$P(^PSDRUG(X,0),"^")
  1. .S (Y,VAR)="" F S Y=$O(SPC(Y)) Q:Y="" F Q:$L($G(VAR))>Y S:$L($G(VAR))<Y VAR=VAR_" " S:$L(VAR)=Y VAR=VAR_SPC(Y)
  1. .S OP(CNT)=VAR
  1. S OP(1)="This is an alert containing drugs with DEA schedules that are going to change."
  1. S OP(2)="The following drugs should be reviewed by pharmacy and verified "
  1. S OP(3)="that they contain the correct scheduling after the changes. Please "
  1. S OP(4)="see the patch description for a corresponding table and decide what "
  1. S OP(5)="the new codes should be."
  1. S OP(6)="There are a total of "_(CNT-8)_" drug(s) that have changed."
  1. S OP(7)="IEN NAME"
  1. S XMDUZ="POSTMASTER",XMSUB="DEA CODES SUBJECT TO CHANGE PLEASE REVIEW",XMTEXT="OP("
  1. S XMY(DUZ)=""
  1. S X="" F S X=$O(^XUSEC("PSNMGR",X)) Q:'X S XMY(X)=""
  1. D ^XMD
  1. Q