source: FOIAVistA/trunk/r/INCOMPLETE_RECORDS_TRACKING-DGJ/DGJBGJ1.m@ 1712

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

initial load of FOIAVistA 6/30/08 version

File size: 2.3 KB
Line 
1DGJBGJ1 ;ALB/MAF - IRT BACKGROUND JOB (CONT.) - MAY 3 1993
2 ;;1.0;Incomplete Records Tracking;;Jun 25, 2001
3MSG N DGJCNT,DGJDV,DGJDT,DGJCA
4 S (DGJCNT,DGJDV,DGJDT,DGJCA)=0
5 F S DGJDV=$O(^TMP("VAS",$J,DGJDV)) Q:DGJDV']"" F S DGJDT=$O(^TMP("VAS",$J,DGJDV,DGJDT)) Q:DGJDT']"" F S DGJCA=$O(^TMP("VAS",$J,DGJDV,DGJDT,DGJCA)) Q:DGJCA']"" S DGJCNT=DGJCNT+1 S DGJMSG(DGJCNT,0)=^TMP("VAS",$J,DGJDV,DGJDT,DGJCA,0)
6 I '$D(DGJMSG(1)) G Q
7 ;quit it no text in message
8 S XMSUB="PATIENTS DISCHARGED LESS THAN 48 HOURS"
9 S XMTEXT="DGJMSG("
10 S DGJB=+$P($G(^DG(43,1,"NOT")),"^",14)
11 S XMY("G."_$P($G(^XMB(3.8,DGJB,0)),"^",1))="" ; pass mailgroup
12 ; makes sure it gets sent to someone
13 I '$D(XMY) S XMY(.5)=""
14 ; make postmaster the sender so it will show up as new to DUZ
15 S XMDUZ=.5
16 D ^XMD:$D(XMY)
17Q K DGSM,DGB,DGTEXT,XMR,DGII,XMY,XMTEXT,XMDUZ,XMSUB Q
18 ;
19ERRMSG ; Send error message.
20 Q:'$D(DGJERR)
21 S Y=DGJRUN D DD^%DT S DGJRUN=Y
22 K DGJMSG
23 S DGJMSG(1)="The following error(s) were reported during the Incomplete Records menu run:"
24 S DGJMSG(2)="IRT Update Std. Def. Background Job [DGJ IRT UPDATE (Background)"
25 S DGJMSG(3)=" or"
26 S DGJMSG(4)="IRT Update Std. Deficiencies [DGJ IRT UPDATE STD. DEFIC.]"
27 S DGJMSG(5)=" "
28 S DGJMSG(6)="Verify the following patient information. Manually run the option:"
29 S DGJMSG(7)="IRT UPDATE Std. Deficiencies [DGJ IRT UPDATE STD. DEFIC.]"
30 S DGJMSG(8)="for the run time listed below."
31 S DGJMSG(9)=" "
32 S DGJMSG(10)="Run time: "_DGJRUN
33 S DGJMSG(11)="Errors encountered during menu run:"
34 S DGJMSG(12)="-----------------------------------------"
35 S TXT=12,I=0
36 F S I=$O(DGJERR(I)) Q:I="" D
37 . S DFN=0 F S DFN=$O(DGJERR(I,DFN)) Q:'DFN D
38 . . S DGJMT=0 F S DGJMT=$O(DGJERR(I,DFN,DGJMT)) Q:'DGJMT D
39 . . . S Y=DGJMT D DD^%DT
40 . . .S DGJMSG(TXT+1)=$P(^DPT(DFN,0),"^",1)_"("_$E($P(^DPT(DFN,0),"^",9),6,9)_") Mvmt: ("_Y_") has "_$P($T(@(I)),";",3)
41 ;
42 S XMSUB="IRT Update Std. Defic. Error List"
43 S XMTEXT="DGJMSG("
44 S DGJB=+$P($G(^DG(43,1,"NOT")),"^",14)
45 I DGJB S XMY("G."_$P($G(^XMB(3.8,DGJB,0)),"^",1))="" ; pass mailgroup
46 I '$D(XMY) S XMY(.5)=""
47 I DUZ>0 S XMY(DUZ)=""
48 ; make postmaster the sender so it will show up as new to DUZ
49 S XMDUZ=.5
50 D ^XMD:$D(XMY)
51 K XMTEXT,XMSUB,DGJB,XMY,DGJMSG,XMDUZ,I,DFN,DGJMT,Y Q
52 ;
53ERRMSG1 ; Error listing
54ERR1 ;ERR1;No Ward Location found."
Note: See TracBrowser for help on using the repository browser.