source: FOIAVistA/trunk/r/AUTO_REPLENISHMENT_WARD_STOCK-PSGW/PSGWCAD1.m@ 1487

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

initial load of FOIAVistA 6/30/08 version

File size: 2.1 KB
Line 
1PSGWCAD1 ;BHAM ISC/CML-Send 'Update AMIS Stats' MailMan message for missing Inpatient Site assignment ; 09/05/90 12:42
2 ;;2.3; Automatic Replenishment/Ward Stock ;;4 JAN 94
3MAIL ;Send message for AOUs missing INPATIENT SITE Data
4 Q:'$O(ERR1(0)) S NUM=5,CNT=0
5 K XMY,^TMP("PSGWMSG",$J) D NOW^%DTC S Y=X X ^DD("DD") S RDT=Y
6 F PSGWDUZ=0:0 S PSGWDUZ=$O(^XUSEC("PSGWMGR",PSGWDUZ)) Q:'PSGWDUZ S XMY(PSGWDUZ)=""
7 I '$D(XMY) F PSGWDUZ=0:0 S PSGWDUZ=$O(^XUSEC("PSGW PARAM",PSGWDUZ)) Q:'PSGWDUZ S XMY(PSGWDUZ)=""
8 S:'$D(XMY) XMY(.5)="" S ^TMP("PSGWMSG",$J,1,0)=" ********** MISSING DATA NOTIFICATION **********"
9 S ^TMP("PSGWMSG",$J,2,0)="",^TMP("PSGWMSG",$J,3,0)="On "_RDT_", the nightly job to update the AR/WS AMIS Stats file (#58.5)"
10 F AOU=0:0 S AOU=$O(ERR1(AOU)) Q:'AOU S NUM=NUM+1,CNT=CNT+1,^TMP("PSGWMSG",$J,NUM,0)=" "_CNT_". "_$P(^PSI(58.1,AOU,0),"^")
11 S PRT1=$S(CNT>1:"AOUs",1:"AOU"),PRT2=$S(CNT>1:"are",1:"is")
12 S ^TMP("PSGWMSG",$J,4,0)="was unable to process the AMIS activity for the following "_PRT1_":",^TMP("PSGWMSG",$J,5,0)="",^TMP("PSGWMSG",$J,NUM+1,0)=""
13 S ^TMP("PSGWMSG",$J,NUM+2,0)="The above "_PRT1_" "_PRT2_" missing an Inpatient Site assignment in the PHARMACY AOU",^TMP("PSGWMSG",$J,NUM+3,0)="STOCK file (#58.1). Until this information is supplied, NO AMIS data can"
14 S ^TMP("PSGWMSG",$J,NUM+4,0)="be stored for the "_PRT1_".",^TMP("PSGWMSG",$J,NUM+5,0)="",^TMP("PSGWMSG",$J,NUM+6,0)="One of the following Supervisor options may be used to supply the missing"
15 S ^TMP("PSGWMSG",$J,NUM+7,0)="data: 1. Create the Area of Use",^TMP("PSGWMSG",$J,NUM+8,0)=" 2. Identify AOU INPATIENT SITE",^TMP("PSGWMSG",$J,NUM+9,0)=""
16 S ^TMP("PSGWMSG",$J,NUM+10,0)="*** Please note that the AMIS data for the listed "_PRT1_" has NOT been lost.",^TMP("PSGWMSG",$J,NUM+11,0)="It will be picked up the next time the nightly job runs AFTER an Inpatient"
17 S ^TMP("PSGWMSG",$J,NUM+12,0)="Site assignment has been made!!",XMSUB="UPDATE AR/WS AMIS STATS/MISSING DATA",XMDUZ="INPATIENT PHARMACY AR/WS",XMTEXT="^TMP(""PSGWMSG"",$J," D ^XMD
18 K AOU,CNT,NUM,PSGWDUZ,PRT1,PRT2,RDT,XMDUZ,XMZ,XMY,^TMP("PSGWMSG",$J) Q
Note: See TracBrowser for help on using the repository browser.