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

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

initial load of WorldVistAEHR

File size: 2.4 KB
Line 
1DG53285M ;ALB/PAK DG*5.3*285 POST-INSTALL TO MAILMAN MSG ; 04/24/00
2 ;;5.3;Registration;**285**;Aug 13, 1993
3 ;
4 ;This routine will be run as part of the post-install for patch
5 ;DG*5.3*285
6 ;
7 ;A mail message will be sent to the user when the post-install is
8 ; complete.
9 ;
10 ;
11MAIL ; Send a mailman msg to user with results
12 N DIFROM,%
13 N DATA,DATA1,FILE,FLD,IENX,IY,NODE,TEXT,I,X,XMDUZ,XMSUB,XMTEXT,XMY,Y,STA
14 K ^TMP("DG53285",$J)
15 S XMSUB="Purge of NO LONGER REQUIRED IVM verified Means Tests"
16 S XMDUZ="IVM/HEC PACKAGE",XMY(DUZ)="",XMY(.5)=""
17 S XMTEXT="^TMP(""DG53285"",$J,"
18 D NOW^%DTC S Y=% D DD^%DT
19 S ^TMP("DG53285",$J,1)="Purge of NO LONGER REQUIRED verified Means Tests"
20 S ^TMP("DG53285",$J,2)=" "
21 S TEXT="Income year"
22 S TEXT=$$BLDSTR("# of IVM MT purged",TEXT,20,18)
23 S ^TMP("DG53285",$J,3)=TEXT
24 S ^TMP("DG53285",$J,4)=$$REPEAT^XLFSTR("=",$L(TEXT))
25 S IY=0,NODE=4
26 F S IY=$O(^XTMP("DG-MTIY",IY)) Q:'IY D
27 . S DATA=^XTMP("DG-MTIY",IY)
28 . S TEXT=IY+1700
29 . S DATA1=$J(+$P(DATA,U),6)
30 . S TEXT=$$BLDSTR(DATA1,TEXT,20,$L(DATA1))
31 . S NODE=NODE+1
32 . S ^TMP("DG53285",$J,NODE)=TEXT
33 F I=1:1:2 S NODE=NODE+1,^TMP("DG53285",$J,NODE)=" "
34 ;
35 ; add error reports to the mail message
36 I $O(^XTMP("DG-MTERR",0))'="" D
37 .S NODE=NODE+1
38 .S ^TMP("DG53285",$J,NODE)="Some records were not edited due to filing errors:"
39 .S NODE=NODE+1
40 .S ^TMP("DG53285",$J,NODE)=" "
41 .S TEXT="File #"
42 .S TEXT=$$BLDSTR("Record #",TEXT,12,8)
43 .S TEXT=$$BLDSTR("Field #",TEXT,22,7)
44 .S TEXT=$$BLDSTR("Error Message",TEXT,30,13)
45 .S NODE=NODE+1
46 .S ^TMP("DG53285",$J,NODE)=TEXT
47 .S FILE=0
48 .F S FILE=$O(^XTMP("DG-MTERR",FILE)) Q:'FILE D
49 ..S TEXT=FILE
50 ..S IENX=0
51 ..F S IENX=$O(^XTMP("DG-MTERR",FILE,IENX)) Q:'IENX D
52 ...S FLD=0
53 ...F S FLD=$O(^XTMP("DG-MTERR",FILE,IENX,FLD)) Q:'FLD D
54 ....S DATA=^XTMP("DG-MTERR",FILE,IENX,FLD)
55 ....S TEXT=$$BLDSTR(IENX,TEXT,12,$L(IENX))
56 ....S TEXT=$$BLDSTR(FLD,TEXT,22,$L(FLD))
57 ....S TEXT=$$BLDSTR(DATA,TEXT,30,$L(DATA))
58 ....S NODE=NODE+1
59 ....S ^TMP("DG53285",$J,NODE)=TEXT
60 ;
61MAIL1 D ^XMD
62 K ^TMP("DG53285",$J)
63 Q
64 ;
65BLDSTR(NSTR,STR,COL,NSL) ; build a string
66 ; Input:
67 ; NSTR = a string to be added to STR
68 ; STR = an existing string to which NSTR will be added
69 ; COL = column location at which NSTR will be added to STR
70 ; NSL = length of new string
71 ; Output:
72 ; returns STR with NSTR appended at the specified COL
73 ;
74 Q $E(STR_$J("",COL-1),1,COL-1)_$E(NSTR_$J("",NSL),1,NSL)_$E(STR,COL+NSL,999)
Note: See TracBrowser for help on using the repository browser.