source: FOIAVistA/trunk/r/PATIENT_DATA_EXCHANGE-VAQ/VAQDIS27.m@ 1671

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

initial load of FOIAVistA 6/30/08 version

File size: 3.1 KB
Line 
1VAQDIS27 ;ALB/JFP,JRP - PDX, BUILDS DISPLAY ARRAY FOR MAS DATA ;01MAR93
2 ;;1.5;PATIENT DATA EXCHANGE;**13**;NOV 17, 1993
3SCR4 ; -- Builds MAS DATA SCREEN 4, APPLICANT/SPOUSE EMPLOYMENT DATA
4ROW0 ; -- Builds header
5 D BLANK^VAQDIS20
6 S VAQLN=$$REPEAT^VAQUTL1(" ",79)
7 S VAQCTR=" -- APPLICANT/SPOUSE EMPLOYMENT -- "
8 S X=$$CENTER^VAQDIS20(VAQLN,VAQCTR)
9 D TMP,BLANK^VAQDIS20
10 K VAQLN,VAQCTR
11ROW1 ;
12 S VAQTMP=$G(@XTRCT@("VALUE",2,.3111,0))
13 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
14 S X=$$SETSTR^VALM1("Employer: "_VAQINF,"",5,44)
15 S VAQTMP=$G(@XTRCT@("VALUE",2,.251,0))
16 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
17 S X=$$SETSTR^VALM1("Spouse's: "_VAQINF,X,44,35)
18 D TMP K VAQTMP,VAQINF
19 ;
20EMP ; -- Employer address
21 K ADDR
22 S VAQTMP=1
23 F VAQX=.3113,.3114,.3115 D Q:(VAQINF="")
24 .S VAQINF=$G(@XTRCT@("VALUE",2,VAQX,0))
25 .I ((VAQX=.3113)&(VAQINF="")) S VAQINF="STREET ADDRESS UNKNOWN"
26 .Q:(VAQINF="")
27 .S ADDR(VAQTMP)=VAQINF
28 .S VAQTMP=VAQTMP+1
29 S CTY=$G(@XTRCT@("VALUE",2,.3116,0))
30 S ZIP=$G(@XTRCT@("VALUE",2,.2204,0))
31 S STATE=$$STATE^VAQDIS20($G(@XTRCT@("VALUE",2,.3117,0)))
32 S VAQINF=$S((CTY="")&(STATE="")&(ZIP=""):"CITY/STATE/ZIP UNKNOWN",1:CTY_$S(STATE="":" ",1:", ")_STATE_" "_ZIP)
33 S ADDR(VAQTMP)=VAQINF
34EMPSP ;Spouse's employer address
35 K ADDRT
36 S VAQTMP=1
37 F VAQX=.252,.253,.254 D Q:(VAQINF="")
38 .S VAQINF=$G(@XTRCT@("VALUE",2,VAQX,0))
39 .I ((VAQX=.252)&(VAQINF="")) S VAQINF="STREET ADDRESS UNKNOWN"
40 .Q:(VAQINF="")
41 .S ADDRT(VAQTMP)=VAQINF
42 .S VAQTMP=VAQTMP+1
43 S CTY=$G(@XTRCT@("VALUE",2,.255,0))
44 S ZIP=$G(@XTRCT@("VALUE",2,.2206,0))
45 S STATE=$$STATE^VAQDIS20($G(@XTRCT@("VALUE",2,.256,0)))
46 S VAQINF=$S((CTY="")&(STATE="")&(ZIP=""):"CITY/STATE/ZIP UNKNOWN",1:CTY_$S(STATE="":" ",1:", ")_STATE_" "_ZIP)
47 S ADDRT(VAQTMP)=VAQINF
48 D ADRLOAD
49 K ADDR,ADDRT,VAQTMP,VAQINF,VAQX,CTY,STATE,ZIP
50 ;
51ROW4 ; -- Phone
52 S VAQTMP=$G(@XTRCT@("VALUE",2,.3119,0))
53 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
54 S X=$$SETSTR^VALM1("Phone: "_VAQINF,"",8,46)
55 S VAQTMP=$G(@XTRCT@("VALUE",2,.258,0))
56 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
57 S X=$$SETSTR^VALM1("Phone: "_VAQINF,X,47,32)
58 D TMP K VAQTMP,VAQINF
59 ;
60ROW5 ; -- Occupation
61 S VAQTMP=$G(@XTRCT@("VALUE",2,.07,0))
62 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
63 S X=$$SETSTR^VALM1("Occupation: "_VAQINF,"",3,41)
64 S VAQTMP=$G(@XTRCT@("VALUE",2,.2514,0))
65 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
66 S X=$$SETSTR^VALM1("Occupation: "_VAQINF,X,42,37)
67 D TMP K VAQTMP,VAQINF
68 ;
69ROW6 ; -- Status
70 S VAQTMP=$G(@XTRCT@("VALUE",2,.31115,0))
71 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
72 S X=$$SETSTR^VALM1("Status: "_VAQINF,"",7,46)
73 S VAQTMP=$G(@XTRCT@("VALUE",2,.2515,0))
74 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
75 S X=$$SETSTR^VALM1("Status: "_VAQINF,X,46,33)
76 D TMP K VAQTMP,VAQINF
77 ;
78EXIT ; -- Sets the number of lines in display
79 QUIT
80 ;
81ADRLOAD ; -- Loads addresses into display array
82 F VAQX=1:1:4 D
83 .S VAQINF=""
84 .S:($D(ADDR(VAQX))) VAQINF=$$SETSTR^VALM1(ADDR(VAQX),VAQINF,15,53)
85 .S:($D(ADDRT(VAQX))) VAQINF=$$SETSTR^VALM1(ADDRT(VAQX),VAQINF,54,25)
86 .Q:(VAQINF="")
87 .S VALMCNT=VALMCNT+1
88 .S @ROOT@(VALMCNT,0)=$E(VAQINF,1,79)
89 Q
90 ;
91TMP ; -- Sets up display array
92 S VALMCNT=VALMCNT+1
93 S @ROOT@(VALMCNT,0)=$E(X,1,79)
94 QUIT
95 ;
96END ; -- End of code
97 QUIT
Note: See TracBrowser for help on using the repository browser.