source: FOIAVistA/trunk/r/CMOP-PSX/PSXPURG1.m@ 1726

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

initial load of FOIAVistA 6/30/08 version

File size: 1.1 KB
Line 
1PSXPURG1 ;BIRM/WPB-CHECK PSX(552.1,"AP" FOR NOT PROCESSED BATCHES [ 04/08/97 2:06 PM ]
2 ;;2.0;CMOP;;11 Apr 97
3CKAP K ^TMP($J,"PSXPROC")
4 D NOW^%DTC S STRT=$$FMADD^XLFDT(%,-3,0,0,0),CNT=1 K %
5 F S STRT=$O(^PSX(552.1,"AP",STRT)) Q:'STRT S BAT="" F S BAT=$O(^PSX(552.1,"AP",STRT,BAT)) Q:'BAT D CKAQ
6 D MSG
7 K STRT,BAT,CNT
8 Q
9CKAQ S:$D(^PSX(552.2,"AQ",BAT)) ^TMP($J,"PSXPROC",CNT)=BAT,CNT=CNT+1
10 Q
11MSG Q Q:'$D(^TMP($J,"PSXPROC"))
12 S XMSUB="CMOP PROCESSED MSG",XMDUN="CMOP Manager"
13 D XMZ^XMA2 G:XMZ'>0 MSG
14 S FAC=$P(^PSX(553,1,0),"^")_" CMOP"
15 S COM=$S($D(^TMP($J,"PSXPROC")):" has transmissions that are marked as processed that have data to go to the vendor.",1:" all transmissions processed correctly."),LCNT=1
16 S ^XMB(3.9,XMZ,2,LCNT,0)=FAC_COM,LCNT=LCNT+1,^XMB(3.9,XMZ,2,LCNT,0)=" ",LCNT=LCNT+1
17 I $D(^TMP($J,"PSXPROC")) D
18 .S XX=0 F S XX=$O(^TMP($J,"PSXPROC",XX)) Q:XX'>0 S ^XMB(3.9,XMZ,2,LCNT,0)=$G(^TMP($J,"PSXPROC",XX))_" marked as processed but has data to send to the vendor.",LCNT=LCNT+1
19 S ^XMB(3.9,XMZ,2,0)="^3.92A^"_LCNT_"^"_LCNT_"^"_DT,XMDUZ=.5
20 K XMY D GRP^PSXNOTE D ENT1^XMD
21 K XMSUB,XMDUN,XMZ,LCNT,^TMP($J,"PSXPROC"),FAC,COM,XMY,XMDUZ,XX
22 Q
Note: See TracBrowser for help on using the repository browser.