source: FOIAVistA/trunk/r/VA_FILEMAN-ARJT-DI-DD-DM-DT-%DT-%RCR/DDBRAHTE.m@ 1607

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

initial load of FOIAVistA 6/30/08 version

File size: 2.6 KB
Line 
1DDBRAHTE ;SFISC/DCL-BROWSER ANCHOR & HYPERTEXT JUMP EDIT ;NOV 04, 1996@13:51
2 ;;22.0;VA FileMan;**145**;Mar 30, 1999
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 Q
5REDIT ; root edit for hypertext jump - CLOSED_ROOT
6 Q
7 ;prototype - phasing out
8 Q:'$$CHKI
9 N DDBSAN,DDBSANS,DDBSANX,DDBSANR,X
10 S DDBSAN=$$NROOT^DDBRAP(DDBSA),DDBSANX=$P(DDBRHT,DDGLDEL,2)
11 S X(1)=" < Edit Hypertext Jump Closed_Root >"
12 S DDBSANS=$G(@DDBSAN@("H",DDBSANX)),DDBSANR=$G(@DDBSAN@("H",DDBSANX,0))
13 Q:DDBSAN=""!(DDBSANS="")
14GTR S X(1)=$G(X(1)),X(2)=" "_$E(DDBSANX,1,30)_" >"
15 W $$WS^DDBR1(.X)
16 D EN^DIR0($P(DDBSY,";",3)-1,$L($G(X(2)))+2,44,1,DDBSANR,100,1,"","KPW",.X)
17 K DIR0
18 I $E(X)="?" S X(1)="* Enter closed_root jump for hypertext: "_$E(DDBSANX,1,35)_$S($L(DDBSANX)>35:"...",1:"")_" *" G GTR
19 I DDBSANR'=X S @DDBSAN@("H",DDBSANX,0)=X
20 G OUT
21 ;
22IEDIT ; interactive edit/switch
23 Q:'$$CHKI
24 Q
25ANCH ; enter Anchor for jump
26 Q
27 ;prototype - phasing out
28 Q:'$$CHKI
29 N DDBSAN,DDBSANS,DDBSANX,DDBSANR,DDBSANCH,X
30 S DDBSAN=$$NROOT^DDBRAP(DDBSA),DDBSANX=$P(DDBRHT,DDGLDEL,2)
31 S X(1)=" < Edit Anchor Jump >"
32 S DDBSANS=$G(@DDBSAN@("H",DDBSANX)),DDBSANR=$G(@DDBSAN@("H",DDBSANX,0))
33 S DDBSANCH=$P(DDBSANS,"^",4)
34 Q:DDBSAN=""!(DDBSANS="")
35AGTR S X(1)=$G(X(1)),X(2)=" "_$E(DDBSANX,1,30)_" >"
36 W $$WS^DDBR1(.X)
37 D EN^DIR0($P(DDBSY,";",3)-1,$L($G(X(2)))+2,44,1,DDBSANCH,100,1,"","KPW",.X)
38 K DIR0
39 I $E(X)="?" S X(1)="* Enter FILE#;IEN;FIELD;ANCHOR for: "_$E(DDBSANX,1,35)_$S($L(DDBSANX)>35:"...",1:"")_" *" G AGTR
40 I DDBSANCH'=X S $P(@DDBSAN@("H",DDBSANX),"^",4)=X
41 G OUT
42 Q
43 ;
44TEDIT ; edit hypertext document title
45 I 'DDBRHTF!($G(DUZ(0))'["@") Q
46 N DDBSAN,DDBSANX,X
47 S DDBSAN=$$NROOT^DDBRAP(DDBSA),DDBSANX=$G(@DDBSAN@("TITLE"))
48 S X(1)=" < Edit Hypertext Document Title >"
49TGTR S X(1)=$G(X(1)),X(2)=" Title >"
50 W $$WS^DDBR1(.X)
51 D EN^DIR0($P(DDBSY,";",3)-1,$L($G(X(2)))+2,44,1,DDBSANX,100,1,"","KPW",.X)
52 K DIR0
53 I $E(X)="?" S X(1)="* Enter Document Name for Title *" G TGTR
54 I X'="^" D D RPS^DDBRGE Q
55 .S @DDBSAN@("TITLE")=X
56 .S DDBPMSG=X,DDBHDR=$$CTXT^DDBR(X,$J("",IOM+1),IOM)
57 .Q
58 G OUT
59 ;
60CHKI() ;return 1 if ok 0 not ok to continue also init DDBRHT if undefined
61 S DDBRHT=$G(DDBRHT)
62 Q:DDBRHT="" 0
63 I 'DDBRHTF!($G(DUZ(0))'["@") Q 0
64 I $P(DDBRHT,DDGLDEL,4)'=DDBSA Q 0
65 I +DDBRHT>DDBL Q 0
66 I +DDBRHT<($S(DDBL'>DDBSRL:0,1:DDBL-DDBSRL)+1) Q 0
67 Q 1
68 ;
69OUT D PSR^DDBR0() Q
70 ;
71RA ;Rebuild Anchors
72 I 'DDBRHTF!($G(DUZ(0))'["@") Q
73 N X,DDBSAN
74 S DDBSAN=$$NROOT^DDBRAP(DDBSA)
75 S X(1)="",X(2)=" < Rebuilding Anchor Index for HyperText Jumps >"
76 W $$WS^DDBR1(.X)
77 D WP^DDBRAP(DDBSA,"",$G(@DDBSAN@("TITLE"),DDBPMSG))
78 R X:2
79 G OUT
Note: See TracBrowser for help on using the repository browser.