source: WorldVistAEHR/trunk/r/PATIENT_DATA_EXCHANGE-VAQ/VAQDIS20.m@ 975

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

initial load of WorldVistAEHR

File size: 1.8 KB
Line 
1VAQDIS20 ;ALB/JFP - Function Calls for Display;03FEB93
2 ;;1.5;PATIENT DATA EXCHANGE;;NOV 17, 1993
3 ;
4FUNCT ; *************** Function Calls ***************
5 ;
6CENTER(LINE,CTR) ; -- Centers text on 80 column screen
7 ; INPUT : line - line to center in
8 ; : ctr - text to center
9 ; OUTPUT : X - centered text
10 Q:('$D(LINE)) ""
11 Q:('$D(CTR)) ""
12 N LEN,LNST
13 S LEN=$L(CTR)
14 S LNST=((80-LEN)\2)+1
15 S X=$$INSERT^VAQUTL1(CTR,LINE,LNST,LEN)
16 Q X
17 ;
18STATE(STATE) ; -- Converts state to abrev
19 ; INPUT : state - long state
20 ; OUTPUT : stavb - abrev state
21 Q:('$D(STATE)) ""
22 Q:STATE="" ""
23 N SDA,STABV
24 S SDA="",SDA=$O(^DIC(5,"B",STATE,SDA))
25 S STABV=$S(SDA'="":$P(^DIC(5,SDA,0),U,2),1:" ")
26 Q STABV
27 ;
28COUNTY(STATE,CNTYPT) ; -- Converts county pointer to apha, if passed
29 ; INPUT : state - long state
30 ; : cntypt - county pointer OR text
31 ; OUTPUT : county - county name
32 Q:('$D(STATE)) ""
33 Q:('$D(CNTYPT)) ""
34 Q:(CNTYPT'?1N.N) CNTYPT
35 Q:STATE="" ""
36 Q:CNTYPT="" ""
37 N SDA,CDA,STAVB,COUNTY
38 S (SDA,CDA)=""
39 S SDA=$O(^DIC(5,"B",STATE,SDA))
40 Q:SDA="" ""
41 S CDA=$O(^DIC(5,SDA,1,"C",CNTYPT,CDA))
42 S COUNTY=$S(CDA'="":$P(^DIC(5,SDA,1,CDA,0),U,1),1:" ")
43 Q COUNTY
44 QUIT
45 ;
46BLANK ; -- Sets up blank line
47 S X=$$SETSTR^VALM1(" ","",1,80) D TMP ; -- null line
48 QUIT
49 ;
50TMP ; -- Sets up display array
51 S VALMCNT=VALMCNT+1
52 S @ROOT@(VALMCNT,0)=$E(X,1,79)
53 QUIT
54 ;
55ROOT(ROOT) ; -- Sets root to display
56 I ROOT["()" S TMP=$P(ROOT,")",1),ROOT=TMP_$C(34)_"DISPLAY"_$C(34)_")" K TMP QUIT ROOT
57 I ROOT[")" S TMP=$P(ROOT,")",1),ROOT=TMP_","_$C(34)_"DISPLAY"_$C(34)_")" K TMP QUIT ROOT
58 I ROOT'[")" S ROOT=ROOT_"("_$C(34)_"DISPLAY"_$C(34)_")" QUIT ROOT
59 QUIT ROOT
60 ;
61END ; -- End of code
62 QUIT
Note: See TracBrowser for help on using the repository browser.