source: WorldVistAEHR/trunk/r/VA_FILEMAN-ARJT-DI-DD-DM-DT-%DT-%RCR/DDBRAHTR.m@ 1150

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

initial load of WorldVistAEHR

File size: 1.7 KB
RevLine 
[613]1DDBRAHTR ;SFISC/DCL-BROWSER ANCHOR & HYPERTEXT PROCESSOR REVERSE TAB ;NOV 04, 1996@13:52
2 ;;22.0;VA FileMan;;Mar 30, 1999
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 Q
5REVTAB ; Reverse Tab
6 S DDBRHT=$G(DDBRHT)
7 I $P(DDBRHT,DDGLDEL,4)'=DDBSA S DDBRHT=""
8 N LIM,ULCLR,ULNEW
9 S LIM=DDBL,ULCLR=DDBRHT'>0,ULNEW=0
10PSR ;S DDBL=$S(DDBL'>DDBSRL:0,1:DDBL-DDBSRL)
11 D SDLR($S(DDBL'>DDBSRL:0,1:DDBL-DDBSRL)+1)
12 Q
13SDLR(L) N I,J,SFR,STO
14 I +DDBRHT<L!(+DDBRHT>LIM) S DDBRHT="",ULCLR=1
15 S DX=0,SFR=$P(DDBSY,";",3),STO=$P(DDBSY,";",2),L=L+DDBSRL
16 F I=SFR:-1:STO S L=L-1 Q:$S(DDBZN:$D(@DDBSA@(L,0)),1:$D(@DDBSA@(L)))
17 S (SFR,DY)=I X IOXY
18 F I=SFR:-1:STO D
19 .I $D(@DDBSA@(L)) S X=$S(DDBZN:@DDBSA@(L,0),1:@DDBSA@(L)),L=L-1
20 .E Q
21 .I ULCLR,ULNEW Q
22 .Q:$L(X,"$.%")'>2
23 .S WRF=0,J=$P(X,"$.%",$P(DDBRHT,DDGLDEL,3)),X=$$HTD(X,L+1)
24 .I +DDBRHT,J=$P(DDBRHT,DDGLDEL,2) S ULCLR=1,WRF=1
25 .Q:'WRF
26 .S DY=I
27 .X IOXY
28 .W $P(DDGLCLR,DDGLDEL),X
29 .Q
30 ;
31 I 'ULNEW S DDBRHT=""
32 Q
33 ;
34HTD(X,WPIEN) ;text
35 Q:'DDBRHTF $E(X,DDBSF,DDBST)
36 Q:$L(X,"$.")'>2 X
37 S:$L(X,"$.$")>2 X=$$HT(X,"$.$","","","","","","")
38 S:$L(X,"$.%")>2 X=$$HT(X,"$.%",$P(DDGLVID,DDGLDEL),$P(DDGLVID,DDGLDEL,3),(WPIEN'>+DDBRHT!(DDBRHT="")),$S(WPIEN=+DDBRHT:$P(DDBRHT,DDGLDEL,3)-2,1:$L(X,"$.%")-1),$P(DDGLVID,DDGLDEL,4),$P(DDGLVID,DDGLDEL,5))
39 Q X
40 ;
41HT(Y,D,C1,C2,UF,UP,U1,U2) ;
42 Q:$L(Y,D)'>2 Y
43 N YL,I,Y1
44 S YL=$L(Y,D),Y1=""
45 F I=1:1:YL D
46 .S:I#2 Y1=Y1_$P(Y,D,I)
47 .I UF,I=UP,'ULNEW D Q
48 ..S Y1=Y1_C1_U1_$P($P(Y,D,I),"^",$S($P(Y,D,I)["$CREF$":$L($P(Y,D,I),"^"),1:2),255)_U2_C2,ULNEW=1,WRF=1
49 ..S DDBRHT=WPIEN_DDGLDEL_$P(Y,D,I)_DDGLDEL_I_DDGLDEL_DDBSA
50 .S:'(I#2) Y1=Y1_C1_$P($P(Y,D,I),"^",$S($P(Y,D,I)["$CREF$":$L($P(Y,D,I),"^"),1:2),255)_C2
51 .Q
52 Q Y1
Note: See TracBrowser for help on using the repository browser.