source: WorldVistAEHR/trunk/r/PATIENT_DATA_EXCHANGE-VAQ/VAQDIS25.m@ 1442

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

initial load of WorldVistAEHR

File size: 3.1 KB
Line 
1VAQDIS25 ;ALB/JFP,JRP - PDX, BUILDS DISPLAY ARRAY FOR MAS DATA ;01MAR93
2 ;;1.5;PATIENT DATA EXCHANGE;**13**;NOV 17, 1993
3SCR3 ; -- Builds MAS DATA SCREEN 3, NEXT OF KIN
4ROW0 ; -- Header
5 D BLANK^VAQDIS20
6 S VAQLN=$$REPEAT^VAQUTL1(" ",79)
7 S VAQCTR=" -- NEXT OF KIN -- "
8 S X=$$CENTER^VAQDIS20(VAQLN,VAQCTR)
9 D TMP,BLANK^VAQDIS20
10 K VAQLN,VAQCTR
11ROW1 ;
12 S VAQTMP=$G(@XTRCT@("VALUE",2,.211,0))
13 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
14 S X=$$SETSTR^VALM1("Nok: "_VAQINF,"",10,46)
15 S VAQTMP=$G(@XTRCT@("VALUE",2,.2191,0))
16 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
17 S X=$$SETSTR^VALM1("Nok-2: "_VAQINF,X,47,32)
18 D TMP K VAQTMP,VAQINF
19ROW2 ;
20 S VAQTMP=$G(@XTRCT@("VALUE",2,.212,0))
21 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
22 S X=$$SETSTR^VALM1("Relation: "_VAQINF,"",5,43)
23 S VAQTMP=$G(@XTRCT@("VALUE",2,.2192,0))
24 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
25 S X=$$SETSTR^VALM1("Relation: "_VAQINF,X,44,37)
26 D TMP K VAQTMP,VAQINF
27 ;
28NOK ; -- NOK Address
29 K ADDR
30 S VAQTMP=1
31 F VAQX=.213,.214,.215 D Q:(VAQINF="")
32 .S VAQINF=$G(@XTRCT@("VALUE",2,VAQX,0))
33 .I ((VAQX=.213)&(VAQINF="")) S VAQINF="STREET ADDRESS UNKNOWN"
34 .Q:(VAQINF="")
35 .S ADDR(VAQTMP)=VAQINF
36 .S VAQTMP=VAQTMP+1
37 S CTY=$G(@XTRCT@("VALUE",2,.216,0))
38 S ZIP=$G(@XTRCT@("VALUE",2,.2207,0))
39 S STATE=$$STATE^VAQDIS20($G(@XTRCT@("VALUE",2,.217,0)))
40 S VAQINF=$S((CTY="")&(STATE="")&(ZIP=""):"CITY/STATE/ZIP UNKNOWN",1:CTY_$S(STATE="":" ",1:", ")_STATE_" "_ZIP)
41 S ADDR(VAQTMP)=VAQINF
42NOK2 ;NOK-2 Address
43 K ADDRT
44 S VAQTMP=1
45 F VAQX=.2193,.2194,.2195 D Q:(VAQINF="")
46 .S VAQINF=$G(@XTRCT@("VALUE",2,VAQX,0))
47 .I ((VAQX=.2193)&(VAQINF="")) S VAQINF="STREET ADDRESS UNKNOWN"
48 .Q:(VAQINF="")
49 .S ADDRT(VAQTMP)=VAQINF
50 .S VAQTMP=VAQTMP+1
51 S CTY=$G(@XTRCT@("VALUE",2,.2196,0))
52 S ZIP=$G(@XTRCT@("VALUE",2,.2203,0))
53 S STATE=$$STATE^VAQDIS20($G(@XTRCT@("VALUE",2,.2197,0)))
54 S VAQINF=$S((CTY="")&(STATE="")&(ZIP=""):"CITY/STATE/ZIP UNKNOWN",1:CTY_$S(STATE="":" ",1:", ")_STATE_" "_ZIP)
55 S ADDRT(VAQTMP)=VAQINF
56 D ADRLOAD
57 K ADDR,ADDRT,VAQTMP,VAQINF,VAQX,CTY,STATE,ZIP
58 ;
59ROW5 ; -- Phone
60 S VAQTMP=$G(@XTRCT@("VALUE",2,.219,0))
61 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
62 S X=$$SETSTR^VALM1("Phone: "_VAQINF,"",8,46)
63 S VAQTMP=$G(@XTRCT@("VALUE",2,.2199,0))
64 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
65 S X=$$SETSTR^VALM1("Phone: "_VAQINF,X,47,32)
66 D TMP K VAQTMP,VAQINF
67 ;
68ROW6 ; -- Work Phone
69 S VAQTMP=$G(@XTRCT@("VALUE",2,.21011,0))
70 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
71 S X=$$SETSTR^VALM1("Work Phone: "_VAQINF,"",3,41)
72 S VAQTMP=$G(@XTRCT@("VALUE",2,.211011,0))
73 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
74 S X=$$SETSTR^VALM1("Work Phone: "_VAQINF,X,42,37)
75 D TMP K VAQTMP,VAQINF
76 ;
77 D BLANK^VAQDIS20
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.