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

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

initial load of FOIAVistA 6/30/08 version

File size: 2.6 KB
Line 
1DGRRPSAM ; ALB/SGG - rtnDGRR PatientServices Address Main ; 09/30/03 ; Compiled October 2, 2003 16:00:54
2 ;;5.3;Registration;**557**;Aug 13, 1993
3 ;
4DOC ;<DataSet Name='MainAddress'
5 ;.111 STREET ADDRESS [LINE 1] (Fa), [.11;1]
6 ;.112 STREET ADDRESS [LINE 2] (Fa), [.11;2]
7 ;.113 STREET ADDRESS [LINE 3] (Fa), [.11;3]
8 ;.114 CITY (Fa), [.11;4]
9 ;.115 STATE (P5'a), [.11;5]
10 ;.116 ZIP CODE (F), [.11;6]
11 ; .1112 ZIP+4 (FXOa), [.11;12]
12 ;.117 COUNTY (NJ3,0XOa), [.11;7]
13 ;.121 BAD ADDRESS INDICATOR (S), [.11;16]
14 ; '1' FOR UNDELIVERABLE;
15 ; '2' FOR HOMELESS;
16 ; '3' FOR OTHER;
17 ;.14105 CONFIDENTIAL ADDRESS ACTIVE? (RSX), [.141;9]
18 ;.131 PHONE NUMBER [RESIDENCE] (Fa), [.13;1]
19 ;.132 PHONE NUMBER [WORK] (Fa), [.13;2]
20 ;
21GETPSARY(PSARRAY) ;
22 NEW CNT
23 SET CNT=$G(CNT)+1,PSARRAY(CNT)="<DataSet Name='MainAddress'"
24 SET CNT=$G(CNT)+1,PSARRAY(CNT)="^Street1^"_$$AMSTRE1()
25 SET CNT=$G(CNT)+1,PSARRAY(CNT)="^Street2^"_$$AMSTRE2()
26 SET CNT=$G(CNT)+1,PSARRAY(CNT)="^Street3^"_$$AMSTRE3()
27 SET CNT=$G(CNT)+1,PSARRAY(CNT)="^City^"_$$AMCITY()
28 SET CNT=$G(CNT)+1,PSARRAY(CNT)="^State^"_$$AMSTATE()
29 SET CNT=$G(CNT)+1,PSARRAY(CNT)="^Zip^"_$$AMZIP()
30 SET CNT=$G(CNT)+1,PSARRAY(CNT)="^County^"_$$AMCOUNTY()
31 SET CNT=$G(CNT)+1,PSARRAY(CNT)="^StartDate^"
32 SET CNT=$G(CNT)+1,PSARRAY(CNT)="^EndDate^"
33 SET CNT=$G(CNT)+1,PSARRAY(CNT)="^BadAddressIndicator^"_$$AMBADIND()
34 SET CNT=$G(CNT)+1,PSARRAY(CNT)="^ConfidentialAddressActive^"_$$AMCNFAC()
35 SET CNT=$G(CNT)+1,PSARRAY(CNT)="^PhoneNumber^"
36 SET CNT=$G(CNT)+1,PSARRAY(CNT)="^HomePhoneNumber^"_$$AMPHNHM()
37 SET CNT=$G(CNT)+1,PSARRAY(CNT)="^WorkPhoneNumber^"_$$AMPHNWK()
38 SET CNT=$G(CNT)+1,PSARRAY(CNT)="></DataSet>"_"^^^1"
39 QUIT
40 ;
41AMSTRE1() ;
42 QUIT $P(GLOB(.11),"^",1)
43 ;
44AMSTRE2() ;
45 QUIT $P(GLOB(.11),"^",2)
46 ;
47AMSTRE3() ;
48 QUIT $P(GLOB(.11),"^",3)
49 ;
50AMCITY() ;
51 QUIT $P(GLOB(.11),"^",4)
52 ;
53AMSTATE() ;
54 NEW DATA
55 SET DATA=$P(GLOB(.11),"^",5)
56 IF DATA'="" SET DATA=$P($G(^DIC(5,DATA,0)),"^",2)
57 QUIT DATA
58 ;
59AMZIP() ;
60 NEW DATA
61 SET DATA=$P(GLOB(.11),"^",12)
62 IF DATA="" SET DATA=$P(GLOB(.11),"^",6)
63 QUIT DATA
64 ;
65AMCOUNTY() ;
66 NEW DATA,STATE
67 SET STATE=$P(GLOB(.11),"^",5)
68 SET DATA=$P(GLOB(.11),"^",7)
69 IF DATA'="",STATE'="" SET DATA=$P($G(^DIC(5,STATE,1,DATA,0)),"^",1)
70 QUIT DATA
71 ;
72AMBADIND() ;
73 NEW DATA
74 SET DATA=$P(GLOB(.11),"^",16)
75 SET DATA=$S(DATA=1:"UNDELIVERABLE",DATA=2:"HOMELESS",DATA=3:"OTHER",1:"")
76 QUIT DATA
77 ;
78AMCNFAC() ;
79 NEW DATA
80 SET DATA=$P(GLOB(.141),"^",9)
81 SET DATA=$S(DATA="Y":"YES",1:"NO")
82 QUIT DATA
83 ;
84AMPHNHM() ;
85 QUIT $P(GLOB(.13),"^",1)
86 ;
87AMPHNWK() ;
88 QUIT $P(GLOB(.13),"^",2)
Note: See TracBrowser for help on using the repository browser.