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

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

initial load of FOIAVistA 6/30/08 version

File size: 4.3 KB
Line 
1DDS01 ;SFISC/MLH,MKO-PROCESS BLOCK ;9:03 AM 30 Mar 2000
2 ;;22.0;VA FileMan;**8,39**;Mar 30, 1999
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 F D IN,CHK Q:"^Q^NB^NP^"[(U_DDACT_U)
5 Q
6 ;
7IN K DDSBR,DDSFLD,DDSO,DDSU,DIR
8 S:$D(@DDSREFS@(DDSPG,$S(DDO:DDSBK,1:0),DDO,"N"))#2 DDSU("N")=^("N")
9 ;
10 I DDM,'$G(DDSKM) D CLRMSG^DDS
11 G:'DDO COM^DDSCOM
12 ;
13 S DDSOSV=0
14 F DDSI=0,1,2,4,7,10:1:14,20 D
15 . S:$D(^DIST(.404,DDSBK,40,DDO,DDSI))#2 DDSO(DDSI)=^(DDSI)
16 K DDSI
17 ;
18 S DDSFLD=$G(DDSO(1)) K DDSO(1)
19 I $P($G(DDSO(0)),U,3)=2 N DDP S DDP=0,DDSFLD=DDO_","_DDSBK
20 ;
21 I DDSFLD]"",DDSDA]"" M DDSU=@DDSREFT@("F"_DDP,DDSDA,DDSFLD)
22 ;
23 I '$D(DDSREP)!DDSDA,$$UNED($G(DDSU("A")),$G(DDSO(4)),$G(DDSU("N"))) D Q
24 . I $D(DDSACT)#2 S DDACT=DDSACT K DDSACT
25 . S:DDACT="U" DDACT="L"
26 . S:DDACT="D" DDACT="R"
27 . D CURSOR Q:$D(DDSBR)#2
28 . S DDSCHKQ=1
29 K DDSACT
30 ;
31 S (X,DDSOLD)=$G(DDSU("D")),DDSEXT=$G(DDSU("X"),X)
32 ;
33 X:$G(DDSO(11))'?."^" DDSO(11)
34 I $D(DDSBR)#2 D BR^DDS2 Q:$D(DDSBR)#2
35 I $T(@DDACT)]"" D @DDACT S DDSCHKQ=1 Q
36 ;
37 S DIR0N=1 Q:DDSFLD=""
38 ;
39 S:$G(^DD(DDP,DDSFLD,0))'?."^" DDSU("DD")=^(0)
40 I $D(DDSU("N"))[0 S DDACT="N" Q
41 Q:$D(DDSO(2))[0
42 ;
43 D:$G(@DDSREFT@("HLP"))>0 HLP^DDSMSG()
44 K DDSKM,DDQ
45 ;
46 S DIR0=$P(@DDSREFS@(DDSPG,DDSBK,DDO,"D"),U,1,3)
47 S:$P(@DDSREFS@(DDSPG,DDSBK,DDO,"D"),U,10) $P(DIR0,U,6)=1
48 S:$P($G(DDSREP),U,3)>1 $P(DIR0,U)=$P(DIR0,U)+$P(DDSREP,U,3)-1
49 ;
50 I $D(DDSREP),'DDSDA,$P(DDSO(0),U,3)'=2 K DDSU("DD") G SEL^DDSM
51 I $D(DDSU("M"))#2 S DDSGL=U_$P(DDSU("M"),U,2) G:'DDSU("M") WP^DDSWP
52 S DIR("B")=$G(DDSU("X"),DDSOLD)
53 ;
54 I $D(DDSU("M"))#2 D SEL^DDS5 G:X'=DDSOLD&(DDACT="N") EXT
55 I $P($G(DDSO(0)),U,3)'=2 S DIR(0)=DDP_","_DDSFLD_"O"
56 E D DIR^DDSFO
57 D ^DIR K DIR,DUOUT,DIRUT,DIROUT
58 I DIR0N S (X,Y)=DDSOLD Q
59 ;
60EXT I $E(X)=U!$D(DTOUT) S DIR0N=1 Q
61 G EXT^DDS02
62 ;
63CHK Q:$D(DDSBR)#2
64 I $G(DDSCHKQ)=1 K DDSCHKQ Q
65 G:$D(DTOUT) TO^DDS3
66 G:$E(X)=U UPA^DDS2
67 I $G(DDSFLD)=.01,X="",$G(DA) G ^DDS6
68 ;
69 I 'DIR0N,$G(DDSFLD),$D(DDSU("M"))[0,$G(DDSCHKQ)'=2,$P($G(DDSU("DD")),U,5,99)["DINUM"!($P($G(DDSU("DD")),U,2)["I")!$S($P($G(DDSU("A")),U,4)="":$P($G(DDSO(4)),U,4),1:$P($G(DDSU("A")),U,4)) G UNED^DDS02
70 K DDSCHKQ
71 ;
72 I $G(DDSFLD)=.01,$G(DDSPTB)]"",$G(DDSREP)<2,'DIR0N D RPF^DDS7(DDP,DDSPTB,DDSDA,.DA)
73 X:$G(DDSO(12))'?."^" DDSO(12)
74 ;
75 I 'DIR0N,DDO,$G(DDSFLD)]"" D
76 . I $P($G(DDSO(0)),U,3)=2 N DDP S DDP=0
77 . S DDSCHG=1
78 . I DDSDA!'$D(DDSREP),+$G(DDSU("F"))'=1 S $P(@DDSREFT@("F"_DDP,DDSDA,DDSFLD,"F"),U)=1
79 . X:$G(DDSO(13))'?."^" DDSO(13)
80 . D:$D(@DDSREFS@("PT",DDP,DDSFLD)) RPB^DDS7(DDP,DDSFLD,DDSPG)
81 . D:$D(@DDSREFS@("COMP",DDP,DDSFLD,DDSPG)) RPCF^DDSCOMP(DDSPG)
82 ;
83 I $D(DDSBR)#2 D BR^DDS2 Q:$D(DDSBR)#2
84 I $T(@DDACT)]"" G @DDACT
85 I 'DDO G:X]"" ^DDS3 S DDSO(0)=0
86 ;
87 G:"^U^D^R^L^"[(U_DDACT_U) CURSOR
88 G:$D(DDSU("M"))[0 NF
89 G:DDSU("M") ^DDS5
90 D EDIT^DDSWP,R^DDSR
91 ;
92NF I 'DDO,DDSOSV S DDO=DDSOSV Q
93 ;
94 I DDO,$S($D(DDSREP):DDSDA,1:1) D
95 . D:'$D(DDSU("M"))
96 .. I $G(@DDSREFS@("ASUB",DDSPG,DDSBK,DDO))]"" S DDSSTACK="`"_^(DDO)
97 .. E I $P($G(DDSO(7)),U,2)]"" S DDSSTACK=$P(DDSO(7),U,2)
98 . X:$G(DDSO(10))'?."^" DDSO(10)
99 ;
100 I $D(DDSSTACK) D ^DDSSTK,R^DDS3 K DDSU
101 I $D(DDSBR)#2 D BR^DDS2 Q:$D(DDSBR)#2
102 S DDACT="N"
103 ;
104CURSOR N ACT,B,BLK,BLK0,FND,N,REP
105 K DDSACT
106 S:$D(DDSU("N"))[0 DDSU("N")=$G(@DDSREFS@(DDSPG,DDSBK,DDO,"N"))
107 S FND=0
108 I $D(DDSREP),DDO D MNAV^DDSM(.FND) Q:FND
109 ;
110 S B=U,(BLK,BLK0)=DDSBK,N=DDSU("N"),ACT=$S(DDO&$G(DDSDN):"N",1:DDACT)
111 F D Q:FND!$D(REP)
112 . S DDO=$P(N,U,$L($P("U^D^R^L^N",ACT),U))
113 . I 'DDO S (DDO,DDSBK)=0,FND=1 Q
114 . ;
115 . S DDSBK=$P(DDO,",",2),DDO=+DDO
116 . I DDSBK D Q:$D(REP)
117 .. I $P($G(@DDSREFS@(DDSPG,DDSBK)),U,4) D
118 ... S DDO=$P($G(@DDSREFS@(DDSPG,DDSBK)),U,9),ACT="N"
119 .. E S ACT=DDACT
120 .. I '$P($G(@DDSREFT@(DDSPG,DDSBK)),U),DDSDAORG S B=B_DDSBK_U
121 .. E I $P(@DDSREFS@(DDSPG,DDSBK),U,7)>1 S REP=1,DDACT="NB",DDSBR=""
122 . E S DDSBK=BLK
123 . ;
124 . I B'[(U_DDSBK_U) S FND=1 S:DDSBK'=BLK0 DDACT="NB",DDSBR="",DDSACT=ACT
125 . ;
126 . S:'FND N=$G(@DDSREFS@(DDSPG,DDSBK,+DDO,"N")),BLK=DDSBK
127 Q
128 ;
129NP ;;
130 G:$D(DDSREP)&DDO PGDN^DDSM
131 S:DDSNP]"" DDSPG=DDSNP
132 S:DDSNP="" DDACT="N"
133 Q
134PP ;;
135 G:$D(DDSREP)&DDO PGUP^DDSM
136 S DDSPG=$$PP^DDS5(.Y)
137 S DDACT=$S(Y=1:"NP",1:"N")
138 Q
139NB ;;
140 S DDSBK=$$NB^DDS5(.Y),DDACT=$S(Y=1:"NB",1:"N")
141 Q
142SEL ;;
143 I $G(DDSSEL) W $C(7) Q
144 S DDACT="N" G PG^DDSRSEL
145SV ;;
146 G SV^DDS02
147QT ;;
148 G QT^DDS3
149EX ;;
150 G EX^DDS3
151CL ;;
152 G CL^DDS3
153RF ;;
154 S DDACT="N"
155 G R^DDSR
156 ;
157UNED(ATT,DEF,N) ;
158 Q $S(N="":1,$P(ATT,U,4)="":$P(DEF,U,4)=1,1:$P(ATT,U,4)=1)&'$P(N,U,11)
Note: See TracBrowser for help on using the repository browser.