source: WorldVistAEHR/trunk/r/PATIENT_DATA_EXCHANGE-VAQ/VAQDIS26.m@ 691

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

initial load of WorldVistAEHR

File size: 4.3 KB
RevLine 
[613]1VAQDIS26 ;ALB/JFP - PDX, BUILDS DISPLAY ARRAY FOR MAS DATA ;01MAR93
2 ;;1.5;PATIENT DATA EXCHANGE;**13**;NOV 17, 1993
3SCR3 ; -- Builds MAS DATA SCREEN 3 CONTINUE, EMERGENCY CONTACT
4ROW0 ; -- Header
5 S VAQLN=$$REPEAT^VAQUTL1(" ",79)
6 S VAQCTR=" -- EMERGENCY CONTACT -- "
7 S X=$$CENTER^VAQDIS20(VAQLN,VAQCTR)
8 D TMP,BLANK^VAQDIS20
9 K VAQLN,VAQCTR
10ROW1 ;
11 S VAQTMP=$G(@XTRCT@("VALUE",2,.331,0))
12 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
13 S X=$$SETSTR^VALM1("E-Cont: "_VAQINF,"",7,37)
14 S VAQTMP=$G(@XTRCT@("VALUE",2,.3311,0))
15 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
16 S X=$$SETSTR^VALM1("E2-Cont: "_VAQINF,X,45,34)
17 D TMP K VAQTMP,VAQINF
18ROW2 ;
19 S VAQTMP=$G(@XTRCT@("VALUE",2,.332,0))
20 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
21 S X=$$SETSTR^VALM1("Relation: "_VAQINF,"",5,43)
22 S VAQTMP=$G(@XTRCT@("VALUE",2,.3312,0))
23 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
24 S X=$$SETSTR^VALM1("Relation: "_VAQINF,X,44,37)
25 D TMP K VAQTMP,VAQINF
26 ;
27EMER ; Emergency contact address
28 K ADDR
29 S VAQTMP=1
30 F VAQX=.333,.334,.335 D Q:(VAQINF="")
31 .S VAQINF=$G(@XTRCT@("VALUE",2,VAQX,0))
32 .I ((VAQX=.333)&(VAQINF="")) S VAQINF="STREET ADDRESS UNKNOWN"
33 .Q:(VAQINF="")
34 .S ADDR(VAQTMP)=VAQINF
35 .S VAQTMP=VAQTMP+1
36 S CTY=$G(@XTRCT@("VALUE",2,.336,0))
37 S ZIP=$G(@XTRCT@("VALUE",2,.2201,0))
38 S STATE=$$STATE^VAQDIS20($G(@XTRCT@("VALUE",2,.337,0)))
39 S VAQINF=$S((CTY="")&(STATE="")&(ZIP=""):"CITY/STATE/ZIP UNKNOWN",1:CTY_$S(STATE="":" ",1:", ")_STATE_" "_ZIP)
40 S ADDR(VAQTMP)=VAQINF
41EMER2 ;Emergency contact 2 address
42 K ADDRT
43 S VAQTMP=1
44 F VAQX=.3313,.3314,.3315 D Q:(VAQINF="")
45 .S VAQINF=$G(@XTRCT@("VALUE",2,VAQX,0))
46 .I ((VAQX=.2193)&(VAQINF="")) S VAQINF="STREET ADDRESS UNKNOWN"
47 .Q:(VAQINF="")
48 .S ADDRT(VAQTMP)=VAQINF
49 .S VAQTMP=VAQTMP+1
50 S CTY=$G(@XTRCT@("VALUE",2,.3316,0))
51 S ZIP=$G(@XTRCT@("VALUE",2,.2204,0))
52 S STATE=$$STATE^VAQDIS20($G(@XTRCT@("VALUE",2,.3317,0)))
53 S VAQINF=$S((CTY="")&(STATE="")&(ZIP=""):"CITY/STATE/ZIP UNKNOWN",1:CTY_$S(STATE="":" ",1:", ")_STATE_" "_ZIP)
54 S ADDRT(VAQTMP)=VAQINF
55 D ADRLOAD
56 K ADDR,ADDRT,VAQTMP,VAQINF,VAQX,CTY,STATE,ZIP
57 ;
58ROW5 ; -- Phone
59 S VAQTMP=$G(@XTRCT@("VALUE",2,.339,0))
60 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
61 S X=$$SETSTR^VALM1("Phone: "_VAQINF,"",8,46)
62 S VAQTMP=$G(@XTRCT@("VALUE",2,.3319,0))
63 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
64 S X=$$SETSTR^VALM1("Phone: "_VAQINF,X,47,32)
65 D TMP K VAQTMP,VAQINF
66 ;
67ROW6 ; -- Work Phone
68 S VAQTMP=$G(@XTRCT@("VALUE",2,.33011,0))
69 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
70 S X=$$SETSTR^VALM1("Work Phone: "_VAQINF,"",3,41)
71 S VAQTMP=$G(@XTRCT@("VALUE",2,.331011,0))
72 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
73 S X=$$SETSTR^VALM1("Work Phone: "_VAQINF,X,42,37)
74 D TMP K VAQTMP,VAQINF
75 D BLANK^VAQDIS20
76ROW7 ;
77 S VAQTMP=$G(@XTRCT@("VALUE",2,.341,0))
78 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
79 S X=$$SETSTR^VALM1("Designee: "_VAQINF,"",5,36)
80 S VAQTMP=$G(@XTRCT@("VALUE",2,.342,0))
81 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
82 S X=$$SETSTR^VALM1("Relation: "_VAQINF,X,44,37)
83 D TMP K VAQTMP,VAQINF
84 ;
85ROW8 ; -- Address line 1,2,3
86 F VAQX=.343,.344,.345 D
87 .S VAQINF=$G(@XTRCT@("VALUE",2,VAQX,0))
88 .S:((VAQX=.343)&(VAQINF="")) VAQINF="STREET ADDRESS UNKNOWN"
89 .Q:(VAQINF="")
90 .S X=$$SETSTR^VALM1(VAQINF,"",15,53)
91 .D TMP
92 K VAQTMP,VAQINF,VAQFLAG,VAQX
93 ;
94ROW9 ; -- (city,state,zip)
95 S CTY=$G(@XTRCT@("VALUE",2,.346,0))
96 S ZIP=$G(@XTRCT@("VALUE",2,.2202,0))
97 S STATE=$$STATE^VAQDIS20($G(@XTRCT@("VALUE",2,.347,0)))
98 S VAQINF=$S((CTY="")&(STATE="")&(ZIP=""):"CITY/STATE/ZIP UNKNOWN",1:CTY_$S(STATE="":" ",1:", ")_STATE_" "_ZIP)
99 S X=$$SETSTR^VALM1(VAQINF,"",15,53)
100 D TMP K CTY,STATE,ZIP,VAQINF
101 ;
102ROW10 ;
103 S VAQTMP=$G(@XTRCT@("VALUE",2,.349,0))
104 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
105 S X=$$SETSTR^VALM1("Phone: "_VAQINF,"",8,34)
106 S VAQTMP=$G(@XTRCT@("VALUE",2,.34011,0))
107 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
108 S X=$$SETSTR^VALM1("Work Phone: "_VAQINF,X,42,37)
109 D TMP K VAQTMP,VAQINF
110 ;
111EXIT ; -- Sets the number of lines in display
112 QUIT
113 ;
114ADRLOAD ; -- Loads address into display array
115 F VAQX=1:1:4 D
116 .S VAQINF=""
117 .S:($D(ADDR(VAQX))) VAQINF=$$SETSTR^VALM1(ADDR(VAQX),VAQINF,15,53)
118 .S:($D(ADDRT(VAQX))) VAQINF=$$SETSTR^VALM1(ADDRT(VAQX),VAQINF,54,25)
119 .Q:(VAQINF="")
120 .S VALMCNT=VALMCNT+1
121 .S @ROOT@(VALMCNT,0)=$E(VAQINF,1,79)
122 Q
123 ;
124TMP ; -- Sets up display array
125 S VALMCNT=VALMCNT+1
126 S @ROOT@(VALMCNT,0)=$E(X,1,79)
127 QUIT
128 ;
129END ; -- End of code
130 QUIT
Note: See TracBrowser for help on using the repository browser.