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

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

initial load of WorldVistAEHR

File size: 1.5 KB
Line 
1DDBRAHT ;SFISC/DCL-BROWSER ANCHOR & HYPERTEXT PROCESSOR ;NOV 04, 1996@13:50
2 ;;22.0;VA FileMan;;Mar 30, 1999
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 Q
5TAB ;
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(DDBL+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,";",2),STO=$P(DDBSY,";",3)
16 S DY=SFR X IOXY
17 F I=SFR:1:STO D
18 .I $D(@DDBSA@(L)) S X=$S(DDBZN:@DDBSA@(L,0),1:@DDBSA@(L)),DDBL=DDBL+1,L=L+1
19 .E Q
20 .I ULCLR,ULNEW Q
21 .Q:$L(X,"$.%")'>2
22 .S WRF=0,J=$P(X,"$.%",$P(DDBRHT,DDGLDEL,3)),X=$$HTD(X,L-1)
23 .I +DDBRHT,J=$P(DDBRHT,DDGLDEL,2) S ULCLR=1,WRF=1
24 .Q:'WRF
25 .S DY=I
26 .X IOXY
27 .W $P(DDGLCLR,DDGLDEL),X
28 .Q
29 ;
30 I 'ULNEW S DDBRHT=""
31 Q
32 ;
33HTD(X,WPIEN) ;text
34 Q:'DDBRHTF $E(X,DDBSF,DDBST)
35 Q:$L(X,"$.")'>2 X
36 S:$L(X,"$.$")>2 X=$$HT(X,"$.$","","","","","","")
37 S:$L(X,"$.%")>2 X=$$HT(X,"$.%",$P(DDGLVID,DDGLDEL),$P(DDGLVID,DDGLDEL,3),WPIEN'<+DDBRHT,$S(WPIEN=+DDBRHT:$P(DDBRHT,DDGLDEL,3)+2,1:2),$P(DDGLVID,DDGLDEL,4),$P(DDGLVID,DDGLDEL,5))
38 Q X
39 ;
40HT(Y,D,C1,C2,UF,UP,U1,U2) ;
41 Q:$L(Y,D)'>2 Y
42 N YL,I,Y1
43 S YL=$L(Y,D),Y1=""
44 F I=1:1:YL D
45 .S:I#2 Y1=Y1_$P(Y,D,I)
46 .I UF,I=UP,'ULNEW D Q
47 ..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
48 ..S DDBRHT=WPIEN_DDGLDEL_$P(Y,D,I)_DDGLDEL_I_DDGLDEL_DDBSA
49 .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
50 .Q
51 Q Y1
Note: See TracBrowser for help on using the repository browser.