source: FOIAVistA/trunk/r/VA_FILEMAN-ARJT-DI-DD-DM-DT-%DT-%RCR/DDGFUPDP.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: 3.1 KB
Line 
1DDGFUPDP ;SFISC/MKO-UPDATE PAGE COORDINATES ;01:37 PM 19 Jan 1994
2 ;;22.0;VA FileMan;;Mar 30, 1999
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5PAGE(P1,P2,P3,P4,T,A) ;
6 ;
7 D DESTROY^DDGLIBW(DDGFWID,1),DESTROY^DDGLIBW(DDGFWIDB,1)
8 I P3]"" D
9 . D REPALL^DDGLIBW($G(A))
10 . D CREATE^DDGLIBW(DDGFWID,P1_U_P2_U_(P3-P1+1)_U_(P4-P2+1),1)
11 . S DDGFLIM=P1_U_P2_U_P3_U_P4
12 E D
13 . D CLOSEALL^DDGLIBW()
14 . D CREATE^DDGLIBW(DDGFWID,P1_U_P2_U_(IOSL-7-P1)_U_(IOM-1-P2))
15 . S DDGFLIM=P1_U_P2_U_(IOSL-8)_U_(IOM-2)
16 D:T="PTOP" TOP(P1,P2,P3,P4)
17 D:T="PBRC" BRC(P1,P2,P3,P4)
18 Q
19 ;
20TOP(P1,P2,P3,P4) ;Update page image
21 ;
22 N B,C,C1,C2,C3,D1,D2,D3,F,I,L,N,P,X1,Y1
23 ;
24 S P=DDGFPG
25 S N=@DDGFREF@("F",P)
26 S Y1=P1-$P(N,U),X1=P2-$P(N,U,2)
27 I 'Y1,'X1 Q
28 ;
29 I $P(N,U,3)]"" D
30 . K @DDGFREF@("RC",DDGFWID,$P(N,U),$P(N,U,2),$P(N,U,4),"P","P","PTOP")
31 . K @DDGFREF@("RC",DDGFWID,$P(N,U,3),$P(N,U,4),$P(N,U,4),"P","P","PBRC")
32 I $G(P3)]"" D
33 . S @DDGFREF@("RC",DDGFWID,P1,P2,P4,"P","P","PTOP")=""
34 . S @DDGFREF@("RC",DDGFWID,P3,P4,P4,"P","P","PBRC")=""
35 ;
36 S $P(N,U,1,4)=P1_U_P2_U_P3_U_P4,$P(N,U,7)=1,DDGFCHG=1
37 S @DDGFREF@("F",P)=N
38 ;
39 ;Loop through all blocks on page
40 S B="" F S B=$O(@DDGFREF@("F",P,B)) Q:B="" D
41 . S N=@DDGFREF@("F",P,B)
42 . S @DDGFREF@("BKRC",DDGFWIDB,$P(N,U)+Y1,$P(N,U,2)+X1,$P(N,U,3)+X1,B)=@DDGFREF@("BKRC",DDGFWIDB,$P(N,U),$P(N,U,2),$P(N,U,3),B)
43 . K @DDGFREF@("BKRC",DDGFWIDB,$P(N,U),$P(N,U,2),$P(N,U,3),B)
44 . S $P(N,U,1,3)=$P(N,U)+Y1_U_($P(N,U,2)+X1)_U_($P(N,U,3)+X1)
45 . S @DDGFREF@("F",P,B)=N
46 . ;
47 . S F="" F S F=$O(@DDGFREF@("F",P,B,F)) Q:F="" D
48 .. S N=@DDGFREF@("F",P,B,F)
49 .. S C1=$P(N,U),C2=$P(N,U,2),C3=$P(N,U,3),C=$P(N,U,4)
50 .. S D1=$P(N,U,5),D2=$P(N,U,6),D3=$P(N,U,7),L=$P(N,U,8)
51 .. ;
52 .. I Y1 S:C1]"" $P(N,U)=C1+Y1 S:L $P(N,U,5)=D1+Y1
53 .. I X1 D
54 ... I C]"" F I=2,3 S $P(N,U,I)=$P(N,U,I)+X1
55 ... I L F I=6,7 S $P(N,U,I)=$P(N,U,I)+X1
56 .. S @DDGFREF@("F",P,B,F)=N
57 .. ;
58 .. I C]"" D
59 ... K @DDGFREF@("RC",DDGFWID,C1,C2,C3,B,F,"C")
60 ... S @DDGFREF@("RC",DDGFWID,$P(N,U),$P(N,U,2),$P(N,U,3),B,F,"C")=""
61 .. I L D
62 ... K @DDGFREF@("RC",DDGFWID,D1,D2,D3,B,F,"D")
63 ... S @DDGFREF@("RC",DDGFWID,$P(N,U,5),$P(N,U,6),$P(N,U,7),B,F,"D")=""
64 .. ;
65 .. D:C]"" WRITE^DDGLIBW(DDGFWID,C,$P(N,U)-P1,$P(N,U,2)-P2)
66 .. D:L WRITE^DDGLIBW(DDGFWID,$TR($J("",L)," ","_"),$P(N,U,5)-P1,$P(N,U,6)-P2)
67 Q
68 ;
69BRC(P1,P2,P3,P4) ;Change bottom right coordinate of page
70 N B,C,F,L,N,P
71 S P=DDGFPG
72 S N=@DDGFREF@("F",P)
73 I $P(N,U,3)]"" D
74 . K @DDGFREF@("RC",DDGFWID,$P(N,U),$P(N,U,2),$P(N,U,4),"P","P","PTOP")
75 . K @DDGFREF@("RC",DDGFWID,$P(N,U,3),$P(N,U,4),$P(N,U,4),"P","P","PBRC")
76 I $G(P3)]"" D
77 . S @DDGFREF@("RC",DDGFWID,P1,P2,P4,"P","P","PTOP")=""
78 . S @DDGFREF@("RC",DDGFWID,P3,P4,P4,"P","P","PBRC")=""
79 ;
80 S $P(N,U,1,4)=P1_U_P2_U_P3_U_P4,$P(N,U,7)=1,DDGFCHG=1
81 S @DDGFREF@("F",P)=N
82 ;
83 ;Loop through all blocks/fields on page
84 S B="" F S B=$O(@DDGFREF@("F",P,B)) Q:B="" D
85 . S F="" F S F=$O(@DDGFREF@("F",P,B,F)) Q:F="" D
86 .. S N=@DDGFREF@("F",P,B,F)
87 .. S C=$P(N,U,4),L=$P(N,U,8)
88 .. ;
89 .. I C]"" D WRITE^DDGLIBW(DDGFWID,C,$P(N,U)-P1,$P(N,U,2)-P2)
90 .. I L D WRITE^DDGLIBW(DDGFWID,$TR($J("",L)," ","_"),$P(N,U,5)-P1,$P(N,U,6)-P2)
91 Q
Note: See TracBrowser for help on using the repository browser.