source: WorldVistAEHR/trunk/r/PHARMACY_DATA_MANAGEMENT-PSS/PSS1P126.m@ 1474

Last change on this file since 1474 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.3 KB
RevLine 
[613]1PSS1P126 ;SMT - PSS*1*126 POST INSTALL ; 8/21/07 10:48am
2 ;;1.0; PHARMACY DATA MANAGEMENT;**126**; 4/26/07;Build 11
3 ;
4 ;This routine will send mail to anyone holding the "PSNMGR" key
5 ; as well as the installing user, a list of drugs whos DEA code
6 ; is subject to change as the result of PSS*1*126 and PSO*7*206
7 ; DEA code changes.
8 ;
9EN N XMDUZ,XMSUB,XMTEXT,DIFROM,XMY,X,CNT,OP,SPC,Y,VAR
10 S X=0,CNT=8
11 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
12 .S SPC(0)=X,SPC(10)=$P(^PSDRUG(X,0),"^")
13 .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)
14 .S OP(CNT)=VAR
15 S OP(1)="This is an alert containing drugs with DEA schedules that are going to change."
16 S OP(2)="The following drugs should be reviewed by pharmacy and verified "
17 S OP(3)="that they contain the correct scheduling after the changes. Please "
18 S OP(4)="see the patch description for a corresponding table and decide what "
19 S OP(5)="the new codes should be."
20 S OP(6)="There are a total of "_(CNT-8)_" drug(s) that have changed."
21 S OP(7)="IEN NAME"
22 S XMDUZ="POSTMASTER",XMSUB="DEA CODES SUBJECT TO CHANGE PLEASE REVIEW",XMTEXT="OP("
23 S XMY(DUZ)=""
24 S X="" F S X=$O(^XUSEC("PSNMGR",X)) Q:'X S XMY(X)=""
25 D ^XMD
26 Q
Note: See TracBrowser for help on using the repository browser.