source: WorldVistAEHR/trunk/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX15.m@ 1261

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

revised back to 6/30/08 version

File size: 7.5 KB
RevLine 
[623]1IBXX15 ; COMPILED XREF FOR FILE #399.0222 ; 12/27/07
[613]2 ;
3 I X'="" D
4 .N DIK,DIV,DIU,DIN
[623]5 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"M1")):^("M1"),1:"") S X=$P(Y(1),U,10),X=X S DIU=X K Y S X=DIV S X=$$PRVQUAL^IBCU(DA,"",1) X ^DD(399,.22,1,4,1.4)
6 S X=$P(DIKZ(0),U,22)
[613]7 I X'="" D
8 .N DIK,DIV,DIU,DIN
[623]9 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"M1")):^("M1"),1:"") S X=$P(Y(1),U,11),X=X S DIU=X K Y S X=DIV S X=$$PRVQUAL^IBCU(DA,"",2) X ^DD(399,.22,1,5,1.4)
10 S X=$P(DIKZ(0),U,22)
[613]11 I X'="" D
12 .N DIK,DIV,DIU,DIN
[623]13 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"M1")):^("M1"),1:"") S X=$P(Y(1),U,12),X=X S DIU=X K Y S X=DIV S X=$$PRVQUAL^IBCU(DA,"",3) X ^DD(399,.22,1,6,1.4)
14 S X=$P(DIKZ(0),U,22)
[613]15 I X'="" D
16 .N DIK,DIV,DIU,DIN
[623]17 .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,.22,1,7,1.4)
18 S X=$P(DIKZ(0),U,22)
[613]19 I X'="" D
20 .N DIK,DIV,DIU,DIN
[623]21 .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,2),X=X S DIU=X K Y S X=DIV S X=$P($$TAXDEF^IBCEP81(DIV(0)),U,2) X ^DD(399,.22,1,8,1.4)
[613]22 S DIKZ(0)=$G(^DGCR(399,DA,0))
[623]23 S X=$P(DIKZ(0),U,25)
24 I X'="" D ALLID^IBCEP3(DA,.25,1)
25 S X=$P(DIKZ(0),U,26)
[613]26 I X'="" D
27 .N DIK,DIV,DIU,DIN
[623]28 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,0)):^(0),1:"") S X=$P(Y(1),U,6),X=X S DIU=X K Y S X=DIV S X=DIV,X=X S DIH=$G(^DGCR(399,DIV(0),0)),DIV=X S $P(^(0),U,6)=DIV,DIH=399,DIG=.06 D ^DICR
[613]29 S DIKZ(0)=$G(^DGCR(399,DA,0))
[623]30 S X=$P(DIKZ(0),U,27)
[613]31 I X'="" D
32 .N DIK,DIV,DIU,DIN
[623]33 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,0)):^(0),1:"") S X=$P(Y(1),U,19),X=X S DIU=X K Y S X=DIV S X=$$FT^IBCU3(DA,1) X ^DD(399,.27,1,1,1.4)
34 S DIKZ("S")=$G(^DGCR(399,DA,"S"))
35 S X=$P(DIKZ("S"),U,1)
36 I X'="" S ^DGCR(399,"APD",$E(X,1,30),DA)=""
37 S X=$P(DIKZ("S"),U,3)
[613]38 I X'="" D
39 .N DIK,DIV,DIU,DIN
[623]40 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S Y(1)=$S($D(^DGCR(399,D0,"S")):^("S"),1:"") S X=$P(Y(1),U,4)="" I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"S")):^("S"),1:"") S X=$P(Y(1),U,4),X=X S DIU=X K Y S X=DIV S X=DT X ^DD(399,3,1,1,1.4)
41 S X=$P(DIKZ("S"),U,3)
[613]42 I X'="" D
43 .N DIK,DIV,DIU,DIN
[623]44 .X ^DD(399,3,1,2,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"S")):^("S"),1:"") S X=$P(Y(1),U,5),X=X S DIU=X K Y S X=DIV S X=DUZ X ^DD(399,3,1,2,1.4)
45 S DIKZ("S")=$G(^DGCR(399,DA,"S"))
46 S X=$P(DIKZ("S"),U,7)
47 I X'="" S ^DGCR(399,"APM",$E(X,1,30),DA)=""
48 S X=$P(DIKZ("S"),U,9)
[613]49 I X'="" D
50 .N DIK,DIV,DIU,DIN
[623]51 .X ^DD(399,9,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"S")):^("S"),1:"") S X=$P(Y(1),U,10),X=X S DIU=X K Y S X=DIV S X=DT X ^DD(399,9,1,1,1.4)
52 S X=$P(DIKZ("S"),U,9)
[613]53 I X'="" D
54 .N DIK,DIV,DIU,DIN
[623]55 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X X ^DD(399,9,1,2,69.2) S X=X="YES",Y=X,X=Y(2),X=X&Y I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"S")):^("S"),1:"") S X=$P(Y(1),U,11),X=X S DIU=X K Y S X=DIV S X=DUZ X ^DD(399,9,1,2,1.4)
56 S X=$P(DIKZ("S"),U,9)
[613]57 I X'="" D
58 .N DIK,DIV,DIU,DIN
[623]59 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S Y=Y(0) X:$D(^DD(399,9,2)) ^(2) S X=Y="YES" I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,0)):^(0),1:"") S X=$P(Y(1),U,13),X=X S DIU=X K Y S X=DIV S X=3 X ^DD(399,9,1,3,1.4)
60 S X=$P(DIKZ("S"),U,9)
[613]61 I X'="" D
62 .N DIK,DIV,DIU,DIN
[623]63 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X=$$EXTERNAL^DIDU(399,9,"",Y(0))="YES" I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"TX")):^("TX"),1:"") S X=$P(Y(1),U,6),X=X S DIU=X K Y S X="" X ^DD(399,9,1,4,1.4)
64 S DIKZ("S")=$G(^DGCR(399,DA,"S"))
65 S X=$P(DIKZ("S"),U,10)
66 I X'="" S ^DGCR(399,"APD3",$E(X,1,30),DA)=""
67 S X=$P(DIKZ("S"),U,12)
[613]68 I X'="" D
69 .N DIK,DIV,DIU,DIN
[623]70 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S Y(1)=$S($D(^DGCR(399,D0,"S")):^("S"),1:"") S X=$P(Y(1),U,14)="" I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"S")):^("S"),1:"") S X=$P(Y(1),U,14),X=X S DIU=X K Y S X=DIV S X=DT X ^DD(399,12,1,1,1.4)
71 S X=$P(DIKZ("S"),U,12)
[613]72 I X'="" D
73 .N DIK,DIV,DIU,DIN
[623]74 .X ^DD(399,12,1,2,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"S")):^("S"),1:"") S X=$P(Y(1),U,15),X=X S DIU=X K Y S X=DIV S X=DUZ S DIH=$G(^DGCR(399,DIV(0),"S")),DIV=X S $P(^("S"),U,15)=DIV,DIH=399,DIG=15 D ^DICR
75 S X=$P(DIKZ("S"),U,12)
[613]76 I X'="" D
77 .N DIK,DIV,DIU,DIN
[623]78 .X ^DD(399,12,1,3,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"S")):^("S"),1:"") S X=$P(Y(1),U,13),X=X S DIU=X K Y S X=DIV S X=DUZ S DIH=$G(^DGCR(399,DIV(0),"S")),DIV=X S $P(^("S"),U,13)=DIV,DIH=399,DIG=13 D ^DICR
79 S X=$P(DIKZ("S"),U,12)
80 I X'="" S ^DGCR(399,"AP",$E(X,1,30),DA)=""
81 S DIKZ("S")=$G(^DGCR(399,DA,"S"))
82 S X=$P(DIKZ("S"),U,14)
[613]83 I X'="" D
84 .N DIK,DIV,DIU,DIN
[623]85 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,0)):^(0),1:"") S X=$P(Y(1),U,13),X=X S DIU=X K Y S X=DIV S X=4 S DIH=$G(^DGCR(399,DIV(0),0)),DIV=X S $P(^(0),U,13)=DIV,DIH=399,DIG=.13 D ^DICR
86 S X=$P(DIKZ("S"),U,14)
[613]87 I X'="" D
88 .N DIK,DIV,DIU,DIN
[623]89 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"S")):^("S"),1:"") S X=$P(Y(1),U,15),X=X S DIU=X K Y S X=DIV S X=DUZ S DIH=$G(^DGCR(399,DIV(0),"S")),DIV=X S $P(^("S"),U,15)=DIV,DIH=399,DIG=15 D ^DICR
90 S DIKZ("S")=$G(^DGCR(399,DA,"S"))
91 S X=$P(DIKZ("S"),U,16)
[613]92 I X'="" D
93 .N DIK,DIV,DIU,DIN
[623]94 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X=$$EXTERNAL^DIDU(399,16,"",Y(0))="YES" I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"S")):^("S"),1:"") S X=$P(Y(1),U,17),X=X S DIU=X K Y S X=DIV S X=DT X ^DD(399,16,1,1,1.4)
95 S X=$P(DIKZ("S"),U,16)
[613]96 I X'="" D
97 .N DIK,DIV,DIU,DIN
[623]98 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X=$$EXTERNAL^DIDU(399,16,"",Y(0))="YES" I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"S")):^("S"),1:"") S X=$P(Y(1),U,18),X=X S DIU=X K Y S X=DIV S X=DUZ X ^DD(399,16,1,2,1.4)
99 S DIKZ("S")=$G(^DGCR(399,DA,"S"))
100 S X=$P(DIKZ("S"),U,17)
[613]101 I X'="" D
102 .N DIK,DIV,DIU,DIN
[623]103 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S Y(1)=$S($D(^DGCR(399,D0,"S")):^("S"),1:"") S X=$P(Y(1),U,16),X=X S X=X=1 I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,0)):^(0),1:"") S X=$P(Y(1),U,13),X=X S DIU=X K Y S X=DIV S X=7 X ^DD(399,17,1,1,1.4)
104 S DIKZ("TX")=$G(^DGCR(399,DA,"TX"))
105 S X=$P(DIKZ("TX"),U,2)
106 I X'="" S ^DGCR(399,"ALEX",$E(X,1,30),DA)=""
107 S X=$P(DIKZ("TX"),U,5)
[613]108 I X'="" D
109 .N DIK,DIV,DIU,DIN
[623]110 .X ^DD(399,24,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"TX")):^("TX"),1:"") S X=$P(Y(1),U,3),X=X S DIU=X K Y S X=DIV S X=DT X ^DD(399,24,1,1,1.4)
111 S DIKZ("TX")=$G(^DGCR(399,DA,"TX"))
112 S X=$P(DIKZ("TX"),U,6)
[613]113 I X'="" D
114 .N DIK,DIV,DIU,DIN
[623]115 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X=Y(0),X=X S X=X=1 I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,0)):^(0),1:"") S X=$P(Y(1),U,13),X=X S DIU=X K Y S X=DIV S X=2 X ^DD(399,25,1,1,1.4)
116 S X=$P(DIKZ("TX"),U,6)
[613]117 I X'="" D
118 .N DIK,DIV,DIU,DIN
[623]119 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X X ^DD(399,25,1,2,69.2) S X=X S X=X="",Y=X,X=Y(2),X=X&Y I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"S")):^("S"),1:"") S X=$P(Y(1),U,8),X=X S DIU=X K Y S X=DIV S X=DUZ X ^DD(399,25,1,2,1.4)
120 S X=$P(DIKZ("TX"),U,6)
[613]121 I X'="" D
122 .N DIK,DIV,DIU,DIN
[623]123 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X X ^DD(399,25,1,3,69.2) S X=X S X=X="",Y=X,X=Y(2),X=X&Y I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"S")):^("S"),1:"") S X=$P(Y(1),U,7),X=X S DIU=X K Y S X=DIV S X=DT X ^DD(399,25,1,3,1.4)
124 S DIKZ("C")=$G(^DGCR(399,DA,"C"))
125 S X=$P(DIKZ("C"),U,14)
[613]126 I X'="" D
127 .N DIK,DIV,DIU,DIN
[623]128 .X ^DD(399,64,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"C")):^("C"),1:"") S X=$P(Y(1),U,10),X=X S DIU=X K Y S X=DIV S X=$P(^ICD9(+X,0),"^",3) X ^DD(399,64,1,1,1.4)
129 S DIKZ("M")=$G(^DGCR(399,DA,"M"))
130 S X=$P(DIKZ("M"),U,1)
[613]131 I X'="" D
132 .N DIK,DIV,DIU,DIN
[623]133 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"M1")):^("M1"),1:"") S X=$P(Y(1),U,2),X=X S DIU=X K Y S X=DIV S X=$$PRVNUM^IBCU(DA,X,1) X ^DD(399,101,1,1,1.4)
134 S X=$P(DIKZ("M"),U,1)
[613]135END G ^IBXX16
Note: See TracBrowser for help on using the repository browser.