source: FOIAVistA/tag/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGPMXX1.m@ 1416

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

WorldVistAEHR overlayed on FOIAVistA

File size: 4.2 KB
Line 
1DGPMXX1 ; COMPILED XREF FOR FILE #405 ; 11/06/06
2 ;
3 S DIKZK=2
4 S DIKZ(0)=$G(^DGPM(DA,0))
5 S X=$P(DIKZ(0),U,2)
6 I X'="" S DGPMDDF=2 D ^DGPMDD2
7 S X=$P(DIKZ(0),U,3)
8 I X'="" K ^DGPM("C",$E(X,1,30),DA)
9 S X=$P(DIKZ(0),U,3)
10 I X'="" S DGPMDDF=3 D ^DGPMDD2
11 S X=$P(DIKZ(0),U,3)
12 I X'="" K ^DGPM("ADFN"_X,+^DGPM(DA,0),DA)
13 S X=$P(DIKZ(0),U,4)
14 I X'="" D
15 .N DIK,DIV,DIU,DIN
16 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGPM(D0,0)):^(0),1:"") S X=$P(Y(1),U,18),X=X S DIU=X K Y S X="" S DIH=$S($D(^DGPM(DIV(0),0)):^(0),1:""),DIV=X S $P(^(0),U,18)=DIV,DIH=405,DIG=.18 D ^DICR:$N(^DD(DIH,DIG,1,0))>0
17 S DIKZ(0)=$G(^DGPM(DA,0))
18 S X=$P(DIKZ(0),U,5)
19 I X'="" I $P(^DGPM(DA,0),"^",2)=3 S A1B2TAG="ADM" D ^A1B2XFR
20 S X=$P(DIKZ(0),U,6)
21 I X'="" S DGPMDDF=6,DGPMDDT=0 D ^DGPMDDCN
22 S X=$P(DIKZ(0),U,6)
23 I X'="" S Y=^DGPM(DA,0) I +Y,Y<DT,X'=$P(Y,U,6) S Y=$P(Y,U,2) I Y<3 S DGOWD=$S($D(^DIC(42,+X,0)):$P(^(0),U),1:"") K DGIDX
24 S X=$P(DIKZ(0),U,7)
25 I X'="" S DGPMDDF=7,DGPMDDT=0 D ^DGPMDDCN
26 S X=$P(DIKZ(0),U,8)
27 I X'="" S DGPMDDF=8,DGPMDDT=0 D ^DGPMDDCN
28 S X=$P(DIKZ(0),U,9)
29 I X'="" S DGPMDDF=9 D ^DGPMDD2
30 S X=$P(DIKZ(0),U,9)
31 I X'="" S DGPMDDF=9,DGPMDDT=0 D ^DGPMDDCN
32 S X=$P(DIKZ(0),U,9)
33 I X'="" I $D(^DGPM(+$P(^DGPM(DA,0),"^",24),0)),($P(^(0),"^",2)=1) S A1B2TAG="ADM1" D ^A1B2XFR
34 S X=$P(DIKZ(0),U,9)
35 I X'="" S Y=^DGPM(DA,0) I +Y,Y<DT S Y=$P(Y,U,2) I Y=6,X'=$P(Y,U,9) S DGHNYT=14 D ^DGPMGLC
36 S X=$P(DIKZ(0),U,9)
37 I X'="" D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DFN)
38 S X=$P(DIKZ(0),U,9)
39 I X'="" S DH=405,DV=.09,DU=1 S DIIX=2 D:$G(DIK(0))'["A" AUDIT^DIK1
40 S X=$P(DIKZ(0),U,14)
41 I X'="" S DGPMDDF=14 D ^DGPMDD2
42 S X=$P(DIKZ(0),U,14)
43 I X'="" K ^DGPM("CA",$E(X,1,30),DA)
44 S X=$P(DIKZ(0),U,14)
45 I X'="" D
46 .N DIK,DIV,DIU,DIN
47 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X I "^3^5^"[("^"_$P(^DGPM(DA,0),"^",2)_"^") I X S X=DIV X ^DD(405,.14,1,3,89.2) S X=$S('$D(^DGPM(+$P(Y(101),U,17),0)):"",1:$P(^(0),U,1)) S D0=I(0,0) S DIU=X K Y S X="" X ^DD(405,.14,1,3,2.4)
48 S DIKZ(0)=$G(^DGPM(DA,0))
49 S X=$P(DIKZ(0),U,16)
50 I X'="" K ^DGPM("APTF",$E(X,1,30),DA)
51 S X=$P(DIKZ(0),U,17)
52 I X'="" D XREF^DGPMDDCN
53 S X=$P(DIKZ(0),U,18)
54 I X'="" D
55 .N DIK,DIV,DIU,DIN
56 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X=$S('$D(^DG(405.2,+X,0)):"",1:$P(^(0),U,1))["DEATH" I X S X=DIV X ^DD(405,.18,1,2,89.2) S X=$P(Y(101),U,1) S D0=I(0,0) S DIU=X K Y S X="" X ^DD(405,.18,1,2,2.4)
57 S X=$P(DIKZ(0),U,18)
58 I X'="" S Y=^DGPM(DA,0) I +Y,Y<DT S Y=$P(Y,U,2) I Y<4 S DGOTY=$S($D(^DG(405.2,+X,0)):$P(^(0),U),1:"") K DGIDX
59 S X=$P(DIKZ(0),U,18)
60 I X'="" I $P(^DGPM(DA,0),"^",2)=3 S A1B2TAG="ADM" D ^A1B2XFR
61 S DIKZ(0)=$G(^DGPM(DA,0))
62 S X=$P(DIKZ(0),U,19)
63 I X'="" S DGPMDDF=19,DGPMDDT=0 D ^DGPMDDCN
64 S X=$P(DIKZ(0),U,22)
65 I X'="" S DGPMDDF=22 D ^DGPMDD2
66 S X=$P(DIKZ(0),U,23)
67 I X'="" S DGPMDDF=23 D ^DGPMDD2
68 S X=$P(DIKZ(0),U,24)
69 I X'="" K ^DGPM("APHY",$E(X,1,30),DA)
70 S X=$P(DIKZ(0),U,27)
71 I X'="" K ^DGPM("AVISIT",$E(X,1,30),DA)
72 S X=$P(DIKZ(0),U,27)
73 I X'="" K:$P(^DGPM(DA,0),U,3) ^DGPM("AVST",$P(^DGPM(DA,0),U,3),X,DA)
74 S DIKZ("DIR")=$G(^DGPM(DA,"DIR"))
75 S X=$P(DIKZ("DIR"),U,1)
76 I X'="" D
77 .N DIK,DIV,DIU,DIN
78 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGPM(D0,"DIR")):^("DIR"),1:"") S X=$P(Y(1),U,2),X=X S DIU=X K Y S X="" S DIH=$G(^DGPM(DIV(0),"DIR")),DIV=X S $P(^("DIR"),U,2)=DIV,DIH=405,DIG=42 D ^DICR
79 S X=$P(DIKZ("DIR"),U,1)
80 I X'="" D
81 .N DIK,DIV,DIU,DIN
82 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGPM(D0,"DIR")):^("DIR"),1:"") S X=$P(Y(1),U,3),X=X S DIU=X K Y S X="" S DIH=$G(^DGPM(DIV(0),"DIR")),DIV=X S $P(^("DIR"),U,3)=DIV,DIH=405,DIG=43 D ^DICR
83 S X=$P(DIKZ("DIR"),U,1)
84 I X'="" S DGPMDDF=41,DGPMDDT=0 D ^DGPMDDCN
85 S DIKZ("ODS")=$G(^DGPM(DA,"ODS"))
86 S X=$P(DIKZ("ODS"),U,2)
87 I X'="" S A1B2TAG="ADM" D ^A1B2XFR
88 S X=$P(DIKZ("ODS"),U,4)
89 I X'="" K ^DGPM("AODSA",$E(X,1,30),DA)
90 S X=$P(DIKZ("ODS"),U,6)
91 I X'="" S A1B2TAG="ADM" D ^A1B2XFR
92 S X=$P(DIKZ("ODS"),U,7)
93 I X'="" K ^DGPM("AODSD",$E(X,1,30),DA)
94 S DIKZ(0)=$G(^DGPM(DA,0))
95 S X=$P(DIKZ(0),U,1)
96 I X'="" K ^DGPM("B",$E(X,1,30),DA)
97 S X=$P(DIKZ(0),U,1)
98 I X'="" S DGPMDDF=1 D ^DGPMDD2
99 S X=$P(DIKZ(0),U,1)
100 I X'="" K:$P(^DGPM(DA,0),U,3) ^DGPM("ADFN"_$P(^(0),U,3),X,DA)
101 S X=$P(DIKZ(0),U,1)
102 I X'="" S Y=$P(^DGPM(DA,0),U,2) I Y,Y'=4,Y'=5,X,X<DT S DGHNYT=$S(Y=1:2,Y=2:5,Y=3:8,1:14) D ^DGPMGLC
103 S X=$P(DIKZ(0),U,1)
104 I X'="" I "^1^3^"[("^"_$P(^DGPM(DA,0),"^",2)_"^") S A1B2TAG="ADM" D ^A1B2XFR
105END Q
Note: See TracBrowser for help on using the repository browser.