source: WorldVistAEHR/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DG53659M.m@ 1766

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

initial load of WorldVistAEHR

File size: 1.5 KB
Line 
1DG53659M ;EG - DG*5.3*659 cleanup ;03/21/2006
2 ;;5.3;Registration;**659**;Aug 13,1993;Build 20
3 ;
4 ;
5MAIL(NAMSPC,TESTING,DUZ) ; mail stats
6 N U,MSGNO,TOTREC,TOTPAT
7 N STAT,STIME,ETIME
8 S U="^"
9 S X=$G(^XTMP(NAMSPC,0,0))
10 S TOTREC=$P(X,U,2)
11 S STAT=$P(X,U,6),STIME=$P(X,U,7)
12 S ETIME=$P(X,U,8)
13 S TOTPAT=$P(X,U,10)
14 ;
15 S X=$$HDNG(NAMSPC,.HTEXT,.LIN,STAT,STIME,ETIME,TESTING)
16 S X=$$SUMRY(.LIN,TOTREC,TOTPAT)
17 S X=$$MAILIT(HTEXT,DUZ,NAMSPC)
18 K ^TMP(NAMSPC,$J,"MSG")
19 Q 1
20 ;
21 ;build heading lines for mail message
22HDNG(NAMSPC,HTEXT,LIN,STAT,STIME,ETIME,TESTING) ;
23 N X,TEXT,U
24 S U="^"
25 K ^TMP(NAMSPC,$J,"MSG")
26 S LIN=0
27 S HTEXT="Convert Radiation Exposure Method "_STAT_" on "
28 S HTEXT=HTEXT_$$FMTE^XLFDT(ETIME)
29 S X=$$BLDLINE(NAMSPC,HTEXT,.LIN)
30 S X=$$BLDLINE(NAMSPC,"",.LIN)
31 I TESTING="Y" D
32 . S TEXT="** TESTING - NO CHANGES TO DATABASE EXECUTED **"
33 . S X=$$BLDLINE(NAMSPC,TEXT,.LIN)
34 . Q
35 S X=$$BLDLINE(NAMSPC,"",.LIN)
36 Q 1
37 ;
38 ;build summary lines for mail message
39SUMRY(LIN,TOTREC,TOTPAT) ;
40 N TEXT,X,U,OLD,NEW
41 S U="^"
42 S TEXT=" Total Patient Records Read: "_$J($FN(TOTREC,","),11)
43 S X=$$BLDLINE(NAMSPC,TEXT,.LIN)
44 S TEXT=" Total Patient Records Changed: "_$J($FN(TOTPAT,","),11)
45 S X=$$BLDLINE(NAMSPC,TEXT,.LIN)
46 Q 1
47 ;
48 ;
49BLDLINE(NAMSPC,TEXT,LIN) ;build a single line into TMP message global
50 S LIN=LIN+1
51 S ^TMP(NAMSPC,$J,"MSG",LIN)=TEXT
52 Q 1
53MAILIT(HTEXT,DUZ,NAMSPC) ; send the mail message
54 N XMY,XMDUZ,XMSUB,XMTEXT
55 S XMY(DUZ)="",XMDUZ=.5
56 S XMSUB=HTEXT
57 S XMTEXT="^TMP(NAMSPC,$J,""MSG"","
58 D ^XMD
59 Q 1
Note: See TracBrowser for help on using the repository browser.