source: WorldVistAEHR/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGPMXX2.m@ 686

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

initial load of WorldVistAEHR

File size: 5.3 KB
Line 
1DGPMXX2 ; COMPILED XREF FOR FILE #405 ; 11/06/06
2 ;
3 S DIKZK=1
4 S DIKZ(0)=$G(^DGPM(DA,0))
5 S X=$P(DIKZ(0),U,1)
6 I X'="" S ^DGPM("B",$E(X,1,30),DA)=""
7 S X=$P(DIKZ(0),U,1)
8 I X'="" S DGPMDDF=1 D ^DGPMDD1
9 S X=$P(DIKZ(0),U,1)
10 I X'="" D
11 .N DIK,DIV,DIU,DIN
12 .X ^DD(405,.01,1,3,1.3) I X S X=DIV X ^DD(405,.01,1,3,89.2) S X=$P(Y(101),U,1) S D0=I(0,0) S DIU=X K Y S X=DIV S X=DIV X ^DD(405,.01,1,3,1.4)
13 S X=$P(DIKZ(0),U,1)
14 I X'="" S:$P(^DGPM(DA,0),U,22)="" $P(^(0),U,22)=0
15 S X=$P(DIKZ(0),U,1)
16 I X'="" D
17 .N DIK,DIV,DIU,DIN
18 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X=$S('$D(^DGPM(+$P(^DGPM(DA,0),U,24),0)):0,1:X'=+^(0)) I X S X=DIV S Y(1)=$S($D(^DGPM(D0,0)):^(0),1:"") S X=$P(Y(1),U,24),X=X S DIU=X K Y S X="" X ^DD(405,.01,1,5,1.4)
19 S X=$P(DIKZ(0),U,1)
20 I X'="" S:$P(^DGPM(DA,0),U,3) ^DGPM("ADFN"_$P(^(0),U,3),X,DA)=""
21 S X=$P(DIKZ(0),U,1)
22 I X'="" S Y=$P(^DGPM(DA,0),U,2) I Y,Y'=4,Y'=5,X,X<DT S DGHNYT=$S(Y=1:$S($D(DGIDX):3,1:1),Y=2:$S($D(DGIDX):6,1:4),Y=3:$S($D(DGIDX):9,1:7),1:15) D ^DGPMGLC K DGIDX
23 S X=$P(DIKZ(0),U,1)
24 I X'="" I "^1^3^"[("^"_$P(^DGPM(DA,0),"^",2)_"^") S A1B2TAG="ADM" D ^A1B2XFR
25 S DIKZ(0)=$G(^DGPM(DA,0))
26 S X=$P(DIKZ(0),U,2)
27 I X'="" S DGPMDDF=2 D ^DGPMDD1
28 S X=$P(DIKZ(0),U,3)
29 I X'="" S ^DGPM("C",$E(X,1,30),DA)=""
30 S X=$P(DIKZ(0),U,3)
31 I X'="" S DGPMDDF=3 D ^DGPMDD1
32 S X=$P(DIKZ(0),U,3)
33 I X'="" S ^DGPM("ADFN"_X,+^DGPM(DA,0),DA)=""
34 S X=$P(DIKZ(0),U,4)
35 I X'="" D
36 .N DIK,DIV,DIU,DIN
37 .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 X ^DD(405,.04,1,1,1.1) X ^DD(405,.04,1,1,1.4)
38 S DIKZ(0)=$G(^DGPM(DA,0))
39 S X=$P(DIKZ(0),U,5)
40 I X'="" I $P(^DGPM(DA,0),"^",2)=3 S A1B2TAG="ADM" D ^A1B2XFR
41 S X=$P(DIKZ(0),U,6)
42 I X'="" S DGPMDDF=6,DGPMDDT=1 D ^DGPMDDCN
43 S X=$P(DIKZ(0),U,6)
44 I X'="" D
45 .N DIK,DIV,DIU,DIN
46 .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,7),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,7)=DIV,DIH=405,DIG=.07 D ^DICR:$N(^DD(DIH,DIG,1,0))>0
47 S X=$P(DIKZ(0),U,6)
48 I X'="" S Y=^DGPM(DA,0) I +Y,Y<DT S Y=$P(Y,U,2) I Y<3,$D(DGOWD) S DGHNYT=$S(Y=1:10,1:12) D ^DGPMGLC K DGIDX
49 S DIKZ(0)=$G(^DGPM(DA,0))
50 S X=$P(DIKZ(0),U,7)
51 I X'="" S DGPMDDF=7,DGPMDDT=1 D ^DGPMDDCN
52 S X=$P(DIKZ(0),U,8)
53 I X'="" S DGPMDDF=8,DGPMDDT=1 D ^DGPMDDCN
54 S X=$P(DIKZ(0),U,9)
55 I X'="" S DGPMDDF=9 D ^DGPMDD1
56 S X=$P(DIKZ(0),U,9)
57 I X'="" S DGPMDDF=9,DGPMDDT=1 D ^DGPMDDCN
58 S X=$P(DIKZ(0),U,9)
59 I X'="" I $D(^DGPM(+$P(^DGPM(DA,0),"^",24),0)),($P(^(0),"^",2)=1) S A1B2TAG="ADM1" D ^A1B2XFR
60 S X=$P(DIKZ(0),U,9)
61 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=13 D ^DGPMGLC
62 S X=$P(DIKZ(0),U,9)
63 I X'="" D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DFN)
64 S X=$P(DIKZ(0),U,9)
65 I X'="" S DH=405,DV=.09,DU=1 S DIIX=3 D:$G(DIK(0))'["A" AUDIT^DIK1
66 S X=$P(DIKZ(0),U,14)
67 I X'="" S DGPMDDF=14 D ^DGPMDD1
68 S X=$P(DIKZ(0),U,14)
69 I X'="" S ^DGPM("CA",$E(X,1,30),DA)=""
70 S X=$P(DIKZ(0),U,14)
71 I X'="" D
72 .N DIK,DIV,DIU,DIN
73 .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=DIV S X=DA X ^DD(405,.14,1,3,1.4)
74 S DIKZ(0)=$G(^DGPM(DA,0))
75 S X=$P(DIKZ(0),U,16)
76 I X'="" S ^DGPM("APTF",$E(X,1,30),DA)=""
77 S X=$P(DIKZ(0),U,17)
78 I X'="" D XREF^DGPMDDCN
79 S X=$P(DIKZ(0),U,18)
80 I X'="" D
81 .N DIK,DIV,DIU,DIN
82 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X I "MAS MOVEMENT TYPE"'="TRANSFER IN"&("MAS MOVEMENT TYPE"'="TRANSFER OUT") I X S X=DIV S Y(1)=$S($D(^DGPM(D0,0)):^(0),1:"") S X=$P(Y(1),U,5),X=X S DIU=X K Y S X="" X ^DD(405,.18,1,1,1.4)
83 S X=$P(DIKZ(0),U,18)
84 I X'="" D
85 .N DIK,DIV,DIU,DIN
86 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X=$S('$D(^DG(405.2,+Y(0),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 X ^DD(405,.18,1,2,1.1) X ^DD(405,.18,1,2,1.4)
87 S X=$P(DIKZ(0),U,18)
88 I X'="" S Y=^DGPM(DA,0) I +Y,Y<DT S Y=$P(Y,U,2) I Y<4,$D(DGOTY) S DGHNYT=11 D ^DGPMGLC K DGIDX
89 S X=$P(DIKZ(0),U,18)
90 I X'="" I $P(^DGPM(DA,0),"^",2)=3 S A1B2TAG="ADM" D ^A1B2XFR
91 S DIKZ(0)=$G(^DGPM(DA,0))
92 S X=$P(DIKZ(0),U,19)
93 I X'="" S DGPMDDF=19,DGPMDDT=1 D ^DGPMDDCN
94 S X=$P(DIKZ(0),U,22)
95 I X'="" S DGPMDDF=22 D ^DGPMDD1
96 S X=$P(DIKZ(0),U,23)
97 I X'="" S DGPMDDF=23 D ^DGPMDD1
98 S X=$P(DIKZ(0),U,24)
99 I X'="" S ^DGPM("APHY",$E(X,1,30),DA)=""
100 S X=$P(DIKZ(0),U,27)
101 I X'="" S ^DGPM("AVISIT",$E(X,1,30),DA)=""
102 S X=$P(DIKZ(0),U,27)
103 I X'="" S:$P(^DGPM(DA,0),U,3) ^DGPM("AVST",$P(^DGPM(DA,0),U,3),X,DA)=""
104 S DIKZ("DIR")=$G(^DGPM(DA,"DIR"))
105 S X=$P(DIKZ("DIR"),U,1)
106 I X'="" D
107 .N DIK,DIV,DIU,DIN
108 .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=DIV S %=$P($H,",",2),X=DT_(%\60#60/100+(%\3600)+(%#60/10000)/100) X ^DD(405,41,1,1,1.4)
109 S X=$P(DIKZ("DIR"),U,1)
110 I X'="" D
111 .N DIK,DIV,DIU,DIN
112 .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=DIV S X=$G(DUZ) S DIH=$G(^DGPM(DIV(0),"DIR")),DIV=X S $P(^("DIR"),U,3)=DIV,DIH=405,DIG=43 D ^DICR
113 S X=$P(DIKZ("DIR"),U,1)
114 I X'="" S DGPMDDF=41,DGPMDDT=1 D ^DGPMDDCN
115 S DIKZ("ODS")=$G(^DGPM(DA,"ODS"))
116 S X=$P(DIKZ("ODS"),U,2)
117 I X'="" S A1B2TAG="ADM" D ^A1B2XFR
118 S X=$P(DIKZ("ODS"),U,4)
119 I X'="" S ^DGPM("AODSA",$E(X,1,30),DA)=""
120 S X=$P(DIKZ("ODS"),U,6)
121 I X'="" S A1B2TAG="ADM" D ^A1B2XFR
122 S X=$P(DIKZ("ODS"),U,7)
123 I X'="" S ^DGPM("AODSD",$E(X,1,30),DA)=""
124END Q
Note: See TracBrowser for help on using the repository browser.