source: FOIAVistA/trunk/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX2.m@ 811

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

initial load of FOIAVistA 6/30/08 version

File size: 2.8 KB
Line 
1IBXX2 ; COMPILED XREF FOR FILE #399.0222 ; 07/22/08
2 ;
3 I X'="" D
4 .N DIK,DIV,DIU,DIN
5 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"U1")):^("U1"),1:"") S X=$P(Y(1),U,2),X=X S DIU=X K Y S X=DIV S X=DIU-X X ^DD(399,218,1,1,2.4)
6 S DIKZ("U2")=$G(^DGCR(399,DA,"U2"))
7 S X=$P(DIKZ("U2"),U,5)
8 I X'="" D
9 .N DIK,DIV,DIU,DIN
10 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"U1")):^("U1"),1:"") S X=$P(Y(1),U,2),X=X S DIU=X K Y S X=DIV S X=DIU-X X ^DD(399,219,1,1,2.4)
11 S DIKZ("U2")=$G(^DGCR(399,DA,"U2"))
12 S X=$P(DIKZ("U2"),U,6)
13 I X'="" D
14 .N DIK,DIV,DIU,DIN
15 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"U1")):^("U1"),1:"") S X=$P(Y(1),U,2),X=X S DIU=X K Y S X=DIV S X=DIU-X X ^DD(399,220,1,1,2.4)
16 S DIKZ("U2")=$G(^DGCR(399,DA,"U2"))
17 S X=$P(DIKZ("U2"),U,10)
18 I X'="" D
19 .N DIK,DIV,DIU,DIN
20 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"U2")):^("U2"),1:"") S X=$P(Y(1),U,12),X=X S DIU=X K Y S X="" X ^DD(399,232,1,1,2.4)
21 S X=$P(DIKZ("U2"),U,10)
22 I X'="" D
23 .N DIK,DIV,DIU,DIN
24 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"U2")):^("U2"),1:"") S X=$P(Y(1),U,11),X=X S DIU=X K Y S X="" X ^DD(399,232,1,2,2.4)
25 S X=$P(DIKZ("U2"),U,10)
26 I X'="" D
27 .N DIK,DIV,DIU,DIN
28 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X=$$CLIAREQ^IBCEP8A(DA) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U2")):^("U2"),1:"") S X=$P(Y(1),U,13),X=X S DIU=X K Y S X=DIV S X=$$CLIA^IBCEP8A(DA) X ^DD(399,232,1,3,2.4)
29 S X=$P(DIKZ("U2"),U,10)
30 I X'="" D
31 .N DIK,DIV,DIU,DIN
32 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"U3")):^("U3"),1:"") S X=$P(Y(1),U,3),X=X S DIU=X K Y S X="" S DIH=$G(^DGCR(399,DIV(0),"U3")),DIV=X S $P(^("U3"),U,3)=DIV,DIH=399,DIG=244 D ^DICR
33 S DIKZ("M1")=$G(^DGCR(399,DA,"M1"))
34 S X=$P(DIKZ("M1"),U,8)
35 I X'="" K ^DGCR(399,"AG",$E(X,1,30),DA)
36 S DIKZ(0)=$G(^DGCR(399,DA,0))
37 S X=$P(DIKZ(0),U,1)
38 I X'="" K ^DGCR(399,"B",$E(X,1,30),DA)
39CR1 S DIXR=139
40 K X
41 S DIKZ("M")=$G(^DGCR(399,DA,"M"))
42 S X(1)=$P(DIKZ("M"),U,1)
43 S X(2)=$P(DIKZ("M"),U,2)
44 S X(3)=$P(DIKZ("M"),U,3)
45 S X(4)=$P(DIKZ("M"),U,13)
46 S X(5)=$P(DIKZ("M"),U,12)
47 S X(6)=$P(DIKZ("M"),U,14)
48 S X=$G(X(1))
49 D
50 . K X1,X2 M X1=X,X2=X
51 . S:$D(DIKIL) (X2,X2(1),X2(2),X2(3),X2(4),X2(5),X2(6))=""
52 . N DIKXARR M DIKXARR=X S DIKCOND=1
53 . S X=$S($O(^DGCR(399,DA,"PRV",0)):1,1:0)
54 . S DIKCOND=$G(X) K X M X=DIKXARR
55 . Q:'DIKCOND
56 . D:X1(1)'=X2(1)!(X1(5)'=X2(5)) DELID^IBCEP3(DA,1) D:X1(2)'=X2(2)!(X1(4)'=X2(4)) DELID^IBCEP3(DA,2) D:X1(3)'=X2(3)!(X1(6)'=X2(6)) DELID^IBCEP3(DA,3)
57CR2 S DIXR=477
58 K X
59 S DIKZ("M")=$G(^DGCR(399,DA,"M"))
60 S X(1)=$P(DIKZ("M"),U,1)
61 S X(2)=$P(DIKZ("M"),U,2)
62 S X(3)=$P(DIKZ("M"),U,3)
63 S DIKZ(0)=$G(^DGCR(399,DA,0))
64 S X(4)=$P(DIKZ(0),U,2)
65 S X=$G(X(1))
66 D
67 . K X1,X2 M X1=X,X2=X
68 . S:$D(DIKIL) (X2,X2(1),X2(2),X2(3),X2(4))=""
69 . N G I $G(X(4)) F G=1,2,3 I $G(X(G)) K ^DGCR(399,"AE",X(4),X(G),DA)
70CR3 K X
71END G ^IBXX3
Note: See TracBrowser for help on using the repository browser.