source: FOIAVistA/trunk/r/INCOME_VERIFICATION_MATCH-IVM/IVM273M.m@ 1094

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

initial load of FOIAVistA 6/30/08 version

File size: 2.5 KB
Line 
1IVM273M ;ALB/PDJ IVM*2.0*73 - CLEANUP IVM PATIENT FILE;02/07/2003
2 ;;2.0;INCOME VERIFICATION MATCH;**73**; 21-OCT-94
3 ;
4 ; A mail message will be sent to the user when the edit process
5 ; is complete.
6 ;
7 ;
8MAIL ; Send a mailman msg to user with results
9 N DIFROM,%
10 N DATA,NODE,TEXT,XMDUZ,XMSUB,XMTEXT,XMY,Y
11 N XTPAT,NAME
12 N PIEN,R3015,SSN
13 S XTPAT="IVM*2.0*73-PATREC"
14 K ^TMP("IVM2073",$J)
15 S XMSUB="IVM PATIENT file Cleanup"
16 S XMDUZ="IVM Edit Package",XMY(DUZ)="",XMY(.5)=""
17 S XMTEXT="^TMP(""IVM2073"",$J,"
18 D NOW^%DTC S Y=% D DD^%DT
19 S ^TMP("IVM2073",$J,1)="IVM PATIENT file cleanup"
20 S ^TMP("IVM2073",$J,2)=" "
21 S NODE=2
22 S NODE=NODE+1
23 S ^TMP("IVM2073",$J,NODE)=" "
24 ;
25PRTRECS ; Print List of records
26 S NODE=NODE+1
27 S ^TMP("IVM2073",$J,NODE)=" "
28 S TEXT=" Total IVM PATIENT Records Updated: "
29 S TEXT=$$BLDSTR($J(+$G(^XTMP(XTPAT,1)),8,0),TEXT,50,8)
30 S NODE=NODE+1
31 S ^TMP("IVM2073",$J,NODE)=TEXT
32 S NODE=NODE+1
33 S ^TMP("IVM2073",$J,NODE)=" "
34 S NODE=NODE+1
35 S ^TMP("IVM2073",$J,NODE)=" "
36 ;
37 S TEXT=" "
38 S TEXT=$$BLDSTR("DFN",TEXT,3,3)
39 S TEXT=$$BLDSTR("301.5",TEXT,16,5)
40 S TEXT=$$BLDSTR("SSN",TEXT,29,3)
41 S TEXT=$$BLDSTR("Name",TEXT,43,4)
42 S TEXT=$$BLDSTR("Addr?",TEXT,67,5)
43 S TEXT=$$BLDSTR("Ph?",TEXT,75,3)
44 S NODE=NODE+1
45 S ^TMP("IVM2073",$J,NODE)=TEXT
46 S NODE=NODE+1
47 S ^TMP("IVM2073",$J,NODE)=$$REPEAT^XLFSTR("=",79)
48 S PIEN=""
49 F S PIEN=$O(^XTMP(XTPAT,"RECS",PIEN)) Q:PIEN="" D
50 . D BLDPAT
51 S NODE=NODE+1
52 S ^TMP("IVM2073",$J,NODE)=$$REPEAT^XLFSTR("=",79)
53 ;
54MAIL1 ; Send message
55 S NODE=NODE+1
56 S ^TMP("IVM2073",$J,NODE)=" "
57 S NODE=NODE+1
58 S ^TMP("IVM2073",$J,NODE)=" ******** END OF MESSAGE ********"
59 ;
60 D ^XMD
61 K ^TMP("IVM2073",$J)
62 Q
63 ;
64BLDPAT ; Format Patient line for printing
65 N DATA,NAME,PH,AD
66 S DATA=^XTMP(XTPAT,"RECS",PIEN)
67 S R3015=$P(DATA,"^",1),NAME=$P(DATA,"^",2),SSN=$P(DATA,"^",3)
68 S AD=$P(DATA,"^",4),PH=$P(DATA,"^",5)
69 S TEXT=" "
70 S TEXT=$$BLDSTR(PIEN,TEXT,3,$L(PIEN))
71 S TEXT=$$BLDSTR(R3015,TEXT,16,$L(R3015))
72 S TEXT=$$BLDSTR(SSN,TEXT,29,$L(SSN))
73 S TEXT=$$BLDSTR($E(NAME,1,20),TEXT,43,20)
74 I AD S TEXT=$$BLDSTR("YES",TEXT,68,3)
75 I PH S TEXT=$$BLDSTR("YES",TEXT,75,3)
76 S NODE=NODE+1
77 S ^TMP("IVM2073",$J,NODE)=TEXT
78 Q
79 ;
80BLDSTR(NSTR,STR,COL,NSL) ; build a string
81 ; Input:
82 ; NSTR = a string to be added to STR
83 ; STR = an existing string to which NSTR will be added
84 ; COL = column location at which NSTR will be added to STR
85 ; NSL = length of new string
86 ; Output:
87 ; returns STR with NSTR appended at the specified COL
88 ;
89 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.