Changeset 636 for FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS
- Timestamp:
- Dec 4, 2009, 8:26:01 PM (15 years ago)
- Location:
- FOIAVistA/tag/r
- Files:
-
- 236 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBATER.m
r628 r636 1 1 IBATER ;LL/ELZ - TRANSFER PRICING PROSTHETICS DRIVER ; 7-APR-2000 2 ;;2.0;INTEGRATED BILLING;**115 ,389**;21-MAR-94;Build 63 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**115**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 ; This routine is called by the nightly back ground job. It will go … … 22 22 CHECK ; check if transfer pricing and not already added 23 23 ; 24 N IBDATA,IBD ATA1,IBDFN24 N IBDATA,IBDFN 25 25 ; 26 26 ; already in file … … 28 28 ; 29 29 ; valid tp patient 30 S IBDATA=$G(^RMPR(660,+IBDA,0)) Q:IBDATA="" S IBDATA1=$G(^RMPR(660,+IBDA,1))30 S IBDATA=$G(^RMPR(660,+IBDA,0)) Q:IBDATA="" 31 31 S IBDFN=$P(IBDATA,"^",2) Q:'IBDFN Q:'$$TPP^IBATUTL(IBDFN) 32 32 ; 33 33 ; checks from RMPRBIL copied 4/7/2000 with mod for patient type removed 34 I $S('$D(^RMPR(660,IBDA,"AM")):1,$P(IBDATA,"^",9)="":1,$P(IBDATA,"^",12)="":1,$P(IBDATA 1,"^",4)="":1,$P(IBDATA,"^",14)="V":1,$P(IBDATA,"^",15)="*":1,1:0) Q34 I $S('$D(^RMPR(660,IBDA,"AM")):1,$P(IBDATA,"^",9)="":1,$P(IBDATA,"^",12)="":1,$P(IBDATA,"^",6)="":1,$P(IBDATA,"^",14)="V":1,$P(IBDATA,"^",15)="*":1,1:0) Q 35 35 ; 36 36 ; now if inpt, must be in 351.67 37 I $P(^RMPR(660,IBDA,"AM"),"^",3)'=1,$P(^("AM"),"^",3)'=4,'$D(^IBAT(351.67,"B",$P(IBDATA 1,"^",4))) Q37 I $P(^RMPR(660,IBDA,"AM"),"^",3)'=1,$P(^("AM"),"^",3)'=4,'$D(^IBAT(351.67,"B",$P(IBDATA,"^",6))) Q 38 38 ; 39 39 Q:'$P(IBDATA,"^",16) ; no total cost, at least yet … … 41 41 FILE ; ok transaction needs to be filled in tp files 42 42 ; 43 S IBDATA=$$RMPR^IBATFILE(IBDFN,IBDT,$$PPF^IBATUTL(IBDFN),(IBDA_";RMPR(660,"), ,$P(IBDATA,"^",16))43 S IBDATA=$$RMPR^IBATFILE(IBDFN,IBDT,$$PPF^IBATUTL(IBDFN),(IBDA_";RMPR(660,"),$P(IBDATA,"^",6),$P(IBDATA,"^",16)) 44 44 ; 45 45 Q -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBATFILE.m
r628 r636 1 1 IBATFILE ;LL/ELZ - TRANSFER PRICING FILLING ; 22-JAN-1999 2 ;;2.0;INTEGRATED BILLING;**115 ,389**;21-MAR-94;Build 63 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**115**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 PAT(DA,IBFAC,IBOVER) ; files patient in transfer pricing returns dfn 5 5 Q:'$G(DA) 0 … … 104 104 ; DFN=dfn for patient, IBEDT=event date, IBPREF=enrolled facility 105 105 ; IBSOURCE=source (prost ien;RMPR(660, 106 ; IBPROS=ien from file 661 - removed in 389 no longer valid106 ; IBPROS=ien from file 661 107 107 ; IBCOST=item cost 108 I '$G(DFN)!('$G(IBEDT))!('$G(IBPREF))!($G(IBSOURCE)="") Q 0108 I '$G(DFN)!('$G(IBEDT))!('$G(IBPREF))!($G(IBSOURCE)="")!('$G(IBPROS)) Q 0 109 109 N IBIEN 110 110 S IBIEN=$$NEW(DFN,IBEDT,IBPREF,IBSOURCE) I 'IBIEN Q IBIEN 111 111 S DIE="^IBAT(351.61,",DA=IBIEN 112 S DR=".1////"_+IBEDT_"; .05////"_$S($G(IBCOST):"P;4.05////"_+IBCOST_";.13////"_DT,1:"C")112 S DR=".1////"_+IBEDT_";4.04////"_+IBPROS_";.05////"_$S($G(IBCOST):"P;4.05////"_+IBCOST_";.13////"_DT,1:"C") 113 113 L +^IBAT(351.61,IBIEN):10 I '$T Q "0^Transaction Locked" 114 114 D ^DIE D:$G(IBCOST) TOTAL^IBATCM(IBIEN) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBATLM1B.m
r628 r636 1 1 IBATLM1B ;LL/ELZ - TRANSFER PRICING TRANSACTION LIST MENU ; 15-SEP-1998 2 ;;2.0;INTEGRATED BILLING;**115,261 ,389**;21-MAR-94;Build 63 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**115,261**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 CF ; -- change facility from patient level … … 129 129 Q 130 130 R ; -- select an prosthetic 131 N IBBDT,IBEDT,IBCOUNT,IBOUT,IBDA,IBDATA,IB DATA1,IBP,IBC,IBCOUNT,%,DIRUT131 N IBBDT,IBEDT,IBCOUNT,IBOUT,IBDA,IBDATA,IBP,IBC,IBCOUNT,%,DIRUT 132 132 ; 133 133 S (IBCOUNT,IBOUT)=0 … … 138 138 . ; 139 139 . ; valid data 140 . S IBDATA=$G(^RMPR(660,+IBDA,0)) Q:IBDATA="" S IBDATA1=$G(^RMPR(660,+IBDA,1))140 . S IBDATA=$G(^RMPR(660,+IBDA,0)) Q:IBDATA="" 141 141 . ; 142 142 . ; valid date range … … 144 144 . ; 145 145 . ; checks from RMPRBIL copied 4/7/2000 with mod for AM node patients 146 . I $S('$D(^RMPR(660,IBDA,"AM")):1,$P(IBDATA,"^",9)="":1,$P(IBDATA,"^",12)="":1,$P(IBDATA 1,"^",4)="":1,$P(IBDATA,"^",14)="V":1,$P(IBDATA,"^",15)="*":1,1:0) Q146 . I $S('$D(^RMPR(660,IBDA,"AM")):1,$P(IBDATA,"^",9)="":1,$P(IBDATA,"^",12)="":1,$P(IBDATA,"^",6)="":1,$P(IBDATA,"^",14)="V":1,$P(IBDATA,"^",15)="*":1,1:0) Q 147 147 . ; 148 148 . ; set array … … 155 155 . S IBDATA=IBP(IBC,$O(IBP(IBC,0))) 156 156 . W !,IBC,?4,$$FMTE^XLFDT($P(IBDATA,"^",12),"5D") 157 . W ?20,$ E($P($$PIN^IBATUTL($O(IBP(IBC,0))),U,2),1,28),?50,"("157 . W ?20,$$EX^IBATUTL(660,4,$P(IBDATA,"^",6)),?40,"(" 158 158 . W $$EX^IBATUTL(660,62,$P(^RMPR(660,$O(IBP(IBC,0)),"AM"),"^",3)),")" 159 159 . W ?65,$J($FN($P(IBDATA,"^",16),",",2),12) … … 166 166 I $D(DIRUT) D H Q 167 167 W !!,"Adding Transaction number ",$$SITE^IBATUTL 168 W $$RMPR^IBATFILE(DFN,$P(IBDATA,"^",12),$$PPF^IBATUTL(DFN),(IBDA_";RMPR(660,"), ,$P(IBDATA,"^",16))168 W $$RMPR^IBATFILE(DFN,$P(IBDATA,"^",12),$$PPF^IBATUTL(DFN),(IBDA_";RMPR(660,"),$P(IBDATA,"^",6),$P(IBDATA,"^",16)) 169 169 W "!" H 1 170 170 D H -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBATLM2A.m
r628 r636 1 1 IBATLM2A ;LL/ELZ - TRANSFER PRICING PT TRANSACTION DETAIL ; 15-SEP-1998 2 ;;2.0;INTEGRATED BILLING;**115,210,266,309 ,389**;21-MAR-94;Build 63 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**115,210,266,309**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 N IBX,IBY K ^TMP("IBATEE",$J) … … 150 150 D SETVALM(.VALMCNT,"") 151 151 D SET("Prosthetic Item:",.IBY,5,16) 152 D SET($ P($$PIN^IBATUTL(+$P(IBDATA(0),"^",12)),U,2),.IBY,23,30) ; dbia 374153 D SET($FN($P(IBDATA(4),"^",5),",",2),.IBY,5 8,15)152 D SET($$GET1^DIQ(661,$P(IBDATA(4),"^",4),.01),.IBY,12,40) ; dbia 374 153 D SET($FN($P(IBDATA(4),"^",5),",",2),.IBY,55,15) 154 154 D SETVALM(.VALMCNT,.IBY) 155 155 D SETVALM(.VALMCNT,"") -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBATO1.m
r628 r636 1 1 IBATO1 ;LL/ELZ - TRANSFER PRICING REPORTS CONT. ; 18-DEC-98 2 ;;2.0;INTEGRATED BILLING;**115,266 ,389**;21-MAR-94;Build 63 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**115,266**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 PAGE() ; performs page reads and returns 1 if quiting is needed … … 40 40 . S IBD(1,IBO,IBB)=$E($$EX^IBATUTL(351.61,4.01,+IBA(4)),1,18) 41 41 I $P(IBA(0),"^",12)["RMPR(660," D Q 42 . S IBD(1,IBO,IBB)=$E($ P($$PIN^IBATUTL(+$P(IBA(0),"^",12)),U,2),1,18)42 . S IBD(1,IBO,IBB)=$E($$EX^IBATUTL(351.61,4.04,$P(IBA(4),"^",4)),1,18) 43 43 S IBDATE=$P($G(^IBAT(351.61,IBIEN,0)),U,4) ; Event Date 44 44 S IBX=0 F S IBX=$O(^IBAT(351.61,IBA,3,IBX)) Q:IBX<1 D -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBATUTL.m
r628 r636 1 1 IBATUTL ;LL/ELZ - TRANSFER PRICING UTILITES ; 3-SEP-1998 2 ;;2.0;INTEGRATED BILLING;**115,266,347 ,389**;21-MAR-94;Build 62 ;;2.0;INTEGRATED BILLING;**115,266,347**;21-MAR-94;Build 24 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 161 161 Q Z 162 162 ; 163 PIN(P660,P6611) ; return Prosthetics Item Description (#661.1,.02)164 ; input: P660 - pointer to Patient Item (#660) or P6611 - pointer to HCPCS (#661.1)165 ; return: pointer to HCPCS (#661.1) ^ Short Description (#661.1,.01) ^ HCPCS (#661.1,.01)166 N IBX,IBY S IBY=""167 I +$G(P660) S P6611=+$P($G(^RMPR(660,+P660,1)),U,4)168 I +$G(P6611) S IBX=$G(^RMPR(661.1,+P6611,0)) I IBX'="" S IBY=P6611_U_$P(IBX,U,2)_U_$P(IBX,U,1)169 Q IBY170 ;171 163 EX(FILE,FIELD,VALUE) ; -- return external value 172 164 N Y,C S Y=$G(VALUE) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCBB.m
r628 r636 1 1 IBCBB ;ALB/AAS - EDIT CHECK ROUTINE TO BE INVOKED BEFORE ALL BILL APPROVAL ACTIONS ;2-NOV-89 2 ;;2.0;INTEGRATED BILLING;**80,51,137,288,327,361 ,371,377**;21-MAR-94;Build 232 ;;2.0;INTEGRATED BILLING;**80,51,137,288,327,361**;21-MAR-94;Build 9 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 23 23 ; 24 24 EN ;Entry to check for errors 25 N IBQ,IBXERR,IBXDATA,IBXSAVE,IBZPRC92,IBQUIT,IBISEQ,IDDATA,IB FOR,IBC25 N IBQ,IBXERR,IBXDATA,IBXSAVE,IBZPRC92,IBQUIT,IBISEQ,IDDATA,IBERRNO 26 26 I $D(IBFL) N IBFL 27 27 K ^TMP($J) 28 28 W ! 29 29 S IBER="" D GVAR I '$D(IBND0) S IBER=-1 Q 30 ; 31 ;I $$ISPROS^IBCEF1(IBIFN) D 32 ;. D WARN^IBCBB11("Bill has prosthetics item(s) and will only print locally") 33 ;. I $$NEEDMRA^IBEFUNC(IBIFN) S IBQUIT=$$IBER^IBCBB3(.IBER,"098") 30 34 ; 31 35 ;patient in patient file … … 41 45 I IBAT]"",'$D(^DGCR(399.3,IBAT,0)) S IBER=IBER_"IB059;" 42 46 I IBAT]"",$D(^DGCR(399.3,IBAT,0)),'$P(^(0),"^",6) S IBER=IBER_"IB059;",IBAT="" 47 ;I IBAT]"",$D(^DGCR(399.3,IBAT,0)) S IBARTP=$P(^PRCA(430.2,$P(^DGCR(399.3,IBAT,0),"^",6),0),"^",6) 43 48 I IBAT]"",$P($G(^DGCR(399.3,IBAT,0)),"^",6) S IBARTP=$P($$CATN^PRCAFN($P(^DGCR(399.3,IBAT,0),"^",6)),"^",3) 44 49 ;Check that AR category expects same debtor as defined in who's responsible. … … 77 82 . S IDDATA=$$INSDEM^IBCEF(IBIFN,IBISEQ) 78 83 . K ^UTILITY("VADM",$J),^UTILITY("VAPA",$J) 79 . ; 80 . I '$P(IDDATA,U,1) D ERR(221) ; birth date missing 81 . ; 82 . I "^M^F^"'[(U_$P(IDDATA,U,2)_U) D ERR(261) ; sex missing 83 . ; 84 . ; IB*2*371 - esg - check for other missing insurance pieces 85 . ; check insured's name, primary ID#, pt. relationship to insured, 86 . ; and subscriber address data 87 . N INNAME,SUBID,PTREL,SFA,CAS,LN,FN 88 . ; 89 . ; IB273 - Primary Insurance name of insured missing 90 . ; IB274 - Secondary Insurance name of insured missing 91 . ; IB275 - Tertiary Insurance name of insured missing 92 . S INNAME=$$POLICY^IBCEF(IBIFN,17,IBISEQ) 93 . S LN=$P(INNAME,",",1),FN=$P(INNAME,",",2) ; last name,first name 94 . S LN=$$NOPUNCT^IBCEF(LN,1) 95 . S FN=$$NOPUNCT^IBCEF(FN,1) 96 . I LN=""!(FN="") D ERR(273) ; name of insured missing or invalid 97 . S LN=$$NAME^IBCEFG1(INNAME) ; additional name checks 98 . S FN=$P(LN,U,2) 99 . S LN=$P(LN,U,1) 100 . I LN=""!(FN="") D ERR(273) ; name of insured missing or invalid 101 . ; 102 . ; IB276 - Primary Insurance subscriber ID missing 103 . ; IB277 - Secondary Insurance subscriber ID missing 104 . ; IB278 - Tertiary Insurance subscriber ID missing 105 . S SUBID=$$NOPUNCT^IBCEF($$POLICY^IBCEF(IBIFN,2,IBISEQ),1) 106 . I SUBID="" D ERR(276) ; subscriber ID# missing 107 . ; 108 . ; IB279 - Primary Insurance missing pt relationship 109 . ; IB280 - Secondary Insurance missing pt relationship 110 . ; IB281 - Tertiary Insurance missing pt relationship 111 . S PTREL=$$POLICY^IBCEF(IBIFN,16,IBISEQ) 112 . I PTREL="" D ERR(279) ; missing patient relationship to insured 113 . ; 114 . ; subscriber address section 115 . S SFA=$$INSADDR^IBCEF(IBIFN,IBISEQ) ; full address all pieces 116 . S CAS=$$NOPUNCT^IBCEF($P(SFA,U,2,5),1) ; string city,st,zip,addr1 117 . ; 118 . ; IB282 - Primary Insurance address line 1 missing 119 . ; IB283 - Secondary Insurance address line 1 missing 120 . ; IB284 - Tertiary Insurance address line 1 missing 121 . I $$NOPUNCT^IBCEF($P(SFA,U,5),1)="" D ; address line 1 is blank 122 .. ; pat=subscriber and current insurance - address is required 123 .. I +PTREL=1,IBISEQ=$$COBN^IBCEF(IBIFN) D ERR(282) Q 124 .. ; if any part of the address is there, then all fields are required 125 .. I CAS'="" D ERR(282) Q 126 .. Q 127 . ; 128 . ; IB285 - Primary Insurance city missing 129 . ; IB286 - Secondary Insurance city missing 130 . ; IB287 - Tertiary Insurance city missing 131 . I $$NOPUNCT^IBCEF($P(SFA,U,2),1)="" D ; city is blank 132 .. ; pat=subscriber and current insurance - address is required 133 .. I +PTREL=1,IBISEQ=$$COBN^IBCEF(IBIFN) D ERR(285) Q 134 .. ; if any part of the address is there, then all fields are required 135 .. I CAS'="" D ERR(285) Q 136 .. Q 137 . ; 138 . ; IB288 - Primary Insurance state missing 139 . ; IB289 - Secondary Insurance state missing 140 . ; IB290 - Tertiary Insurance state missing 141 . I $$NOPUNCT^IBCEF($P(SFA,U,3),1)="" D ; state is blank 142 .. ; pat=subscriber and current insurance - address is required 143 .. I +PTREL=1,IBISEQ=$$COBN^IBCEF(IBIFN) D ERR(288) Q 144 .. ; if any part of the address is there, then all fields are required 145 .. I CAS'="" D ERR(288) Q 146 .. Q 147 . ; 148 . ; IB291 - Primary Insurance zipcode missing 149 . ; IB292 - Secondary Insurance zipcode missing 150 . ; IB293 - Tertiary Insurance zipcode missing 151 . I $$NOPUNCT^IBCEF($P(SFA,U,4),1)="" D ; zipcode is blank 152 .. ; pat=subscriber and current insurance - address is required 153 .. I +PTREL=1,IBISEQ=$$COBN^IBCEF(IBIFN) D ERR(291) Q 154 .. ; if any part of the address is there, then all fields are required 155 .. I CAS'="" D ERR(291) Q 156 .. Q 157 . ; 158 . Q 159 ; 160 ; esg - IB*2*371 - check patient address fields 161 K ^UTILITY("VAPA",$J) 162 ; 163 S IBFOR=0 ; foreign address flag 164 S IBC=+$$PTADDR^IBCEF(IBIFN,25) ; country code ien 165 I IBC D 166 . N CODE 167 . S CODE=$$GET1^DIQ(779.004,IBC,.01) ; .01 code field file 779.004 168 . I CODE'="",CODE'="USA" S IBFOR=1 ; foreign country exists 169 . Q 170 ; 171 I $$NOPUNCT^IBCEF($$PTADDR^IBCEF(IBIFN,1),1)="" S IBER=IBER_"IB269;" 172 I $$NOPUNCT^IBCEF($$PTADDR^IBCEF(IBIFN,4),1)="" S IBER=IBER_"IB270;" 173 I $$NOPUNCT^IBCEF($$PTADDR^IBCEF(IBIFN,5),1)="",'IBFOR S IBER=IBER_"IB271;" 174 I $$NOPUNCT^IBCEF($$PTADDR^IBCEF(IBIFN,11),1)="",'IBFOR S IBER=IBER_"IB272;" 175 K ^UTILITY("VAPA",$J) 176 ; 177 D PAYERADD^IBCBB0(IBIFN) ; check the payer addresses 178 ; 179 ; esg - 9/20/07 - IB patch 371 - prevent EDI transmission for 3 payer 180 ; claims for all but the first payer. To be removed when Emdeon 181 ; and FSC are able to deal with these. 182 ; 183 I +$G(^DGCR(399,IBIFN,"I2")),+$G(^DGCR(399,IBIFN,"I3")),$$TXMT^IBCEF4(IBIFN) D 184 . ; for MRA request claims, make sure the MRA secondary claim is forced to print 185 . I $$REQMRA^IBEFUNC(IBIFN) D Q 186 .. I '$P($G(^DGCR(399,IBIFN,"TX")),U,9) S IBER=IBER_"IB146;" 187 .. Q 188 . ; 189 . I $$COBN^IBCEF(IBIFN)=1 Q ; primary payer sequence claims are OK 190 . ; 191 . ; But claims with a payer sequence of 2 or 3 need to print locally 192 . S IBER=IBER_"IB147;" 84 . I '$P(IDDATA,U,1) D ; birth date missing 85 .. S IBERRNO=220+IBISEQ 86 .. S IBER=IBER_"IB"_IBERRNO_";" 87 . I "^M^F^"'[(U_$P(IDDATA,U,2)_U) D ; sex missing 88 .. S IBERRNO=260+IBISEQ 89 .. S IBER=IBER_"IB"_IBERRNO_";" 193 90 . Q 194 91 ; … … 207 104 Q ($P(IBND0,U,24)_$P($G(^DGCR(399.1,+$P(IBND0,U,25),0)),U,2)_$P(IBND0,U,26)) 208 105 ; 209 ERR(Z) ; update IBER variable from the above insurance checks210 ; Z is the IB error code# for the primary insurance error211 N IBERRNO212 S IBERRNO="IB"_(Z+IBISEQ-1)213 I IBER[IBERRNO Q214 S IBER=IBER_IBERRNO_";"215 Q216 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCBB1.m
r628 r636 1 1 IBCBB1 ;ALB/AAS - CONTINUATION OF EDIT CHECK ROUTINE ;2-NOV-89 2 ;;2.0;INTEGRATED BILLING;**27,52,80,93,106,51,151,148,153,137,232,280,155,320,343,349,363 ,371,395**;21-MAR-94;Build 32 ;;2.0;INTEGRATED BILLING;**27,52,80,93,106,51,151,148,153,137,232,280,155,320,343,349,363**;21-MAR-94;Build 35 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 23 23 S IBTFY=$$FY^IBOUTL(IBTDT) 24 24 ; 25 ;Statement crosses fiscal years 26 ;I IBTFY'=IBFFY S IBER=IBER_"IB047;" 27 ; 28 ;Statement crosses calendar years 29 ;I $E(IBTDT,1,3)'=$E(IBFDT,1,3) S IBER=IBER_"IB046;" 30 ; 25 31 ;Total Charges 26 32 I +IBTC'>0!(+IBTC'=IBTC) S IBER=IBER_"IB064;" … … 37 43 I IBAU]"",'$D(^VA(200,IBAU,0)) S IBER=IBER_"IB041;" 38 44 ; 45 ;Bill exists and not already new bill 46 ;I $S('$D(^PRCA(430,IBIFN,0)):1,$P($P(^PRCA(430,IBIFN,0),"^"),"-",2)'=IBBNO:1,1:0) S IBER=IBER_"IB056;" 47 ;I $P($$BN^PRCAFN(IBIFN),"-",2)'=IBBNO S IBER=IBER_"IB056;" 48 ;I IBER="",$P(^PRCA(430,IBIFN,0),"^",8)=$O(^PRCA(430.3,"AC",104,"")) S IBER=IBER_"IB040;" 39 49 I IBER="",+$$STA^PRCAFN(IBIFN)=104 S IBER=IBER_"IB040;" 40 50 ; If ins bill, must have valid COB sequence … … 46 56 ; Check NPIs 47 57 D NPICHK^IBCBB11 48 ;49 ; Check multiple rx NPIs50 D RXNPI^IBCBB11(IBIFN)51 58 ; 52 59 ; Check taxonomies … … 68 75 ... S Q0=0 F S Q0=$O(IBID(1,FUNCTION,Q0)) Q:'Q0 I $P(IBID(1,FUNCTION,Q0),U,9)=+Z S IBOK=1 Q 69 76 ... I 'IBOK S IBER=IBER_$S(IBINS=1:"IB236;",IBINS=2:"IB237;",IBINS=3:"IB238;",1:"") 70 ; 71 D PRIIDCHK^IBCBB11 77 . I $$TXMT^IBCEF4(IBIFN) D 78 .. D F^IBCEF("N-ALL ATT/REND PROV SSN/EI","IBZ",,IBIFN) 79 .. I $P(IBZ,U,3)=""&($P(IBZ,U,4)="") S IBER=IBER_"IB321;" ; SSN/IEN required for rend/att 72 80 ; 73 81 N IBM,IBM1 … … 133 141 F Z=0:1:2 S Z0=$O(Z(Z)) Q:'Z0 I Z0'=(Z+1) S IBER=IBER_"IB322;" Q 134 142 K Z 135 ; HD64676 IB*2*371 - OK for payer sequence to be blank when the Rate 136 ; Type is either Interagency or Sharing Agreement 137 I $P($G(^DGCR(399,IBIFN,0)),U,21)="",$P($G(^DGCR(399,IBIFN,0)),U,7)'=4,$P($G(^DGCR(399,IBIFN,0)),U,7)'=9 S IBER=IBER_"IB323;" 143 I $P($G(^DGCR(399,IBIFN,0)),U,21)="" S IBER=IBER_"IB323;" 138 144 K IBXDATA D F^IBCEF("N-PROCEDURE CODING METHD",,,IBIFN) 139 145 ; Coding method should agree with types of procedure codes … … 153 159 ; 154 160 D VALNDC^IBCBB11(IBIFN,DFN) ;validate NDC# 155 ;156 161 ;Build AR array if no errors and MRA not needed or already rec'd 157 162 I IBER="",$S($$NEEDMRA^IBEFUNC(IBIFN)!($$REQMRA^IBEFUNC(IBIFN)):0,1:1) D ARRAY -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCBB11.m
r628 r636 1 1 IBCBB11 ;ALB/AAS - CONTINUATION OF EDIT CHECK ROUTINE ;12 Jun 2006 3:45 PM 2 ;;2.0;INTEGRATED BILLING;**51,343,363 ,371,395,392**;21-MAR-94;Build 22 ;;2.0;INTEGRATED BILLING;**51,343,363**;21-MAR-94;Build 35 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 52 52 S IBTAXS=$$PROVTAX^IBCEF73A(IBIFN,.IBNOTAX) 53 53 I $L(IBNOTAX) F Z=1:1:$L(IBNOTAX,U) D 54 . ; Only Referring, Rendering and Attending are currently sent to the payer 55 . I IBTAXREQ,"134"[$P(IBNOTAX,U,Z) S IBER=IBER_"IB"_(250+$P(IBNOTAX,U,Z))_";" Q ; If required, set error 54 . I IBTAXREQ S IBER=IBER_"IB"_(250+$P(IBNOTAX,U,Z))_";" Q ; If required, set error 56 55 . D WARN("Taxonomy for the "_$P("referring^operating^rendering^attending^supervising^^^^other",U,$P(IBNOTAX,U,Z))_" provider has no value") ; Else, set warning 57 56 ; Check organizations … … 59 58 S IBTAXS=$$ORGTAX^IBCEF73A(IBIFN,.IBNOTAX) 60 59 I $L(IBNOTAX) F Z=1:1:$L(IBNOTAX,U) D 61 . ; These are not currently sent to the payer so no errors yet 62 . ; I IBTAXREQ S IBER=IBER_"IB"_(164+$P(IBNOTAX,U,Z))_";" Q ; If required, set error 60 . I IBTAXREQ S IBER=IBER_"IB"_(164+$P(IBNOTAX,U,Z))_";" Q ; If required, set error 63 61 . ; PRXM/KJH - Changed descriptions. 64 62 . D WARN("Taxonomy for the "_$P("Division^Non-VA Service Facility^Billing Provider",U,$P(IBNOTAX,U,Z))_" has no value") ; Else, set warning 65 63 Q 66 64 ; 67 VALNDC(IBIFN,IBDFN) ; IB*2*363 - validate NDC# between PRESCRIPTION file (#52) 65 VALNDC(IBIFN,IBDFN) ; IB*2*363 - validate NDC# between PRESCRIPTION file (#52) 68 66 ; and IB BILL/CLAIMS PRESCRIPTION REFILL file (#362.4) 69 67 ; input - IBIFN = internal entry number of the billing record in the BILL/CLAIMS file (#399) … … 76 74 S IBX=0 F S IBX=$O(IBRXCOL(IBX)) Q:'IBX D WARN("NDC# on Bill does not equal the NDC# on Rx "_IBRXCOL(IBX)) 77 75 Q 78 ;79 PRIIDCHK ; Check for required Pimarary ID (SSN/EIN)80 ; If the provider is on the claim, he must have one81 ;82 N IBI,IBZ83 I $$TXMT^IBCEF4(IBIFN) D84 . D F^IBCEF("N-ALL ATT/REND PROV SSN/EI","IBZ",,IBIFN)85 . S IBI="" F S IBI=$O(^DGCR(399,IBIFN,"PRV","B",IBI)) Q:IBI="" D86 .. I $P(IBZ,U,IBI)="" S IBER=IBER_$S(IBI=1:"IB151;",IBI=2:"IB152;",IBI=3!(IBI=4):"IB321;",IBI=5:"IB153;",IBI=9:"IB154;",1:"")87 Q88 ;89 RXNPI(IBIFN) ; check for multiple pharmacy npi's on the same bill90 N IBORG,IBRXNPI,IBX,IBY91 S IBORG=$$RXSITE^IBCEF73A(IBIFN,.IBORG)92 S IBX=0 F S IBX=$O(IBORG(IBX)) Q:'IBX S IBY=0 F S IBY=$O(IBORG(IBX,IBY)) Q:'IBY S IBRXNPI(+IBORG(IBX,IBY))=""93 S (IBX,IBY)=0 F S IBX=$O(IBRXNPI(IBX)) Q:'IBX S IBY=IBY+194 I IBY>1 D WARN("Bill has prescriptions resulting from "_IBY_" different NPI locations")95 Q -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCBB2.m
r628 r636 1 1 IBCBB2 ;ALB/ARH - CONTINUATION OF EDIT CHECKS ROUTINE (CMS-1500) ;04/14/92 2 ;;2.0;INTEGRATED BILLING;**51,137,210,245,232,296,320,349 ,371**;21-MAR-94;Build 572 ;;2.0;INTEGRATED BILLING;**51,137,210,245,232,296,320,349**;21-MAR-94;Build 46 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 6 6 ; 7 7 EN ; 8 N IBI,IBJ,IBN,IBY,IBDX,IBDXO,IBDXL,IBCPT,IBCPTL,IBOLAB,Z,IBXSAVE,IBLOC,IBTX,IBPS,IBSP,IBLCT ,IBNVFLG,IBU38 N IBI,IBJ,IBN,IBY,IBDX,IBDXO,IBDXL,IBCPT,IBCPTL,IBOLAB,Z,IBXSAVE,IBLOC,IBTX,IBPS,IBSP,IBLCT 9 9 I '$D(IBER) S IBER="" 10 10 S IBTX=$$TXMT^IBCEF4(IBIFN) 11 11 ; 12 ; Warn if no group provider id (MCRWNR is a default) 13 ; I '$$WNRBILL^IBEFUNC(IBIFN) D 14 ; . S Z=$P($G(^DGCR(399,IBIFN,"M1")),U,$$COBN^IBCEF(IBIFN)+1) 15 ; . I Z="" D WARN^IBCBB11("No group prov # for the current ins co - site tax id will be used") 12 16 ; Max 4 modifiers per CPT code allowed before warning 13 17 K IBXDATA … … 22 26 ; CPT procs must be associated with a dx, must have a defined provider 23 27 S (IBLOC,IBN,IBI,IBY)=0 F S IBI=$O(^DGCR(399,IBIFN,"CP",IBI)) Q:IBI'?1N.N S IBCPT=^(IBI,0) D I +IBY S IBN=1 28 . ;I IBER'["IB089",$P(IBCPT,U,10)=7,$S('$P(IBCPT,U,16):1,1:$P(IBCPT,U,16)#15) S IBER=IBER_"IB089;" ;anesthesia needs minutes in multiple of 15 24 29 . I 'IBLOC,$P(IBCPT,U,15)'="",IBTX S Z="At least 1 charge has local box 24K data that will not be transmitted - " S IBLOC=1 D WARN^IBCBB11(Z) S Z=" This data will only print locally" D WARN^IBCBB11(Z) 25 30 . I $P(IBCPT,U)'["ICPT(" S:IBER'["IB092" IBER=IBER_"IB092;" Q 26 31 . S IBY=1 F IBJ=11:1:14 I +$P(IBCPT,"^",IBJ) S IBCPTL(+$P(IBCPT,"^",IBJ))="",IBY=0 32 . ;I '$P(IBCPT,U,18) S:IBER'["IB094;" IBER=IBER_"IB094;" Q 27 33 I +IBN S IBER=IBER_"IB072;" 28 34 ; … … 46 52 S Z=$$EVENT^IBCF22(IBIFN,.IBXSAVE,.IBI) 47 53 I IBI S IBER=IBER_"IB099;" 48 ;49 ; esg - 6/6/07 - warning if missing non-VA care type for outside facility50 S IBNVFLG=051 I $P(IBNDU2,U,10),'$P(IBNDU2,U,11) D WARN^IBCBB11("Non-VA facility indicated, but the Non-VA Care Type field is not defined") S IBNVFLG=152 ;53 54 ; unit/charge limits 54 55 K IBXDATA … … 61 62 .. I $P(IBXDATA(IBI),U,14),"24"'[$P(IBNDU2,U,11) D WARN^IBCBB11("Outside lab charges exist on a non-lab NON-VA bill") 62 63 . I '$P(IBNDU2,U,11),$P(IBXDATA(IBI),U,11) D WARN^IBCBB11("Purchased service amounts are invalid unless this is a NON-VA bill") 63 . I IBNVFLG,'$P(IBXDATA(IBI),U,11) D WARN^IBCBB11("Non-VA facility indicated, but no purchased service charge on line# "_IBI)64 64 . I $D(IBXDATA(IBI,"A")) S IBER=IBER_"IB310;" Q 65 65 . I $D(IBXDATA(IBI,"ARX")),IBER'["311;" S IBER=IBER_"IB311;" Q … … 78 78 . I IBER'["IB090",$P(IBXDATA(IBI),U,9)'<10000 S IBER=IBER_"IB090;" 79 79 . I '($P(IBXDATA(IBI),U,9)*$P(IBXDATA(IBI),U,8)),$$COBN^IBCEF(IBIFN)'>1 S Z="Procedure "_$P(IBXDATA(IBI),U,5)_" has a 0-charge and will not be transmitted" D WARN^IBCBB11(Z) 80 . I $G(IBXDATA(IBI,"AUX"))'="",'$G(IBSP(1)),+IBSP'=35,$TR($P(IBXDATA(IBI,"AUX"),U,4,6)_$P(IBXDATA(IBI,"AUX"),U,2),U)'="" S IBSP(1)=1 80 81 I IBTX,IBLCT>50 D 81 82 . I '$$REQMRA^IBEFUNC(IBIFN) S IBER=IBER_"IB308;" Q 82 83 . I '$P(IBNDTX,U,9) S IBER=IBER_"IB325;" 83 S IBU3=$P($G(^DGCR(399,IBIFN,"U3")),U,4,7) I $TR(IBU3,U)'="" D 84 .I +IBSP'=35 D WARN^IBCBB11("Chiropractic service details only valid if provider specialty is '35'") 85 .I $P(IBU3,U,2)="" S IBER=IBER_"IB137;" 86 .I $P(IBU3,U,4)="" S IBER=IBER_"IB138;" Q 87 .I $P(IBU3,U,3)="","AM"[$P(IBU3,U,4) S IBER=IBER_"IB139;" 88 .Q 84 I $G(IBSP(1)) D WARN^IBCBB11("Chiropractic service details only valid if provider specialty is '35'") 89 85 I IBPS'="" D WARN^IBCBB11("NON-VA facility indicated, but no purchased service charge on line item"_$S(IBPS[",":"s",1:"")_" #"_IBPS) 90 86 I $P(IBNDU2,U,11),$P(IBNDU2,U,11)=4,IBOLAB>1 D WARN^IBCBB11("For proper payment, you must bill each outside lab on a separate claim form") -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCBB3.m
r628 r636 1 1 IBCBB3 ;ALB/TMP - CONTINUATION OF EDIT CHECKS ROUTINE (MEDICARE) ;06/23/98 2 ;;2.0;INTEGRATED BILLING;**51,137,155,349 ,371,377**;21-MAR-94;Build 232 ;;2.0;INTEGRATED BILLING;**51,137,155,349**;21-MAR-94;Build 46 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 21 21 I $G(IBXDATA)="",IBFT=3 D Q:IBQUIT 22 22 . N Z 23 . I "^11^18^"[(U_IBTOB12_U) S IBQUIT=$$IBER (.IBER,231) Q23 . I "^11^18^"[(U_IBTOB12_U) S IBQUIT=$$IBER^IBCBB3(.IBER,231) Q 24 24 . I $$INPAT^IBCEF(IBIFN,1) S Z="Admitting Diagnosis may be required by payer, please verify" D WARN^IBCBB11(Z) 25 25 ; … … 27 27 S IBOK=1,Z=0,IBZP=U F S Z=$O(Z(Z)) Q:'Z S:$S($P($G(Z(Z,1)),U,3)["VA(200":1,1:0) IBZP=IBZP_+$P(Z(Z,1),U,3)_U 28 28 D ALLPROC^IBCVA1(IBIFN,.IBZP1) 29 S Z=0 F S Z=$O(IBZP1(Z)) Q:'Z I $P(IBZP1(Z),U,18), IBZP'[(U_$P(IBZP1(Z),U,18)_U)S IBOK=0 Q29 S Z=0 F S Z=$O(IBZP1(Z)) Q:'Z I $P(IBZP1(Z),U,18),(U_$P(IBZP1(Z),U,18)_U)'[IBZP S IBOK=0 Q 30 30 I 'IBOK D WARN^IBCBB11("At least one provider on a procedure does not match your "_$S(IBFT=2:"render",1:"attend")_"ing or operating provider") 31 31 I IBFT=2 D EN^IBCBB2 … … 37 37 PARTA ; MEDICARE specific edit checks for PART A claims (UB-04 formats) 38 38 ; 39 N IBI,IBJ,IBX,IBCTYP,VADM,VAPA,IBSTOP,IBDXC,IBDXARY,IBPR,IBLABS ,REQMRA39 N IBI,IBJ,IBX,IBCTYP,VADM,VAPA,IBSTOP,IBDXC,IBDXARY,IBPR,IBLABS 40 40 N IBS,IBTUNIT,IBCAGE,IBREV1,IBOCCS,IBOCSDT,IBVALCD,IBOCCD,IBNOPR 41 41 N IBCCARY1,IBPATST,IBZADMIT,IBZDISCH,IBXIEN,IBXERR,IBXDATA,IBOCSP … … 89 89 ; procedure 90 90 ; 91 S REQMRA=$$REQMRA^IBEFUNC(IBIFN)92 91 S (IBNOPR,IBI)=0 93 92 F S IBI=$O(IBXDATA(IBI)) Q:'IBI D 94 . I REQMRA D GYMODCHK(IBXDATA(IBI)) ; IB*2*377 GY modifier check95 93 . S IBJ=$P(IBXDATA(IBI),U),IBECAT="" 96 94 . I 'IBNOPR D … … 119 117 . ; to be sent to MEDICARE for an MRA 120 118 . D NONMCR(.IBPR,.IBLABS) ; Remove Oxygen, labs, influenza shots 119 . ;I $O(IBPR(""))="" D 121 120 . I $G(IBLABS) D WARN^IBCBB11("The only possible billable procedures on this bill are labs -"),WARN^IBCBB11(" Please verify that MEDICARE does not reimburse these labs at 100%") Q 122 121 . I $O(IBPR(""))="" D … … 138 137 D DEM^VADPT 139 138 I $P(VADM(5),U)'="M",$P(VADM(5),U)'="F" S IBQUIT=$$IBER(.IBER,124) Q:IBQUIT 140 ;141 ; esg - 10/17/07 - patch 371142 ; For Part A replacement MRA request claims, make sure143 ; the Medicare ICN/DCN number is present and also text in FL-80.144 I $$REQMRA^IBEFUNC(IBIFN),$F(".137.138.117.118.","."_IBTOB_".") D Q:IBQUIT145 . N IBZ,FL80TXT146 . D F^IBCEF("N-CURR INS FORM LOC 64","IBZ",,IBIFN) ; see CI3-11147 . I IBZ="" S IBQUIT=$$IBER(.IBER,205) Q:IBQUIT ; missing ICN/DCN148 . S FL80TXT=$P($G(^DGCR(399,IBIFN,"UF2")),U,3)149 . I FL80TXT="" S IBQUIT=$$IBER(.IBER,206) Q:IBQUIT ; missing FL80 text150 . Q151 139 ; 152 140 D ^IBCBB4 … … 172 160 F Z=77:1:85 S Z0="E13"_Z K IBPR(Z0) 173 161 ; Labs 162 ;S Z="80000" F S Z=$O(IBPR(Z)) Q:Z'?1"8"4N K IBPR(Z) S IBLABS=1 174 163 S Z="80000" F S Z=$O(IBPR(Z)) Q:Z'?1"8"4N S IBLABS=1 175 164 ; Flu shots … … 195 184 Q IB 196 185 ; 197 GYMODCHK(Z) ; GY modifier check procedure. IB*2*377 - 2/4/08198 ; Z is the IBXDATA(IBI) service line EDI199 N MODS200 I IBER["IB123" Q ; error already found201 S MODS=$P(Z,U,9) ; list of modifiers separated by commas202 I MODS'["GY" Q ; GY modifier not here on this line item203 I $P(Z,U,6) Q ; non-covered charges exist on this line item204 S IBQUIT=$$IBER(.IBER,123)205 GYMODX ;206 Q207 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCBB5.m
r628 r636 1 1 IBCBB5 ;ALB/BGA - CONT OF MEDICARE EDIT CHECKS ;08/12/98 2 ;;2.0;INTEGRATED BILLING;**51,137 ,371**;21-MAR-94;Build 573 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**51,137**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified 4 4 ; 5 5 D F^IBCEF("N-ADMISSION DATE","IBZADMIT",,IBIFN) … … 15 15 S IBI=0 F S IBI=$O(IBXSAVE("OCCS",IBI)) Q:'IBI D 16 16 . N IBOCSDT,IBOCSDT1,Z 17 . S IBOCSDT=$P(IBXSAVE("OCCS",IBI),U,2),IBOCSDT1=$P(IBXSAVE("OCCS",IBI),U, 3),IBOCCS=$P(IBXSAVE("OCCS",IBI),U)17 . S IBOCSDT=$P(IBXSAVE("OCCS",IBI),U,2),IBOCSDT1=$P(IBXSAVE("OCCS",IBI),U,4),IBOCCS=$P(IBXSAVE("OCCS",IBI),U) 18 18 . S IBOCSP(IBOCCS,$O(IBOCSP(IBOCCS,""),-1)+1)=IBXSAVE("OCCS",IBI) 19 . ; Occurrence Code End dates must be > start date and are required for OCCURANCE SPANS20 . I 'IBOCSDT1 S IBER=IBER_"IB155;" Q21 . I IBOCSDT1<IBOCSDT S IBER=IBER_"IB150;" Q22 19 ; 23 20 S IBI=0 F S IBI=$O(IBXSAVE("OCC",IBI)) Q:'IBI D … … 37 34 S IBX=0 38 35 F S IBX=$O(IBXDATA(IBX)) Q:'IBX D Q:IBQUIT 39 . I '$D(IBVALCD($P(IBXDATA(IBX),U))) S IBVALCD($P(IBXDATA(IBX),U))=$P(IBXDATA(IBX),U,2)40 36 . ; value code 01 must have a value>0 41 . I $P(IBXDATA(IBX),U)="01",IBER'["134;",$P(IBXDATA(IBX),U,2)'>0 S IBQUIT=$$IBER^IBCBB3(.IBER,134) Q 37 . I $P(IBXDATA(IBX),U)="01",IBER'["134;",$P(IBXDATA(IBX),U,2)'>0 S IBQUIT=$$IBER^IBCBB3(.IBER,134) 38 . Q:IBQUIT 42 39 . ; value code 02 must have a value=0 43 . I $P(IBXDATA(IBX),U)="02",IBER'["135;",+$P(IBXDATA(IBX),U,2)'=0 S IBQUIT=$$IBER^IBCBB3(.IBER,135) Q40 . I $P(IBXDATA(IBX),U)="02",IBER'["135;",+$P(IBXDATA(IBX),U,2)'=0 S IBQUIT=$$IBER^IBCBB3(.IBER,135) 44 41 . ; code^amount^dollar amt flag (1=amt,0=quantity) 45 . I $P(IBXDATA(IBX),U,2)="",IBER'["157;" S IBQUIT=$$IBER^IBCBB3(.IBER,157) Q 46 . I '$$CHK^IBCVC($P(IBXDATA(IBX),U,4),$P(IBXDATA(IBX),U,2)),IBER'["158;" S IBQUIT=$$IBER^IBCBB3(.IBER,158) Q 42 . Q:IBQUIT 43 . I '$D(IBVALCD($P(IBXDATA(IBX),U))) S IBVALCD($P(IBXDATA(IBX),U))=$P(IBXDATA(IBX),U,2) Q 44 ; Must have value code 01 or 02 for TOB 11X, 18X, 21X - default it 45 ;I '$D(IBVALCD("01")),'$D(IBVALCD("02")),$S(IBTOB12="11":1,IBTOB12="18":1,1:IBTOB12="21") S IBQUIT=$$IBER^IBCBB3(.IBER,132) 47 46 ; 48 47 Q:IBQUIT -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCBB9.m
r628 r636 1 1 IBCBB9 ;ALB/BGA MEDICARE PART B EDIT CHECKS ;10/15/98 2 ;;2.0;INTEGRATED BILLING;**51,137,155,349 ,371**;21-MAR-94;Build 572 ;;2.0;INTEGRATED BILLING;**51,137,155,349**;21-MAR-94;Build 46 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 27 27 I $S($G(IBXDATA)="":1,$E($P(IBXDATA,U))=" "!($E($P(IBXDATA,U))'?1A):1,$E($P(IBXDATA,U,2))=" "!($E($P(IBXDATA,U,2))'?1A):1,1:0) S IBQUIT=$$IBER^IBCBB3(.IBER,300) Q:IBQUIT 28 28 ; 29 ; First char of the pat's address and city must not be a space 30 K IBXDATA D F^IBCEF("N-PATIENT STREET ADDRESS LN 1",,,IBIFN) 31 I $G(IBXDATA)=""!($E($G(IBXDATA))=" ") S IBQUIT=$$IBER^IBCBB3(.IBER,302) Q:IBQUIT 32 ; 33 K IBXDATA D F^IBCEF("N-PATIENT CITY",,,IBIFN) 34 I $G(IBXDATA)=""!($E($G(IBXDATA))=" ") S IBQUIT=$$IBER^IBCBB3(.IBER,302) Q:IBQUIT 35 ; 29 36 ; Must be a valid HIC # 30 37 I '$$VALID^IBCBB8(IBIFN) S IBQUIT=$$IBER^IBCBB3(.IBER,215) Q:IBQUIT -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCC1.m
r628 r636 1 IBCC1 ;ALB/MJB - CANCEL THIRD PARTY BILL ;10-OCT-942 ;;2.0;INTEGRATED BILLING;**19,95,160,159,320,347 ,377**;21-MAR-94;Build 231 IBCC1 ;ALB/MJB - CANCEL UB-82 THIRD PARTY BILL ;10-OCT-94 2 ;;2.0;INTEGRATED BILLING;**19,95,160,159,320,347**;21-MAR-94;Build 24 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; 5 5 RNB ; -- Add a reason not billable to claims tracking 6 6 N X,Y,DIC,DIE,I,J,DA,DR,IBTYP,IBTRE,IB,IBAPPT,IBDT,IBTALK,IBCODE,IBTRED,IBTSAV,FILL,IBRX,IBDATA,IBD,IBDT,IBQUIT,IBPRO,IBDD 7 N ZT,TCNT,CNT8 7 Q:'$G(IBIFN) 9 8 S IB(0)=$G(^DGCR(399,IBIFN,0)),IBTYP=$P(IB(0),"^",5),IBQUIT=0 10 9 I '$D(DFN) S DFN=$P(IB(0),"^",2) 11 KILL ^TMP($J,"IBCC1")12 10 ; 13 11 ; -- is inpt find entry in dgpm, then in ibt(356, s da=ibtre then edit … … 16 14 .S DGPM=$O(^DGPM("APTT1",DFN,DATE,0)) ; double check for asih 17 15 .I DGPM S (IBTRE,IBTSAV)=$O(^IBT(356,"AD",DGPM,0)) 18 .I $G(IBTRE) D CTSET(IBTRE)16 .I $G(IBTRE) D RNBEDIT 19 17 .Q:IBQUIT 20 18 .; … … 23 21 .S DATE=$P(IB(0),"^",3),DFN=$P(IB(0),"^",2) 24 22 .S IBDT=(DATE-.25) F S IBDT=$O(^IBT(356,"APTY",DFN,IBCODE,IBDT)) Q:'IBDT!(IBDT>(DATE+.24)) D 25 ..S IBTRE=0 F S IBTRE=$O(^IBT(356,"APTY",DFN,IBCODE,IBDT,IBTRE)) Q:IBTRE=""!(IBQUIT) D:$G(IBTSAV)'=IBTRE CTSET(IBTRE)23 ..S IBTRE=0 F S IBTRE=$O(^IBT(356,"APTY",DFN,IBCODE,IBDT,IBTRE)) Q:IBTRE=""!(IBQUIT) D:$G(IBTSAV)'=IBTRE RNBEDIT 26 24 .Q 27 25 ; … … 30 28 .S IBAPPT=0 F S IBAPPT=$O(^DGCR(399,IBIFN,"OP",IBAPPT)) Q:'IBAPPT!(IBQUIT) D 31 29 ..S IBDT=(IBAPPT-.01) F S IBDT=$O(^IBT(356,"APTY",DFN,IBCODE,IBDT)) Q:'IBDT!(IBDT>(IBAPPT+.24)) D 32 ...S IBTRE=0 F S IBTRE=$O(^IBT(356,"APTY",DFN,IBCODE,IBDT,IBTRE)) Q:IBTRE=""!(IBQUIT) D CTSET(IBTRE)30 ...S IBTRE=0 F S IBTRE=$O(^IBT(356,"APTY",DFN,IBCODE,IBDT,IBTRE)) Q:IBTRE=""!(IBQUIT) D RNBEDIT 33 31 .Q 34 32 ; … … 38 36 .I '$G(IBRX) S DIC=52,DIC(0)="BO",X=$P(IBDATA,"^",1) D DIC^PSODI(52,.DIC,X) S IBRX=+Y K DIC,X,Y Q:IBRX=-1 39 37 .S FILL="" F S FILL=$O(^IBT(356,"ARXFL",IBRX,FILL)) Q:FILL=""!(IBQUIT) D 40 ..S IBTRE=0 F S IBTRE=$O(^IBT(356,"ARXFL",IBRX,FILL,IBTRE)) Q:'IBTRE!(IBQUIT) I $P(^IBT(356,+IBTRE,0),"^",6)=IBDT D CTSET(IBTRE)38 ..S IBTRE=0 F S IBTRE=$O(^IBT(356,"ARXFL",IBRX,FILL,IBTRE)) Q:'IBTRE!(IBQUIT) I $P(^IBT(356,+IBTRE,0),"^",6)=IBDT D RNBEDIT 41 39 ; 42 40 PRO ; -- find prosthetics on bill … … 44 42 .S IBDATA=$G(^IBA(362.5,IBD,0)),IBPRO=$P(IBDATA,"^",4) 45 43 .Q:'$G(IBPRO) 46 .S IBTRE=0 F S IBTRE=$O(^IBT(356,"APRO",+IBPRO,IBTRE)) Q:'IBTRE!(IBQUIT) D CTSET(IBTRE) 47 ; 48 ; ----- Finished with the gathering of the CT data entries ----- 49 ; 50 ; count up the total number of CT entries recorded in the scratch global 51 S ZT="",TCNT=0 52 F S ZT=$O(^TMP($J,"IBCC1",ZT)) Q:ZT="" S IBTRE=0 F S IBTRE=$O(^TMP($J,"IBCC1",ZT,IBTRE)) Q:'IBTRE S TCNT=TCNT+1 53 ; 54 ; loop thru all of the associated CT entries and call the RNBEDIT procedure for each one 55 S ZT="",CNT=0 56 F S ZT=$O(^TMP($J,"IBCC1",ZT)) Q:ZT=""!IBQUIT D Q:IBQUIT 57 . S IBTRE=0 F S IBTRE=$O(^TMP($J,"IBCC1",ZT,IBTRE)) Q:'IBTRE!IBQUIT S CNT=CNT+1 D RNBEDIT(IBTRE,ZT,TCNT,CNT) 58 . Q 59 ; 60 ; clean-up the scratch global when completed 61 KILL ^TMP($J,"IBCC1") 44 .S IBTRE=0 F S IBTRE=$O(^IBT(356,"APRO",+IBPRO,IBTRE)) Q:'IBTRE!(IBQUIT) D RNBEDIT 62 45 Q 63 46 ; 64 CTSET(IBTRE) ; procedure to store this CT entry in the scratch global 65 Q:'$G(IBTRE) 66 S ^TMP($J,"IBCC1",$$TYPE(IBTRE),IBTRE)="" 67 CTSETX ; 68 Q 69 ; 70 RNBEDIT(IBTRE,CTTYPE,TCNT,CNT) ; CT entry display and capture RNB data and additional comment data 47 RNBEDIT ; 71 48 Q:IBQUIT 72 I '$D(IBTALK) D 73 . N CTZ 74 . W !!,"Since you have canceled this bill, you may enter a Reason Not Billable and" 75 . W !,"an Additional Comment into Claims Tracking." 76 . W !,"This will take the care off of the UNBILLED lists." 77 . I TCNT=1 S CTZ="Note: There is 1 associated Claims Tracking entry." 78 . E S CTZ="Note: There are "_TCNT_" associated Claims Tracking entries." 79 . W !!,CTZ 80 . Q 81 ; 49 W:'$D(IBTALK) !!,"Since you have canceled this bill, you may enter a Reason Not Billable",!,"into Claims Tracking. This will take the care off of the UNBILLED lists" 82 50 S IBTALK=1 83 51 ; 84 N %,IBTRED,IBTRED1 S IBTRED=$G(^IBT(356,IBTRE,0)),IBTRED1=$G(^IBT(356,IBTRE,1)) 85 ; 86 W !!,"Claims Tracking Entry [",CNT," of ",TCNT,"]" 87 W !?7,"Entry ID#: ",+IBTRED 88 W !?12,"Type: ",$$EXPAND^IBTRE(356,.18,$P(IBTRED,U,18)) 89 ; 90 I CTTYPE=1 D ; inpatient admission or scheduled admission 91 . W !?2,"Admission Date: ",$$FMTE^XLFDT($P(IBTRED,U,6),"1P") 92 . Q 93 ; 94 I CTTYPE=2 D ; outpatient visit 95 . N IBOE,IBOE0 96 . W !?6,"Visit Date: ",$$FMTE^XLFDT($P(IBTRED,U,6),"1P") 97 . S IBOE=+$P(IBTRED,U,4),IBOE0=$$SCE^IBSDU(IBOE) 98 . W !?10,"Clinic: ",$$GET1^DIQ(44,+$P(IBOE0,U,4)_",",.01) 99 . Q 100 ; 101 I CTTYPE=3 D ; prescription refill 102 . N PSONTALK,PSOTMP,X 103 . S PSONTALK=1 104 . S X=+$P(IBTRED,U,8)_U_+$P(IBTRED,U,10) D EN^PSOCPVW 105 . ;if refill was deleted and EN^PSOCPVW doesn't return any data use IB API 106 . I '$D(PSOTMP) D PSOCPVW^IBNCPDPC(+$P(IBTRED,U,2),+$P(IBTRED,U,8),.PSOTMP) 107 . W !?3,"Prescription#: ",$G(PSOTMP(52,+$P(IBTRED,U,8),.01,"E")) 108 . I '$P(IBTRED,U,10) W !?7,"Fill Date: ",$$FMTE^XLFDT($P(IBTRED,U,6),"1P") 109 . I $P(IBTRED,U,10) W !?5,"Refill Date: ",$$FMTE^XLFDT($P(IBTRED,U,6),"1P") 110 . W !?12,"Drug: ",$G(PSOTMP(52,+$P(IBTRED,U,8),6,"E")) 111 . Q 112 ; 113 I CTTYPE=4 D ; prosthetic item 114 . N IBDA,IBRMPR 115 . S IBDA=$P(IBTRED,U,9) 116 . D PRODATA^IBTUTL1(IBDA) 117 . W !?3,"Delivery Date: ",$$FMTE^XLFDT($P(IBTRED,U,6),"1P") 118 . W !?12,"Item: ",$G(IBRMPR(660,+IBDA,4,"E")) 119 . W !?5,"Description: ",$G(IBRMPR(660,+IBDA,24,"E")) 120 . Q 121 ; 52 N %,IBTRED S IBTRED=$G(^IBT(356,IBTRE,0)) 53 W !!,"Claims Tracking entry: ",+IBTRED," ",$$EXPAND^IBTRE(356,.18,$P(IBTRED,"^",18))," ",$$FMTE^XLFDT($P(IBTRED,"^",6)) 122 54 I $G(IBMCSRNB)'="",$P(IBTRED,U,19) W !," Note: A Reason Not Billable has been previously entered",!?8,"for this Claims Tracking record." 123 I $G(IBMCSCAC)'="",$P(IBTRED1,U,8)'="" W !," Note: An Additional Comment has been previously entered",!?8,"for this Claims Tracking record."124 ;125 55 S DA=IBTRE,DIE="^IBT(356,",DR=".19" 126 I $G(IBMCSRNB)'="" S DR=".19//"_$P(IBMCSRNB,U,2) ; IB*320 MCS cancel - reason not billable 127 I $G(IBMCSCAC)'="" S DR=DR_";1.08//^S X=IBMCSCAC" ; IB*377 MCS cancel - additional comment 128 I $G(IBMCSCAC)="" S DR=DR_";1.08" ; IB*377 additional comment field SRS 3.3.2.1 56 I $G(IBMCSRNB)'="" S DR=".19//"_$P(IBMCSRNB,U,2) ; IB*320 MCS cancel 129 57 D ^DIE 130 58 ; 131 ; - if the RNB or additional commentchanged, update the user and date/time last edited132 I $P(IBTRED, U,19)'=$P($G(^IBT(356,IBTRE,0)),U,19)!($P(IBTRED1,U,8)'=$P($G(^IBT(356,IBTRE,1)),U,8)) D NOW^%DTC S DR="1.03///"_%_";1.04////"_DUZ D ^DIE59 ; - if the RNB changed, update the user and date/time last edited 60 I $P(IBTRED,"^",19)'=$P($G(^IBT(356,IBTRE,0)),"^",19) D NOW^%DTC S DR="1.03///"_%_";1.04////"_DUZ D ^DIE 133 61 ; 134 62 ; $D(Y) indicates an up-arrow exit from the DIE call (??) 135 63 I $D(Y) S DFN=+$P(^IBT(356,IBTRE,0),"^",2) D FIND^IBOHCT(DFN,IBTRE) S IBQUIT=1 136 64 Q 137 ;138 TYPE(Z) ; function to get the type of claims tracking entry139 ; Z is the ien to file 356140 Q +$P($G(^IBE(356.6,+$P($G(^IBT(356,+Z,0)),U,18),0)),U,3)141 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCCC2.m
r628 r636 1 1 IBCCC2 ;ALB/AAS - CANCEL AND CLONE A BILL - CONTINUED ;6/6/03 9:56am 2 ;;2.0;INTEGRATED BILLING;**80,106,124,138,51,151,137,161,182,211,245,155,296,320,348,349 ,371**;21-MAR-94;Build 572 ;;2.0;INTEGRATED BILLING;**80,106,124,138,51,151,137,161,182,211,245,155,296,320,348,349**;21-MAR-94;Build 46 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 55 55 U2 F J=1:1:19 I $P(IBND("U2"),"^",J)]"" S $P(^DGCR(399,IBIFN,"U2"),"^",J)=$P(IBND("U2"),"^",J) 56 56 Q 57 U3 F J=1:1: 7I $P(IBND("U3"),"^",J)]"" S $P(^DGCR(399,IBIFN,"U3"),"^",J)=$P(IBND("U3"),"^",J)57 U3 F J=1:1:3 I $P(IBND("U3"),"^",J)]"" S $P(^DGCR(399,IBIFN,"U3"),"^",J)=$P(IBND("U3"),"^",J) 58 58 Q 59 59 UF2 F J=1,3 I $P(IBND("UF2"),"^",J)]"" S $P(^DGCR(399,IBIFN,"UF2"),"^",J)=$P(IBND("UF2"),"^",J) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCCC3.m
r628 r636 1 1 IBCCC3 ;ALB/AAS - CANCEL AND CLONE A BILL - CONTINUED ;25-JAN-90 2 ;;2.0;INTEGRATED BILLING;**363,381 ,389**;21-MAR-94;Build 62 ;;2.0;INTEGRATED BILLING;**363,381**;21-MAR-94;Build 1 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 52 52 ... S IBX=$G(^IBA(362.5,IBPIFN,0)) I IBX=""!($P(IBX,U,2)'=IBIFN1) Q 53 53 ... S DIC="^IBA(362.5,",DIC(0)="L",X=$P(IBX,U,1) K DA,DO D FILE^DICN K DA,DO Q:Y'>0 54 ... S DR=".02////"_IBIFN_";.0 4////"_$P(IBX,U,4)_";.05////^S X=$P(IBX,U,5)"54 ... S DR=".02////"_IBIFN_";.03////"_$P(IBX,U,3)_";.04////"_$P(IBX,U,4) 55 55 ... S DIE=DIC,DA=+Y D ^DIE K DIC,DIE,DA,DO,DR 56 56 K DIE,DIC,DA,DO,DR,X,Y -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCE.m
r628 r636 1 1 IBCE ;ALB/TMP - 837 EDI TRANSMISSION UTILITIES/NIGHTLY JOB ;22-JAN-96 2 ;;2.0;INTEGRATED BILLING;**137,283,296,371**;21-MAR-94;Build 57 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 2 ;;2.0;INTEGRATED BILLING;**137,283,296**;21-MAR-94 4 3 EN ; Run all jobs needed for EDI processing nightly 5 4 ; including transmit bills waiting for extract, batches not sent, … … 44 43 ; 45 44 RESUB(IB364) ; Manually resubmit bill for transmission (ien file 364 = IB364) 46 N DIR,X,Y,IBBTCH,DTOUT,DUOUT ,IBIFN,NEW36445 N DIR,X,Y,IBBTCH,DTOUT,DUOUT 47 46 I '$$MGCHK(1) G RESUBQ 48 S IBIFN=+$P($G(^IBA(364,+$G(IB364),0)),U,1) I 'IBIFN G RESUBQ49 47 S IBBTCH="" 50 48 W ! S DIR(0)="SA^I:IMMEDIATE TRANSMIT;L:TRANSMIT LATER WITH REST OF READY FOR EXTRACT BILLS",DIR("A")="TRANSMIT (I)MMEDIATELY OR (L)ATER?: ",DIR("B")="L" … … 53 51 D ^DIR K DIR 54 52 I $D(DTOUT)!$D(DUOUT) G RESUBQ 55 ; 56 ; immediate retransmission of claim 57 I Y="I" D G RESUBQ 58 . S NEW364=$$ADDTBILL^IBCB1(IBIFN) ; Add a new transmission record 59 . I '$P(NEW364,U,3) D Q 60 .. S DIR("A",1)="FAILED TO ADD A NEW EDI TRANSMISSION",DIR(0)="EA",DIR("A")="PRESS ENTER TO CONTINUE " W ! D ^DIR K DIR 61 .. Q 62 . ; 53 I Y="I" D G:'IBBTCH RESUBQ 54 . N Y 63 55 . K ^TMP("IBONE",$J),^TMP("IBSELX",$J),^TMP("IBCE-BATCH",$J) 64 . S ^TMP("IBONE",$J, +NEW364)="",^TMP("IBONE",$J)=0,^TMP("IBSELX",$J)=""56 . S ^TMP("IBONE",$J,IB364)="",^TMP("IBONE",$J)=0,^TMP("IBSELX",$J)="" 65 57 . D ONE^IBCE837 66 58 . S IBBTCH=$O(^TMP("IBCE-BATCH",$J,0)) ; external batch# 67 59 . I IBBTCH'="" S IBBTCH=+$G(^TMP("IBCE-BATCH",$J,IBBTCH)) ; internal batch# 68 60 . K ^TMP("IBONE",$J),^TMP("IBSELX",$J),^TMP("IBCE-BATCH",$J) 69 . ;70 61 . I 'IBBTCH D 71 62 .. S DIR("A",1)="BILL NOT RESUBMITTED - CHECK ALERTS/MAIL FOR DETAILS" 72 63 . E D 73 64 .. N DIE,DR,DA 74 .. D UPDEDI^IBCEM(IB364,"R") ; update EDI files for old transmission65 .. D UPDEDI^IBCEM(IB364,"R") 75 66 .. S DIE="^IBA(364,",DR=".06////"_+IBBTCH,DA=IB364 D ^DIE 76 .. S DIR("A",1)="BILL RESUBMITTED IN BATCH #"_$P($G(^IBA(364.1, +IBBTCH,0)),U,1)77 . S DIR(0)="EA",DIR("A")="PRESS ENTER TO CONTINUE " W !D ^DIR K DIR78 . Q79 ;80 ; Later retransmission of claim81 D UPDEDI^IBCEM(IB364,"R") ; update EDI files for oldtransmission record82 S Y=$$ADDTBILL^IBCB1(IBIFN) ; Add a new transmission record83 S DIR("A",1)="BILL'S TRANSMISSION STATUS RESET TO 'READY TO EXTRACT'"84 S DIR(0)="EA",DIR("A")="PRESS ENTER TO CONTINUE " W !D ^DIR K DIR67 .. S DIR("A",1)="BILL RESUBMITTED IN BATCH #"_$P($G(^IBA(364.1,IBBTCH,0)),U) 68 . S DIR(0)="EA",DIR("A")="PRESS ENTER TO CONTINUE " D ^DIR K DIR 69 I Y="L" D 70 . N Y 71 . D UPDEDI^IBCEM(IB364,"R") 72 . ;Add a new transmission record 73 . S Y=$$ADDTBILL^IBCB1($P($G(^IBA(364,+IB364,0)),U),1) 74 . S DIR("A",1)="BILL'S TRANSMISSION STATUS RESET TO 'READY TO EXTRACT'" 75 . S DIR(0)="EA",DIR("A")="PRESS ENTER TO CONTINUE " D ^DIR K DIR 85 76 ; 86 77 RESUBQ Q -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCE277.m
r628 r636 1 1 IBCE277 ;ALB/TMP - 277 EDI CLAIM STATUS MESSAGE PROCESSING ;15-JUL-98 2 ;;2.0;INTEGRATED BILLING;**137,155,368**;21-MAR-94;Build 21 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 2 ;;2.0;INTEGRATED BILLING;**137,155**;21-MAR-94 4 3 Q 5 4 ; MESSAGE HEADER DATA STRING = … … 8 7 HDR(ENTITY,ENTVAL,IBTYPE,IBD) ;Process header data 9 8 ; INPUT: 10 ; ENTITY = "BATCH" or "CLAIM" for batch/claim level messages respectively 11 ; ENTVAL = claim # 9 ; ENTITY = "BATCH" if batch level message 10 ; "CLAIM" if claim level message 11 ; ENTVAL = batch # or claim # 12 12 ; IBTYPE = the type of status msg this piece of the message represents 13 13 ; (837REC1, 837REJ1) … … 16 16 ; OUTPUT: 17 17 ; IBD array returned with processed data 18 ; "LINE" = The last line # populated in the message 18 19 ; "DATE" = Date/Time of status (Fileman format) 19 20 ; "MRA" = 1 if MRA, 0 if not "X12" = 1 if X12, 0 if not … … 22 23 ; 23 24 ; ^TMP("IBMSG",$J,"BATCH",batch #,0)=MESSAGE HEADER DATA STRING 24 ; if batch level message25 ; if called from batch level 25 26 ; ,"D",0,1)=header record raw data 26 27 ; ,line #)=batch status message lines 27 28 ; 28 29 ; ^TMP("IBMSG",$J,"CLAIM",claim #,0)=MESSAGE HEADER DATA STRING 29 ; if c laim level message30 ; if called from claim level 30 31 ; ,"D",0,1)=header record raw data 31 32 ; ,line #)=claim status message lines 32 33 ; 33 N DATA,IBD0,L,PC,X,Y 34 S IBD0=$G(^TMP("IBMSGH",$J,0)) Q:IBD0="" 35 S Y=0,L=1 36 ; Convert claim date/time 37 S X=$$DATE($P(IBD0,U,3))_"@"_$E($P(IBD0,U,4)_"0000",1,4) I X S %DT="XTS" D ^%DT 38 ; populate IBD array 39 S IBD("DATE")=$S(Y>0:Y,1:""),IBD("MRA")=$P(IBD0,U,5),IBD("X12")=($P(IBD0,U,2)="X") 40 S IBD("SOURCE")=$P(IBD0,U,12,13),IBD("BATCH")=$P(IBD0,U,14) 41 I +$TR($P(IBD0,U,6,9),U) F PC=6:1:9 D 42 .I $P(IBD0,U,PC)'="" S DATA=$P("# Claims Submitted^# Claims Rejected^Total Charges Submitted^Total Charges Rejected",U,PC-5)_": "_$S(PC<8:+$P(IBD0,U,PC),1:$FNUMBER($P(IBD0,U,PC)/100,"",2))_" " 43 .I $L($G(^TMP("IBMSG-H",$J,ENTITY,ENTVAL,L)))+$L(DATA)>70 S L=L+1 ; if data doesn't fit into current line, go to the next line 44 .S ^TMP("IBMSG-H",$J,ENTITY,ENTVAL,L)=$G(^TMP("IBMSG-H",$J,ENTITY,ENTVAL,L))_DATA ; file this piece of data 45 .Q 46 ; file batch ref. number 47 S:IBD("BATCH")'="" L=L+1,^TMP("IBMSG-H",$J,ENTITY,ENTVAL,L)="Batch Reference Number: "_IBD("BATCH") 48 I $TR($P(IBD0,U,10,13),U)'="" D 49 .S L=L+1 50 .; generate and file Payer Name / Payer Id line 51 .S DATA="Payer Name: "_$S($P(IBD0,U,10)'="":$P(IBD0,U,10),1:"N/A")_" Payer ID: "_$S($P(IBD0,U,11)'="":$P(IBD0,U,11),1:"N/A") 52 .S ^TMP("IBMSG-H",$J,ENTITY,ENTVAL,L)=DATA 53 .I $P(IBD0,U,12)'=""!($P(IBD0,U,13)'="") D 54 ..; generate and file Message Source line 55 ..S DATA="Source: "_$S($P(IBD0,U,12)="Y":"Sent by payer",$P(IBD0,U,13)'="":"Sent by non-payer ("_$P(IBD0,U,13)_")",1:"UNKNOWN") 56 ..S L=L+1,^TMP("IBMSG-H",$J,ENTITY,ENTVAL,L)=DATA 57 ..Q 58 .Q 59 S ^TMP("IBMSG",$J,ENTITY,ENTVAL,0)=IBTYPE_U_$G(IBD("MSG#"))_U_$G(IBD("SUBJ"))_U_$$GETBILL(ENTVAL)_U_U_IBD("DATE")_U_IBD("SOURCE") 60 ; file raw data 34 N CT,CT1,IBBILL,IBD0,L,LINE,PC,Z,X,Y 35 S IBD0=$G(^TMP("IBMSGH",$J,0)),IBD("LINE")=0 36 Q:IBD0="" 37 S Y=0,X=$$DATE($P(IBD0,U,3))_"@"_$E($P(IBD0,U,4)_"0000",1,4) 38 I X S %DT="XTS" D ^%DT 39 S IBD("DATE")=$S(Y>0:Y,1:"") 40 S IBD("MRA")=$P(IBD0,U,5),IBD("X12")=($P(IBD0,U,2)="X") 41 S IBD("SOURCE")=$P(IBD0,U,12,13) 42 S CT=0 43 ; 44 I ENTITY="BATCH",ENTVAL'="" D ;Only pertinent for batch level extract 45 . S IBD("BATCH")=$O(^IBA(364.1,"B",ENTVAL,0)) 46 . F PC=6:1:9 D 47 .. I $P(IBD0,U,PC)'="" S DATA=$P("# Claims Submitted^# Claims Rejected^Total Charges Submitted^Total Charges Rejected",U,PC-5)_": "_$S(PC<8:+$P(IBD0,U,PC),1:$FNUMBER($P(IBD0,U,PC)/100,"",2))_" " 48 .. I CT,$L($G(LINE(CT)))+$L(DATA)>80 S CT=CT+1 49 .. S:'CT CT=1 S LINE(CT)=$G(LINE(CT))_DATA 50 ; 51 I ENTVAL'="",$TR($P(IBD0,U,10,13),U)'="" S CT1=CT,CT=CT+1 F PC=10,11,12 D ;Both batch, claim levels extract 52 . Q:$P(IBD0,U,PC)="" 53 . I PC<12 S LINE(CT)=$G(LINE(CT))_$P("Payer Name^Payer ID",U,PC-9)_": "_$P(IBD0,U,PC)_" ",CT1=CT Q 54 . I $P(IBD0,U,12)'=""!($P(IBD0,U,13)'="") S:$P(IBD0,U,10)'=""!($P(IBD0,U,11)'="") CT=CT+1 S LINE(CT)="Source: "_$S($P(IBD0,U,12)="Y":"Sent by payer",$P(IBD0,U,13)'="":"Sent by non-payer ("_$P(IBD0,U,13)_")",1:"UNKNOWN")_" " 55 ; 56 I CT D 57 . S (L,Z)=0 58 . F S Z=$O(LINE(Z)) Q:'Z S L=L+1,^TMP("IBMSG-H",$J,ENTITY,ENTVAL,L)=LINE(Z) 59 . ;S IBD("LINE")=$G(IBD("LINE"))+CT 60 ; 61 I ENTITY="CLAIM" D 62 . N Z0 63 . S Z0=+$O(^DGCR(399,"B",ENTVAL,0)) 64 . I $G(IBD("BATCH")) S IBBILL=$O(^IBA(364,"ABABI",+$G(IBD("BATCH")),Z0,""),-1) Q 65 . S IBBILL=$$LAST364^IBCEF4(Z0) 66 S ^TMP("IBMSG",$J,ENTITY,ENTVAL,0)=IBTYPE_U_$G(IBD("MSG#"))_U_$G(IBD("SUBJ"))_U_$S(ENTITY="CLAIM":IBBILL,1:"")_U_$S(ENTITY="BATCH":ENTVAL,1:"")_U_IBD("DATE")_U_IBD("SOURCE") 67 ; 61 68 S ^TMP("IBMSG",$J,ENTITY,ENTVAL,"D",0,1)="##RAW DATA: "_IBD0 62 69 Q 63 70 ; 64 9(IBD) ; Process Message Header record 65 ; INPUT: 66 ; IBD must be passed by reference = entire message line 67 ; OUTPUT: 68 ; IBD array returned with processed data 69 ; "CLAIM" = claim # 70 ; "LINE" = last line # populated in the message 71 ; 72 ; ^TMP("IBMSG",$J,"CLAIM",claim #,line#)= message data lines 73 ; ,"D",9,msg seq #)= raw data 74 N ENTITY,ERR,FLD,IBCLM,IBIFN,L 75 D STRTREC Q:IBCLM="" ; if no claim/batch number, bail out 76 ; make sure that we have data to file 77 S ERR=$P(IBD,U,4) Q:ERR="" 78 ; file error along with corresponding field number (if available) 79 S L=L+1,FLD=$P(IBD,U,5),^TMP("IBMSG",$J,ENTITY,IBCLM,L)="Error"_$S(FLD'="":" in field "_FLD,1:"")_":" 80 S L=L+1,^TMP("IBMSG",$J,ENTITY,IBCLM,L)=ERR 81 D ENDREC(9) 82 Q 83 ; 84 10(IBD) ; Process message data 85 ; INPUT: 86 ; IBD must be passed by reference = entire message line 87 ; OUTPUT: 88 ; IBD array returned with processed data 89 ; "CLAIM" = claim # 90 ; "LINE" = last line # populated in the message 91 ; 92 ; ^TMP("IBMSG",$J,"CLAIM",claim #,line#)= message data lines 93 ; ,"D",10,msg seq #)= raw data 71 5(IBD) ; Process batch status data 72 ; INPUT: 73 ; IBD must be passed by reference = entire message line 74 ; OUTPUT: 75 ; IBD array returned with processed data 76 ; "LINE" = The last line # populated in the message 77 ; 78 ; ^TMP("IBMSG",$J,"BATCH",batch #,line#)=batch status message lines 79 ; ,"D",5,msg seq #)= 80 ; batch status message raw data 81 ; 82 N CT,DATA,IBBTCH,IBTYPE,L,LINE,Z 83 K ^TMP("IBCONF",$J) 84 S IBBTCH=+$P(IBD,U,2) 85 S IBTYPE=$S($P(IBD,U,3)="R":"837REJ1",1:"837REC1") 86 I '$D(^TMP("IBMSG",$J,"BATCH",IBBTCH)) D HDR("BATCH",IBBTCH,IBTYPE,.IBD) ;Process header data if not already done for batch 87 S CT=0,LINE(1)="" 88 S DATA=$P(IBD,U,4) 89 I DATA'="",$TR($P(IBD,U,5,7),U)'="" D 90 . Q:$G(^TMP("IBMSG",$J,"BATCH",IBBTCH))=DATA 91 . S:'CT CT=CT+1 S LINE(CT)=$G(LINE(CT))_$S(DATA="W":"Warning",DATA="E":"Error",1:"Informational")_" " 92 S ^TMP("IBMSG",$J,"BATCH",IBBTCH)=DATA 93 I $P(IBD,U,5)'="" S:'CT CT=CT+1 S LINE(CT)=$G(LINE(CT))_"Code: "_$P(IBD,U,5) 94 I $P(IBD,U,6)'="" S:'CT CT=CT+1 S LINE(CT)=$G(LINE(CT))_" "_$P(IBD,U,6),CT=CT+1 95 I $P(IBD,U,7)'="" S:'CT CT=CT+1 S LINE(CT)=$G(LINE(CT))_" "_$P(IBD,U,7) 96 I CT D 97 . S L=$G(IBD("LINE")),Z=0 98 . F S Z=$O(LINE(Z)) Q:'Z S L=L+1,^TMP("IBMSG",$J,"BATCH",IBBTCH,L)=LINE(Z) 99 . S ^TMP("IBMSG",$J,"BATCH",IBBTCH,"D",5,$O(^TMP("IBMSG",$J,"BATCH",IBBTCH,"D",5,""),-1)+1)="##RAW DATA: "_IBD 100 . S IBD("LINE")=$G(IBD("LINE"))+CT 101 Q 102 ; 103 10(IBD) ; Process claim status data 104 ; INPUT: 105 ; IBD must be passed by reference = entire message line 106 ; OUTPUT: 107 ; IBD array returned with processed data 108 ; "CLAIM" = The claim # 109 ; "LINE" = The last line # populated in the message 110 ; 111 ; ^TMP("IBMSG",$J,"CLAIM",claim #,line#)=claim status message lines 112 ; ,"D",10,msg seq #)= 113 ; claim status raw data 94 114 ; ^TMP("IBCONF",$J,claim #")="" for invalid claims within the batch 95 115 ; 96 N CODE,DATA,ENTITY,IBCLM,IBIFN,IBTYPE,L,Z 97 D STRTREC Q:IBCLM="" ; if no claim number, bail out 98 S:$P(IBD,U,3)="R" ^TMP("IBCONF",$J,IBIFN)="" 116 N CT,DATA,IBCLM,IBTYPE,L,LINE,Z 117 S IBCLM=$$GETCLM($P(IBD,U,2)) 118 Q:IBCLM="" 119 S:$P(IBD,U,3)="R" ^TMP("IBCONF",$J,+$O(^DGCR(399,"B",IBCLM,0)))="" 99 120 S IBTYPE=$S($P(IBD,U,3)="R":"837REJ1",1:"837REC1") 100 ;Process header data if not already done 101 I '$D(^TMP("IBMSG",$J,ENTITY,IBCLM,0)) D HDR(ENTITY,IBCLM,IBTYPE,.IBD) 102 I IBTYPE="837REJ1",$P($G(^TMP("IBMSG",$J,ENTITY,IBCLM,0)),U,1)'="837REJ1" D HDR(ENTITY,IBCLM,IBTYPE,.IBD) 103 S CODE=$P(IBD,U,4) I CODE'="",$TR($P(IBD,U,5,6),U)'="" D 104 .S Z=CODE_$P(IBD,U,5) I Z'=$G(IBD("SCODE")) D 105 ..; determine type of status code and file it 106 ..S L=L+1,DATA=$S(CODE="W":"Warning",CODE="E":"Error",1:"Informational")_" " 107 ..I $P(IBD,U,5)'="" S ^TMP("IBMSG",$J,ENTITY,IBCLM,L)=DATA_"Code: "_$P(IBD,U,5) 108 ..I $P(IBD,U,6)'="" S:$P(IBD,U,5)'="" L=L+1 S ^TMP("IBMSG",$J,ENTITY,IBCLM,L)=DATA_"Message:",L=L+1 109 ..S IBD("SCODE")=Z 110 ..Q 111 .; file status message 112 .I $P(IBD,U,6)'="" S ^TMP("IBMSG",$J,ENTITY,IBCLM,L)=$P(IBD,U,6),L=L+1,^TMP("IBMSG",$J,ENTITY,IBCLM,L)=" " 113 .Q 114 D ENDREC(10) 115 Q 116 ; 117 13(IBD) ; Process claim data 118 ; Claim must have been referenced by a previous '10' level 119 ; INPUT: 120 ; IBD must be passed by reference = entire message line 121 ; 122 ; OUTPUT: 123 ; IBD("LINE") = The last line # populated in the message 124 ; 125 ; ^TMP("IBMSG",$J,"CLAIM",claim #,line#)=claim data lines 126 ; ,"D",13,msg seq #)=raw data 127 ; 128 N CTYPE,ENTITY,IBCLM,IBIFN,L,Z1,Z2 129 D STRTREC 130 ; quit if no claim number or no previous 'line 10' record 131 Q:$S(IBCLM="":1,1:'$D(^TMP("IBMSG",$J,"CLAIM",IBCLM))) 132 ; file clearinghouse trace number 133 I $P(IBD,U,3)'="" S L=L+1,^TMP("IBMSG",$J,ENTITY,IBCLM,L)="Clearinghouse Trace Number: "_$P(IBD,U,3) 134 ; file payer status date 135 I $P(IBD,U,4)'="" S L=L+1,^TMP("IBMSG",$J,ENTITY,IBCLM,L)=" Payer Status Date: "_$$DATE($P(IBD,U,4)) 136 ; file payer claim number 137 I $P(IBD,U,5)'="" S L=L+1,^TMP("IBMSG",$J,ENTITY,IBCLM,L)=" Payer Claim Number: "_$P(IBD,U,5) 138 ; file split claim indicator 139 I +$P(IBD,U,6)'=0 S L=L+1,^TMP("IBMSG",$J,ENTITY,IBCLM,L)=" Split Claim: "_$S(+$P(IBD,U,6)=1:"No",1:"Yes ("_+$P(IBD,U,6)_" parts)") 140 ; file claim type if it either doesn't match value in VistA or if it's a dental claim 141 S Z1=$P(IBD,U,7),Z2=$$FT^IBCEF(IBIFN),CTYPE=$S(Z1="P"&(Z2'=2):"Professional",Z1="I"&(Z2'=3):"Institutional",Z1="D":"Dental",1:"") 142 S:CTYPE'="" L=L+1,^TMP("IBMSG",$J,ENTITY,IBCLM,L)=" Claim Type: "_CTYPE 143 D ENDREC(13) 121 I '$D(^TMP("IBMSG",$J,"CLAIM",IBCLM)) D HDR("CLAIM",IBCLM,IBTYPE,.IBD) ;Process header data if not already done for claim 122 I IBTYPE="837REJ1",$P($G(^TMP("IBMSG",$J,"CLAIM",IBCLM,0)),U,1)'="837REJ1" D HDR("CLAIM",IBCLM,IBTYPE,.IBD) 123 S CT=0,DATA=$P(IBD,U,4) 124 I DATA'="",$TR($P(IBD,U,5,7),U)'="" D 125 . Q:$G(^TMP("IBMSG",$J,"CLAIM",IBCLM))=DATA 126 . S ^TMP("IBMSG",$J,"CLAIM",IBCLM)=DATA 127 . S CT=CT+1,LINE(CT)=$G(LINE(CT))_$S(DATA="W":"Warning",DATA="E":"Error",1:"Informational")_" " 128 I $P(IBD,U,5)'="" S CT=$S('CT:1,1:CT),LINE(CT)=$G(LINE(CT))_"Code: "_$P(IBD,U,5) 129 I $P(IBD,U,6)'="" S CT=$S('CT:1,1:CT),LINE(CT)=$G(LINE(CT))_" "_$P(IBD,U,6) 130 I $P(IBD,U,7)'="" S CT=CT+1,LINE(CT)=" "_$P(IBD,U,7) 131 I CT D 132 . S L=$G(IBD("LINE")),Z=0 133 . F S Z=$O(LINE(Z)) Q:'Z S L=L+1,^TMP("IBMSG",$J,"CLAIM",IBCLM,L)=LINE(Z) 134 . S ^TMP("IBMSG",$J,"CLAIM",IBCLM,"D",10,$O(^TMP("IBMSG",$J,"CLAIM",IBCLM,"D",10,""),-1)+1)="##RAW DATA: "_IBD 135 . S IBD("LINE")=$G(IBD("LINE"))+CT 144 136 Q 145 137 ; … … 156 148 ; subscr/patient raw data 157 149 ; 158 N ENTITY,DATA,IBCLM,IBIFN,IBNM,IBNUM,IBDFN,L 159 D STRTREC 160 ; quit if no claim number or no previous 'line 10' record 150 N CT,Z,L,LINE,DATA,IBCLM,IBNM,IBNUM,IBDFN 151 S IBCLM=$$GETCLM($P(IBD,U,2)),CT=0,L=$G(IBD("LINE")) 161 152 Q:$S(IBCLM="":1,1:'$D(^TMP("IBMSG",$J,"CLAIM",IBCLM))) 162 S IBDFN=+$ P(^DGCR(399,IBIFN,0),U,2)153 S IBDFN=+$G(^DGCR(+$O(^DGCR(399,"B",IBCLM,0)),0)) 163 154 S IBNM=$S($P(IBD,U,3)'="":$P(IBD,U,3)_","_$P(IBD,U,4)_$S($P(IBD,U,5)'="":" "_$P(IBD,U,5),1:""),1:$P($G(^DPT(IBDFN,0)),U)) 164 155 S IBNUM=$S($P(IBD,U,6)'="":$P(IBD,U,6),1:$P($G(^DPT(IBDFN,0)),U,9)) 165 S L=L+1,^TMP("IBMSG",$J,ENTITY,IBCLM,L)="Patient: "_IBNM_" "_IBNUM156 S CT=CT+1,LINE(CT)="Patient: "_IBNM_" "_IBNUM 166 157 I $P(IBD,U,11) D 167 .S DATA=$$DATE($P(IBD,U,11)),L=L+1 168 .S ^TMP("IBMSG",$J,ENTITY,IBCLM,L)="Service Dates: "_DATA_" - "_$S($P(IBD,U,12):$$DATE($P(IBD,U,12)),1:DATA) 169 .Q 170 D ENDREC(15) 171 Q 172 ; 173 STRTREC ; start processing of the record 174 ; 175 ; OUTPUT: 176 ; sets the following variables 177 ; IBCLM = claim # 178 ; ENTITY = "CLAIM" (all 277STAT messages are on claim level) 179 ; L = last populated line number 180 ; 181 S IBCLM=$$GETCLM($P(IBD,U,2)),ENTITY="CLAIM",L=+$G(IBD("LINE")) 182 S IBIFN=+$O(^DGCR(399,"B",IBCLM,0)) 183 Q 184 ; 185 ENDREC(TYPE) ; finish processing of the record 186 ; INPUT: 187 ; TYPE = record type (line type) 188 ; 189 ; OUTPUT: 190 ; IBD("LINE") = is updated with last populated line number 191 ; 192 ;make sure all variables are set properly 193 Q:$G(ENTITY)="" 194 Q:$G(IBCLM)="" 195 Q:$G(TYPE)="" 196 ; file raw data 197 S ^TMP("IBMSG",$J,ENTITY,IBCLM,"D",TYPE,$O(^TMP("IBMSG",$J,ENTITY,IBCLM,"D",TYPE,""),-1)+1)="##RAW DATA: "_IBD 198 ; update line count 199 S IBD("LINE")=$G(IBD("LINE"))+L 200 Q 201 ; 202 GETBILL(CLAIM) ; Extract transmission # 203 N TRANS 204 S TRANS=$$LAST364^IBCEF4(IBIFN) 205 ; if status of the last transmission is "X" or "P", keep searching backwards through file 364 until record 206 ; with different status is found 207 I TRANS F Q:"XP"'[$P(^IBA(364,TRANS,0),U,3) S TRANS=$O(^IBA(364,"B",IBIFN,TRANS),-1) Q:TRANS="" ; 208 Q +TRANS 158 . S DATA=$$DATE($P(IBD,U,11)),CT=CT+1 159 . S LINE(CT)="Service Dates: "_DATA_" - "_$S($P(IBD,U,12):$$DATE($P(IBD,U,12)),1:DATA)_" " 160 . ; Add additional lines of display data here for record 15 161 S Z=0 F S Z=$O(LINE(Z)) Q:'Z S L=L+1,^TMP("IBMSG",$J,"CLAIM",IBCLM,L)=LINE(Z) 162 S ^TMP("IBMSG",$J,"CLAIM",IBCLM,"D",15,$O(^TMP("IBMSG",$J,"CLAIM",IBCLM,"D",15,""),-1)+1)="##RAW DATA: "_IBD 163 S IBD("LINE")=$G(IBD("LINE"))+CT 164 Q 165 ; 166 20(IBD) ; Process service line status data 167 ; Claim must have been referenced by a previous '10' level 168 ; INPUT: 169 ; IBD must be passed by reference = entire message line 170 ; OUTPUT: 171 ; IBD array returned with processed data 172 ; "LINE" = The last line # populated in the message 173 ; "TYPE" = The msg type of status record (Confirmation/rejection) 174 ; Note: returned if not already set at batch or claim level 175 ; 176 ; ^TMP("IBMSG",$J,"CLAIM",claim #)="" 177 ; ,line#)=service line status msg lines 178 ; ,"D",20,msg seq #)= 179 ; service line status raw data 180 ; 181 N CT,DATA,L,LINE,Z,IBCLM,IBLNUM 182 S IBCLM=$$GETCLM($P(IBD,U,2)),IBLNUM=$P(IBD,U,8) 183 Q:'$D(^TMP("IBMSG",$J,"CLAIM",IBCLM)) 184 S CT=0 185 I IBLNUM'="" S CT=CT+1,LINE(CT)="Claim Line: "_IBLNUM,^TMP("IBMSG",$J,"LINE",IBCLM,IBLNUM)="" 186 S DATA=$P(IBD,U,4) 187 I DATA'="",$TR($P(IBD,U,5,7),U)'="" S:'CT CT=CT+1 S LINE(CT)=$S(DATA="W":"Warning",DATA="E":"Error",1:"Informational")_" "_$G(LINE(CT)) 188 S:$G(IBD("TYPE"))="" IBD("TYPE")=$S(DATA="E":"837REJ1",1:"837REC1") 189 I $P(IBD,U,5)'="" S:'CT CT=CT+1 S LINE(CT)=LINE(CT)_$P(IBD,U,5) 190 I $P(IBD,U,6)'="" S CT=CT+1,LINE(CT)=" "_$P(IBD,U,6) 191 I $P(IBD,U,7)'="" S CT=CT+1,LINE(CT)=" "_$P(IBD,U,7) 192 I CT D 193 . S L=$G(IBD("LINE")),Z=0 194 . F S Z=$O(LINE(Z)) Q:'Z S L=L+1,^TMP("IBMSG",$J,"CLAIM",IBCLM,L)=LINE(Z) 195 . S ^TMP("IBMSG",$J,"CLAIM",IBCLM,"D",20,$O(^TMP("IBMSG",$J,"CLAIM",IBCLM,"D",20,""),-1)+1)="##RAW DATA: "_IBD 196 . S IBD("LINE")=$G(IBD("LINE"))+CT 197 Q 198 ; 199 21(IBD) ; Process service line ID data 200 ; Moved for size too big 201 D 21^IBCE277A(IBD) 202 Q 209 203 ; 210 204 DATE(DT) ; Convert YYMMDD Date into MM/DD/YY or YYYYMMDD into MM/DD/YYYY … … 216 210 GETCLM(X) ; Extract the claim # without site id from the data in X 217 211 N IBCLM 218 S IBCLM=$P(X,"-",2) I IBCLM="",X'="" S IBCLM=$E(X,$S($L(X)>7:4,1:1),$L(X)) 212 S IBCLM=$P(X,"-",2) 213 I IBCLM="",X'="" S IBCLM=$E(X,$S($L(X)>7:4,1:1),$L(X)) 214 ;S IBCLM=$E(X,$L(IBCLM)-6,$L(IBCLM)) ; Only take last 7 char 219 215 Q IBCLM 220 216 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCE835.m
r628 r636 1 1 IBCE835 ;ALB/TMP - 835 EDI EXPLANATION OF BENEFITS MSG PROCESSING ;19-JAN-99 2 ;;2.0;INTEGRATED BILLING;**137,135,155,377**;21-MAR-94;Build 23 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 ; 2 ;;2.0;INTEGRATED BILLING;**137,135,155**;21-MAR-94 5 3 Q 6 4 ; … … 71 69 I '$D(^TMP("IBMSG",$J,"CLAIM",IBBILL)) D HDR(IBBILL,.IBD) ;Process header data if not already done for claim 72 70 ; 71 I $P(IBD,U,7)="Y"!($P(IBD,U,8)="Y") D ;New patient name or id reported 72 . ; 73 . ; Alert to EDI mail group that name or ID has changed 74 . N XQA,XQAMSG 75 . S XQA("G.IB EDI")="" 76 . S XQAMSG="EOB for bill # "_IBBILL_" indicates a new name or id exists for patient" 77 . D SETUP^XQALERT 78 . ; 79 . S IBD("LINE")=$G(IBD("LINE"))+1 80 . I $P(IBD,U,7)="Y" S ^TMP("IBMSG",$J,"CLAIM",IBBILL,IBD("LINE"))="New patient name: "_$P(IBD,U,3)_","_$P(IBD,U,4)_" "_$P(IBD,U,5)_" " 81 . I $P(IBD,U,8)="Y" S ^TMP("IBMSG",$J,"CLAIM",IBBILL,IBD("LINE"))=$G(^TMP("IBMSG",$J,"CLAIM",IBBILL,IBD("LINE")))_"New patient id: "_$P(IBD,U,6) 82 ; 73 83 I $P(IBD,U,9) D ;Statement dates 74 84 . S IBD("LINE")=$G(IBD("LINE"))+1 … … 77 87 S ^TMP("IBMSG",$J,"CLAIM",IBBILL,"D",5,1)="##RAW DATA: "_IBD 78 88 S ^TMP("IBMSG",$J,"CLAIM",IBBILL,"D1",1,5)="##RAW DATA: "_IBD 79 Q80 ;81 6(IBD) ; Process 06 record type for corrected name and/or ID# - IB*2*377 - 1/14/0882 NEW IBCLM,Z83 S IBCLM=$$GETCLM^IBCE277($P(IBD,U,2))84 Q:IBCLM=""85 I '$D(^TMP("IBMSG",$J,"CLAIM",IBCLM)) D HDR(IBCLM,.IBD) ;Process header data if not already done for claim86 ;87 S Z=$G(IBD("LINE"))88 I $P(IBD,U,3)'="" S Z=Z+1,^TMP("IBMSG",$J,"CLAIM",IBCLM,Z)="Corrected Patient Last Name: "_$P(IBD,U,3)89 I $P(IBD,U,4)'="" S Z=Z+1,^TMP("IBMSG",$J,"CLAIM",IBCLM,Z)="Corrected Patient First Name: "_$P(IBD,U,4)90 I $P(IBD,U,5)'="" S Z=Z+1,^TMP("IBMSG",$J,"CLAIM",IBCLM,Z)="Corrected Patient Middle Name: "_$P(IBD,U,5)91 I $P(IBD,U,6)'="" S Z=Z+1,^TMP("IBMSG",$J,"CLAIM",IBCLM,Z)="Corrected Patient ID#: "_$P(IBD,U,6)92 S IBD("LINE")=Z93 ;94 S ^TMP("IBMSG",$J,"CLAIM",IBCLM,"D",6,1)="##RAW DATA: "_IBD95 S ^TMP("IBMSG",$J,"CLAIM",IBCLM,"D1",1,6)="##RAW DATA: "_IBD96 89 Q 97 90 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCE837A.m
r628 r636 1 1 IBCE837A ;ALB/TMP - OUTPUT FOR 837 TRANSMISSION - CONTINUED ;8/6/03 10:50am 2 ;;2.0;INTEGRATED BILLING;**137,191,211,232,296,377**;21-MAR-94;Build 23 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 2 ;;2.0;INTEGRATED BILLING;**137,191,211,232,296**;21-MAR-94 4 3 ; 5 4 UPD(MSGNUM,BATCH,CNT,BILLS,DESC,IBBTYP,IBINS) ; Upd current batch + bills w/new status … … 30 29 .S DA=IBIEN,DIE="^IBA(364,",DR=".02////"_IBBATCH_";.03///P;.04///NOW" D ^DIE 31 30 .S IBIFN=+$G(^IBA(364,IBIEN,0)) 32 . ;33 . ; If this claim has just been retransmitted, set the .06 field for the previous transmission entry34 . N PRVTXI,PRVTXD35 . S PRVTXI=$O(^IBA(364,"B",IBIFN,IBIEN),-1) ; previous transmission for this claim36 . I PRVTXI D37 .. S PRVTXD=$G(^IBA(364,PRVTXI,0))38 .. I '$F(".R.E.","."_$P(PRVTXD,U,3)_".") Q ; prev trans must have status of "R" or "E"39 .. I $P(PRVTXD,U,7,8)'=$P($G(^IBA(364,IBIEN,0)),U,7,8) Q ; test bill and COB must be the same40 .. S DA=PRVTXI,DIE=364,DR=".06///"_IBBATCH D ^DIE ; update the resubmit batch number41 .. Q42 . ;43 31 .Q:$D(^TMP("IBRESUBMIT",$J))!($P($G(^DGCR(399,IBIFN,0)),U,13)=4)!(+$$TXMT^IBCEF4(IBIEN)=2) 44 32 .S IBMRA=$$NEEDMRA^IBEFUNC(IBIFN) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEBUL.m
r628 r636 1 1 IBCEBUL ;ALB/TMP - 837 EDI SPECIAL BULLETINS PROCESSING ;19-SEP-96 2 ;;2.0;INTEGRATED BILLING;**137,250,377**;21-MAR-94;Build 23 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 2 ;;2.0;INTEGRATED BILLING;**137,250**;21-MAR-94 4 3 ; 5 4 NOTSENT ; Check for batches in pending status (no confirmation from Austin) 6 5 ; from yesterday or before 7 N XMTO,XMSUBJ,XMBODY,XMDUZ,IBT,IB,IBE,IBCT,IBI,IB0,IB1,Z,IB TYP6 N XMTO,XMSUBJ,XMBODY,XMDUZ,IBT,IB,IBE,IBCT,IBI,IB0,IB1,Z,IBDTM 8 7 K ^TMP($J,"IBNOTSENT") 8 D NOW^%DTC S IBDTM=% 9 9 S (IBCT,IBI)=0 10 F S IBI=$O(^IBA(364.1,"ASTAT","P",IBI)) Q:'IBI D 11 . I $$BCHCHK(IBI) Q ; Batch check function 12 . S IBCT=IBCT+1 13 . S IBTYP=$P($G(^IBA(364.1,IBI,0)),U,7) 14 . I IBCT'>10,IBTYP'="" S ^TMP($J,"IBNOTSENT",IBTYP,IBI)="" 15 . Q 16 ; 10 F S IBI=$O(^IBA(364.1,"ASTAT","P",IBI)) Q:'IBI S IBTYP=$P($G(^IBA(364.1,IBI,0)),U,7),IBDAYS=(IBDTM-$P($G(^(1)),U,6)) I IBDAYS>1,IBDAYS'=IBDTM,$O(^IBA(364,"C",IBI,0)) D 11 .S IBCT=IBCT+1,IBCT(+IBTYP)=$G(IBCT(+IBTYP))+1 12 .I IBCT'>10 S ^TMP($J,"IBNOTSENT",IBTYP,IBI)="" 17 13 I IBCT D 18 14 .S IBT(1)="There are "_IBCT_" EDI batch(es) still pending Austin receipt " … … 20 16 .S IBT(3)="as being received by Austin." 21 17 .S IBT(4)=" " 22 .I IBCT>10 S IBT(5)="Since there were more than 10 batches found, please run the ",IBT(6)=" EDI BATCHES PENDING RECEIPTreport to get a list of these batches."18 .I IBCT>10 S IBT(5)="Since there were more than 10 batches found, please run the ",IBT(6)=" EDI BATCHES WAITING FOR AUSTIN RECEIPT OVER 1-DAY report to get a list of these batches." 23 19 .I IBCT'>10 D 24 20 ..S IBT(5)=" BATCH # PENDING SINCE MAIL MESSAGE #",IBT(6)="",$P(IBT(6),"-",76)="",IBT(6)=" "_IBT(6),IBE=6 … … 32 28 ....S IBT(IBE)=" "_$E($P(IB0,U)_$J("",10),1,10)_" "_$E($$FMTE^XLFDT($P(IB1,U,6),1)_$J("",20),1,20)_" "_$P(IB0,U,4),IBE=IBE+1,IBT(IBE)=$J("",8)_$E($P(IB0,U,8),1,72) 33 29 .S XMSUBJ="EDI BATCHES WAITING AUSTIN RECEIPT FOR OVER 1 DAY",XMBODY="IBT",XMDUZ="",XMTO("I:G.IB EDI")="" 34 .D SENDMSG^XMXAPI(XMDUZ,XMSUBJ,XMBODY,.XMTO )30 .D SENDMSG^XMXAPI(XMDUZ,XMSUBJ,XMBODY,.XMTO,,.XMZ) 35 31 K ^TMP($J,"IBNOTSENT") 36 32 Q 37 33 ; 38 UPDBCH(BCHIEN) ; update the status of this batch to show A0:received in Austin39 NEW DIE,DA,DR40 S DIE=364.1,DA=+BCHIEN,DR=".02///A0"41 I $D(^IBA(DIE,DA,0)) D ^DIE42 UPDBCHX ;43 Q44 ;45 BCHCHK(BCHIEN) ; This function will check the EDI claims associated with this46 ; batch and determine if this batch has been received in Austin or not.47 ;48 ; ** This function is also called by routine IBCERP3 **49 ;50 ; Function value = 1 if we can determine that the batch was received in Austin, or51 ; = 1 if there are no claims in this batch, or52 ; = 1 if the batch is less than 24 hours old - too new to worry about53 ; = 1 means don't display on report or MailMan message54 ;55 ; Function value = 0 if the batch has not yet been received in Austin56 ; = 0 means we need to display batch on report and in MailMan message57 ;58 NEW IBEDI,IBOK,IBZ,IBIFN,IB0,AR,IBSECS59 S IBEDI=0,IBOK=1,BCHIEN=+$G(BCHIEN)60 ;61 ; if the batch transmission is still less than 24 hours old, skip this batch and get out62 S IBSECS=$$FMDIFF^XLFDT($$NOW^XLFDT,$P($G(^IBA(364.1,BCHIEN,1)),U,6),2)63 I IBSECS<86400 G BCHCHKX ; # seconds in a day64 ;65 ; if no edi claims in this batch, update batch status and get out66 I '$O(^IBA(364,"C",BCHIEN,0)) D UPDBCH(BCHIEN) G BCHCHKX67 ;68 F S IBEDI=$O(^IBA(364,"C",BCHIEN,IBEDI)) Q:'IBEDI D Q:'IBOK69 . S IBZ=$G(^IBA(364,IBEDI,0))70 . S IBIFN=+IBZ,IB0=$G(^DGCR(399,IBIFN,0))71 . I $P(IB0,U,13)=7 Q ; cancelled in IB72 . I $P(IBZ,U,3)'="P" Q ; edi claim status is not pending73 . S AR=$P($$BILL^RCJIBFN2(IBIFN),U,2) ; AR status DBIA 145274 . I $F(".22.26.39.","."_AR_".") Q ; collected/closed or cancelled75 . ;76 . ; if we get to this point, then we have found an EDI claim in this batch77 . ; that is not cancelled in IB, the EDI claim status is "P", and the78 . ; AR status is not collected/closed nor cancelled in AR. So therefore79 . ; this claim didn't get to Austin, so the batch didn't get to Austin.80 . S IBOK=081 . Q82 ;83 ; If we find the batch has been received in Austin, then change the batch status.84 I IBOK D UPDBCH(BCHIEN)85 ;86 BCHCHKX ;87 Q IBOK88 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCECOB1.m
r628 r636 1 1 IBCECOB1 ;ALB/CXW - IB COB MANAGEMENT SCREEN/REPORT ;14-JUN-99 2 ;;2.0;INTEGRATED BILLING;**137,155,288,348,377**;21-MAR-94;Build 23 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 2 ;;2.0;INTEGRATED BILLING;**137,155,288,348**;21-MAR-94;Build 5 4 3 ; 5 4 BLD ; Build list entrypoint … … 121 120 .. S X="" 122 121 .. S X=$$SETFLD^VALM1(IBCNT,X,"NUMBER") 123 .. S X=$$SETFLD^VALM1($$BN1^PRCAFN(IBIFN) _$S($P($G(^DGCR(399,IBIFN,"TX")),U,10)=1:"*",1:""),X,"BILL")122 .. S X=$$SETFLD^VALM1($$BN1^PRCAFN(IBIFN),X,"BILL") 124 123 .. S X=$$SETFLD^VALM1($$DAT1^IBOUTL($P(IB,U)),X,"SERVICE") 125 124 .. S X=$$SETFLD^VALM1(IBPAT,X,"PATNM") -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCECSA1.m
r628 r636 1 1 IBCECSA1 ;ALB/CXW - IB STATUS AWAITING RESOLUTION SCREEN ;28-JUL-99 2 ;;2.0;INTEGRATED BILLING;**137,283,288,320,368**;21-MAR-94;Build 21 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 2 ;;2.0;INTEGRATED BILLING;**137,283,288,320**;21-MAR-94 4 3 ; DBIA for $$BN1^PRCAFN() 5 4 ; … … 52 51 . ; 53 52 . S IBSTSMSG=$$TXT(IBDA) ; status message text 54 . S IBERR=$E(IBSTSMSG,1, 60)53 . S IBERR=$E(IBSTSMSG,1,30) 55 54 . I IBERR="" S IBERR="-" 56 55 . ; … … 151 150 F S LN=$O(^IBM(361,+$G(IBDA),1,LN)) Q:'LN D Q:STOP 152 151 . S TX=$G(^IBM(361,IBDA,1,LN,0)) 152 . I $E(TX,1,5)="Error" S TX=$E(TX,6,999) 153 153 . S TX=$$TRIM^XLFSTR(TX) 154 . ; Don't include parts added by ^IBCE277155 . Q:TX="Informational Message:"156 . Q:TX="Warning Message:"157 . Q:TX="Error Message:"158 . I $E(TX,1,27)="Clearinghouse Trace Number:" S STOP=1 Q159 . I $E(TX,1,18)="Payer Status Date:" S STOP=1 Q160 . I $E(TX,1,19)="Payer Claim Number:" S STOP=1 Q161 . I $E(TX,1,12)="Split Claim:" S STOP=1 Q162 . I $E(TX,1,11)="Claim Type:" S STOP=1 Q163 154 . I $E(TX,1,8)="Patient:" S STOP=1 Q 164 155 . I $E(TX,1,14)="Service Dates:" S STOP=1 Q 165 156 . I $E(TX,1,11)="Payer Name:" S STOP=1 Q 166 157 . I $E(TX,1,7)="Source:" S STOP=1 Q 158 . I $E(TX,1,11)="Claim Line:" S STOP=1 Q 159 . I $E(TX,1,13)="Service Type:" S STOP=1 Q 167 160 . I TX["HL=" S HLN=+$P(TX,"HL=",2),DELIM="HL="_HLN,TX=$P(TX,DELIM,1)_"HL= "_$P(TX,DELIM,2,9) 168 161 . I TX["ENVOY REF: " S REFN=$E($P(TX,"ENVOY REF: ",2),1,14),DELIM="ENVOY REF: "_REFN,TX=$P(TX,DELIM,1)_"ENVOY REF: "_$P(TX,DELIM,2,9) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCECSA3.m
r628 r636 1 1 IBCECSA3 ;ALB/CXW - CLAIMS STATUS AWAITING RESOLUTION REPORT ;23-JUL-99 2 ;;2.0;INTEGRATED BILLING;**137,320,371,377**;21-MAR-94;Build 23 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 2 ;;2.0;INTEGRATED BILLING;**137,320**;21-MAR-94 4 3 Q 5 4 EN ; Report of claims status awaiting resolution 6 NEW %ZIS,ZTSAVE,ZTRTN,ZTDESC,DIR,X,Y,DIRUT,DTOUT,DUOUT,DIROUT,IBRVW7 ;8 5 D FULL^VALM1 9 W !10 S DIR(0)="YO" ; IB*2*377 new question11 S DIR("A")="Would you like to include Review Comments with this report"12 S DIR("B")="No"13 D ^DIR K DIR14 I $D(DIRUT) Q15 S IBRVW=Y16 ;17 6 W !!,"You will need a 132 column printer for this report!",! 18 7 ; 8 N %ZIS,ZTSAVE,ZTRTN,ZTDESC 19 9 S %ZIS="QM" D ^%ZIS Q:POP 20 10 I $D(IO("Q")) K IO("Q") D Q … … 25 15 . S ZTSAVE("IBSORTOR")="" 26 16 . S ZTSAVE("^TMP(""IBCECSB"",$J,")="" 27 . S ZTSAVE("IBRVW")=""28 17 . S ZTDESC="IB -Claims Status Awaiting Resolution Report" D ^%ZTLOAD K ZTSK D HOME^%ZIS 29 18 U IO … … 35 24 I '$D(^TMP("IBCECSB",$J)) D G LISTQ 36 25 . D HDR1 W !,"No entries found for this report" 37 S IBX="" F S IBX=$O(^TMP("IBCECSB",$J,IBX)) Q:IBX=""!IBSTOP S IBX2="" F S IBX2=$O(^TMP("IBCECSB",$J,IBX,IBX2)) Q:IBX2=""!IBSTOP S IBX3="" F S IBX3=$O(^TMP("IBCECSB",$J,IBX,IBX2,IBX3)) Q:IBX3=""!IBSTOP D Q:IBSTOP26 S IBX="" F S IBX=$O(^TMP("IBCECSB",$J,IBX)) Q:IBX=""!IBSTOP S IBX2="" F S IBX2=$O(^TMP("IBCECSB",$J,IBX,IBX2)) Q:IBX2=""!IBSTOP S IBX3="" F S IBX3=$O(^TMP("IBCECSB",$J,IBX,IBX2,IBX3)) Q:IBX3=""!IBSTOP D 38 27 . I 'IBFST S IBPAY=$$IBPAY(IBX,IBX2,IBX3) D HDR1 S:'IBDIV IBFST=1 Q:IBSTOP 39 . S IBDA=0 F S IBDA=$O(^TMP("IBCECSB",$J,IBX,IBX2,IBX3,IBDA)) Q:'IBDA!IBSTOP S IB=$G(^TMP("IBCECSB",$J,IBX,IBX2,IBX3,IBDA)) D Q:IBSTOP 40 .. I ($Y+3)>IOSL D HDR1 Q:IBSTOP 41 .. W $$BN1^PRCAFN(+IB),$P(IB,U,12),?13,$E($P(IB,U,2),1,25),?40,$E($P(IB,U,3),1,30),?72,$P($P(IB,U,4),"~"),?78,$$DAT1^IBOUTL($P(IB,U,5)),?88,$E($P(IB,U,7),1,10),?100,"$"_$J($P(IB,U,6),0,2),?110,$P(IB,U,10),?122,$P(IB,U,11),! 42 .. I $P(IB,U,12)="*" W " ***** CSA REVIEW IN PROCESS *****",! 28 . S IBDA=0 F S IBDA=$O(^TMP("IBCECSB",$J,IBX,IBX2,IBX3,IBDA)) Q:'IBDA!IBSTOP S IB=$G(^TMP("IBCECSB",$J,IBX,IBX2,IBX3,IBDA)) D 29 .. I ($Y+5)>IOSL D HDR1 Q:IBSTOP 30 .. W $$BN1^PRCAFN(+IB),?13,$E($P(IB,U,2),1,25),?40,$E($P(IB,U,3),1,30),?72,$P($P(IB,U,4),"~"),?78,$$DAT1^IBOUTL($P(IB,U,5)),?88,$E($P(IB,U,7),1,10),?100,"$"_$J($P(IB,U,6),0,2),?110,$P(IB,U,10),?122,$P(IB,U,11),! 43 31 .. W " FORM TYPE: "_$P($G(^IBE(353,$P($G(^DGCR(399,+IB,0)),U,19),0)),U),! 44 32 .. I 'IBDIV S X=" DIVISION: "_$P(IB,U,8) W X,$J(" ",40-$L(X))_"AUTHORIZING BILLER: "_$P($P(IB,U,9),"~",1),! … … 48 36 ... F I=1:131:$L(X) W " "_$E(X,I,I+130),! 49 37 ... S IBZFT=1 50 ... I ($Y+3)>IOSL D HDR1 Q:IBSTOP 51 ... Q 52 .. Q:IBSTOP 53 .. ; 54 .. ; Display the Review Comments if they exist based on user choice (IB*377) 55 .. I $G(IBRVW),+$O(^IBM(361,IBDA,2,0)) D Q:IBSTOP 56 ... N IBCM,IBT1,IBT0,IBD0,IBCL 57 ... I ($Y+3)>IOSL D HDR1 Q:IBSTOP 58 ... W ?3,"*** Review Comments for Claim "_$$BN1^PRCAFN(+IB)_" ***",! 59 ... S IBCM=0 F IBT1=0:1 S IBCM=$O(^IBM(361,IBDA,2,IBCM)) Q:'IBCM ; count up # of comments 60 ... S IBT0=0 61 ... S IBCM=0 F S IBCM=$O(^IBM(361,IBDA,2,IBCM)) Q:'IBCM!IBSTOP D Q:IBSTOP 62 .... S IBT0=IBT0+1 63 .... S IBD0=$G(^IBM(361,IBDA,2,IBCM,0)) 64 .... I ($Y+3)>IOSL D HDR1 Q:IBSTOP 65 .... W ?7,"Entered "_$$FMTE^XLFDT($P(IBD0,U,1),"5ZPM") 66 .... I $P(IBD0,U,2) W " by "_$P($G(^VA(200,$P(IBD0,U,2),0)),U,1) 67 .... W " ("_IBT0_" of "_IBT1_")",! 68 .... S IBCL=0 F S IBCL=$O(^IBM(361,IBDA,2,IBCM,1,IBCL)) Q:'IBCL!IBSTOP D Q:IBSTOP 69 ..... I ($Y+3)>IOSL D HDR1 Q:IBSTOP 70 ..... W ?10,$G(^IBM(361,IBDA,2,IBCM,1,IBCL,0)),! 71 ..... Q 72 .... Q 73 ... Q 74 .. ; 75 .. ; Display a line break before the next claim in this report 76 .. I ($Y+3)>IOSL D HDR1 Q:IBSTOP 38 ... I ($Y+5)>IOSL D HDR1 Q:IBSTOP 77 39 .. W ! 78 .. Q79 . Q80 ;81 40 G:IBSTOP LISTQ 82 41 I $E(IOST,1,2)["C-" K DIR S DIR(0)="E" D ^DIR K DIR -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCECSA4.m
r628 r636 1 1 IBCECSA4 ;ALB/CXW - IB CLAIMS STATUS AWAITING RESOLUTION SCREEN ;5-AUG-1999 2 ;;2.0;INTEGRATED BILLING;**137,155,320 ,371**;21-MAR-1994;Build 573 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**137,155,320**;21-MAR-1994 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 SMSG ;select message … … 14 14 . D UNLOCK^IBCEU0(361,$P(IBA,U,2)) 15 15 SMSGQ S VALMBCK="R" 16 I $G(IBFASTXT) S VALMBCK="Q" K IBDAX17 16 D:$O(IBDAX(0)) BLD^IBCECSA1 18 17 Q -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEF.m
r628 r636 1 1 IBCEF ;ALB/TMP - FORMATTER SPECIFIC BILL FUNCTIONS ;22-JAN-96 2 ;;2.0;INTEGRATED BILLING;**52,80,51,137,288,296,361 ,371**;21-MAR-94;Build 572 ;;2.0;INTEGRATED BILLING;**52,80,51,137,288,296,361**;21-MAR-94;Build 9 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 39 39 S:$G(IBCOB)="" IBCOB="" 40 40 I 'IBCOB S IBCOB=$$COBN(IBIFN,$G(IBCOB)) 41 S IBI=+$$POLICY(IBIFN,16,IBCOB) ; pt relationship to insured41 S IBI=+$$POLICY(IBIFN,16,IBCOB) 42 42 S DFN=+$P($G(^DGCR(399,IBIFN,0)),U,2) 43 43 I $S('IBI:1,1:"12"'[IBI) S IBADDR="" G INSADDQ … … 48 48 INSADDQ S A=$P($G(^DGCR(399,IBIFN,"M")),U,(11+IBCOB)) 49 49 S A=$G(^DPT(DFN,.312,+A,3)) 50 I $TR($P(IBADDR,U)," ")="" D PI3 51 I IBI=2,$$NOPUNCT($P(A,U,6,10),1)'="" D PI3 50 I $TR($P(IBADDR,U)," ")="" D 51 .S $P(IBADDR,U)=$P(A,U,6)_" "_$P(A,U,7),$P(IBADDR,U,5,6)=$P(A,U,6,7) 52 .F B=2,4 S $P(IBADDR,U,B)=$P(A,U,B+6) 53 .S $P(IBADDR,U,3)=$P($G(^DIC(5,+$P(A,U,9),0)),U,2) 52 54 Q IBADDR 53 ;54 PI3 ; build IBADDR string from patient insurance 3 node data55 S $P(IBADDR,U,1)=$P(A,U,6)_" "_$P(A,U,7)56 S $P(IBADDR,U,5,6)=$P(A,U,6,7)57 F B=2,4 S $P(IBADDR,U,B)=$P(A,U,B+6)58 S $P(IBADDR,U,3)=$P($G(^DIC(5,+$P(A,U,9),0)),U,2)59 S $P(IBADDR,U,7)="" ; no street address 3 in file 2.31260 Q61 55 ; 62 56 PTADDR(IBIFN,ELE) ;Return part of patient's permanent address -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEF1.m
r628 r636 1 1 IBCEF1 ;ALB/TMP - FORMATTER SPECIFIC BILL FUNCTIONS - CONT ;30-JAN-96 2 ;;2.0;INTEGRATED BILLING;**52,124,51,137,210,155,349 ,371**;21-MAR-94;Build 572 ;;2.0;INTEGRATED BILLING;**52,124,51,137,210,155,349**;21-MAR-94;Build 46 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 183 183 . ; address that shows through the envelope window. 184 184 . ; 185 . ; esg - 9/13/07 - IB*2*371 - Line 1 of this box contains the print 186 . ; status (i.e. copy, 2nd notice, 3rd notice, MRA needed). 187 . ; 188 . N Z,Z1,LM,Q,ADDR,X,IBPSTAT 185 . N Z,LM,Q,ADDR,X 189 186 . S LM=$P($G(^IBE(350.9,1,1)),U,31) ; UB address column parameter 190 187 . S Z="" 191 188 . I LM S $P(Z," ",LM)="" ; beginning spaces indent 192 189 . S ADDR=$G(IBXSAVE("CADR")) ; address data string 193 . ; 194 . D F^IBCEF("N-PRINT BILL SUBMIT STATUS","IBPSTAT",,+$G(IBXIEN)) 195 . S Z1=Z I Z1="" S Z1=" " ; line 1 can't start in column 1 196 . S IBXDATA(1)=Z1_$G(IBPSTAT),Q=1 ; line 1 print status 190 . S IBXDATA(1)="",Q=1 ; line 1 is blank 197 191 . S Q=Q+1 198 192 . S IBXDATA(Q)=Z_$G(IBXSAVE("CADR_NAME")) ; line 2 payer name -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEF11.m
r628 r636 1 1 IBCEF11 ;ALB/TMP - FORMATTER SPECIFIC BILL FUNCTIONS - CONT ;30-JAN-96 2 ;;2.0;INTEGRATED BILLING;**51,137,155,309,335,348,349 ,371**;21-MAR-94;Build 572 ;;2.0;INTEGRATED BILLING;**51,137,155,309,335,348,349**;21-MAR-94;Build 46 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 82 82 K IBRX 83 83 ; 84 ; for EDI, remove any $0 line items from the IBFLD array before85 ; dropping down into the next loop (IB*2*371)86 I '$G(IBPRINT) D87 . NEW IBZ,IBI,Z88 . M IBZ=IBFLD K IBFLD89 . S (IBI,Z)=090 . F S IBI=$O(IBZ(24,IBI)) Q:IBI'=+IBI D91 .. I $P(IBZ(24,IBI),U,7)*$P(IBZ(24,IBI),U,8)'>0 Q92 .. S Z=Z+193 .. M IBFLD(24,Z)=IBZ(24,IBI)94 .. S IBFLD(24)=Z95 .. Q96 . Q97 ;98 84 S IBI=0 99 85 F S IBI=$O(IBFLD(24,IBI)) Q:IBI'=+IBI D 100 86 . S IBRX1=0 87 . I '$G(IBPRINT) Q:$P(IBFLD(24,IBI),U,7)*$P(IBFLD(24,IBI),U,8)'>0 ; For EDI, ignore 0-charge line items 101 88 . S IBXDATA(IBI)=$P(IBFLD(24,IBI),U)_U_$P(IBFLD(24,IBI),U,$S($P(IBFLD(24,IBI),U,2)=""&'$G(IBPRINT):1,1:2)) 102 89 . S $P(IBXDATA(IBI),U,3,5)=$P(IBFLD(24,IBI),U,3,5) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEF21.m
r628 r636 1 1 IBCEF21 ;ALB/TMP - FORMATTER SPECIFIC BILL FUNCTIONS CONTINUED ;06-FEB-96 2 ;;2.0;INTEGRATED BILLING;**51,296,371,389**;21-MAR-94;Build 6 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 2 ;;2.0;INTEGRATED BILLING;**51,296**;21-MAR-94 4 3 ; 5 4 COID(IBIFN) ; Claim office ID … … 40 39 D SET^IBCSC5B(IBIFN,.IBARRAY) 41 40 I $P($G(IBARRAY),U,2) D ;Prosthetics 42 . S Z0=0 F S Z0=$O(IBARRAY(Z0)) Q:Z0="" S Z1=0 F S Z1=$O(IBARRAY(Z0,Z1)) Q:'Z1 S Z=Z+1,IBXDATA(Z)="Prosthetic: "_$E($ $PINB^IBCSC5B(+IBARRAY(Z0,Z1)),1,39)_" "_$E(Z0,4,5)_"/"_$E(Z0,6,7)_"/"_$E(Z0,1,2)41 . S Z0=0 F S Z0=$O(IBARRAY(Z0)) Q:Z0="" S Z1=0 F S Z1=$O(IBARRAY(Z0,Z1)) Q:'Z1 S Z=Z+1,IBXDATA(Z)="Prosthetic: "_$E($P($$PIN^IBCSC5B(Z1),U,2),1,39)_" "_$E(Z0,4,5)_"/"_$E(Z0,6,7)_"/"_$E(Z0,1,2) 43 42 Q 44 43 ; … … 78 77 Q 79 78 ; 80 INSSECID(IBIFN,TYPE,SEQ) ; Extract subscriber and patient prim/sec ID's81 ; IBIFN required82 ; TYPE is either "PAT" or "SUB" to indicate we need to extract either83 ; patient or subscriber ID information. Default="SUB".84 ; SEQ is the insurance sequence# (1,2,3). Default is current ins seq#.85 ;86 ; Output:87 ; Function returns an 8-piece string as follows.88 ; [1] primary qualifier89 ; [2] primary ID90 ; [3] secondary qual(1)91 ; [4] secondary ID(1)92 ; [5] secondary qual(2)93 ; [6] secondary ID(2)94 ; [7] secondary qual(3)95 ; [8] secondary ID(3)96 ;97 NEW DATA,DFN,POL,IB0,IB5,REL98 S DATA=""99 S IBIFN=+$G(IBIFN) I 'IBIFN G INSSX100 I $G(TYPE)="" S TYPE="SUB" ; default type of ID's to get101 I '$F(".PAT.SUB.","."_TYPE_".") G INSSX102 I '$G(SEQ) S SEQ=$$COBN^IBCEF(IBIFN) ; default current ins seq#103 I '$F(".1.2.3.","."_SEQ_".") G INSSX104 S DFN=+$P($G(^DGCR(399,IBIFN,0)),U,2) I 'DFN G INSSX105 S POL=+$P($G(^DGCR(399,IBIFN,"M")),U,SEQ+11) I 'POL G INSSX106 S IB0=$G(^DPT(DFN,.312,POL,0)) I IB0="" G INSSX107 S IB5=$G(^DPT(DFN,.312,POL,5))108 S REL=+$P(IB0,U,16) ; pat rel to insured109 S $P(DATA,U,1)="MI"110 S $P(DATA,U,2)=$P(IB0,U,2) ; subscriber primary ID111 S $P(DATA,U,3,8)=$P(IB5,U,2,7) ; subscriber secondary data112 I TYPE="PAT",REL'=1 D113 . S $P(DATA,U,2)=$P(IB5,U,1) ; patient primary ID114 . S $P(DATA,U,3,8)=$P(IB5,U,8,13) ; patient secondary data115 . Q116 ;117 S DATA=$$SCRUB(DATA) ; scrub the data118 INSSX ;119 Q DATA120 ;121 SCRUB(DATA) ; Scrub the 8-piece string gathered above122 NEW PCE123 ;124 ; make sure you can't have an ID without a qualifier or a qualifier125 ; without an ID. Check all 4 pairs.126 F PCE=1,3,5,7 D127 . I $P(DATA,U,PCE)'="",$P(DATA,U,PCE+1)'="" Q128 . S ($P(DATA,U,PCE),$P(DATA,U,PCE+1))=""129 . Q130 ;131 ; fill in secondary gaps. If Set1 and Set2 are blank, but Set3 exists132 ; then move Set3 to Set1 and delete Set3.133 I $P(DATA,U,3)="",$P(DATA,U,5)="",$P(DATA,U,7)'="" D134 . S $P(DATA,U,3)=$P(DATA,U,7),$P(DATA,U,4)=$P(DATA,U,8)135 . S ($P(DATA,U,7),$P(DATA,U,8))=""136 . Q137 ;138 ; fill in secondary gaps more generically.139 ; If Set(n) is blank, but Set(n+1) exists, then move it up.140 F PCE=3,5 D141 . I $P(DATA,U,PCE)="",$P(DATA,U,PCE+2)'="" D142 .. S $P(DATA,U,PCE)=$P(DATA,U,PCE+2)143 .. S $P(DATA,U,PCE+1)=$P(DATA,U,PCE+3)144 .. S ($P(DATA,U,PCE+2),$P(DATA,U,PCE+3))=""145 .. Q146 . Q147 ;148 Q DATA149 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEF22.m
r628 r636 1 1 IBCEF22 ;ALB/TMP - FORMATTER SPECIFIC BILL FUNCTIONS ;06-FEB-96 2 ;;2.0;INTEGRATED BILLING;**51,137,135,155,309,349 ,389**;21-MAR-94;Build62 ;;2.0;INTEGRATED BILLING;**51,137,135,155,309,349**;21-MAR-94;Build 46 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 122 122 .. S IBLCNT=IBLCNT+1,IBXSAVE("PROS-UB-04",IBLCNT)="PROSTHETIC REFILLS:",IBLCNT=2 123 123 .. S IBX=0 F S IBX=$O(IBARRAY(IBX)) Q:IBX="" S IBY=0 F S IBY=$O(IBARRAY(IBX,IBY)) Q:'IBY D 124 ... S IBLCNT=IBLCNT+1,IBXSAVE("PROS-UB-04",IBLCNT)=$$FMTE^XLFDT(IBX,2)_" "_$J($S($P(IBARRAY(IBX,IBY),U,2):"$"_$FN($P(IBARRAY(IBX,IBY),U,2),",",2),1:""),10)_" "_$E($ $PINB^IBCSC5B(+IBARRAY(IBX,IBY)),1,54)124 ... S IBLCNT=IBLCNT+1,IBXSAVE("PROS-UB-04",IBLCNT)=$$FMTE^XLFDT(IBX,2)_" "_$J($S($P(IBARRAY(IBX,IBY),U,2):"$"_$FN($P(IBARRAY(IBX,IBY),U,2),",",2),1:""),10)_" "_$E($P($$PIN^IBCSC5B(IBY),U,2),1,54) 125 125 Q 126 126 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEF3.m
r628 r636 1 1 IBCEF3 ;ALB/TMP - FORMATTER SPECIFIC BILL FLD FUNCTIONS ;17-JUNE-96 2 ;;2.0;INTEGRATED BILLING;**52,84,121,51,152,210,155,348,349 ,389**;21-MAR-94;Build62 ;;2.0;INTEGRATED BILLING;**52,84,121,51,152,210,155,348,349**;21-MAR-94;Build 46 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 122 122 S Z="",CT=0 123 123 F S Z=$O(IBARRAY(Z)) Q:Z="" S Z0="" F S Z0=$O(IBARRAY(Z,Z0)) Q:Z0="" S CT=CT+1 D 124 .S PROS=$ $PINB^IBCSC5B(+IBARRAY(Z,Z0)) ; P389 removed p2 - item ptr file 661125 .;date^ ^short descr^entry # in file 362.5126 .S IBXDATA(CT)=Z_U_ U_PROS_U_+IBARRAY(Z,Z0)124 .S PROS=$P($$PIN^IBCSC5B(+$P($G(^IBA(362.5,+IBARRAY(Z,Z0),0)),U,3)),U,2) 125 .;date^item ptr file 661^short descr from file 441^entry # in file 362.5 126 .S IBXDATA(CT)=Z_U_Z0_U_PROS_U_+IBARRAY(Z,Z0) 127 127 PROSQ Q CT 128 128 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEF73.m
r628 r636 1 1 IBCEF73 ;WOIFO/SS - FORMATTER AND EXTRACTOR SPECIFIC BILL FUNCTIONS ;8/6/03 10:56am 2 ;;2.0;INTEGRATED BILLING;**232,320,358,349 ,377**;21-MAR-94;Build 232 ;;2.0;INTEGRATED BILLING;**232,320,358,349**;21-MAR-94;Build 46 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 174 174 D F^IBCEF("N-ALL INSURED PT RELATION","IBZ",,IBXIEN) 175 175 S IBZ=$G(IBZ(+$$COBN^IBCEF(IBXIEN))) 176 S IBZ=$$ PRELCNV^IBCNSP1(IBZ,1)176 S IBZ=$$RELATION^IBCEFG1(IBZ) 177 177 I IBZ'="18" S IBXDATA="" Q 178 178 N IBZ D F^IBCEF("N-PATIENT STREET ADDRESS 1-3","IBZ",,IBXIEN) … … 227 227 . S IBIDTYP=$P($G(^IBE(355.97,IBIDTYP,0)),"^",3) 228 228 . S:IBIDTYP="EI" IBID=$P($G(^IBA(355.9,IB3559,0)),"^",7),IBQFL=1 229 ; if nothing found yet, look in file 355.93 for Facility Default ID230 I IBID="",IBPROV["IBA(355.93" D231 .N IB0,IBFID,IBQ232 .S IB0=$G(^IBA(355.93,+IBPROV,0)) Q:IB0=""!($P(IB0,U,2)'=1) ; not a facility - bail out233 .S IBFID=$P(IB0,U,9) Q:IBFID="" ; no default id on file - bail out234 .S IBQ=$P(IB0,U,13) I +IBQ>0,$P($G(^IBE(355.97,IBQ,0)),U,3)=24 S IBID=IBFID235 .Q236 229 Q $$NOPUNCT^IBCEF(IBID) 237 230 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEF73A.m
r628 r636 1 1 IBCEF73A ;ALB/KJH - FORMATTER AND EXTRACTOR SPECIFIC (NPI) BILL FUNCTIONS ; 30 Aug 2006 10:38 AM 2 ;;2.0;INTEGRATED BILLING;**343,374 ,395**;21-MAR-94;Build 32 ;;2.0;INTEGRATED BILLING;**343,374**;21-MAR-94;Build 16 3 3 ;; Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; … … 104 104 I IBORG S NPI=$P($$NPI^XUSNPI("Organization_ID",IBORG),U) S:NPI'=-1 $P(IBRETVAL,U,3)=NPI 105 105 I NPI<1,$D(IBNONPI) S IBNONPI=$S(IBNONPI="":3,1:IBNONPI_U_3) 106 I $$ISRX^IBCEF1(IBIEN399) S IBORG=$$RXSITE(IBIEN399) I IBORG S NPI=$P($$NPI^XUSNPI("Organization_ID",IBORG),U) S:NPI'=-1 $P(IBRETVAL,U,3)=NPI107 106 Q IBRETVAL 108 107 ; … … 129 128 I '$L(TAX),$D(IBNOTAX) S IBNOTAX=$S(IBNOTAX="":3,1:IBNOTAX_U_3) 130 129 Q IBRETVAL 131 ;132 RXSITE(IBIEN399,IBLIST) ; returns prescription organization (file 4) pointer133 ; for the given bill. If IBLIST passed by reference, then a list of134 ; the possible organizations are returned for a bill, since a bill may135 ; have more than one prescription. If more than one rx on the bill, the136 ; $$ return is the pointer of the last prescription found.137 ; IBLIST(rx ien,fill date)=ORGINATION (file 4 pointer)138 ;139 N IBX,IBDATA,IBORG,IBRX,IBDT,IBY,IBRXN,DFN140 K ^TMP($J,"IBCEF73A")141 S IBORG=0,DFN=$P($G(^DGCR(399,IBIEN399,0)),"^",2),IBLIST="IBCEF73A"142 S IBRXN=0 F S IBRXN=$O(^IBA(362.4,"AIFN"_IBIEN399,IBRXN)) Q:'IBRXN S IBX=0 F S IBX=$O(^IBA(362.4,"AIFN"_IBIEN399,IBRXN,IBX)) Q:'IBX D143 . S IBDATA=$G(^IBA(362.4,IBX,0))144 . S IBRX=$P(IBDATA,"^",5),IBDT=$P(IBDATA,"^",3) Q:'IBRX!('IBDT)145 . D RX^PSO52API(DFN,IBLIST,IBRX,,"0,2,R")146 . I IBDT=+$G(^TMP($J,"IBCEF73A",DFN,IBRX,22)) S (IBORG,IBLIST(IBRX,IBDT))=$$PSONPI(+$G(^TMP($J,"IBCEF73A",DFN,IBRX,20))) Q147 . S IBY=0 F S IBY=$O(^TMP($J,"IBCEF73A",DFN,IBRX,"RF",IBY)) Q:'IBY I IBDT=+$G(^TMP($J,"IBCEF73A",DFN,IBRX,"RF",IBY,.01)) S (IBORG,IBLIST(IBRX,IBDT))=$$PSONPI(+$G(^TMP($J,"IBCEF73A",DFN,IBRX,"RF",IBY,8))) Q148 K ^TMP($J,"IBCEF73A")149 Q IBORG150 ;151 PSONPI(IB59IEN) ; returns institution ien for a file 59 ien152 N IB4IEN153 K ^TMP($J,"IBCEF59")154 D PSS^PSO59(IB59IEN,,"IBCEF59")155 S IB4IEN=+$G(^TMP($J,"IBCEF59",IB59IEN,101))156 K ^TMP($J,"IBCEF59")157 Q IB4IEN -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEF74A.m
r628 r636 1 1 IBCEF74A ;ALB/ESG - Provider ID maint ?ID continuation ;7 Mar 2006 2 ;;2.0;INTEGRATED BILLING;**320,343,349 ,395**;21-MAR-94;Build 32 ;;2.0;INTEGRATED BILLING;**320,343,349**;21-MAR-94;Build 46 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 35 35 S IBXIEN=IBIFN 36 36 D F^IBCEF("N-RENDERING INSTITUTION","IBZ",,IBIFN) 37 I $$ISRX^IBCEF1(IBIFN) S Z=$$RXSITE^IBCEF73A(IBIFN) I Z S $P(IBZ,"^")=+Z38 37 S FACNAME=$$GETFAC^IBCEP8(+IBZ,+$P(IBZ,U,2),0,"SUB") 39 38 S Z="LAB/FAC" … … 54 53 ; PRXM/KJH - Add NPI to display for patch 343. 55 54 S ORGNPI=$$ORGNPI^IBCEF73A(IBIFN) 56 S DATA=$S($ $ISRX^IBCEF1(IBIFN):$P(ORGNPI,U,3),$P($G(IBZ),U,2)=1:$P(ORGNPI,U,2),$P($G(IBZ),U,2)=0:$P(ORGNPI,U,1),1:$P(ORGNPI,U,3))55 S DATA=$S($P($G(IBZ),U,2)=1:$P(ORGNPI,U,2),$P($G(IBZ),U,2)=0:$P(ORGNPI,U,1),1:$P(ORGNPI,U,3)) 57 56 I ($Y+5)>IOSL S IBQUIT=$$NOMORE^IBCEF74() I IBQUIT G EX 58 57 W !?5,"Lab or Facility NPI:" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEF75.m
r628 r636 1 1 IBCEF75 ;ALB/WCJ - Provider ID functions ;13 Feb 2006 2 ;;2.0;INTEGRATED BILLING;**320 ,371**;21-MAR-94;Build 573 ;; Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**320**;21-MAR-94 3 ;; Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 G AWAY … … 66 66 ; Secondary #2 67 67 ; If there is a ID send with quailifer (stored or computed) 68 I $ TR($P(M1,U,COB+1)," ")]"" D68 I $P(M1,U,COB+1)]"" D 69 69 . S QUAL="" 70 70 . S DAT=$P(M1,U,COB+9) … … 74 74 . S IB2=QUAL_U_$$STRIP^IBCEF76($P(M1,U,COB+1),1,,IBSTRIP) 75 75 ; 76 I $ TR($P(M1,U,COB+1)," ")="" S IB2=$$STRIP^IBCEF76($$OLDWAY(IBIFN,COB),1,,IBSTRIP)_U_$$STRIP^IBCEF76($$GET1^DIQ(350.9,1,1.05),1,,IBSTRIP)76 I $P(M1,U,COB+1)="" S IB2=$$STRIP^IBCEF76($$OLDWAY(IBIFN,COB),1,,IBSTRIP)_U_$$STRIP^IBCEF76($$GET1^DIQ(350.9,1,1.05),1,,IBSTRIP) 77 77 ; 78 78 S IDS("BILLING PRV",IBIFN,SORT1,SORT2,2)=IB2 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEFG1.m
r628 r636 1 1 IBCEFG1 ;ALB/TMP - OUTPUT FORMATTER DATA DEFINITION UTILITIES ;18-JAN-96 2 ;;2.0;INTEGRATED BILLING;**52,51,137,181,197,232,288,349 ,371,377**;21-MAR-94;Build 232 ;;2.0;INTEGRATED BILLING;**52,51,137,181,197,232,288,349**;21-MAR-94;Build 46 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 86 86 ; the decimal and commas. 87 87 N DOLR,CENT 88 I AMT'="" S AMT=$TR(AMT,","),DOLR=$P(AMT,"."),CENT=$E($P(AMT,".",2)_"00",1,2),AMT=DOLR_CENT89 Q AMT88 I AMT'="" S DOLR=$P(AMT,"."),CENT=$E($P(AMT,".",2)_"00",1,2),AMT=DOLR_CENT 89 Q $TR(AMT,",") 90 90 ; 91 91 STATE(CODE) ;Return state code from state pointer … … 95 95 ; CODE = DHCP code for sex 96 96 Q $S(CODE="":"U","MF"[$E(CODE):$E(CODE),1:"U") 97 ; 98 RELATION(CODE) ;Return the X12 code for relationship 99 ; CODE = DHCP code for relationship 100 N X12 101 S X12="" 102 S:CODE'="" X12=$P($S(CODE="01":"18^SELF",CODE="02":"01^SPOUSE",CODE="03":"19^NATURAL CHILD",CODE="08":"20^EMPLOYEE",CODE="32":"32^MOTHER",CODE="33":"33^FATHER",CODE="11":"39^ORGAN DONOR",CODE="15":"41^INJURED PLAINTIFF",1:""),U) 103 Q X12 97 104 ; 98 105 EMPLST(CODE) ;Return the X12 code for employment status -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEM.m
r628 r636 1 1 IBCEM ;ALB/TMP - 837 EDI RETURN MESSAGE PROCESSING ;17-APR-96 2 ;;2.0;INTEGRATED BILLING;**137,191,155,371**;21-MAR-94;Build 57 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 2 ;;2.0;INTEGRATED BILLING;**137,191,155**;21-MAR-94 4 3 Q 5 4 ; … … 88 87 ; 89 88 S IBTEXT(1)=" UPDATED BY: "_$$EXTERNAL^DILFD(361.02,.02,,+$G(DUZ)) 90 S IBTEXT(2)="ACTION USED: "_$S(FUNC="E":"BILL EDITED/RESUBMITTED",FUNC="C":"BILL CANCELED",FUNC="R":"BILL RESUBMITTED WITHOUT EDIT ",FUNC="P":"PRINT BILL",FUNC="Z":"PROCESS COB",1:"")89 S IBTEXT(2)="ACTION USED: "_$S(FUNC="E":"BILL EDITED/RESUBMITTED",FUNC="C":"BILL CANCELED",FUNC="R":"BILL RESUBMITTED WITHOUT EDIT)",FUNC="P":"PRINT BILL",FUNC="Z":"PROCESS COB",1:"") 91 90 S IBTEXT(2)=$S(IBTEXT(2)="":"UNSPECIFIED",1:IBTEXT(2)_" - REVIEW MARKED AS COMPLETE") 92 91 S IBTEXT=2 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEM4.m
r628 r636 1 1 IBCEM4 ;ALB/TMP - IB ELECTRONIC MESSAGE SCREEN TEXT MAINT ;19-APR-2001 2 ;;2.0;INTEGRATED BILLING;**137 ,368**;21-MAR-1994;Build 213 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**137**;21-MAR-1994 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 EN ; entry point for maintenance … … 60 60 ; 61 61 N T,Y,Z,Z0 62 S (IBREV,Y)=0,Z="" ,IBTEXT=$$UP^XLFSTR($G(IBTEXT))63 I '$G(IBSKIP) F S Z=$O(^IBE(361.3,"AC",1,Z)) Q:Z="" I IBTEXT[ $$UP^XLFSTR(Z)S IBREV=1 Q ; Always review messages with this text64 I 'IBREV S Z="" F S Z=$O(^IBE(361.3,"AC",0,Z)) Q:Z="" I IBTEXT[ $$UP^XLFSTR(Z)S Y=1,IBNR=Z Q ; Message contains text to make review unnecessary62 S (IBREV,Y)=0,Z="" 63 I '$G(IBSKIP) F S Z=$O(^IBE(361.3,"AC",1,Z)) Q:Z="" I IBTEXT[Z S IBREV=1 Q ; Always review messages with this text 64 I 'IBREV S Z="" F S Z=$O(^IBE(361.3,"AC",0,Z)) Q:Z="" I IBTEXT[Z S Y=1,IBNR=Z Q ; Message contains text to make review unnecessary 65 65 Q Y 66 66 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEMCA2.m
r628 r636 1 1 IBCEMCA2 ;ALB/ESG - Multiple CSA Message Management - Actions ;20-SEP-2005 2 ;;2.0;INTEGRATED BILLING;**320 ,377**;21-MAR-1994;Build 233 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**320**;21-MAR-1994 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 Q … … 7 7 CANCEL ; mass claim cancel 8 8 NEW NS,IBIFN,NSC,DIR,X,Y,DUOUT,DTOUT,DIRUT,DIROUT,IBDA,IB364,DISP,IBCE 9 NEW IBMCSRSC,IBMCSRNB,IBMCSCNT,IBMCSTOT,IBMCSTOP,IBMCSCAN,MRACHK,IBCAN ,IBMCSCAC9 NEW IBMCSRSC,IBMCSRNB,IBMCSCNT,IBMCSTOT,IBMCSTOP,IBMCSCAN,MRACHK,IBCAN 10 10 D FULL^VALM1 11 11 ; … … 28 28 W !!,"In order to cancel " 29 29 W $S(NSC=1:"this claim",1:"these claims") 30 W ", a Reason Cancelled and a Reason Not Billable" 31 W !,"are required. You may also provide an optional CT Additional Comment." 32 W !,"These will be used as the default responses for " 30 W ", you must supply the Reason Cancelled and" 31 W !,"the Reason Not Billable. These will be the default responses for " 33 32 W $S(NSC=1:"this claim",1:"all claims") 34 33 W "." … … 51 50 I $D(DIRUT) G CANCELX 52 51 M IBMCSRNB=Y ; save the reason not billable code/desc 53 ;54 CANQ3 ; reader call for the Claims Tracking Additional Comment field55 W !56 S DIR(0)="356,1.08O"57 S DIR("A")="CT Additional Comment"58 D ^DIR K DIR59 I $D(DIRUT) G CANCELX60 M IBMCSCAC=Y61 52 ; 62 53 W ! -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEOB.m
r628 r636 1 1 IBCEOB ;ALB/TMP - 835 EDI EOB MESSAGE PROCESSING ;20-JAN-99 2 ;;2.0;INTEGRATED BILLING;**137,135,265,155,377**;21-MAR-94;Build 23 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 ; 2 ;;2.0;INTEGRATED BILLING;**137,135,265,155**;21-MAR-94 5 3 Q 6 4 ; … … 24 22 ; Duplicate EOB Check 25 23 S IBFILE="^IBA(364.2,"_IBTDA_",2)" 26 I $$DUP(IBFILE,X) D DELMSG^IBCESRV2(IBTDA)G UPDQ24 I $$DUP(IBFILE,X) G UPDQ 27 25 ; 28 26 I '$$LOCK^IBCEM(IBTDA) G UPDQ ;Lock msg file 364.2 … … 50 48 5(IB0,IBEGBL,IBEOB) ; Record '05' 51 49 ; 52 N IBOK, DA,DR,DIE,X,Y50 N IBOK,IBBULL,DA,DR,DIE,X,Y 53 51 K IBZDATA 54 52 S DR=";",IBOK=1 55 53 S DIE="^IBM(361.1,",DA=IBEOB 56 54 ; 57 I $P(IB0,U,9) S DR=DR_"1.1///"_$$DATE^IBCEU($P(IB0,U,9))_";" ; statement start date 58 I $P(IB0,U,10) S DR=DR_"1.11///"_$$DATE^IBCEU($P(IB0,U,10))_";" ; statement end date 55 S IBBULL="" 56 I $$UPDNM^IBCEOB00(IBEOB,IB0,.IBBULL,.DR)!$$UPDID^IBCEOB00(IBEOB,IB0,.IBBULL,.DR) D ; New insured's name and/or HIC # found 57 . D CHGBULL^IBCEOB3(IBEOB,IBBULL) ;Send a bulletin reporting change 58 ; 59 I $P(IB0,U,9) S DR=DR_"1.1///"_$$DATE^IBCEU($P(IB0,U,9))_";" 60 I $P(IB0,U,10) S DR=DR_"1.11///"_$$DATE^IBCEU($P(IB0,U,10))_";" 59 61 S DR=$P(DR,";",2,$L(DR,";")-1) 60 62 I DR'="" D ^DIE S IBOK=$D(Y)=0 61 63 I 'IBOK S ^TMP(IBEGBL,$J,+$O(^TMP(IBEGBL,$J,""),-1)+1)="Bad record 5 data" 62 64 Q IBOK 63 ;64 6(IB0,IBEGBL,IBEOB) ; Record '06' - corrected patient name and/or ID#65 ; This data is not going to be filed into file 361.1 so the value of this function will always be a 1 so as to66 ; not interrupt the filing process of the EOB/MRA data into file 361.1.67 ;68 ; perform overall integrity checks on the incoming 06 record. If anything is out of place, don't update anything69 ; and report the problem and get out.70 NEW CLM,SITE,IBM,IBIFN,IBIFN1,DFN,SEQ,DIE,DA,DR71 S DIE=361.1,DA=IBEOB,DR="61.01////^S X=IB0" D ^DIE ; archive the raw 06 record data72 S CLM=$P(IB0,U,2),SITE=+CLM,CLM=$P(CLM,"-",2) I CLM="" D MSG(IBEOB,"The claim# in piece 2 is invalid.") G Q673 S IBM=$G(^IBM(361.1,IBEOB,0))74 I $P(IBM,U,4)'=1 D MSG(IBEOB,"This is a non-Medicare EOB.") G Q675 S IBIFN=+$P(IBM,U,1) ; claim# from MRA76 S IBIFN1=+$O(^DGCR(399,"B",CLM,"")) ; claim# from 06 record77 I IBIFN'=IBIFN1 D MSG(IBEOB,"Claim mismatch error."_IBIFN_","_IBIFN1_","_CLM_".") G Q678 I $P($$SITE^VASITE,U,3)'=SITE D MSG(IBEOB,"Invalid station# mismatch."_$P($$SITE^VASITE,U,3)_","_SITE_".") G Q679 S SEQ=$$COBN^IBCEF(IBIFN) ; current payer sequence# on claim80 I '$$WNRBILL^IBEFUNC(IBIFN,SEQ) D MSG(IBEOB,"The current payer on this claim is not MEDICARE (WNR).") G Q681 S DFN=+$P($G(^DGCR(399,IBIFN,0)),U,2) ; patient ien82 I 'DFN D MSG(IBEOB,"The patient DFN cannot be determined.") G Q683 ;84 D UPD^IBCEOB01(IB0,IBEOB,IBIFN,DFN,SEQ) ; update patient insurance policy data85 ;86 Q6 ; exit point for $$6 function87 Q 188 65 ; 89 66 10(IB0,IBEGBL,IBEOB) ; Record '10' … … 106 83 ; 107 84 15(IB0,IBEGBL,IBEOB) ; Record '15' 108 ; Moved due to space constraints 109 Q15 Q $$15^IBCEOB00(IB0,IBEGBL,IBEOB) 85 ; 86 N A,IBOK 87 ; 88 S A="3;1.03;1;0;0^4;1.04;1;0;0^5;1.05;1;0;0^6;1.07;1;0;0^7;1.08;1;0;0^8;1.09;1;0;0^9;1.02;1;0;0^10;2.05;1;0;0" 89 ; 90 S IBOK=$$STORE^IBCEOB1(A,IB0,IBEOB) 91 I 'IBOK S ^TMP(IBEGBL,$J,+$O(^TMP(IBEGBL,$J,""),-1)+1)="Bad record 15 data" G Q15 92 ; 93 ; For Medicare MRA's only: 94 ; If the Covered Amount is present (15 record, piece 3), then file 95 ; a claim level adjustment with Group code=OA, Reason code=AB3. 96 ; 97 I $P($G(^IBM(361.1,IBEOB,0)),U,4)=1,+$P(IB0,U,3) D 98 . N IB20 99 . S IB20=20_U_$P(IB0,U,2)_U_"OA"_U_"AB3"_U_$P(IB0,U,3)_U_"0000000000" 100 . S IB20=IB20_U_"Covered Amount" 101 . S IBOK=$$20(IB20,IBEGBL,IBEOB) 102 . I 'IBOK S ^TMP(IBEGBL,$J,+$O(^TMP(IBEGBL,$J,""),-1)+1)="Could not file the OA-AB3 claim level adjustment for the Covered Amount" 103 . K ^TMP($J,20) 104 . Q 105 ; 106 Q15 Q IBOK 110 107 ; 111 108 17(IB0,IBEGBL,IBEOB) ; Record '17' … … 117 114 ; 118 115 20(IB0,IBEGBL,IBEOB) ; Record '20' 119 ; Moved due to space constraints 120 Q20 Q $$20^IBCEOB00(IB0,IBEGBL,IBEOB) 116 ; 117 N A,LEVEL,IBGRP,IBDA,IBOK 118 ; 119 S IBGRP=$P(IB0,U,3) 120 I IBGRP'="" S ^TMP($J,20)=IBGRP 121 I IBGRP="" S IBGRP=$G(^TMP($J,20)) 122 I IBGRP="" S ^TMP(IBEGBL,$J,+$O(^TMP(IBEGBL,$J,""),-1)+1)="Missing claim level adjustment group code" G Q20 123 ; 124 S IBDA(1)=$O(^IBM(361.1,IBEOB,10,"B",IBGRP,0)) 125 ; 126 I 'IBDA(1) D ;Needs a new entry at group level 127 . N X,Y,DA,DD,DO,DIC,DLAYGO 128 . S DIC="^IBM(361.1,"_IBEOB_",10,",DIC(0)="L",DLAYGO=361.11,DA(1)=IBEOB 129 . S DIC("P")=$$GETSPEC^IBEFUNC(361.1,10) 130 . S X=IBGRP 131 . D FILE^DICN K DIC,DO,DD,DLAYGO 132 . I Y<0 K IBDA S ^TMP(IBEGBL,$J,+$O(^TMP(IBEGBL,$J,""),-1)+1)="Adjustment group code could not be added" Q 133 . S IBDA(1)=+Y 134 ; 135 I $G(IBDA(1)) D ;Add a new entry at the reason code level 136 . S DIC="^IBM(361.1,"_IBEOB_",10,"_IBDA(1)_",1,",DIC(0)="L",DLAYGO=361.111,DA(2)=IBEOB,DA(1)=IBDA(1) 137 . S DIC("P")=$$GETSPEC^IBEFUNC(361.11,1) 138 . S X=$P(IB0,U,4) 139 . D FILE^DICN K DIC,DO,DD,DLAYGO 140 . I Y<0 K IBDA S ^TMP(IBEGBL,$J,+$O(^TMP(IBEGBL,$J,""),-1)+1)="Adjustment reason code could not be added" Q 141 . S IBDA=+Y 142 ; 143 I $G(IBDA) D 144 . S LEVEL=10,LEVEL("DIE")="^IBM(361.1,"_IBEOB_",10,"_IBDA(1)_",1," 145 . S LEVEL(0)=IBDA,LEVEL(1)=IBDA(1),LEVEL(2)=IBEOB 146 . S A="5;.02;1;0;0^6;.03;0;1;1^7;.04;0;1;0" 147 . S IBOK=$$STORE^IBCEOB1(A,IB0,IBEOB,.LEVEL) 148 . I 'IBOK S ^TMP(IBEGBL,$J,+$O(^TMP(IBEGBL,$J,""),-1)+1)="Bad adjustment reason code ("_$P(IB0,U,4)_") data" Q 149 Q20 Q $G(IBOK) 121 150 ; 122 151 30(IB0,IBEGBL,IBEOB) ; Record '30' … … 157 186 D 45^IBCEOB0(IB0,IBEOB,.IBOK) 158 187 Q $G(IBOK) 159 ;160 MSG(IBEOB,MSG) ; procedure to file message into field 6.03161 ; Results of processing of the "06" record type162 N DIE,DA,DR,Z163 S DIE=361.1,DA=+$G(IBEOB)164 I $G(MSG)="" G MSGX165 S Z=$P($G(^IBM(361.1,DA,6)),U,3) ; already existing message166 I Z'="" S MSG=Z_" "_MSG ; append new message to existing message167 S MSG=$E(MSG,1,190)168 S DR="6.03///^S X=MSG"169 D ^DIE170 MSGX ;171 Q172 188 ; 173 189 DOLLAR(X) ; Convert value in X to dollar format XXX.XX … … 182 198 ; IBFILE = array reference of raw EOB data 183 199 ; 184 N DIC,DA,DR,DO,DD,DLAYGO,Y,REVSTAT,BS ,MMI200 N DIC,DA,DR,DO,DD,DLAYGO,Y,REVSTAT,BS 185 201 F L +^IBM(361.1,0):10 Q:$T 186 202 ; … … 188 204 S BS=$P($G(^DGCR(399,X,0)),U,13) ; bill status 189 205 S REVSTAT=$S(BS=7:9,BS=3:3,BS=4:3,1:0) 190 S MMI=$$NET^XMRENT(IBMNUM) ; MailMan header info191 206 S DIC(0)="L",DIC="^IBM(361.1,",DLAYGO=361.1 192 207 S DIC("DR")=".16////"_REVSTAT_";.17////0"_";100.02////"_IBMNUM_$S('$G(IBAR):";.19////"_+IBTBILL_";100.01////"_IBBATCH,1:"") 193 S DIC("DR")=DIC("DR")_";100.05////"_$$CHKSUM^IBCEMU1(IBFILE) _";62.01////^S X=MMI"208 S DIC("DR")=DIC("DR")_";100.05////"_$$CHKSUM^IBCEMU1(IBFILE) 194 209 D FILE^DICN 195 210 L -^IBM(361.1,0) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEOB00.m
r628 r636 1 1 IBCEOB00 ;ALB/ESG - 835 EDI EOB MSG PROCESSING CONT ;30-JUN-2003 2 ;;2.0;INTEGRATED BILLING;**155,349 ,377**;21-MAR-94;Build 232 ;;2.0;INTEGRATED BILLING;**155,349**;21-MAR-94;Build 46 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 Q … … 94 94 ICNX ; 95 95 Q 96 ;97 15(IB0,IBEGBL,IBEOB) ; Record '15'98 ;99 N A,IBOK100 ;101 S A="3;1.03;1;0;0^4;1.04;1;0;0^5;1.05;1;0;0^6;1.07;1;0;0^7;1.08;1;0;0^8;1.09;1;0;0^9;1.02;1;0;0^10;2.05;1;0;0"102 ;103 S IBOK=$$STORE^IBCEOB1(A,IB0,IBEOB)104 I 'IBOK S ^TMP(IBEGBL,$J,+$O(^TMP(IBEGBL,$J,""),-1)+1)="Bad record 15 data" G Q15105 ;106 ; For Medicare MRA's only:107 ; If the Covered Amount is present (15 record, piece 3), then file108 ; a claim level adjustment with Group code=OA, Reason code=AB3.109 ;110 I $P($G(^IBM(361.1,IBEOB,0)),U,4)=1,+$P(IB0,U,3) D111 . N IB20112 . S IB20=20_U_$P(IB0,U,2)_U_"OA"_U_"AB3"_U_$P(IB0,U,3)_U_"0000000000"113 . S IB20=IB20_U_"Covered Amount"114 . S IBOK=$$20(IB20,IBEGBL,IBEOB)115 . I 'IBOK S ^TMP(IBEGBL,$J,+$O(^TMP(IBEGBL,$J,""),-1)+1)="Could not file the OA-AB3 claim level adjustment for the Covered Amount"116 . K ^TMP($J,20)117 . Q118 ;119 Q15 Q IBOK120 ;121 20(IB0,IBEGBL,IBEOB) ; Record '20'122 ;123 N A,LEVEL,IBGRP,IBDA,IBOK124 ;125 S IBGRP=$P(IB0,U,3)126 I IBGRP'="" S ^TMP($J,20)=IBGRP127 I IBGRP="" S IBGRP=$G(^TMP($J,20))128 I IBGRP="" S ^TMP(IBEGBL,$J,+$O(^TMP(IBEGBL,$J,""),-1)+1)="Missing claim level adjustment group code" G Q20129 ;130 S IBDA(1)=$O(^IBM(361.1,IBEOB,10,"B",IBGRP,0))131 ;132 I 'IBDA(1) D ;Needs a new entry at group level133 . N X,Y,DA,DD,DO,DIC,DLAYGO134 . S DIC="^IBM(361.1,"_IBEOB_",10,",DIC(0)="L",DLAYGO=361.11,DA(1)=IBEOB135 . S DIC("P")=$$GETSPEC^IBEFUNC(361.1,10)136 . S X=IBGRP137 . D FILE^DICN K DIC,DO,DD,DLAYGO138 . I Y<0 K IBDA S ^TMP(IBEGBL,$J,+$O(^TMP(IBEGBL,$J,""),-1)+1)="Adjustment group code could not be added" Q139 . S IBDA(1)=+Y140 ;141 I $G(IBDA(1)) D ;Add a new entry at the reason code level142 . S DIC="^IBM(361.1,"_IBEOB_",10,"_IBDA(1)_",1,",DIC(0)="L",DLAYGO=361.111,DA(2)=IBEOB,DA(1)=IBDA(1)143 . S DIC("P")=$$GETSPEC^IBEFUNC(361.11,1)144 . S X=$P(IB0,U,4)145 . D FILE^DICN K DIC,DO,DD,DLAYGO146 . I Y<0 K IBDA S ^TMP(IBEGBL,$J,+$O(^TMP(IBEGBL,$J,""),-1)+1)="Adjustment reason code could not be added" Q147 . S IBDA=+Y148 ;149 I $G(IBDA) D150 . S LEVEL=10,LEVEL("DIE")="^IBM(361.1,"_IBEOB_",10,"_IBDA(1)_",1,"151 . S LEVEL(0)=IBDA,LEVEL(1)=IBDA(1),LEVEL(2)=IBEOB152 . S A="5;.02;1;0;0^6;.03;0;1;1^7;.04;0;1;0"153 . S IBOK=$$STORE^IBCEOB1(A,IB0,IBEOB,.LEVEL)154 . I 'IBOK S ^TMP(IBEGBL,$J,+$O(^TMP(IBEGBL,$J,""),-1)+1)="Bad adjustment reason code ("_$P(IB0,U,4)_") data" Q155 Q20 Q $G(IBOK)156 96 ; 157 97 35(IB0,IBEGBL,IBEOB) ; Record '35' … … 223 163 Q X 224 164 ; 165 UPDNM(IBEOB,IB0,IBBULL,IBDR) ; Update name on claim if it comes back changed 166 ; IBEOB = the internal entry # of the entry in file 361.1 167 ; IB0 = the raw data returned from the 835 flat file 168 ; IBBULL = holds result of name change check in piece 1 - if name 169 ; changed, first '^' piece is 1, 3rd '^' piece is the old 170 ; insured's name 171 ; IBDR = returned as the updated 'DR' string with the name changed 172 ; fields to use to update the EOB file (361.1) - pass by reference 173 ; 174 N IBCHGED,IBIFN,IBNEW,IBCOB,DIE,DR,X,Y 175 I $P(IB0,U,7) D 176 . S IBNEW=$P(IB0,U,3)_","_$P(IB0,U,4)_$S($P(IB0,U,5)'="":" "_$P(IB0,U,5),1:""),$P(IBBULL,U)=1 177 . S IBCOB=+$P($G(^IBM(361.1,IBEOB,0)),U,15) 178 . S IBIFN=+$G(^IBM(361.1,+IBEOB,0)) 179 . S IB=$G(^DGCR(399,IBIFN,"I"_IBCOB)) 180 . ; 181 . I IB'="",$P(IB,U,17)'=IBNEW D 182 .. ; Update the claim data only 183 .. S $P(IBBULL,U,3)=$P(IB,U,17) ; save old value 184 .. S $P(IB,U,17)=IBNEW 185 .. S DIE="^DGCR(399,",DA=IBIFN,DR="30"_IBCOB_"////"_IB 186 .. D:DA ^DIE 187 .. S IBCHGED=1 188 . S IBDR=$G(IBDR)_"6.01////"_$P(IB0,U,3)_","_$P(IB0,U,4)_" "_$P(IB0,U,5)_";" 189 ; 190 Q $G(IBCHGED) 191 ; 192 UPDID(IBEOB,IB0,IBBULL,IBDR) ; Update id # on claim and policy if it comes back 193 ; changed 194 ; IBEOB = the internal entry # of the entry in file 361.1 195 ; IB0 = the raw data returned from the 835 flat file 196 ; IBBULL = holds result of id change check in piece 2 - if id changed, 197 ; second '^' piece = 1,4th '^' piece is the old insured's id 198 ; IBDR = returned as the updated 'DR' string with the id changed fields 199 ; to use to update the EOB file (361.1) - pass by reference 200 ; 201 N IBCHGED,IBNEW,IBCOB,IB,DIE,DR,DA,X,Y 202 I $P(IB0,U,8) D 203 . S IBNEW=$P(IB0,U,6),$P(IBBULL,U,2)=1 204 . S IBIFN=+$G(^IBM(361.1,+IBEOB,0)) 205 . S IBCOB=+$P($G(^IBM(361.1,IBEOB,0)),U,15) 206 . S IB=$G(^DGCR(399,IBIFN,"I"_IBCOB)) 207 . ; 208 . I IB'="",$P(IB,U,2)'=IBNEW D 209 .. ; Update the claim 210 .. S $P(IBBULL,U,4)=$P(IB,U,2) ; save old value 211 .. S $P(IB,U,2)=IBNEW 212 .. S DIE="^DGCR(399,",DA=IBIFN,DR="30"_IBCOB_"////"_IB D ^DIE 213 .. ; 214 .. ; Update the policy 215 .. S DA(1)=$P($G(^DGCR(399,IBIFN,0)),U,2),DA=$P($G(^("M")),U,(11+IBCOB)),DR="1////"_IBNEW,DIE="^DPT("_DA(1)_",.312," 216 .. I DA(1),DA D ^DIE 217 .. S IBCHGED=1 218 . S IBDR=$G(IBDR)_"6.02////"_$P(IB0,U,6)_";" 219 ; 220 Q $G(IBCHGED) 221 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEP0.m
r628 r636 1 1 IBCEP0 ;ALB/TMP - Functions for PROVIDER ID MAINTENANCE ;13-DEC-99 2 ;;2.0;INTEGRATED BILLING;**137,191,239,232,320,348,349 ,377**;21-MAR-94;Build 232 ;;2.0;INTEGRATED BILLING;**137,191,239,232,320,348,349**;21-MAR-94;Build 46 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 67 67 S IBDSP=Y,IBSORT="" 68 68 I IBDSP="A"!(IBDSP="I") F D Q:'IBOK!(IBSORT'="") 69 . ; 70 . I IBDSP="A" D 71 .. S DIR("A")="Display only IDs with a specific ID Qualifier?: " 72 .. S DIR("?",1)="Answer Yes to select a specific ID Qualifier by which to display IDs." 73 .. S DIR("?")="Answer No to display all IDs." 74 .. Q 75 . ; 76 . I IBDSP="I" D 77 .. S DIR("A")="Display IDs for a specific Provider?: " 78 .. S DIR("?",1)="Answer Yes to select a specific Provider." 79 .. S DIR("?")="Answer No to display all Providers." 80 .. Q 81 . ; 82 . S DIR("B")="NO",DIR(0)="YA" 69 . N Z 70 . S Z=$S(IBDSP="I":"",1:" ID TYPE") 71 . S DIR("A")="DO YOU WANT TO DISPLAY IDS FOR A SPECIFIC PROVIDER"_Z_"?: ",DIR("B")="NO",DIR(0)="YA" 72 . S DIR("?",1)="IF YOU ANSWER YES TO THIS QUESTION, YOU MAY SELECT A SPECIFIC PROVIDER"_Z,DIR("?")=" TO DISPLAY, OTHERWISE, ALL PROVIDER"_Z_"S FOUND WILL BE DISPLAYED" 83 73 . W ! D ^DIR K DIR W ! 84 74 . I $D(DTOUT)!$D(DUOUT) S IBOK=0 Q … … 86 76 . ; 87 77 . I IBDSP="A" D Q 88 .. S DIC(0)="AEMQ",DIC="^IBE(355.97,",DIC("S")="I $S('$P(^(0),U,2):1,1:$P(^(0),U,2)=3)" 89 .. S DIC("A")="Select type of ID Qualifier: " 90 .. D ^DIC K DIC 78 .. S DIC(0)="AEMQ",DIC="^IBE(355.97,",DIC("S")="I $S('$P(^(0),U,2):1,1:$P(^(0),U,2)=3)" D ^DIC K DIC 91 79 .. I Y>0 S IBSORT=+Y Q 92 80 .. I $D(DTOUT)!$D(DUOUT) S IBOK=0 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEP0A.m
r628 r636 1 1 IBCEP0A ;ALB/TMP - EDI UTILITIES for insurance assigned provider ID ;01-NOV-00 2 ;;2.0;INTEGRATED BILLING;**137,232,320,377**;21-MAR-94;Build 23 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 2 ;;2.0;INTEGRATED BILLING;**137,232,320**;21-MAR-94 4 3 ; 5 4 NEW(IBINS,IBPRV,IBPTYP,IBDEF) ; Add new insurance co assigned id … … 26 25 I '$G(IBPTYP) D G:IBQ NEWQ 27 26 . S DIR(0)="PAr^355.97:AEMQ",DIR("A")="Select Provider ID Qualifier: " 28 . S DIR("?")="Enter a Qualifier to i dentify the type of ID number you are entering."27 . S DIR("?")="Enter a Qualifier to indentify the type of ID number you are entering." 29 28 . S DIR("S")="I $$RAINS^IBCEPU(Y)" ; Rendering/Attending IDs provided by ins 30 29 . S DA=0 … … 101 100 Q 102 101 ; 103 PRVTJMP(VALMBG) ; Navigate to a specific type of ID qualifier(from ins co option)102 PRVTJMP(VALMBG) ; Navigate to a specific provider id type (from ins co option) 104 103 ; 105 104 N DIR,X,Y 106 105 D FULL^VALM1 107 S DIR(0)="PAO^355.97:AEMQ",DIR("A")="Select type of ID Qualifier: " 108 S DIR("?")="Select a type of ID Qualifier to display the IDs of that type." 106 S DIR(0)="PAO^355.97:AEMQ",DIR("A")="SELECT PROVIDER ID TYPE: ",DIR("?",1)="SELECTING A PROVIDER ID TYPE WILL FORCE THE DISPLAY TO SKIP TO THE DATA FOR ",DIR("?")=" THAT PROVIDER ID TYPE" 109 107 S DIR("S")="I $D(^TMP(""IBPRV_INS_ID"",$J,""ZXPTYP"",+Y))" 110 108 W ! D ^DIR K DIR W ! … … 113 111 . S Z=$G(^TMP("IBPRV_INS_ID",$J,"ZXPTYP",+Y)) 114 112 . I Z S VALMBG=Z Q 115 . S DIR(0)="EA",DIR("A",1)="T his type of ID Qualifier does not exist in the current display",DIR("A")="Press the Enter key to continue"113 . S DIR(0)="EA",DIR("A",1)="THIS PROVIDER ID TYPE DOES NOT EXIST IN THE CURRENT DISPLAY",DIR("A")="PRESS THE ENTER KEY TO CONTINUE" 116 114 . W ! D ^DIR K DIR W ! 117 115 Q -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEP4.m
r628 r636 1 1 IBCEP4 ;ALB/TMP - EDI UTILITIES for provider ID ;29-SEP-00 2 ;;2.0;INTEGRATED BILLING;**137,320,348,349 ,377**;21-MAR-94;Build 232 ;;2.0;INTEGRATED BILLING;**137,320,348,349**;21-MAR-94;Build 46 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 10 10 EN1(IBINS) ; -- Entry point from provider number maintenence 11 11 N IBPRV,IBALL,IB95 12 S VALMBCK="R"13 12 D ENX 14 13 Q … … 18 17 K IBFASTXT 19 18 D FULL^VALM1 20 S DIR(0)="SA^1: Performing Provider Care Units;2:Billing Provider Care Units"21 S DIR("A")="Enter Type of Care Unit: ",DIR("B")=$P($P(DIR(0),":",2),";" ,1)19 S DIR(0)="SA^1:Care Units for Performing Provider IDs;2:Care Units for Billing Provider Secondary IDs" 20 S DIR("A")="Enter Type of Care Unit: ",DIR("B")=$P($P(DIR(0),":",2),";") 22 21 W ! D ^DIR K DIR W ! 23 22 I Y'>0 Q … … 66 65 .. D SET^VALM10(IBLCT,IBQ,IBENT) 67 66 ; 68 I 'IBLCT D SET^VALM10(1,"No CARE UNITs Found"_$S('$G(IBINS):"",1:" for Insurance Co")) S IBLCT=167 I 'IBLCT D SET^VALM10(1,"No CARE UNITs Found"_$S('$G(IBINS):"",1:" for Insurance Co")) 69 68 S VALMCNT=IBLCT,VALMBG=1 70 69 Q … … 78 77 ; 79 78 EXIT ; -- exit 79 K IBFASTXT 80 80 D CLEAN^VALM10 81 81 K ^TMP("IBPRV_CU",$J),IBINS,IBALL -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEP4A.m
r628 r636 1 1 IBCEP4A ;ALB/TMP - EDI UTILITIES for provider ID ;29-SEP-00 2 ;;2.0;INTEGRATED BILLING;**137,232,280,349 ,377**;21-MAR-94;Build 232 ;;2.0;INTEGRATED BILLING;**137,232,280,349**;21-MAR-94;Build 46 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 23 23 ; IB = 0 or null if called from list manager, 1 if not 24 24 N DIC,DIK,DIR,X,Y,Z,DA,DR,DIE,DO,DD,DLAYGO,IB95,IBOK,IBZ,IB0,IBEDIT,IBCK,IBDA,IBCHG,IBDELETE,Z100,DTOUT,DUOUT 25 I '$G(IB) D FULL^VALM1 S Y=$$SEL()26 I $G(IB)S DIC("A")="CARE UNIT NAME: ",DIC(0)="AEMQ",DIC("S")="I $P(^(0),U,3)=+$G(IBINS)",DIC="^IBA(355.95," W ! D ^DIC K DIC25 I '$G(IB) D FULL^VALM1 26 S DIC("A")="CARE UNIT NAME: ",DIC(0)="AEMQ",DIC("S")="I $P(^(0),U,3)=+$G(IBINS)",DIC="^IBA(355.95," W ! D ^DIC K DIC 27 27 I Y'>0 G CHGQ 28 28 S IB95("IBCU")=+Y,IBDELETE=0,IBDELETE(0)=$G(^IBA(355.95,0)),IBDELETE(1)=$G(^(1)) … … 30 30 W ! S DIR("A")="CARE UNIT NAME: ",DIR("B")=$P($G(^IBA(355.95,+IB95("IBCU"),0)),U),DIR(0)="355.95,.01AO",DIR("S")="I $P(^(0),U,3)=IBINS" D ^DIR K DIR 31 31 I $D(DTOUT)!$D(DUOUT) G CHGQ 32 I X="@" S DIR(0)="EA",DIR("A")="NOTHING DELETED - PRESS ENTER TO CONTINUE" D ^DIR K DIR G CHGQ 32 ; 33 ; Care unit name was deleted 34 I X="@" D G CHGQ 35 . S DIR("A",1)="THIS WILL DELETE THE CARE UNIT NAME AND ALL ITS COMBINATIONS",DIR("A")="ARE YOU SURE THIS IS WHAT YOU WANT TO DO?: ",DIR(0)="YA",DIR("B")="NO" D ^DIR K DIR 36 . I Y'=1 S IB95("IBCU")="" Q ; Changed their mind - don't delete 37 . S Z=0 F S Z=$O(^IBA(355.96,"B",IB95("IBCU"),Z)) Q:'Z S DIK="^IBA(355.96,",DA=Z D ^DIK 38 . S DA=IB95("IBCU"),DIK="^IBA(355.95," D ^DIK 39 . W ! S DIR(0)="EA",DIR("A",1)="CARE UNIT AND ALL ITS COMBINATIONS WERE DELETED",DIR("A")="PRESS ENTER TO CONTINUE " D ^DIR K DIR D BLD^IBCEP4 40 ; 33 41 I $P($G(^IBA(355.95,IB95("IBCU"),0)),U)'=Y S DIE="^IBA(355.95,",DR=".01///"_Y,DA=IB95("IBCU") D ^DIE ; File the name change 34 42 S DR=".02",DIE="^IBA(355.95,",DA=IB95("IBCU") D ^DIE … … 152 160 Q Y 153 161 ; 154 DELETE(IB) ; delete a care unit name155 ; IB = 0 or null if called from list manager, 1 if not156 N DIR,X,Y157 I '$G(IB) D FULL^VALM1 S Y=$$SEL() I Y'>0 G DELETEQ158 S:'$G(IB) IB95("IBCU")=+Y159 S DIR("A",1)="THIS WILL DELETE THE CARE UNIT NAME AND ALL ITS COMBINATIONS",DIR("A")="ARE YOU SURE THIS IS WHAT YOU WANT TO DO?: ",DIR(0)="YA",DIR("B")="NO" D ^DIR K DIR160 I Y'=1 S IB95("IBCU")="" Q ; Changed their mind - don't delete161 S Z=0 F S Z=$O(^IBA(355.96,"B",IB95("IBCU"),Z)) Q:'Z S DIK="^IBA(355.96,",DA=Z D ^DIK162 S DA=IB95("IBCU"),DIK="^IBA(355.95," D ^DIK163 W ! S DIR(0)="EA",DIR("A",1)="CARE UNIT AND ALL ITS COMBINATIONS WERE DELETED",DIR("A")="PRESS ENTER TO CONTINUE " D ^DIR K DIR D BLD^IBCEP4164 DELETEQ ;165 S:'$G(IB) VALMBCK="R"166 Q167 ;168 SEL() ; Select entry from list169 ; returns ien in file 355.95 for selected entry170 N VALMY,SEL171 D EN^VALM2($G(XQORNOD(0)),"S")172 S SEL=+$O(VALMY(""))173 I SEL'>0 Q 0174 Q +$G(^TMP("IBPRV_CU",$J,"ZIDX",SEL))175 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEP5.m
r628 r636 1 1 IBCEP5 ;ALB/TMP - EDI UTILITIES for provider ID ;29-SEP-00 2 ;;2.0;INTEGRATED BILLING;**137,232,320,348,349 ,377**;21-MAR-94;Build 232 ;;2.0;INTEGRATED BILLING;**137,232,320,348,349**;21-MAR-94;Build 46 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 140 140 ; 141 141 EXIT ; -- exit code 142 K IBFASTXT 142 143 D COPYPROV^IBCEP5A(IBINS) 143 144 K IBPRV -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEP6.m
r628 r636 1 1 IBCEP6 ;ALB/TMP - PROVIDER ID MAINT menu and INS CO EDIT hook ;11-02-00 2 ;;2.0;INTEGRATED BILLING;**137,232,320,377**;21-MAR-94;Build 23 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 2 ;;2.0;INTEGRATED BILLING;**137,232,320**;21-MAR-94 4 3 ; 5 EN ; -- main entry point 6 N IBRESP 4 EN ; -- main entry point for IBCE PRV INS PARAMS 7 5 D FULL^VALM1 8 F Q:'$$MENU(.IBRESP) D @IBRESP 9 ENQ ; 6 D EN^VALM("IBCE PRVMAINT") 7 ENQ Q 8 ; 9 HDR ; -- header code 10 K VALMHDR 11 Q 12 ; 13 INIT ; Initialization 14 N IBLCT,IBCT,Z,Z0 15 S (IBLCT,IBCT)=0,XQORM("B")="Select" 16 K ^TMP("IBCE_PRVMAINT_MENU",$J) 17 F Z=1:1:2 S Z0=$J("",10) D SET1(.IBLCT,Z0,1) 18 S Z0=$J("",17)_"-- PROVIDER ID EDITS --" D SET1(.IBLCT,Z0,1),CNTRL^VALM10(IBLCT,18,23,IORVON,IORVOFF) 19 S Z0=$J("",10)_"1 > PROVIDER SPECIFIC IDS" D SET1(.IBLCT,Z0,1) 20 S Z0=$J("",14)_"o PROVIDER'S OWN IDS" D SET1(.IBLCT,Z0,1) 21 S Z0=$J("",14)_"o PROVIDER IDS FURNISHED BY INSURANCE CO" D SET1(.IBLCT,Z0,1) 22 S Z0=$J("",10)_"2 > INSURANCE CO IDS" D SET1(.IBLCT,Z0,2) 23 ;S Z0=$J("",10)_"3 > FACILITY IDS" D SET1(.IBLCT,Z0,3) ;WCJ removed 24 S Z0=$J("",10)_"4 > CARE UNIT MAINTENANCE" D SET1(.IBLCT,Z0,4) 25 S Z0=$J("",14)_"o Care Units for Performing Provider IDs" D SET1(.IBLCT,Z0,1) 26 S Z0=$J("",14)_"o Care Units for Billing Provider Secondary IDs" D SET1(.IBLCT,Z0,1) 27 S Z0=$J("",10)_"5 > INS CO BATCH ID ENTRY" D SET1(.IBLCT,Z0,5) 28 F Z=1:1:2 S Z0=$J("",10) D SET1(.IBLCT,Z0,6) 29 S Z0=$J("",14)_"-- NON/OTHER VA ENTITY EDITS --" D SET1(.IBLCT,Z0,6),CNTRL^VALM10(IBLCT,15,31,IORVON,IORVOFF) 30 S Z0=$J("",10)_"6 > NON/OTHER VA PROVIDER ID INFORMATION" D SET1(.IBLCT,Z0,6) 31 K VALMBG,VALMCNT 32 S VALMBG=1,VALMCNT=IBLCT 33 Q 34 ; 35 SET1(IBLCT,Z0,IBCT) ; 36 S IBLCT=IBLCT+1 D SET^VALM10(IBLCT,Z0,$G(IBCT)) 37 Q 38 ; 39 EXPND ; 40 Q 41 ; 42 HELP ; 43 Q 44 ; 45 EXIT ; 46 K ^TMP("IBCE_PRVMAINT_MENU",$J) 47 D CLEAN^VALM10 48 Q 49 ; 50 SEL ; 51 N Z,Z1,DIR 52 D FULL^VALM1 53 D EN^VALM2($G(XQORNOD(0)),"OS") 54 S Z=+$O(VALMY(0)) 55 I Z,Z<6,'$D(^XUSEC("IB PROVIDER EDIT",DUZ)) S DIR(0)="EA",DIR("A",1)="YOU ARE NOT AUTHORIZED TO EDIT PROVIDER IDS",DIR("A")="Press ENTER to continue" W ! D ^DIR K DIR W ! G SELQ 56 I Z=3 D G SELQ 57 . S DIR(0)="EA",DIR("A",1)="This Action is no longer available",DIR("A")="Press ENTER to continue" 58 . D ^DIR K DIR 59 I Z S Z1=$P($T(ACT+Z),U,2,3) I Z1'="" D @Z1 60 SELQ K VALMBCK,XQORM("B") 61 S VALMBCK="R",XQORM("B")="Quit" 10 62 Q 11 63 ; 12 64 EN1 ; Provider maintenance from the billing screen 8 13 65 N DIR,X,Y,IBEDIT 66 ;S IBEDIT=1 14 67 W ! 68 ;S DIR(0)="YA",DIR("B")="NO",DIR("A",1)="WANT TO ATTEMPT TO RESET ALL PROVIDER IDS TO THE CALCULATED",DIR("A")="DEFAULTS FOR THIS BILL?: " D ^DIR K DIR 69 ;Q:$D(DTOUT)!$D(DUOUT) 70 ;I Y=1 S IBEDIT=0 D RECALCA^IBCEP2A(IBIFN) W ! 71 ; 15 72 I '$D(^XUSEC("IB PROVIDER EDIT",DUZ)) S DIR(0)="EA",DIR("A")="Press ENTER to continue: ",DIR("A",1)="YOU LACK THE SECURITY KEY FOR THIS ACTION" D ^DIR K DIR Q 73 ;I 'IBEDIT D 74 ;. S DIR(0)="YA",DIR("A")="WANT TO CONTINUE WITH GENERAL PROVIDER ID MAINTENANCE?: ",DIR("B")="NO" D ^DIR K DIR 75 ;. I $D(DTOUT)!$D(DUOUT)!'Y Q 76 ;. S IBEDIT=1 16 77 D EN 17 78 Q 18 79 ; 19 PO ; provider's own IDs 20 N IBPRV,IBINS 21 N IBSLEV,DIR,Y,X,IBPRMPT,IBNVAFL,IBIF 22 K IBFASTXT 23 S IBIF="" 24 S IBPRMPT="PROVIDER" 25 D FULL^VALM1 26 S IBSLEV=1 27 D EN^VALM("IBCE PRVPRV MAINT") 28 POX ; 29 Q 80 ACT ; Actions available 81 ;;PROVIDER LEVEL ID EDIT^EN^IBCEP5 82 ;;INS CO LEVEL ID EDIT^EN^IBCEP0 83 ;; 84 ;;CARE UNIT EDIT^EN^IBCEP4 85 ;;BATCH ID ENTRY BY INS CO^EN^IBCEP9 86 ;;NON-VA PROVIDER EDIT^EN^IBCEP8 30 87 ; 31 PI ; provider's IDs provided by an insurance company32 N IBPRV,IBINS33 N IBSLEV,DIR,Y,X,IBPRMPT,IBNVAFL,IBIF34 K IBFASTXT35 S IBIF=""36 S IBPRMPT="PROVIDER"37 D FULL^VALM138 S IBSLEV=239 D EN^VALM("IBCE PRVPRV MAINT")40 PIX ;41 Q42 88 ; 43 BI ; Insurance company batch ID entry44 D EN^IBCEP945 BIX ;46 Q47 89 ; 48 II ; Insurance company IDs 49 D EN^IBCEP0 50 IIX ; 51 Q 52 ; 53 CP ; Care Unit maintenance - performing providers 54 N IBINS,IBALL,IB95 55 N IBSLEV,DIR,Y 56 K IBFASTXT 57 D FULL^VALM1 58 S IBSLEV=1 59 D EN^VALM("IBCE PRVCARE UNIT MAINT") 60 CPX ; 61 Q 62 ; 63 CB ; Care Unit maintenance - billing provider 64 N IBINS,IBALL,IB95 65 N IBSLEV,DIR,Y 66 K IBFASTXT 67 D FULL^VALM1 68 S IBSLEV=2 69 D EN^VALM("IBCE 2ND PRVID CARE UNIT MAINT") 70 CBX ; 71 Q 72 ; 73 NP ; non-VA individual provider information 74 N IBNVPMIF 75 S IBNVPMIF="I" 76 D EN^IBCEP8 77 NPX ; 78 Q 79 ; 80 NF ; non-VA facility provider information 81 N IBNVPMIF 82 S IBNVPMIF="F" 83 D EN^IBCEP8 84 NFX ; 85 Q 86 ; 87 MENU(IBSEL) ; display main provider ID maintenance menu and receive response from user 88 ; function value returns 0 if user exits from menu or "^" out 89 ; function value returns 1 otherwise 90 ; IBSEL is the internal value of the user's selection if any (pass by reference) 91 N IBQ,DIR,X,Y,DTOUT,DUOUT,DIRUT,DIROUT,C,Z 92 N IORESET,IORVON,IORVOFF,IOUON,IOUOFF,IOINHI,IOINLOW,IOINORM 93 S IBQ=1,IBSEL="" 94 S X="IORESET;IORVON;IORVOFF;IOUON;IOUOFF;IOINHI;IOINLOW;IOINORM" 95 D ENDR^%ZISS 96 ; 97 S $P(DIR(0),U,1)="SOA" 98 S $P(Z,";",1)="PO:Provider Own IDs" 99 S $P(Z,";",2)="PI:Provider Insurance IDs" 100 S $P(Z,";",3)="BI:Batch ID Entry" 101 S $P(Z,";",4)="II:Insurance Co IDs" 102 S $P(Z,";",5)="CP:Care Units for Providers" 103 S $P(Z,";",6)="CB:Care Units for Billing Provider" 104 S $P(Z,";",7)="NP:Non-VA Provider" 105 S $P(Z,";",8)="NF:Non-VA Facility" 106 ; 107 S $P(DIR(0),U,2)=Z 108 ; 109 S DIR("L",1)=" "_IOINHI_"Provider IDs"_IOINORM 110 S DIR("L",2)=" "_$P($P(Z,";",1),":",1)_" "_$P($P(Z,";",1),":",2) 111 S DIR("L",3)=" "_$P($P(Z,";",2),":",1)_" "_$P($P(Z,";",2),":",2) 112 S DIR("L",4)="" 113 S DIR("L",5)=" "_IOINHI_"Insurance IDs"_IOINORM 114 S DIR("L",6)=" "_$P($P(Z,";",3),":",1)_" "_$P($P(Z,";",3),":",2) 115 S DIR("L",7)=" "_$P($P(Z,";",4),":",1)_" "_$P($P(Z,";",4),":",2) 116 S DIR("L",8)="" 117 S DIR("L",9)=" "_IOINHI_"Care Units"_IOINORM 118 S DIR("L",10)=" "_$P($P(Z,";",5),":",1)_" "_$P($P(Z,";",5),":",2) 119 S DIR("L",11)=" "_$P($P(Z,";",6),":",1)_" "_$P($P(Z,";",6),":",2) 120 S DIR("L",12)="" 121 S DIR("L",13)=" "_IOINHI_"Non-VA Items"_IOINORM 122 S DIR("L",14)=" "_$P($P(Z,";",7),":",1)_" "_$P($P(Z,";",7),":",2) 123 S DIR("L")=" "_$P($P(Z,";",8),":",1)_" "_$P($P(Z,";",8),":",2) 124 ; 125 S DIR("?")="^D MENH^IBCEP6" 126 S DIR("A")=" Select Provider ID Maintenance Option: " 127 ; 128 ; paint the screen and display menu first time in 129 D MENH 130 W ! 131 S C=0 F S C=$O(DIR("L",C)) Q:'C W !,DIR("L",C) 132 W !,DIR("L"),! 133 D ^DIR K DIR W ! 134 I $D(DIRUT) S IBQ=0 G MENUX 135 S IBSEL=Y 136 I IBSEL="" S IBQ=0 137 MENUX ; 138 Q IBQ 139 ; 140 MENH ; menu help 141 W @IOF,!?4,"Provider ID Maintenance Main Menu" 142 W !!?4,"Enter a code from the list." 143 MENHX ; 144 Q 145 ; 90 ;;SITE LEVEL ID EDIT^EN^IBCEP7 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEP8.m
r628 r636 1 1 IBCEP8 ;ALB/TMP - Functions for NON-VA PROVIDER ;11-07-00 2 ;;2.0;INTEGRATED BILLING;**51,137,232,288,320,343,374,377**;21-MAR-94;Build 23 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 2 ;;2.0;INTEGRATED BILLING;**51,137,232,288,320,343,374**;21-MAR-94;Build 16 4 3 ; 5 4 EN ; -- main entry point … … 17 16 N DIC,DA,X,Y,DLAYGO,IBIF,DIR,DTOUT,DUOUT 18 17 K ^TMP("IBCE_PRVNVA_MAINT",$J) 19 ;20 ; if coming in from main routine ^IBCEP6 this special variable IBNVPMIF is set already21 I $G(IBNVPMIF)'="" S IBIF=IBNVPMIF G INIT122 ;23 18 S DIR("A")="(I)NDIVIDUAL OR (F)ACILITY?: ",DIR(0)="SA^I:INDIVIDUAL;F:FACILITY" D ^DIR K DIR 24 19 I $D(DUOUT)!$D(DTOUT) S VALMQUIT=1 G INITQ 25 20 S IBIF=Y 26 ;27 INIT1 ;28 21 ; 29 22 I IBIF="F" D … … 33 26 . I Y S VALM("PROTOCOL")=+Y_";ORD(101," 34 27 ; 35 S DIC="^IBA(355.93,",DIC("DR")=".02/// "_$S(IBIF'="F":2,1:1)28 S DIC="^IBA(355.93,",DIC("DR")=".02////"_$S(IBIF'="F":2,1:1) 36 29 S DIC("S")="I $P(^(0),U,2)="_$S(IBIF'="F":2,1:1) 37 30 S DLAYGO=355.93,DIC(0)="AELMQ",DIC("A")="Select a NON"_$S(IBIF="I":"-",1:"/OTHER ")_"VA PROVIDER: " … … 140 133 Q 141 134 ; 142 EDITID(IBNPRV,IBSLEV) ; Link from this list template to maintain provider-specific ids 143 ; This entry point is called by 4 action protocols. 144 ; IBNPRV = ien of entry in file 355.93 (can be either an individual or a facility) (required) 145 ; IBSLEV = 1 for facility/provider own ID's 146 ; IBSLEV = 2 for facility/provider ID's furnished by an insurance company 147 ; 148 Q:'$G(IBNPRV) 149 Q:'$G(IBSLEV) 150 N IBPRV,IBIF 151 D FULL^VALM1 ; set full scrolling region 152 D CLEAR^VALM1 ; clear screen 135 EDITID(IBNPRV) ; Link from this list template to maintain provider-specific ids 136 ; IBNPRV = ien of entry in file 355.93 137 N IBPRV 138 D FULL^VALM1 139 D CLEAR^VALM1 153 140 S IBPRV=IBNPRV 154 ; 155 K IBFASTXT 156 S IBIF=$$GET1^DIQ(355.93,IBPRV,.02,"I") ; 1=facility/group 2=individual 157 D EN^VALM("IBCE PRVPRV MAINT") 158 ; 141 D EN1^IBCEP5 159 142 K VALMQUIT 160 S VALMBCK= $S($G(IBFASTXT)'="":"Q",1:"R")143 S VALMBCK="R" 161 144 Q 162 145 ; 163 146 NVAFAC ; Enter/edit Non-VA facility information 164 ; This entry point is called by the menu system for option IBCE PRVNVA FAC EDIT165 147 N X,Y,DA,DIC,IBNPRV,DLAYGO 166 S DIC="^IBA(355.93,",DIC("S")="I $P(^(0),U,2)=1",DIC("DR")=".02/// 1"148 S DIC="^IBA(355.93,",DIC("S")="I $P(^(0),U,2)=1",DIC("DR")=".02////1" 167 149 S DLAYGO=355.93,DIC(0)="AELMQ",DIC("A")="Select a NON/Other VA FACILITY: " 168 150 D ^DIC K DIC,DLAYGO -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEP82.m
r628 r636 1 1 IBCEP82 ;ALB/CLT, Special cross references and data entry for fields in file 355.93 ; 14 Apr 2006 9:41 AM 2 ;;2.0;INTEGRATED BILLING;**343,374,377**;21-MAR-94;Build 23 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 2 ;;2.0;INTEGRATED BILLING;**343,374**;21-MAR-94;Build 16 4 3 ; 5 4 ; Call at tags only … … 25 24 I X="@" G:IBOLDNPI'="" DEL W *7,"??" G EN1 26 25 I $G(DUOUT)!$G(DTOUT)!(X="")!(Y=IBOLDNPI) G XIT 27 I '$$PROC(Y,IBOLDNPI,IBIEN) G EN1 28 G XIT 29 ; 30 EN2(DA,INDENT) ; entry point from input templates IB SCREEN82 and IB SCREEN8H 31 N DTOUT,DUOUT,DIR,DIE,DIC,DR,X,Y 32 N IBIEN,IBNPI,IBCHECK,IBOLDNPI,IBRBNPI,IBRB,SPACES 33 S IBIEN=DA,IBOLDNPI="",SPACES=" " 34 EN21 ; 35 K DIR 36 S DIR(0)="FO^10:10",DIR("A")=$E(SPACES,1,INDENT)_"NPI",DIR("?")=$E(SPACES,1,INDENT)_"Enter a 10 digit National Provider Identifier" 37 I $G(DA) S:$P($G(^IBA(355.93,DA,0)),U,14)'="" (DIR("B"),IBOLDNPI)=$P($G(^IBA(355.93,DA,0)),U,14) 38 D ^DIR S IBCHECK=0 39 I X="@" G:IBOLDNPI'="" DEL W *7,"??" G EN21 40 I $G(DUOUT)!$G(DTOUT)!(X="")!(Y=IBOLDNPI) G XIT 41 I '$$PROC(Y,IBOLDNPI,IBIEN) G EN21 42 G XIT 43 ; 44 PROC(IBNPI,IBOLDNPI,IBIEN) ; process new NPI 45 I '$$CHKDGT^XUSNPI(IBNPI) W !,*7,$E($G(SPACES),1,+$G(INDENT))_"Not a valid NPI. Please try again.",! Q 0 46 I $$NPIUSED^IBCEP81(IBNPI) Q 0 26 S IBNPI=Y 27 I '$$CHKDGT^XUSNPI(IBNPI) W !,*7,"Not a valid NPI. Please try again.",! G EN1 28 I $$NPIUSED^IBCEP81(IBNPI) G EN1 47 29 S IBCHECK=1 48 30 I IBOLDNPI="" D ACTI 49 31 I IBOLDNPI'="" D:IBNPI'=IBOLDNPI INACT 50 32 S $P(^IBA(355.93,IBIEN,0),U,14)=IBNPI,^IBA(355.93,"NPI",IBNPI,IBIEN)="",^IBA(355.93,"NPIHISTORY",IBNPI,IBIEN)="" 51 Q 133 G XIT 52 34 ; 53 35 ACTI ;CREATE AN ACTIVATED ENTRY IN MULTIPLE NPISTATUS FIELD -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEPA.m
r628 r636 1 1 IBCEPA ;ALB/WCJ - Provider ID functions - Care Units ;21-OCT-2005 2 ;;2.0;INTEGRATED BILLING;**320,348,377**;21-MAR-94;Build 23 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 ; 2 ;;2.0;INTEGRATED BILLING;**320,348**;21-MAR-94;Build 5 5 3 EN ; -- main entry point for IBCE 2ND PRVID CARE UNIT MAINT 6 4 D EN^VALM("IBCE 2ND PRVID CARE UNIT MAINT") … … 27 25 D CLEAN^VALM10 28 26 K ^TMP("IBPRV_CU",$J) 29 N TAR,MSG,I,D0,IB CT,Z,DIV,SCREEN27 N TAR,MSG,I,D0,IBLCT,Z,DIV,SCREEN 30 28 ; 31 29 S VALMBG=1 … … 51 49 ... S IN=^TMP("IBPRV_CU",$J,"SORT",DIV,D0) 52 50 ... S Z=$J("",2) 53 ... S Z=Z_$E( IN_" ",1,4)_$E(TAR("DILIST","ID",IN,.01),1,36)51 ... S Z=Z_$E(TAR("DILIST","ID",IN,.01),1,36) 54 52 ... S Z=Z_$J("",40-$L(Z)) 55 53 ... S Z=Z_$E(TAR("DILIST","ID",IN,.02),1,38) 56 54 ... S IBCT=IBCT+1 57 55 ... D SET^VALM10(IBCT,Z) 58 ;59 ; correct the VALMCNT variable - number of lines in the list (not entries)60 S VALMCNT=+$O(@VALMAR@(""),-1)61 56 Q 62 57 ; … … 67 62 EXIT ; -- exit code 68 63 D CLEAN^VALM10 69 K ^TMP("IBPRV_CU",$J)70 64 Q 71 65 ; … … 76 70 ; Assumes IBINS is defined as ins co ien (file 36) 77 71 ; IB = 0 or null if called from list manager, 1 if not 78 N DIC,DIR,X,Y,Z,D ,DA,DR,DIE,DO,DD,DLAYGO,IB95,IBADD,IBOK,IBDIV,MAIN,IBDIVNM72 N DIC,DIR,X,Y,Z,DA,DR,DIE,DO,DD,DLAYGO,IB95,IBADD,IBOK,IBDIV,MAIN,IBDIVNM 79 73 ; 80 74 D FULL^VALM1 … … 85 79 S MAIN=$$EXTERNAL^DILFD(355.92,.05,"",MAIN) 86 80 S DIC=40.8,DIC("A")="Enter the Division for this Care Unit: ",DIC("B")=MAIN,DIC(0)="AEMQ" 87 S D="B^C" 88 D MIX^DIC1 81 D ^DIC 89 82 I Y'>0 G NEWQ 90 83 S IBDIV=+Y … … 153 146 CHANGE ; Edit care unit 154 147 ; Assumes IBINS is defined as ins co ien (file 36) 155 ; 148 ; 156 149 D FULL^VALM1 157 150 ; 158 N X,Y,Z,D ,DA,DD,DIC,DIK,DIR,IBDIV,CAREUNIT,SCREEN,TAR,DIVISION,I151 N X,Y,Z,DA,DD,DIC,DIK,DIR,IBDIV,CAREUNIT,SCREEN,TAR,DIVISION 159 152 ; 160 153 S SCREEN="I $P(^(0),U,3)=+$G(IBINS),$P(^(0),U,4)]""""" … … 173 166 S DIC(0)="AEMQ" 174 167 S DIC("S")="I $D(DIVISION($P(^(0),U)))" 175 S D="B^C" 176 D MIX^DIC1 168 D ^DIC 177 169 I Y'>0 G CHANGEQ 178 170 S IBDIV=+Y 179 S DA=$$SEL($P(Y,U,2)) I 'DA G CHANGEQ 180 S DIE=355.95 171 ; 172 S DIC("A")="Enter the Care Unit name: " 173 S DIC=355.95,DIC("S")="I $P(^(0),U,3)=+$G(IBINS),$P(^(0),U,4)=+$G(IBDIV)",DIC(0)="AEMQ" 174 D ^DIC 175 I Y<1 G CHANGEQ 176 ; 177 S DA=+Y,DIE=355.95 181 178 S DR=".01Care Unit;.04Division;.02Description" 182 179 D ^DIE … … 191 188 ; 192 189 D FULL^VALM1 193 N X,Y,Z,D ,DA,DD,DIC,DIK,DIR,IBDIV,CAREUNIT,SCREEN,TAR,DIVISION190 N X,Y,Z,DA,DD,DIC,DIK,DIR,IBDIV,CAREUNIT,SCREEN,TAR,DIVISION 194 191 ; 195 192 S SCREEN="I $P(^(0),U,3)=+$G(IBINS),$P(^(0),U,4)]""""" … … 208 205 S DIC(0)="AEMQ" 209 206 S DIC("S")="I $D(DIVISION($P(^(0),U)))" 210 S D="B^C" 211 D MIX^DIC1 207 D ^DIC 212 208 I Y'>0 G DELQ 213 209 S IBDIV=+Y 214 S CAREUNIT=$$SEL($P(Y,U,2)) I 'CAREUNIT G DELQ 210 ; 211 K DIC 212 S DIC("A")="Enter the Care Unit name: " 213 S DIC=355.95,DIC("S")="I $P(^(0),U,3)=+$G(IBINS),$P(^(0),U,4)=+$G(IBDIV)",DIC(0)="AEMQ" 214 D ^DIC 215 I Y<1 G DELQ 216 S CAREUNIT=+Y 215 217 ; 216 218 I $D(^IBA(355.92,"AC",+Y)) D G DELQ … … 244 246 Q 245 247 ; 246 SEL(DIV) ; select care unit for a given division247 ; DIV - name of division248 ; returns ien of selected care unit, or 0 if nothing is selected249 N DIR,I,IEN,MIN,MAX,X,Y250 I $G(DIV)="" Q 0251 S IEN=0252 S I=$O(^TMP("IBPRV_CU",$J,"SORT",DIV,"")),MIN=$G(^TMP("IBPRV_CU",$J,"SORT",DIV,I))253 S I=$O(^TMP("IBPRV_CU",$J,"SORT",DIV,""),-1),MAX=$G(^TMP("IBPRV_CU",$J,"SORT",DIV,I))254 I MIN=MAX S IEN=I255 I MIN'=MAX D256 .S DIR("A")="Select CARE UNITS",DIR(0)="N^"_MIN_":"_MAX_":0" D ^DIR257 .Q:$D(DTOUT)!$D(DUOUT)258 .S I="" F S I=$O(^TMP("IBPRV_CU",$J,"SORT",DIV,I)) Q:I=""!(IEN>0) S:$G(^TMP("IBPRV_CU",$J,"SORT",DIV,I))=Y IEN=I259 .Q260 Q IEN -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCERP3.m
r628 r636 1 1 IBCERP3 ;ALB/TMP - EDI BATCHES WAITING MORE THAN 1 DAY REPORT ;30-SEP-96 2 ;;2.0;INTEGRATED BILLING;**137,296,377**;21-MAR-94;Build 23 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 ; 2 ;;2.0;INTEGRATED BILLING;**137,296**;21-MAR-94 5 3 Q 6 4 ; 7 PENDING ; Report of batches not sent after the day the bills in it were extracted - report entry point 8 ; 9 NEW DIR,X,Y,DTOUT,DUOUT,DIRUT,DIROUT,IBCLM 10 I '$O(^IBA(364.1,"ASTAT","P",0)) W !!,"There are no batches that are Pending Austin Receipt.",! S DIR(0)="E" D ^DIR K DIR G EX 11 ; 12 ; Ask user if they want to include claim level detail 13 S DIR(0)="Y",DIR("A")="Include Claims in each Batch",DIR("B")="Yes" 14 W ! D ^DIR K DIR 15 I $D(DIRUT) G EX 16 S IBCLM=+Y 17 ; 18 D DEVICE 19 EX ; 20 Q 21 ; 22 DEVICE ; selection of device on which to print report 23 NEW ZTRTN,ZTDESC,ZTSAVE,POP 24 W !!,"This report is 80 characters wide." 25 S ZTRTN="COMPILE^IBCERP3" 26 S ZTDESC="REPORT OF BILL BATCHES WAITING AUSTIN RECEIPT AFTER 1 DAY" 27 S ZTSAVE("IBCLM")="" 28 D EN^XUTMDEVQ(ZTRTN,ZTDESC,.ZTSAVE,"QM") 29 DEVICEX ; 30 Q 31 ; 32 COMPILE ; Queued job entrypoint 33 N IBBA,IB0,IB1,IEN,IBZ,IBIFN,IB399,CLM,BALDUE,IBSTAT,ARSTAT,IB 5 PENDING ;Report of batches not sent after the day the bills in it were extracted 6 W ! 7 S %ZIS="QM" D ^%ZIS Q:POP 8 I $D(IO("Q")) K IO("Q") S ZTRTN="EN^IBCERP3",ZTDESC="REPORT OF BILL BATCHES WAITING AUSTIN RECEIPT AFTER 1 DAY" D ^%ZTLOAD K ZTSK D HOME^%ZIS Q 9 U IO 10 EN ; Queued job entrypoint 11 N IBPAGE,IBHDRDT,IBLINE,IBSTOP,IBBA,IBBAT,IBCT,IBTYP,IBTYPN,IBV,DIR,Y,IB0,IB1 34 12 ; 35 13 K ^TMP($J,"IBSORT") 36 S IBBA=0 37 F S IBBA=$O(^IBA(364.1,"ASTAT","P",IBBA)) Q:'IBBA D 38 . I $$BCHCHK^IBCEBUL(IBBA) Q ; Batch check function 39 . S IB0=$G(^IBA(364.1,IBBA,0)),IB1=$G(^(1)) 40 . S:$P(IB0,U,7)="" $P(IB0,U,7)="~" 41 . S ^TMP($J,"IBSORT",$P(IB0,U,7),$P(IB0,U,1),IBBA)=$P(IB1,U,6)_U_$P(IB0,U,4) 42 . ; 43 . I 'IBCLM Q ; include claim data flag 44 . ; 45 . ; gather the EDI claim data for this batch 46 . S IEN=0 F S IEN=$O(^IBA(364,"C",IBBA,IEN)) Q:'IEN D 47 .. S IBZ=$G(^IBA(364,IEN,0)),IBIFN=+IBZ,IB399=$G(^DGCR(399,IBIFN,0)) 48 .. S CLM=$P(IB399,U,1) S:CLM="" CLM="~" 49 .. S BALDUE=$G(^DGCR(399,IBIFN,"U1")),BALDUE=$P(BALDUE,U,1)-$P(BALDUE,U,2) 50 .. S IBSTAT=$$EXTERNAL^DILFD(399,.13,,$P(IB399,U,13)) 51 .. S ARSTAT=$$EXTERNAL^DILFD(430,8,,+$P($$BILL^RCJIBFN2(IBIFN),U,2)) 52 .. S IB=$P(IBZ,U,8)_U_BALDUE_U_$P(IBZ,U,3)_U_IBSTAT_U_ARSTAT 53 .. S ^TMP($J,"IBSORT",$P(IB0,U,7),$P(IB0,U,1),IBBA,CLM,IEN)=IB 54 .. Q 55 . Q 14 S (IBPAGE,IBBA)=0 56 15 ; 57 D PRINT ; print report 58 D ^%ZISC ; close the device 59 K ^TMP($J,"IBSORT") ; clean up scratch global 60 I $D(ZTQUEUED) S ZTREQ="@" ; purge the task record 16 ; esg - 5/12/05 - IB*2*296 - Additional check to make sure there are 17 ; bills in the batch in file 364 before including it. Similar to 18 ; existing functionality in routine ^IBCEBUL. 61 19 ; 62 COMPX ; 63 Q 20 F S IBBA=$O(^IBA(364.1,"ASTAT","P",IBBA)) Q:'IBBA S IB0=$G(^IBA(364.1,IBBA,0)),IB1=$G(^(1)) I DT-($P(IB1,U,6)\1)'<1,$P(IB0,U,7)'="",$O(^IBA(364,"C",IBBA,0)) S ^TMP($J,"IBSORT",$P(IB0,U,7),$P(IB0,U),IBBA)=$P(IB1,U,6)_U_$P(IB0,U,4) 64 21 ; 65 PRINT ; print the report to the specified device 66 ; 67 NEW CRT,IBPAGE,IBSTOP,IBCT,IBTYP,IBBAT,IBBA,IBV,CLM,IEN,DIR,X,Y,Z 68 I IOST["C-" S CRT=1 69 E S CRT=0 70 ; 71 S IBPAGE=0 72 I '$D(^TMP($J,"IBSORT")) D HDR1 W !,?3,"No batches found Pending Austin Receipt for >1 day." 22 W:$E(IOST,1,2)["C-" @IOF ;Only initial form feed for print to screen 23 I '$D(^TMP($J,"IBSORT")) D HDR1("") W !,?3,"No data found for this report" 73 24 S (IBSTOP,IBCT)=0 74 25 ; 75 26 S IBTYP="" 76 F S IBTYP=$O(^TMP($J,"IBSORT",IBTYP)) Q:IBTYP="" D Q:IBSTOP 77 . D HDR1 27 F S IBTYP=$O(^TMP($J,"IBSORT",IBTYP)) Q:IBTYP="" D G:IBSTOP STOP 28 . S IBTYPN=$$EXPAND^IBTRE(364.1,.07,IBTYP) 29 . D HDR1(IBTYPN) 78 30 . S IBBAT="" 79 . F S IBBAT=$O(^TMP($J,"IBSORT",IBTYP,IBBAT)) Q:'IBBAT!(IBSTOP) S IBBA=0 F S IBBA=$O(^TMP($J,"IBSORT",IBTYP,IBBAT,IBBA)) Q:'IBBA!IBSTOP S IBV=$G(^(IBBA)) D Q:IBSTOP 80 .. D:$Y>(IOSL-4) HDR1 Q:IBSTOP 81 .. W !,?2,IBBAT,?16,$$FMTE^XLFDT($P(IBV,U,1),"5Z"),?42,$P(IBV,U,2) 82 .. S IBCT=IBCT+1 83 .. I 'IBCLM Q ; no claim level detail 84 .. I $O(^TMP($J,"IBSORT",IBTYP,IBBAT,IBBA,""))="" Q ; no claim data 85 .. ; 86 .. D:$Y>(IOSL-4) HDR1 Q:IBSTOP 87 .. W !!?5,"Claim",?14,"Seq",?22,"Bal Due",?32,"EDI Stat",?43,"IB Status",?57,"AR Status" 88 .. S CLM="" F S CLM=$O(^TMP($J,"IBSORT",IBTYP,IBBAT,IBBA,CLM)) Q:CLM=""!IBSTOP S IEN=0 F S IEN=$O(^TMP($J,"IBSORT",IBTYP,IBBAT,IBBA,CLM,IEN)) Q:'IEN!IBSTOP D Q:IBSTOP 89 ... S IBV=$G(^TMP($J,"IBSORT",IBTYP,IBBAT,IBBA,CLM,IEN)) 90 ... D:$Y>(IOSL-4) HDR1 Q:IBSTOP 91 ... W !,?5,CLM,?15,$P(IBV,U,1),?19,$J($FN($P(IBV,U,2),"",2),10),?35,$P(IBV,U,3),?43,$E($P(IBV,U,4),1,11),?57,$E($P(IBV,U,5),1,16) 92 ... Q 93 .. ; 94 .. Q:IBSTOP 95 .. D:$Y>(IOSL-4) HDR1 Q:IBSTOP 96 .. W ! 97 .. Q 98 . Q 31 . F S IBBAT=$O(^TMP($J,"IBSORT",IBTYP,IBBAT)) Q:'IBBAT!(IBSTOP) S IBBA=0 F S IBBA=$O(^TMP($J,"IBSORT",IBTYP,IBBAT,IBBA)) Q:'IBBA S IBV=$G(^(IBBA)) D Q:IBSTOP 32 .. D:IBLINE>(IOSL-5) HDR1(IBTYPN) Q:IBSTOP 33 .. W !,?6,IBBAT,?20,$$FMTE^XLFDT($P(IBV,U),1),?46,$P(IBV,U,2) 34 .. S IBCT=IBCT+1,IBLINE=IBLINE+1 99 35 ; 100 I IBSTOP G PRINTX 101 D:$Y>(IOSL-4) HDR1 G:IBSTOP PRINTX 102 W !!,"Total Number of Batches: ",IBCT 103 D:$Y>(IOSL-4) HDR1 G:IBSTOP PRINTX 104 W !!?5,"*** End of Report ***" 105 I CRT,'$D(ZTQUEUED) S DIR(0)="E" D ^DIR K DIR 106 PRINTX ; 36 W !!,"TOTAL # OF BATCHES: ",IBCT 37 ; 38 I $E(IOST,1,2)["C-" K DIR S DIR(0)="E" D ^DIR K DIR 39 STOP I '$D(ZTQUEUED) D ^%ZISC 40 I $D(ZTQUEUED) S ZTREQ="@" 41 K ^TMP($J,"IBSORT") 107 42 Q 108 43 ; 109 HDR1 ; Report header 110 ; 111 ; if screen output and page# already exists, do a page break 112 I IBPAGE,CRT D I IBSTOP G HDR1X 113 . S DIR(0)="E" D ^DIR K DIR 114 . I 'Y S IBSTOP=1 115 . Q 116 ; 117 ; if screen output OR page# already exists, do a form feed 118 I IBPAGE!CRT W @IOF 119 ; 44 HDR1(IB) ; Report header 45 ; IB = the text for the type of batch 46 N Z,DIR,Y 47 I 'IBPAGE S IBHDRDT=$$HTE^XLFDT($H,2) 48 I IBPAGE D Q:IBSTOP 49 . I $E(IOST,1,2)["C-" K DIR S DIR(0)="E" D ^DIR K DIR S IBSTOP=('Y) Q:IBSTOP 50 . W @IOF 120 51 S IBPAGE=IBPAGE+1 121 ; 122 W !,"EDI Batches Pending Austin Receipt After 1 Day",?70,"Page: ",IBPAGE 123 W !,"Run Date: ",$$FMTE^XLFDT($$NOW^XLFDT,"5Z") 124 W !!?2,"Batch #",?16,"Transmission Date",?42,"Mail Message #" 125 S Z="",$P(Z,"-",79)="" W !?1,Z 126 ; 127 ; check for a TaskManager stop request 128 I $D(ZTQUEUED),$$S^%ZTLOAD() D G HDR1X 129 . S (ZTSTOP,IBSTOP)=1 130 . W !!!?5,"*** Report Halted by TaskManager Request ***" 131 . Q 132 HDR1X ; 52 W !,?14,"REPORT OF BATCHES STILL WAITING AUSTIN RECEIPT AFTER 1 DAY",?70,"PAGE: ",IBPAGE,!,?((68-$L(IB))\2),"BATCH TYPE: "_IB 53 W !,?26,"RUN DATE: ",IBHDRDT,! 54 W !,?6,"BATCH #",?20,"WAITING SINCE",?46,"MAIL MESSAGE #",! 55 S Z="",$P(Z,"-",76)="" W ?2,Z,! 56 S IBLINE=6 133 57 Q 134 58 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEST.m
r628 r636 1 1 IBCEST ;ALB/TMP - 837 EDI STATUS MESSAGE PROCESSING ;17-APR-96 2 ;;2.0;INTEGRATED BILLING;**137,189,197,135,283,320,368**;21-MAR-94;Build 21 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 2 ;;2.0;INTEGRATED BILLING;**137,189,197,135,283,320**;21-MAR-94 4 3 ; IA 4042 for call to AUDITX^PRCAUDT 5 4 Q … … 63 62 ; 1 = single bill 0 = batch 64 63 ; 65 N DA,DIK,DIE,DIC,X,Y,DR,DO,DD,DLAYGO,Z,Z0,Z1, Z2,Z3,IBT,IBDUP,IBFLDS,IBY,IBAUTO,IBLN64 N DA,DIK,DIE,DIC,X,Y,DR,DO,DD,DLAYGO,Z,Z0,Z1,IBT,IBDUP,IBFLDS,IBY,IBAUTO 66 65 ; 67 66 S X=IBBILL,IBDUP=0 … … 113 112 . D BLDMSG(IB1,IBTDA,.IBT,.IBAUTO) 114 113 . ; 115 . ; IB*2*368 - ymg - 2Q,RE,RP messages will be filed as informational 116 . ; Z0 is the flag for 2Q code 117 . ; Z1 is the flag for RE code 118 . ; Z2 is the flag for RP code 119 . ; Z3 is the flag for autofiling the message 120 . I $P($G(^IBM(361,+IBY,0)),U,3)="R" D 121 .. S Z="",(Z0,Z1,Z2,Z3)=0 F S Z=$O(IBT(Z)) Q:Z=""!(Z3=1) D 122 ... S IBLN=$$UP^XLFSTR($G(IBT(Z))) 123 ... I (Z0!Z1!Z2)=0 D 124 .... S:IBLN?.E1"CODE:".P1"2Q".E Z0=1 125 .... S:IBLN?.E1"CODE:".P1"RE".E Z1=1 126 .... S:IBLN?.E1"CODE:".P1"RP".E Z2=1 127 ... I Z0=1 S:IBLN?.P1"CLAIM".P1"REJECTED".P1"BY".P1"CLEARINGHOUSE".E Z3=1 128 ... I Z1=1 S:IBLN?.P1"ELECTRONIC".P1"CLAIM".P1"REJECTED".P1"BY".P1"EMDEON".E Z3=1 129 ... I Z2=1 S:IBLN?.P1"PAPER".P1"CLAIM".P1"REJECTED".P1"BY".P1"EMDEON".E Z3=1 130 .. I Z3=1 S IBAUTO=1,DIE=361,DA=+IBY,DR=".03////I" D ^DIE 114 . ; IB*2*320 - esg - 2Q messages will be filed as informational 115 . I $P($G(^IBM(361,+IBY,0)),U,3)="R",$G(IBT(1))["2Q CLAIM REJECTED BY CLEARINGHOUSE" D 116 .. S IBAUTO=1 117 .. S DIE=361,DA=+IBY,DR=".03////I" D ^DIE 131 118 .. Q 132 119 . ; … … 134 121 . I $G(IBAUTO),$P($G(^IBM(361,+IBY,0)),U,3)="I" D 135 122 .. S DIE="^IBM(361,",DR=".09////2;.14////1;.1////F",DA=+IBY D ^DIE 136 .. I IB1,$P($G(^IBM(361,+IBY,0)),U,11) S Z="",Z0=0 F S Z=$O(IBT(Z)) Q:Z=""!(Z0=1) D 137 ... S Z0=$$PRINTUPD^IBCEU0($$UP^XLFSTR($G(IBT(Z))),$P($G(^IBM(361,+IBY,0)),U,11)) 138 . ; 139 . D MSGLNSZ(.IBT) ; Convert Message Lines in IBT to be no longer than 70 chars 123 .. I IB1,$P($G(^IBM(361,+IBY,0)),U,11),$$PRINTUPD^IBCEU0($G(IBT(1)),$P($G(^IBM(361,+IBY,0)),U,11)) 124 . ; 140 125 . D WP^DIE(361,+IBY_",",1,"A","IBT") ; file message text 141 126 . ; … … 158 143 ; Don't move the raw data over, just move the text of the message 159 144 F S IBZ=$O(^IBA(364.2,IBTDA,2,IBZ)) Q:'IBZ S IBZ1=$G(^(IBZ,0)) S IBDATA=($E(IBZ1,1,2)="##") Q:IBDATA S IBZ0=IBZ0+1,IBT(IBZ0)=IBZ1 I 'IBCK S Z=$$CKREVU^IBCEM4(IBZ1,,,.IBCK),IBAUTO=$S(IBCK:0,Z:1,1:IBAUTO) 145 ; 146 ; Convert Message Lines in IBT to be no longer than 70 chars 147 D MSGLNSZ(.IBT) 160 148 Q 161 149 ; … … 206 194 ; which is an array of Converted Message Lines (with lines no more than 70 chars each) 207 195 ; 208 N LN,XARY,XARYLN,CNT,OUTMSG,TMPMSG,LDNGSP,LDNGSPN 209 S LN="",CNT=0 F S LN=$O(MSG(LN)) Q:LN="" D ; 196 N LN,XARY,XARYLN,CNT,OUTMSG,TMPMSG,LDNGSP 197 S LN="",CNT=0 198 F S LN=$O(MSG(LN)) Q:LN="" D ; 199 . ; 210 200 . ; Find any leading spaces in original message line, 211 201 . ; to be used if line got split below 212 202 . S TMPMSG=$$TRIM^XLFSTR(MSG(LN),"L"," ") ;Trim Leading Spaces 213 203 . S LDNGSP=$P(MSG(LN),TMPMSG,1) ;get leading spaces if any 214 . S LDNGSPN=$L(LDNGSP) S:LDNGSPN>30 LDNGSP=$E(LDNGSP,1,30) ;make sure there are no more than 30 leading spaces204 . ; 215 205 . ; Converts a single line to multiple lines with a maximum width of 70 each 216 206 . ; If line is 70 chars or less, this call returns the exact line 217 . K XARY D FSTRNG^IBJU1(TMPMSG,70-LDNGSPN,.XARY) 207 . K XARY D FSTRNG^IBJU1(MSG(LN),70,.XARY) 208 . ; 218 209 . ; Scan lines and merge them into the final output array (OUTMSG) 219 210 . ; On lines 2 and higher, add Leading Spaces found above, if any. 220 . S XARYLN="" F S XARYLN=$O(XARY(XARYLN)) Q:XARYLN="" S CNT=CNT+1,OUTMSG(CNT)=LDNGSP_XARY(XARYLN) 211 . S XARYLN="" 212 . F S XARYLN=$O(XARY(XARYLN)) Q:XARYLN="" S CNT=CNT+1,OUTMSG(CNT)=$S(XARYLN=1:XARY(XARYLN),1:LDNGSP_XARY(XARYLN)) 221 213 ; 222 214 ; Move the final Message Lines (OUTMSG) into MSG array to be returned 223 215 K MSG M MSG=OUTMSG 224 Q 225 ; 216 Q ;MSGLNSZ 217 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEU1.m
r628 r636 1 1 IBCEU1 ;ALB/TMP - EDI UTILITIES FOR EOB PROCESSING ;10-FEB-99 2 ;;2.0;INTEGRATED BILLING;**137,155,296,349 ,371**;21-MAR-94;Build 572 ;;2.0;INTEGRATED BILLING;**137,155,296,349**;21-MAR-94;Build 46 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 75 75 . S (IBTOT,Z)=0 76 76 . F S Z=$O(^IBM(361.1,"ABS",IBIFN,IBCOBN,Z)) Q:'Z D 77 .. ; HD64841 IB*2*371 - total up the payer paid amounts 78 .. S IBTOT=IBTOT+$P($G(^IBM(361.1,Z,1)),U,1) 77 .. S IBTOT=IBTOT+$P($G(^IBM(361.1,Z,1)),U,2) 79 78 Q IBTOT 80 79 ; … … 128 127 Q 129 128 ; 130 COBOUT(IBXSAVE,IBXDATA,CL) ; build LCOB segment data 131 ; The IBXSAVE array used here is built by INS-2, then LCOB-1.9 132 ; This is basically the 361.115, but all the piece numbers here in this 133 ; local array are one higher than the pieces in subfile 361.115. 129 COBOUT(IBXSAVE,IBXDATA,CL) ; 134 130 N Z,M,N,P,PCCL 135 131 S (N,Z,P)=0 F S Z=$O(IBXSAVE("LCOB",Z)) Q:'Z D … … 143 139 ; 144 140 COBPYRID(IBXIEN,IBXSAVE,IBXDATA) ; cob insurance company payer id 145 N CT, N,NUM141 N CT,Z,N,NUM 146 142 K IBXDATA 147 143 I '$D(IBXSAVE("LCOB")) G COBPYRX 148 144 D ALLPAYID^IBCEF2(IBXIEN,.NUM,1) 149 S NUM=$G(NUM(1)) 150 S NUM=$E(NUM_$J("",5),1,5) 145 S Z=$$COID^IBCEF2(IBXIEN),NUM=$G(NUM(1)) 146 S:Z="" Z="0000" 147 S NUM=$E(NUM_$J("",5),1,5)_$E(Z_$J("",4),1,4) 151 148 S (CT,N)=0 152 149 F S N=$O(IBXSAVE("LCOB",N)) Q:'N S CT=CT+1,IBXDATA(CT)=NUM … … 159 156 ; The EOB is not eligible if the review status is not 3, or if there 160 157 ; is no insurance sequence indicator, or if the EOB has been DENIED 161 ; and the patient responsibility for that EOB is $0 and that EOB is 162 ; not a split EOB. Split EOB's need to be included (IB*2*371). 158 ; and the patient responsibility for that EOB is $0. 163 159 ; 164 160 NEW ELIG,IBDATA,PTRESP … … 167 163 S IBDATA=$G(^IBM(361.1,IBEOB,0)) 168 164 I $P(IBDATA,U,4)'=1 G EOBELIGX ; Only MRA EOB's for now 169 I $D(^IBM(361.1,IBEOB,"ERR")) G EOBELIGX ; filing error170 165 I $P(IBDATA,U,16)'=3 G EOBELIGX ; review status - accepted-complete 171 166 I '$P(IBDATA,U,15) G EOBELIGX ; insurance sequence must exist 172 167 S PTRESP=$P($G(^IBM(361.1,IBEOB,1)),U,2) ; Pt Resp Amount for 1500s 173 168 I $$FT^IBCEF(+IBDATA)=3 S PTRESP=$$PTRESPI^IBCECOB1(IBEOB) ; for UBs 174 I PTRESP'>0,$P(IBDATA,U,13)=2,'$$SPLIT^IBCEMU1(IBEOB) G EOBELIGX ; Denied & No Pt. Resp. & not a split MRA 169 I PTRESP'>0,$P(IBDATA,U,13)=2 G EOBELIGX ; Denied & No Pt. Resp. 170 I $D(^IBM(361.1,IBEOB,"ERR")) G EOBELIGX ; filing error 175 171 ; 176 172 S ELIG=1 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEU3.m
r628 r636 1 IBCEU3 ;ALB/TMP - EDI UTILITIES FOR 1500 CLAIM FORM ;12/29/05 9:58am 2 ;;2.0;INTEGRATED BILLING;**51,137,155,323,348,371**;21-MAR-94;Build 57 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 1 IBCEU3 ;ALB/TMP - EDI UTILITIES FOR 1500 CLAIM FORM ; 12/29/05 9:58am 2 ;;2.0;INTEGRATED BILLING;**51,137,155,323,348**;21-MAR-94;Build 5 4 3 ; 5 4 BOX19(IBIFN) ; Returns the text that should print in box 19 of the CMS-1500 … … 30 29 S IBSPEC=$$BILLSPEC(IBIFN) 31 30 G:'IBPRT NPRT 32 ; Check for chiropractic services33 I $P($G(^DGCR(399,IBIFN,"U3")),U,5)'="" S:$P($G(^DGCR(399,IBIFN,"U3")),U,4)'="" IBGO=$$LENOK("Last X-ray: "_$TR($$DATE^IBCF2($P(^DGCR(399,IBIFN,"U3"),U,4))," ","/"),.IB19)34 G:'IBGO BOX19Q35 ;36 31 I "^25^65^73^67^48^"[(U_IBSPEC_U) D 37 32 . K IBXDATA D F^IBCEF("N-DATE LAST SEEN",,,IBIFN) … … 59 54 . ; 60 55 . Q:'IBGO 61 . I 'IBHOSP,$P($G(IBXSAVE(IBSUB,Z,"AUX")),U,3) S IBHOSP=1,IBGO=$$LENOK("Attending physician,not hospice employee",.IB19) Q 56 . I 'IBHOSP,$P($G(IBXSAVE(IBSUB,Z,"AUX")),U,3) D Q 57 .. S IBHOSP=1,IBGO=$$LENOK("Attending physician,not hospice employee",.IB19) 58 . ; 59 . Q:'IBGO 60 . I 'IBXRAY,IBSPEC=35,$G(IBXSAVE(IBSUB,Z,"AUX"))'="" D Q 61 .. ; Check for chiropratic services in claim type or specialty 62 .. S IBXRAY=1 63 .. S IBGO=$$LENOK($S($P(IBXSAVE(IBSUB,Z,"AUX"),U,2):"Last Xray:"_$$DATE^IBCF2($P(IBXSAVE(IBSUB,Z,"AUX"),U,2),0,1)_" ",1:"")_$S($P(IBXSAVE(IBSUB,Z,"AUX"),U,4)'="":"Level of Sublux:"_$P(IBXSAVE(IBSUB,Z,"AUX"),U,4),1:""),.IB19) 64 ; 62 65 G:'IBGO BOX19Q 63 66 K IBXDATA D F^IBCEF("N-SPECIAL PROGRAM",,,IBIFN) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEU6.m
r628 r636 1 1 IBCEU6 ;ALB/ESG - EDI UTILITIES FOR EOB PROCESSING ;29-JUL-2003 2 ;;2.0;INTEGRATED BILLING;**155 ,371**;21-MAR-94;Build 573 ; ;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**155**;21-MAR-94 3 ; 4 4 Q 5 5 ; … … 45 45 F S A=$O(^IBM(361.1,"B",IBIFN,A)) Q:'A D 46 46 . I '$$EOBELIG^IBCEU1(A) Q ; eob not eligible for secondary claim 47 . I '$D(^IBM(361.1,A,15,"AC",IBI)) Q ; this EOB does not reference VistA line# IBI48 47 . S IBA=0 49 48 . S IBDATA=$G(^IBM(361.1,A,0)) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEXTRP.m
r628 r636 1 IBCEXTRP ;ALB/JEH - VIEW/PRINT EDI EXTRACT DATA ; 4/22/03 9:59am2 ;;2.0;INTEGRATED BILLING;**137,197,211,348,349 ,377**;21-MAR-94;Build 231 IBCEXTRP ;ALB/JEH - VIEW/PRINT EDI EXTRACT DATA ; 4/22/03 9:59am 2 ;;2.0;INTEGRATED BILLING;**137,197,211,348,349**;21-MAR-94;Build 46 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 6 6 INIT ; 7 7 W !!,"This option will display the EDI extract data for a bill.",! 8 N IBREC1,IBIEN,IBINC,DIC,X,Y,DIR,IB364IEN,IBVNUM ,IBSEG,STOP,POP,DTOUT,DUOUT8 N IBREC1,IBIEN,IBINC,DIC,X,Y,DIR,IB364IEN,IBVNUM 9 9 ; 10 10 N DPTNOFZY S DPTNOFZY=1 ; Suppress PATIENT file fuzzy lookups … … 17 17 . W !!,"There is no batch # for this bill. It has not been transmitted." 18 18 S IBVNUM=$P($G(^IBA(364.1,IBVNUM,0)),U) 19 S DIR("A")="Include Fields With No Data?: ",DIR("B")="NO",DIR(0)="YA" 20 W ! D ^DIR K DIR 19 S DIR("A")="INCLUDE FIELDS WITH NO DATA?: ",DIR("B")="NO",DIR(0)="YA" D ^DIR K DIR 21 20 I $D(DTOUT)!$D(DUOUT) G EXITQ 22 21 S IBINC=+Y 23 ;24 ; IB*2*377 - esg - Ask for specific EDI segments to view25 ;26 W !27 S DIR(0)="SA^A:All EDI Segments;S:Selected EDI Segments"28 S DIR("A")="Include (A)ll or (S)elected EDI Segments?: "29 S DIR("B")="All EDI Segments"30 D ^DIR K DIR31 I $D(DTOUT)!$D(DUOUT) G EXITQ32 I Y="A" G DEV ; all segments, skip to device prompt33 ;34 W !35 K IBSEG36 S STOP=037 F D Q:STOP38 . S DIR(0)="FO^3:4"39 . S DIR("A")=" Select EDI Segment"40 . I $D(IBSEG) S DIR("A")="Another EDI Segment"41 . S DIR("?")="Enter the name of the EDI segment to include."42 . D ^DIR K DIR43 . I $D(DTOUT)!$D(DUOUT) S STOP=1 Q44 . S Y=$$UP^XLFSTR(Y),Y=$$TRIM^XLFSTR(Y) ; uppercase/trim spaces45 . I Y="" S STOP=1 Q46 . S IBSEG(Y)=""47 . Q48 I $D(DTOUT)!$D(DUOUT) G EXITQ49 ;50 22 DEV ; - Select device 51 23 N %ZIS,ZTRTN,ZTSAVE,ZTDESC 52 W !53 24 S %ZIS="QM" D ^%ZIS G:POP EXITQ 54 25 I $D(IO("Q")) D G EXITQ … … 69 40 S IBFMTYP=$S(IBFMTYP=2:"CMS-1500",IBFMTYP=3:"UB-04",1:"OTHER"_"("_IBFMTYP_")") 70 41 S IBILL=$S($$INPAT^IBCEF(IBIEN,1):"Inpt",1:"Oupt")_"/"_IBFMTYP 71 ;72 42 I $D(^TMP("IBXERR",$J)) D G EXITQ 73 43 . S IBERR=0 F S IBERR=$O(^TMP("IBXERR",$J,IBERR)) Q:'IBERR W !,$G(^TMP("IBXERR",$J,IBERR)) 74 . Q 75 ; 76 F S IBSEQ=$O(^IBA(364.6,"ASEQ",8,IBSEQ)) Q:'IBSEQ I $$INCLUDE(IBSEQ) F S IBPC=$O(^IBA(364.6,"ASEQ",8,IBSEQ,1,IBPC)) Q:'IBPC F S IBDA=$O(^IBA(364.6,"ASEQ",8,IBSEQ,1,IBPC,IBDA)) Q:'IBDA D 77 . N IBOK,Z,IBMULT,DSP,IBDATA,PCD,SN 78 . S IBREC=$G(^IBA(364.6,IBDA,0)) 79 . I $P(IBREC,U,11)=1 Q ; calculate only field 80 . ; 81 . ; processing for piece 1 of this EDI segment to see if there is any 82 . ; other data that exists in this segment 44 F S IBSEQ=$O(^IBA(364.6,"ASEQ",8,IBSEQ)) Q:'IBSEQ!(IBQUIT) F S IBPC=$O(^IBA(364.6,"ASEQ",8,IBSEQ,1,IBPC)) Q:'IBPC!(IBQUIT) F S IBDA=$O(^IBA(364.6,"ASEQ",8,IBSEQ,1,IBPC,IBDA)) Q:'IBDA!(IBQUIT) S IBREC=$G(^IBA(364.6,IBDA,0)) D Q:IBQUIT 45 . N IBOK,Z,IBMULT 46 . I $P(IBREC,U,11)=1 Q 83 47 . I IBPC=1 S IBOK=0 D 84 48 .. S Z=1 F S Z=$O(^TMP("IBXDATA",$J,1,IBSEQ,1,Z)) Q:'Z I $G(^(Z))'="" S IBOK=1 Q 85 .. I IBOK Q ; data exists so include segment normally 86 .. S SN=$P($G(^TMP("IBXDATA",$J,1,IBSEQ,1,1)),U,1) ; segment name 87 .. I SN="" S SN=$P($P(IBREC,U,10),"'",2) 88 .. S SN=SN_" (No Data - Record Not Sent)" 89 .. S $P(^TMP("IBXDATA",$J,1,IBSEQ,1,1),U,1)=SN 90 .. Q 91 . ; 92 . ; loop thru all multiple occurrences of this segment 49 .. I 'IBOK S $P(^TMP("IBXDATA",$J,1,IBSEQ,1,1),U)=$P($G(^TMP("IBXDATA",$J,1,IBSEQ,1,1)),U)_" (NO DATA - RECORD NOT SENT)" 93 50 . S IBMULT=0 F S IBMULT=$O(^TMP("IBXDATA",$J,1,IBSEQ,IBMULT)) Q:'IBMULT D 94 .. ; 95 .. ; field with no data; check user preference 96 .. I '$G(IBINC),$P($G(^TMP("IBXDATA",$J,1,IBSEQ,IBMULT,IBPC)),U,1)="" Q 97 .. ; 98 .. ; build display data 99 .. S PCD="["_IBPC_"] " ; piece# 100 .. S DSP=$P(IBREC,U,10) ; short description field 101 .. S IBDATA=$P($G(^TMP("IBXDATA",$J,1,IBSEQ,IBMULT,IBPC)),U,1) ; data 102 .. S DSP=$J(PCD,5)_$$FO^IBCNEUT1(DSP,40)_": "_IBDATA 103 .. S ^TMP($J,"IBLINES",IBSEQ,IBMULT,IBPC)=DSP 104 .. Q 105 . Q 106 ; 107 S IBQUIT=0 51 .. I '$G(IBINC),$P($G(^TMP("IBXDATA",$J,1,IBSEQ,IBMULT,IBPC)),U)="" Q 52 .. S ^TMP($J,"IBLINES",IBSEQ,IBMULT,IBPC)=$E($P(IBREC,U,10)_$J("",30),1,30)_": "_$P($G(^TMP("IBXDATA",$J,1,IBSEQ,IBMULT,IBPC)),U) 53 . 108 54 W:$E(IOST,1,2)["C-" @IOF ; initial form feed for screen print 109 55 N IBFMTYP S IBFMTYP=$$FT^IBCEF(IBIEN) … … 111 57 S IBILL=$S($$INPAT^IBCEF(IBIEN,1):"Inpt",1:"Oupt")_"/"_IBFMTYP 112 58 D HDR 113 S Z=0 F S Z=$O(^TMP($J,"IBLINES",Z)) Q:'Z !IBQUIT S Z0=0 F S Z0=$O(^TMP($J,"IBLINES",Z,Z0)) Q:'Z0!IBQUIT S Z1=0 F S Z1=$O(^TMP($J,"IBLINES",Z,Z0,Z1)) Q:'Z1!IBQUIT D Q:IBQUIT114 . I IBLINE>(IOSL-3) DHDR Q:IBQUIT59 S Z=0 F S Z=$O(^TMP($J,"IBLINES",Z)) Q:'Z S Z0=0 F S Z0=$O(^TMP($J,"IBLINES",Z,Z0)) Q:'Z0 S Z1=0 F S Z1=$O(^TMP($J,"IBLINES",Z,Z0,Z1)) Q:'Z1 D G:IBQUIT Q1 60 . D:IBLINE>(IOSL-5) HDR Q:IBQUIT 115 61 . W !,^TMP($J,"IBLINES",Z,Z0,Z1) 116 62 . S IBLINE=IBLINE+1 117 . I IBLINE>(IOSL-3) D HDR Q:IBQUIT 118 . ; 119 . ; end of segment add an extra line feed 120 . I '$O(^TMP($J,"IBLINES",Z,Z0,Z1)) W ! S IBLINE=IBLINE+1 121 . Q 122 ; 123 K ^TMP($J,"IBLINES") 124 G EXITQ 125 ; 63 Q1 K ^TMP($J,"IBLINES") 64 Q 126 65 ; 127 66 HDR ; - Report header … … 132 71 ; 133 72 S IBPG=IBPG+1 134 W ! ,?25,"EDI Transmitted Bill Extract Data",!,"Bill #",?11,"Type",?27,"Patient Name",?52,"SSN",?57,$$FMTE^XLFDT(DT),?71,"Page: "_IBPG73 W !!,?25,"EDI Transmitted Bill Extract Data",!,"Bill #",?11,"Type",?27,"Patient Name",?52,"SSN",?57,$$FMTE^XLFDT(DT),?71,"Page: "_IBPG 135 74 W !,$TR($J("",IOM)," ","=") 136 75 W !,$P(IBREC1,U)_" "_"("_IBILL_")",?27,$P($G(^DPT(+$P(IBREC1,U,2),0)),U),?52,$P($G(^DPT($P(IBREC1,U,2),0)),U,9),! 137 S IBLINE=6 76 S IBLINE=5 77 Q 78 ; 79 ASK ; 80 I $E(IOST,1,2)'["C-" Q 81 N DIR,DIROUT,DIRUT,DTOUT,DUOUT 82 S DIR(0)="E" D ^DIR 83 I ($D(DIRUT))!($D(DUOUT)) S IBQUIT=1 138 84 Q 139 85 ; 140 86 EXITQ ; - clean up and exit 141 I $E(IOST,1,2)["C-" ,'$G(IBQUIT)K DIR S DIR(0)="E" W ! D ^DIR K DIR87 I $E(IOST,1,2)["C-" K DIR S DIR(0)="E" W ! D ^DIR K DIR 142 88 K ^TMP("IBXERR",$J),^TMP("IBXDATA",$J),IBXERR 143 89 D CLEAN^DILF … … 150 96 ; IBFORM = the ien of the form in file 353 151 97 ; IBLOCAL = 1 if OK to use local form, 0 if not 152 N IBVNUM,IBL ,IBINC,IBSEG98 N IBVNUM,IBL 153 99 D FORMPRE^IBCFP1 154 100 S IBVNUM=$G(IBBATCH) … … 160 106 Q 161 107 ; 162 INCLUDE(IBSEQ) ; Function to determine if segment should be included or not163 N OK,LZ,SEGNAME164 S OK=1 ; default is to include it165 I '$D(IBSEG) G INCLX ; if nothing in array, then include all166 I '$D(^TMP("IBXDATA",$J,1,IBSEQ)) S OK=0 G INCLX ; no data there167 S LZ=+$O(^TMP("IBXDATA",$J,1,IBSEQ,"")) ; first line# found in data168 S SEGNAME=$P($G(^TMP("IBXDATA",$J,1,IBSEQ,LZ,1)),U,1) ; piece 1169 S SEGNAME=$$TRIM^XLFSTR(SEGNAME)170 I SEGNAME'="",'$D(IBSEG(SEGNAME)) S OK=0 ; don't include171 INCLX ;172 Q OK173 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCF331.m
r628 r636 1 1 IBCF331 ;ALB/ARH - UB92 HCFA-1450 (GATHER CODES CONT) ;25-AUG-1993 2 ;;2.0;INTEGRATED BILLING;**52,210,309 ,389**; 21-MAR-94;Build 63 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**52,210,309**; 21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 ; … … 32 32 S IBZ="PROSTHETIC ITEMS:" D SET2 33 33 S IBX=0 F S IBX=$O(IBARRAY(IBX)) Q:IBX="" S IBY=0 F S IBY=$O(IBARRAY(IBX,IBY)) Q:'IBY D 34 . S IBZ=$$FMTE^XLFDT(IBX,2)_" "_$J($S($P(IBARRAY(IBX,IBY),U,2):"$"_$FN($P(IBARRAY(IBX,IBY),U,2),",",2),1:""),10)_" "_$E($ $PINB^IBCSC5B(+IBARRAY(IBX,IBY)),1,54) D SET234 . S IBZ=$$FMTE^XLFDT(IBX,2)_" "_$J($S($P(IBARRAY(IBX,IBY),U,2):"$"_$FN($P(IBARRAY(IBX,IBY),U,2),",",2),1:""),10)_" "_$E($P($$PIN^IBCSC5B(IBY),U,2),1,54) D SET2 35 35 ; 36 36 END Q -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCF4.m
r628 r636 1 1 IBCF4 ;ALB/ARH - PRINT BILL ADDENDUM ;12-JAN-94 2 ;;2.0;INTEGRATED BILLING;**52,137,199,309 ,389**;21-MAR-94;Build 63 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**52,137,199,309**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 PRXA ;get bill number then print rx refill addendums for bills … … 56 56 . S IBY=$G(^IBA(362.5,IBPIFN,0)),IBYC="" Q:IBY="" 57 57 . S IBYC=$$CHG(IBPIFN,5,.IBRC) 58 . W !,$$FMTE^XLFDT(+$P(IBY,U,1),2),?11,$J($S(IBYC:"$"_$FN(IBYC,",",2),1:""),10),?24,$ E($P(IBY,U,5),1,55)58 . W !,$$FMTE^XLFDT(+$P(IBY,U,1),2),?11,$J($S(IBYC:"$"_$FN(IBYC,",",2),1:""),10),?24,$P($$PIN^IBCSC5B(+$P(IBY,U,3)),U,2) 59 59 . S IBLN=IBLN+1 I IBLN>(IOSL-7) D PAUSE,HDR 60 60 D:'IBQUIT PAUSE -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNADD.m
r628 r636 1 1 IBCNADD ;ALB/AAS - ADDRESS RETRIEVAL ENGINE FOR FILE 399 ; 29-AUG-93 2 ;;2.0;INTEGRATED BILLING;**52,80 ,377**;21-MAR-94;Build 233 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**52,80**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 ADD(DA ,IBCOB) ; -- Retrieve correct billing address for a bill, mailing address of Bill Payer5 ADD(DA) ; -- Retrive correct billing address for a bill, mailing address of Bill Payer 6 6 ; assumes that new policy field points to valid ins. policy 7 ; DA = ien to file 3998 ; IBCOB = payer sequence PST or 123 (optional)9 ;10 7 N X,Y,I,J,IB01,IB02,IBTYP,DFN,IBCNS,IBCDFN,IBCNT,IBAGAIN,IBFND,IBBILLTY,IBCHRGTY 11 8 S IB02="" 12 9 S DFN=$P($G(^DGCR(399,DA,0)),"^",2) 10 S IBCNS=+$P($G(^DGCR(399,DA,"MP")),U,1) G:'IBCNS MAINQ 11 S IBCDFN=$P($G(^DGCR(399,DA,"MP")),"^",2) I IBCDFN S IBCNS=+$G(^DPT(+DFN,.312,+IBCDFN,0)) 13 12 S IBBILLTY=$P($G(^DGCR(399,DA,0)),"^",5),IBCHRGTY=$P($$CHGTYPE^IBCU(DA),"^;",1) 14 ;15 S IBCNS=+$P($G(^DGCR(399,DA,"MP")),U,1)16 S IBCDFN=$P($G(^DGCR(399,DA,"MP")),U,2)17 ;18 ; If a specific payer sequence was passed in, get the ins. company and the policy ptr19 ; No address returned for Medicare20 I $G(IBCOB)'="" D I $$MCRWNR^IBEFUNC(IBCNS) G MAINQ21 . S IBCOB=$TR(IBCOB,"PST","123")22 . S IBCNS=+$P($G(^DGCR(399,DA,"I"_IBCOB)),U,1)23 . S IBCDFN=+$P($G(^DGCR(399,DA,"M")),U,IBCOB+11)24 . Q25 ;26 I 'IBCNS G MAINQ27 I IBCDFN S IBCNS=+$G(^DPT(+DFN,.312,+IBCDFN,0))28 13 I '$D(^DIC(36,+IBCNS,0)) G MAINQ 29 14 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNBCD.m
r628 r636 1 1 IBCNBCD ;ALB/ARH-Ins Buffer: display/compare buffer and existing ins ;1 Jun 97 2 ;;2.0;INTEGRATED BILLING;**82,251,361 ,371**;21-MAR-94;Build 572 ;;2.0;INTEGRATED BILLING;**82,251,361**;21-MAR-94;Build 9 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 78 78 D DISPLAY(60.12,2.312,.2,"Coor of Benefits:") 79 79 D DISPLAY(61.01,2.312,2.1,"Emp Sponsored?:") 80 D DISPLAY(62.01,2.312,5.01,"Patient Id:")81 80 ; 82 81 I +$G(^IBA(355.33,IBBUFDA,61))!($$GET1^DIQ(2.312,IBEXTDA,2.1)="YES") D ESGHP -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNBEE.m
r628 r636 1 1 IBCNBEE ;ALB/ARH-Ins Buffer: add/edit existing entries in buffer ;1 Jun 97 2 ;;2.0;INTEGRATED BILLING;**82,184,252,251,356,361 ,371,377**;21-MAR-94;Build 232 ;;2.0;INTEGRATED BILLING;**82,184,252,251,356,361**;21-MAR-94;Build 9 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 157 157 ;;40.01:40.03;40.1;40.11;40.09;40.04:40.08 158 158 ; 159 MRPOL ; Patient Policy fields asked of MCCR users in the Buffer Process options (all buffer policy fields except ESGHP ,60.05,60.0660.02-61.01160 ;;60.02;60.03;60. 14PT. RELATIONSHIP TO INSURED;S IBZZ=X;60.04T;I IBZZ'="18" S Y="@111";60.07///1;60.08///@;60.09///@;62.01///@;S Y="@112";@111;60.07;60.08;60.13;62.01T;@112;60.1:60.12;.03;61.01159 MRPOL ; Patient Policy fields asked of MCCR users in the Buffer Process options (all buffer policy fields except ESGHP 60.02-61.01 160 ;;60.02;60.03;60.05;60.06//^S X=$S(X="v":"01",X="s":"02",1:"");S IBZZ=X;60.04;I IBZZ'="01" S Y="@111";60.07///1;60.08///@;60.09///@;S Y="@112";@111;60.07:60.09;60.13;@112;60.1:60.12;.03;61.01 161 161 ; 162 162 OTINS ; Insurance Company fields asked of non-MCCR users entering buffer data from options outside IB (20.01-20.04,21.01-21.06) … … 166 166 ;;40.02;40.03;40.1;40.11;40.09 167 167 ; 168 OTPOL ; Patient Policy fields asked of non-MCCR users entering buffer data from options outside IB (60.02-60.0 8)169 ;;60.02;60.03;60. 14PT. RELATIONSHIP TO INSURED;S IBZZ=X;60.04T;I IBZZ'="18" S Y="@111";60.07///1;60.08///@;60.09///@;62.01///@;S Y="@112";@111;60.07;60.08;60.13;62.01T;@112168 OTPOL ; Patient Policy fields asked of non-MCCR users entering buffer data from options outside IB (60.02-60.09) 169 ;;60.02;60.03;60.05;60.06//^S X=$S(X="v":"01",X="s":"02",1:"");S IBZZ=X;60.04;I IBZZ'="01" S Y="@111";60.07///1;60.08///@;60.09///@;S Y="@112";@111;60.07:60.09;60.13;@112 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNBLE.m
r628 r636 1 1 IBCNBLE ;ALB/ARH-Ins Buffer: LM buffer entry screen ;1 Jun 97 2 ;;2.0;INTEGRATED BILLING;**82,231,184,251 ,371**;21-MAR-94;Build 573 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**82,231,184,251**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 EN ; - main entry point for list manager display … … 41 41 ; 42 42 BLD ; display buffer entry 43 N IB0,IB20,IB40,IB60,IB61,IB 62,IBL,IBLINE,ADDR,IBI,IBY43 N IB0,IB20,IB40,IB60,IB61,IBL,IBLINE,ADDR,IBI,IBY 44 44 S VALMCNT=0 45 S IB0=$G(^IBA(355.33,IBBUFDA,0)),IB20=$G(^IBA(355.33,IBBUFDA,20)),IB40=$G(^IBA(355.33,IBBUFDA,40)) 46 S IB60=$G(^IBA(355.33,IBBUFDA,60)),IB61=$G(^IBA(355.33,IBBUFDA,61)),IB62=$G(^IBA(355.33,IBBUFDA,62)) 45 S IB0=$G(^IBA(355.33,IBBUFDA,0)),IB20=$G(^IBA(355.33,IBBUFDA,20)),IB40=$G(^IBA(355.33,IBBUFDA,40)),IB60=$G(^IBA(355.33,IBBUFDA,60)),IB61=$G(^IBA(355.33,IBBUFDA,61)) 47 46 ; 48 47 D SET(" ") S IBY=$J("",26)_"Insurance Company Information" D SET(IBY,"B") S IBLINE="" … … 98 97 S IBL="Coord of Benefits: ",IBY=$$EXPAND^IBTRE(355.33,60.12,$P(IB60,U,12)) S IBLINE=$$SETL(IBLINE,IBY,IBL,62,16) 99 98 D SET(IBLINE) S IBLINE="" 100 I $P(IB6 2,U)'="" S IBL="Patient Id: ",IBY=$P(IB62,U) S IBLINE=$$SETL(IBLINE,IBY,IBL,62,13)99 I $P(IB60,U,6)'="01"!($P(IB60,U,9)'="") S IBL="Insured's SSN: ",IBY=$P(IB60,U,9) S IBLINE=$$SETL("",IBY,IBL,18,13) 101 100 I IBLINE'="" D SET(IBLINE) S IBLINE="" 102 101 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNBMI.m
r628 r636 1 IBCNBMI ;ALB/ARH-Ins Buffer: move buffer data to insurance files ; 09 Mar 2005 11:42 AM2 ;;2.0;INTEGRATED BILLING;**82,184,246,251,299,345,361 ,371**;21-MAR-94;Build 571 IBCNBMI ;ALB/ARH-Ins Buffer: move buffer data to insurance files ; 09 Mar 2005 11:42 AM 2 ;;2.0;INTEGRATED BILLING;**82,184,246,251,299,345,361**;21-MAR-94;Build 9 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 120 120 ; 121 121 POLDR ; 122 ;;2.312^60.02:6 2.01^8;3;1;6;16;17;3.01;3.05;4.01;4.02;.2;3.12;2.1;2.015;2.11;2.12;2.01:2.08;5.01122 ;;2.312^60.02:61.12^8;3;1;6;16;17;3.01;3.05;4.01;4.02;.2;3.12;2.1;2.015;2.11;2.12;2.01:2.08 123 123 POLFLD ; corresponding fields: Buffer File (355.33) and Insurance Patient Policy file (2.312) 124 124 ;;60.02^8^Effective Date^ ; Effective Date … … 147 147 ;;61.11^2.07^Emp Zip Code^1 ; Employer Claims Zip Code 148 148 ;;61.12^2.08^Emp Phone^ ; Employer Claims Phone 149 ;;62.01^5.01^Patient Id^ ; Patient Id150 149 ; 151 150 POLA ; auto set fields -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNEBF.m
r628 r636 1 1 IBCNEBF ;DAOU/ALA - Create an Entry in the Buffer File ;20-JUN-2002 2 ;;2.0;INTEGRATED BILLING;**184,271,361 ,371**;21-MAR-94;Build 572 ;;2.0;INTEGRATED BILLING;**184,271,361**;21-MAR-94;Build 9 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 23 23 ; 24 24 ; 25 NEW VBUF,IEN,INAME,PNAME,IIEN,GNUMB,GNAME,SUBID,PPHONE ,PATID25 NEW VBUF,IEN,INAME,PNAME,IIEN,GNUMB,GNAME,SUBID,PPHONE 26 26 NEW BPHONE,EFFDT,EXPDT,WHO,REL,IDOB,ISSN,COB,TQIEN,RDATA,ISEX,NAME 27 27 NEW MSG,XMSUB,MSGP,INSDATA,PCE,BFD,BFN,INSPCE,ESGHPARR … … 33 33 S NAME=$P($G(^DPT(DFN,.312,IRIEN,0)),U,17) 34 34 S SUBID=$P($G(^DPT(DFN,.312,IRIEN,0)),U,2) 35 S PATID=$P($G(^DPT(DFN,.312,IRIEN,5)),U,1)36 35 S WHO=$P($G(^DPT(DFN,.312,IRIEN,0)),U,6) 37 36 S COB=$P($G(^DPT(DFN,.312,IRIEN,0)),U,20) … … 83 82 S COB=$P(RDATA,U,13) 84 83 S SUBID=$P(RDATA,U,5) 85 S PATID=$P(RDATA,U,18)86 84 S GNAME=$P(RDATA,U,6) 87 85 S GNUMB=$P(RDATA,U,7) … … 93 91 ; 94 92 D FIL 95 K DFN,VBUF,IEN,IRIEN,INAME,PNAME,IIEN,GNUMB,GNAME,SUBID,PPHONE ,PATID93 K DFN,VBUF,IEN,IRIEN,INAME,PNAME,IIEN,GNUMB,GNAME,SUBID,PPHONE 96 94 K BPHONE,EFFDT,EXPDT,WHO,REL,IDOB,ISSN,COB,TQIEN,RDATA,ISEX,NAME 97 95 K ADD,%DT,D0,DG,DIC,DISYS,DIW,IENS … … 117 115 . S VBUF(60.07)=NAME ; Name of Insured 118 116 . S VBUF(60.04)=SUBID ; Subscriber ID 119 . S VBUF(62.01)=PATID ; Patient/Member ID120 117 . S VBUF(20.04)=PPHONE ; Precertification Phone 121 118 . S VBUF(20.03)=BPHONE ; Billing Phone … … 156 153 . S MSG(4)=" Patient DFN = "_$G(DFN) 157 154 . S MSG(5)=" Pt Ins Record IEN = "_$G(IRIEN) 158 . S MSG(6)="Please log a Remedy Ticketfor this problem."155 . S MSG(6)="Please log a NOIS for this problem." 159 156 . S XMSUB="Error creating Buffer Entry." 160 157 . D MSG^IBCNEUT5(MSGP,XMSUB,"MSG(") -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNQ.m
r628 r636 1 IBCNQ ;ALB/MJB - MCCR PATIENT BILLING INQUIRY ;13 JUN 88 13:52 2 ;;2.0;INTEGRATED BILLING;**51,320,377**;21-MAR-94;Build 23 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 1 IBCNQ ;ALB/MJB - MCCR PATIENT BILLING INQUIRY ;7:37 PM 30 Jan 2008 2 ;;2.0;INTEGRATED BILLING;**51,320;VWEHR1**;WorldVistA 30-Jan-08 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 ; 5 ;Modified from FOIA VISTA, 6 ;Copyright 2008 WorldVistA. Licensed under the terms of the GNU 7 ;General Public License See attached copy of the License. 8 ; 9 ;This program is free software; you can redistribute it and/or modify 10 ;it under the terms of the GNU General Public License as published by 11 ;the Free Software Foundation; either version 2 of the License, or 12 ;(at your option) any later version. 13 ; 14 ;This program is distributed in the hope that it will be useful, 15 ;but WITHOUT ANY WARRANTY; without even the implied warranty of 16 ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 ;GNU General Public License for more details. 18 ; 19 ;You should have received a copy of the GNU General Public License along 20 ;with this program; if not, write to the Free Software Foundation, Inc., 21 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 4 22 ; 5 23 ;MAP TO DGCRNQ … … 11 29 VIEW ; 12 30 ;*** 31 ;S XRTL=$ZU(0),XRTN="IBCNQ-2" D T0^%ZOSV ;start rt clock 13 32 F I=0,"S","U","U1" S IB(I)=$G(^DGCR(399,IBIFN,I)) 14 33 S DFN=$P(IB(0),"^",2),IBSTAT=$P(IB(0),"^",13),IBBNO=$$BN^PRCAFN(IBIFN),IBPAGE=0 S:IBBNO=-1 IBBNO=$S($D(IBIL):IBIL,1:$P(IB(0),"^")) … … 17 36 ; 18 37 S IBUN="UNSPECIFIED",IBUK="UNKNOWN USER" 19 W !,"Bill Status",?15,": ",$S(IBSTAT=1:"ENTERED/NOT REVIEWED",IBSTAT=2:"MRA REQUESTED",IBSTAT=3:"AUTHORIZED",IBSTAT=4:"PRINTED/TRANSMITTED",IBSTAT=7:"CANCELLED",1:IBUN)," - RECORD IS ",$S(IBSTAT =1:"",1:"UN"),"EDITABLE"38 W !,"Bill Status",?15,": ",$S(IBSTAT=1:"ENTERED/NOT REVIEWED",IBSTAT=2:"MRA REQUESTED",IBSTAT=3:"AUTHORIZED",IBSTAT=4:"PRINTED/TRANSMITTED",IBSTAT=7:"CANCELLED",1:IBUN)," - RECORD IS ",$S(IBSTAT<3:"",1:"UN"),"EDITABLE" 20 39 W !,"Rate Type",?15,": ",$S($P(IB(0),"^",7)="":IBUN,'$D(^DGCR(399.3,$P(IB(0),"^",7),0)):IBUN,1:$P(^DGCR(399.3,$P(IB(0),"^",7),0),"^")) 21 40 W:+$P(^IBE(350.9,1,1),"^",22) !,"Form Type",?15,": ",$S($P($G(^IBE(353,+$P(IB(0),"^",19),0)),"^")]"":$P(^(0),"^"),1:IBUN) … … 38 57 S IBUN="UNSPECIFIED",IBUK="UNKNOWN USER" 39 58 I IB("S")']"" W !,"Past actions of this billing record unspecified." G DISPQ 40 S IBX="Entered^^^^^^MRA Requested^^^Authorized^^ First Printed^^Last Printed^^^Cancelled"41 F I=1, 7,10,12,14,17 I $P(IB("S"),U,I)]"" D:IBAC[7&($Y>(IOSL-4)) HDR Q:$S(IBAC'[7:0,1:IBQUIT) D DISP159 S IBX="Entered^^^^^^MRA Requested^^^Authorized^^^^Last Printed^^^Cancelled" 60 F I=1,10,14,17 I $P(IB("S"),U,I)]"" D:IBAC[7&($Y>(IOSL-4)) HDR Q:$S(IBAC'[7:0,1:IBQUIT) D DISP1 42 61 ; 43 62 ;Patch 320 - Added call to retrieve claim clone history. … … 59 78 ; now go backwards for claim cloning history all the way back 60 79 S IBBCH=IBCURR 61 F S IBBCH=$Q(@IBBCH,-1) Q:IBBCH="" D 80 ; 81 ;WV/EHR REVERSE $Q REPLACEMENT; SO 01/12/08 ;VWEHR1 82 ; 83 ;F S IBBCH=$Q(@IBBCH,-1) Q:IBBCH="" D 84 F S IBBCH=$$Q^VWUTIL($NA(@IBBCH),-1) Q:IBBCH="" D 85 . ; 86 . ;END CHANGE 87 . ; 62 88 . N IBX,TS1,TS2 S IBX=@IBBCH 63 89 . I IBINDENT S TS1=4,TS2=19 ; set tab stops -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNRDV.m
r628 r636 1 IBCNRDV ;OAKFO/ELZ - INSURANCE INFORMATION EXCHANGE VIA RDV 2 ;;2.0;INTEGRATED BILLING;**214,231,361 ,371**;21-MAR-94;Build 571 IBCNRDV ;OAKFO/ELZ - INSURANCE INFORMATION EXCHANGE VIA RDV;27-MAR-03 2 ;;2.0;INTEGRATED BILLING;**214,231,361**;21-MAR-94;Build 9 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 94 94 S IBD(0)=$G(IBY(0)) 95 95 ; 96 ; where n starts at 1 and increments to 7for each insurance company96 ; where n starts at 1 and increments 6 for each insurance company 97 97 ; IBD(n) = 355.33, zero node format 98 98 ; IBD(n+1) = 355.33, 20 node format … … 101 101 ; IBD(n+4) = 355.33, 60 node format 102 102 ; IBD(n+5) = 355.33, 61 node format 103 ; IBD(n+6) = 355.33, 62 node format104 103 ; 105 104 S IBP="|" … … 107 106 . S IBZ=$P($G(IBY(IBI,+IBT)),"^",$P(IBT,IBP,2)) ; set the existing data 108 107 . I $L($P(IBT,IBP,6)) X $P(IBT,IBP,6) ; output transform 109 . S $P(IBD(IBI-1* 7+$P(IBT,IBP,3)),"^",$P(IBT,IBP,4))=IBZ ; set data IBD108 . S $P(IBD(IBI-1*6+$P(IBT,IBP,3)),"^",$P(IBT,IBP,4))=IBZ ; set data IBD 110 109 Q 111 110 ; … … 141 140 ;;4|1|5|10|60.1;primary care provider 142 141 ;;4|2|5|11|60.11;primary provider phone 143 ;;5|1|7|1|62.01;patient id144 142 ;;355.3|2|4|1|40.01;is this a group policy 145 143 ;;355.3|3|4|2|40.02;group name -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNS1.m
r628 r636 1 1 IBCNS1 ;ALB/AAS - INSURANCE MANAGEMENT SUPPORTED FUNCTIONS ;22-JULY-91 2 ;;2.0;INTEGRATED BILLING;**28,60,52,85,107,51,137,240 ,371**;21-MAR-94;Build 573 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**28,60,52,85,107,51,137,240**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 INSURED(DFN,IBINDT) ; -- Is patient insured … … 108 108 ; var(x,3) =: ^dpt(dfn,.312,x,3) 109 109 ; var(x,4) =: ^dpt(dfn,.312,x,4) 110 ; var(x,5) =: ^dpt(dfn,.312,x,5)111 110 ; var(x,355.3) =: ^iba(355.3,$p(var(x,0),"^",18),0) 112 111 ; var("S",COB sequence,x) =: (null) as an xref for COB … … 123 122 .S @VAR@(X,3)=$G(^DPT(DFN,.312,X,3)) 124 123 .S @VAR@(X,4)=$G(^DPT(DFN,.312,X,4)) 125 .S @VAR@(X,5)=$G(^DPT(DFN,.312,X,5))126 124 .S @VAR@(X,355.3)=$G(^IBA(355.3,+$P($G(^DPT(DFN,.312,X,0)),"^",18),0)) 127 125 .I $G(SOP) D -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNSC.m
r628 r636 1 IBCNSC ;ALB/NLR - INSURANCE COMPANY EDIT ; 6/1/05 9:42am2 ;;2.0;INTEGRATED BILLING;**46,137,184,276,320 ,371**;21-MAR-94;Build 573 ;;Per VHA Directive 2004-038, this routine should not be modified.1 IBCNSC ;ALB/NLR - INSURANCE COMPANY EDIT ; 6/1/05 9:42am 2 ;;2.0;INTEGRATED BILLING;**46,137,184,276,320**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 ;also used for IA #4694 … … 47 47 N OFFSET,START,IBCNS14,IBADD 48 48 S IBCNS14=$$ADDRESS^IBCNSC0(IBCNS,.14,7) 49 S START=4 8,OFFSET=249 S START=40,OFFSET=2 50 50 D SET^IBCNSP(START,OFFSET+25," Appeals Office Information ",IORVON,IORVOFF) 51 51 D SET^IBCNSP(START+1,OFFSET," Company Name: "_$P($G(^DIC(36,+$P(IBCNS14,"^",7),0)),"^",1)) … … 63 63 N OFFSET,START,IBCNS15,IBADD 64 64 S IBCNS15=$$ADDRESS^IBCNSC0(IBCNS,.15,8) 65 S START= 55,OFFSET=265 S START=47,OFFSET=2 66 66 D SET^IBCNSP(START,OFFSET+25," Inquiry Office Information ",IORVON,IORVOFF) 67 67 D SET^IBCNSP(START+1,OFFSET," Company Name: "_$P($G(^DIC(36,+$P(IBCNS15,"^",7),0)),"^",1)) … … 109 109 Q OK 110 110 ; 111 DUPQUAL(IBCNS,QUAL,FIELD) ; input transform to make sure that the sam qualifier is not used twice for112 ; payer secondary IDs. There are two sets of fields in file 36 that can not be duplicated.113 ; 6.01 EDI INST SECONDARY ID QUAL(1) can not be the same as 6.03 EDI INST SECONDARY ID QUAL(2)114 ; 6.05 EDI PROF SECONDARY ID QUAL(1) can not be the same as 6.07 EDI PROF SECONDARY ID QUAL(2)115 ;116 ; Input:117 ; IBCNS is the insurance company internal number118 ; QUAL is the internal code of the value being input.119 ; FIELD is the field it is being compare with.120 ;121 ; Returns:122 ; TRUE/1 if they are the same (duplicate)123 ; FALSE/0 if they are not124 ;125 Q:$G(QUAL)="" 0 ; should not happen because this is invoked as an input transform126 Q:'+$G(IBCNS) 1 ; stop from editing through fileman127 N DUP128 S DUP=$$GET1^DIQ(36,+$G(IBCNS)_",",+$G(FIELD),"I")129 D CLEAN^DILF130 Q QUAL=DUP -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNSC0.m
r628 r636 1 IBCNSC0 ;ALB/NLR - INSURANCE COMPANY EDIT - ; 12-MAR-19932 ;; 2.0; INTEGRATED BILLING ;**371**; 21-MAR-94;Build 573 ;;Per VHA Directive 2004-038, this routine should not be modified.1 IBCNSC0 ;ALB/NLR - INSURANCE COMPANY EDIT - ; 12-MAR-1993 2 ;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 CLAIMS1 ; display Inpatient Claims information 6 6 N OFFSET,START,IBCNS12,IBADD 7 S START=2 7,OFFSET=27 S START=21,OFFSET=2 8 8 D SET^IBCNSP(START,OFFSET+20," Inpatient Claims Office Information ",IORVON,IORVOFF) 9 9 S IBCNS12=$$ADDRESS(IBCNS,.12,5) … … 22 22 ; 23 23 N OFFSET,START,IBCNS16,IBADD 24 S START= 34,OFFSET=224 S START=27,OFFSET=2 25 25 D SET^IBCNSP(START,OFFSET+20," Outpatient Claims Office Information ",IORVON,IORVOFF) 26 26 S IBCNS16=$$ADDRESS(IBCNS,.16,6) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNSC01.m
r628 r636 1 IBCNSC01 ;ALB/NLR - INSURANCE COMPANY EDIT ; 6/1/05 10:06am2 ;;2.0;INTEGRATED BILLING;**52,137,191,184,232,320,349 ,371**;21-MAR-94;Build 571 IBCNSC01 ;ALB/NLR - INSURANCE COMPANY EDIT ; 6/1/05 10:06am 2 ;;2.0;INTEGRATED BILLING;**52,137,191,184,232,320,349**;21-MAR-94;Build 46 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 18 18 D SET^IBCNSP(START+6,OFFSET+1,"Amb. Sur. Rev. Code: "_$P(IBCNS0,"^",9)) 19 19 D SET^IBCNSP(START+7,OFFSET+1,"Rx Refill Rev. Code: "_$P(IBCNS0,"^",15)) 20 D SET^IBCNSP(START+8,OFFSET+3,"Filing Time Frame: "_$P(IBCNS0,"^",12)) 21 D SET^IBCNSP(START+9,OFFSET+4,"Type Of Coverage: "_$$EXPAND^IBTRE(36,.13,+$P(IBCNS0,U,13))) 22 D SET^IBCNSP(START+10,OFFSET+3,"Primary Form Type: "_$$EXPAND^IBTRE(36,.14,$P(IBCNS0,"^",14))) 20 23 ; 21 S OFFSET=45 22 D SET^IBCNSP(START+1,OFFSET+3,"Filing Time Frame: "_$P(IBCNS0,"^",12)) 23 D SET^IBCNSP(START+2,OFFSET+4,"Type Of Coverage: "_$$EXPAND^IBTRE(36,.13,+$P(IBCNS0,U,13))) 24 D SET^IBCNSP(START+3,OFFSET+7,"Billing Phone: "_$P(IBCNS13,"^",2)) 25 D SET^IBCNSP(START+4,OFFSET+2,"Verification Phone: "_$P(IBCNS13,"^",4)) 26 D SET^IBCNSP(START+5,OFFSET+2,"Precert Comp. Name: "_$P($G(^DIC(36,+$P(IBCNS13,"^",9),0)),"^",1)) 27 D SET^IBCNSP(START+6,OFFSET+7,"Precert Phone: "_$$PHONE(IBCNS13)) 28 I +IBCNS3=2 D SET^IBCNSP(START+7,OFFSET,"Max # Test Bills/Day: "_$P(IBCNS3,U,6)) 29 ; 30 S START=11,OFFSET=2 31 D SET^IBCNSP(START,OFFSET+28," EDI Parameters ",IORVON,IORVOFF) 32 D SET^IBCNSP(START+1,OFFSET+13,"Transmit?: "_$S(+IBCNS3=1:"YES-LIVE",+IBCNS3=2:"TEST ONLY",1:"NO")) 33 D SET^IBCNSP(START+2,OFFSET+1,"Inst Payer Primary ID: "_$P(IBCNS3,U,4)) 34 D SET^IBCNSP(START+3,OFFSET,"Inst Payer Sec ID Qual: "_$$GET1^DIQ(36,+IBCNS,6.01)) 35 D SET^IBCNSP(START+4,OFFSET+5,"Inst Payer Sec ID: "_$$GET1^DIQ(36,+IBCNS,6.02)) 36 D SET^IBCNSP(START+5,OFFSET,"Inst Payer Sec ID Qual: "_$$GET1^DIQ(36,+IBCNS,6.03)) 37 D SET^IBCNSP(START+6,OFFSET+5,"Inst Payer Sec ID: "_$$GET1^DIQ(36,+IBCNS,6.04)) 38 D SET^IBCNSP(START+7,OFFSET+12,"Bin Number: "_$P($G(^DIC(36,+IBCNS,3)),"^",3)) ; 39 ; 40 S OFFSET=41 41 D SET^IBCNSP(START+1,OFFSET+8," Insurance Type: "_$$EXPAND^IBTRE(36,3.09,+$P(IBCNS3,U,9))) 42 D SET^IBCNSP(START+2,OFFSET+1," Prof Payer Primary ID: "_$P(IBCNS3,U,2)) 43 D SET^IBCNSP(START+3,OFFSET," Prof Payer Sec ID Qual: "_$$GET1^DIQ(36,+IBCNS,6.05)) 44 D SET^IBCNSP(START+4,OFFSET+5," Prof Payer Sec ID: "_$$GET1^DIQ(36,+IBCNS,6.06)) 45 D SET^IBCNSP(START+5,OFFSET," Prof Payer Sec ID Qual: "_$$GET1^DIQ(36,+IBCNS,6.07)) 46 D SET^IBCNSP(START+6,OFFSET+5," Prof Payer Sec ID: "_$$GET1^DIQ(36,+IBCNS,6.08)) 24 N START,OFFSET 25 S START=1,OFFSET=45 26 D SET^IBCNSP(START+1,OFFSET+7,"Billing Phone: "_$P(IBCNS13,"^",2)) 27 D SET^IBCNSP(START+2,OFFSET+2,"Verification Phone: "_$P(IBCNS13,"^",4)) 28 D SET^IBCNSP(START+3,OFFSET+2,"Precert Comp. Name: "_$P($G(^DIC(36,+$P(IBCNS13,"^",9),0)),"^",1)) 29 D SET^IBCNSP(START+4,OFFSET+7,"Precert Phone: "_$$PHONE(IBCNS13)) 30 D SET^IBCNSP(START+5,OFFSET+6," *** EDI Parameters *** ",IOINHI,IOINORM) 31 D SET^IBCNSP(START+6,OFFSET+11,"Transmit?: "_$S(+IBCNS3=1:"YES-LIVE",+IBCNS3=2:"TEST ONLY",1:"NO")) 32 D SET^IBCNSP(START+7,OFFSET+7,"Inst Payer ID: "_$P(IBCNS3,U,4)) 33 D SET^IBCNSP(START+8,OFFSET+7,"Prof Payer ID: "_$P(IBCNS3,U,2)) 34 D SET^IBCNSP(START+9,OFFSET+6,"Insurance Type: "_$$EXPAND^IBTRE(36,3.09,+$P(IBCNS3,U,9))) 35 D SET^IBCNSP(START+10,OFFSET+10,"Bin Number: "_$P($G(^DIC(36,+IBCNS,3)),"^",3)) 36 I +IBCNS3=2 D SET^IBCNSP(START+11,OFFSET,"Max # Test Bills/Day: "_$P(IBCNS3,U,6)) 47 37 Q 48 38 ; … … 65 55 S IBCNS11=$G(^DIC(36,+IBCNS,.11)) 66 56 S IBCNS13=$G(^DIC(36,+IBCNS,.13)) 67 S START= 21,OFFSET=2557 S START=15,OFFSET=25 68 58 D SET^IBCNSP(START,OFFSET," Main Mailing Address ",IORVON,IORVOFF) 69 59 N OFFSET S OFFSET=2 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNSC02.m
r628 r636 1 1 IBCNSC02 ;ALB/ESG - Insurance Company parent/child management ;01-NOV-2005 2 ;;2.0;INTEGRATED BILLING;**320 ,371**;21-MAR-94;Build 573 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**320**;21-MAR-1994 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 Q … … 11 11 I PCFLG="P" S PCDESC="Parent" 12 12 S TITLE=" Associated Insurance Companies " 13 S (START,IBLINE)= 6213 S (START,IBLINE)=54 14 14 S OFFSET=(40-($L(TITLE)/2))\1+1 15 15 D SET^IBCNSP(START,OFFSET,TITLE,IORVON,IORVOFF) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNSC1.m
r628 r636 1 1 IBCNSC1 ;ALB/NLR - IBCNS INSURANCE COMPANY ;23-MAR-93 2 ;;2.0;INTEGRATED BILLING;**62,137,232,291,320,348,349 ,371**;21-MAR-94;Build 572 ;;2.0;INTEGRATED BILLING;**62,137,232,291,320,348,349**;21-MAR-94;Build 46 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 40 40 I $G(IBY)=",12," D FACID 41 41 F Z=1,2,4,9,13,14 S IBEDIKEY(Z)=$P($G(^DIC(36,+IBCNS,3)),U,Z) ; save EDI data fields 42 F Z=1:1:8 S IBEDIKEY(Z,6)=$P($G(^DIC(36,+IBCNS,6)),U,Z) ; save EDI data fields 43 I $G(IBY)'=",12," N DIE,DA,DR S DIE="^DIC(36,",(DA,Y)=IBCNS,DR="[IBEDIT INS CO1]" D ^DIE K DIE S:$D(Y) IB("^")=1 D:$TR($P($G(^DIC(36,IBCNS,6)),U,1,8),U)]"" CUIDS(IBCNS) 42 I $G(IBY)'=",12," N DIE,DA,DR S DIE="^DIC(36,",(DA,Y)=IBCNS,DR="[IBEDIT INS CO1]" D ^DIE K DIE I $D(Y) S IB("^")=1 44 43 I $G(IBY)=",12," D EDITID^IBCEP(+IBCNS) 45 44 I $F(",6,13,",$G(IBY)) D PARENT^IBCNSC02(+IBCNS) ; parent/child management … … 57 56 N OFFSET,START,IBCNS18,IBADD 58 57 S IBCNS18=$$ADDRESS^IBCNSC0(IBCNS,.18,11) 59 S START= 41,OFFSET=258 S START=34,OFFSET=2 60 59 D SET^IBCNSP(START,OFFSET+19," Prescription Claims Office Information ",IORVON,IORVOFF) 61 60 D SET^IBCNSP(START+1,OFFSET," Company Name: "_$P($G(^DIC(36,+$P(IBCNS18,"^",7),0)),"^",1)) … … 206 205 I IBINS,IBPTYP S X=$P($G(^IBA(355.91,+$O(^IBA(355.91,"AC",IBINS,IBPTYP,"*N/A*","")),0)),U,7) 207 206 Q X 208 ;209 CUIDS(IBCNS) ;210 N DIE,DA,DR,PIECE,DAT6,Y211 S DAT6=$P(^DIC(36,IBCNS,6),U,1,8) ; get the Payer IDs212 ;213 ; Make sure each qualifier has an ID and vice versa214 F PIECE=1,3,5,7 D215 . I $TR($P(DAT6,U,PIECE,PIECE+1),U)="" Q ; both blank216 . I $P(DAT6,U,PIECE)]"",$P(DAT6,U,PIECE+1)]"" Q ; both have data217 . S DIE="^DIC(36,",(DA,Y)=IBCNS,DR="6.0"_$S($P(DAT6,U,PIECE)]"":PIECE,1:PIECE+1)_"////@"218 . D ^DIE K DIE219 ;220 S DAT6=$P($G(^DIC(36,IBCNS,6)),U,1,8) ; get the Payer IDs again since they may have changed above.221 ;222 ; Make sure the first pair of ID/Qual are populated if the 2nd pair is. If not, move em over.223 ; This is done for institutional then professional224 F PIECE=1,5 D225 . I $P(DAT6,U,PIECE)]"" Q ; already has set one226 . I $P(DAT6,U,PIECE+2)="" Q ; has no second set227 . S DIE="^DIC(36,",(DA,Y)=IBCNS228 . ; deleting the qualifier triggers deletion of the ID229 . S DR="6.0"_PIECE_"////"_$P(DAT6,U,PIECE+2)_";6.0"_(PIECE+1)_"////"_$P(DAT6,U,PIECE+3)_";6.0"_(PIECE+2)_"////@"230 . D ^DIE K DIE231 Q -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNSEH.m
r628 r636 1 IBCNSEH ;ALB/AAS - EXTENDED HELP FOR INSURANCE MANAGEMENT ;28-MAY-932 ;; 2.0;INTEGRATED BILLING;**6,28,371**;21-MAR-94;Build 573 ;;Per VHA Directive 2004-038, this routine should not be modified.1 IBCNSEH ;ALB/AAS - EXTENDED HELP FOR INSURANCE MANAGEMENT - 28-MAY-93 2 ;;Version 2.0 ; INTEGRATED BILLING ;**6,28**; 21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 INS ; -- Help for Insurance Type … … 14 14 PAT ; -- Help for entering patient specific information 15 15 Q:'$G(IBCNSEH) 16 W !!,"Now you may enter the patient specific policy information.",! 16 W !!,"Now you may enter the patient specific policy information." 17 W !,"Most of these fields will be familiar to experienced users. The field" 18 W !,"'SUBSCRIBER ID' used to be called 'INSURANCE NUMBER' and " 19 W !,"has been modified to allow entering just 'SS' to retrieve" 20 W !,"the patients SSN. This field is the identifier for the policy or patient" 21 W !,"that the carrier uses. See the new help.",! 17 22 Q 18 23 POL ; -- Help for policy specific information -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNSM32.m
r628 r636 1 IBCNSM32 ;ALB/AAS - INSURANCE MANAGEMENT - POLICY EDIT ; 23-JAN-952 ;;2.0;INTEGRATED BILLING;**28,40,52,85,103,133,361 ,371**;21-MAR-94;Build 571 IBCNSM32 ;ALB/AAS - INSURANCE MANAGEMENT - POLICY EDIT ; 23-JAN-95 2 ;;2.0;INTEGRATED BILLING;**28,40,52,85,103,133,361**;21-MAR-94;Build 9 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 13 13 ; 14 14 N IBAD,IBDIF,DA,DR,DIC,DIE,DGSENFLG S DGSENFLG=1 15 S DIE="^DPT("_DFN_",.312,",DA(1)=DFN,DA=IBCDFN 16 S DR="S IBAD="""";8;@333;3;D FUTURE^IBCNSM31;6;S IBAD=X;K X I '$$VET^IBCNSU1() S Y=""@10"";17///^S X=$P(^DPT(DFN,0),U);16///^S X=""01""" 17 ;S DR="S IBAD="""";8;@333;3;D FUTURE^IBCNSM31;6;S IBAD=X;I IBAD'=""v"" S Y=""@10"";17"_$S($$VET^IBCNSU1():"///^S X="""_$P(^DPT(DFN,0),U,1)_"""",1:"//"_);16///^S X=""01""" 18 S DR=DR_";S Y=""@20"";@10;17;16//^S X=$S(IBAD=""s"":""02"",1:"""");@20;1;3.01;3.12;1.09//;I $G(IBREG) S Y=""@99"";.2;4.01;4.02;@99" 19 I $G(IBREG),$D(^XUSEC("IB INSURANCE SUPERVISOR",DUZ)) S DR=".01//;"_DR 15 20 L +^DPT(DFN,.312,+IBCDFN):5 I '$T D LOCKED^IBTRCD1 G PATPOLQ 16 ; 17 D EDIT^IBCNSP1(DFN,IBCDFN,.IBQUIT) ; IB*371 edit 2.312 subfile data 18 ; 19 ; If the 2.312 subfile entry was deleted then unlock and get out 20 I '$D(^DPT(DFN,.312,IBCDFN,0)) L -^DPT(DFN,.312,+IBCDFN) G PATPOLQ 21 D ^DIE I $D(Y)!($D(DTOUT)) S IBQUIT=1 22 I '$D(DA) S IBQUIT=1 G PATPOLQ 21 23 ; 22 24 ; -- if the company was changed, change the policy plan -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNSP.m
r628 r636 1 1 IBCNSP ;ALB/AAS - INSURANCE MANAGEMENT - EXPANDED POLICY ;05-MAR-1993 2 ;;2.0;INTEGRATED BILLING;**6,28,43,52,85,251,363 ,371**;21-MAR-94;Build 572 ;;2.0;INTEGRATED BILLING;**6,28,43,52,85,251,363**;21-MAR-94;Build 35 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 % ; 5 5 EN ; -- main entry point for IBCNS EXPANDED POLICY 6 N IB1ST7 6 K VALMQUIT,IBPPOL 8 7 S IBTOP="IBCNSP" … … 31 30 K ^TMP("IBCNSVP",$J),^TMP("IBCNSVPDX",$J) 32 31 D KILL^VALM10() 33 F I=1:1:20 D BLANK(.I) ; start with 20 blank lines 34 N IBCDFND,IBCDFND1,IBCDFND2,IBCDFND4,IBCDFND5 35 S IBCDFND=$G(^DPT(DFN,.312,$P(IBPPOL,U,4),0)),IBCDFND1=$G(^(1)),IBCDFND2=$G(^(2)),IBCDFND4=$G(^(4)),IBCDFND5=$G(^(5)) 32 F I=1:1:50 D BLANK(.I) 33 S VALMCNT=50 34 N IBCDFND,IBCDFND1,IBCDFND2,IBCDFND4 35 S IBCDFND=$G(^DPT(DFN,.312,$P(IBPPOL,U,4),0)),IBCDFND1=$G(^(1)),IBCDFND2=$G(^(2)),IBCDFND4=$G(^(4)) 36 36 S IBCPOL=+$P(IBCDFND,U,18),IBCNS=+IBCDFND,IBCDFN=$P(IBPPOL,U,4) 37 37 S IBCPOLD=$G(^IBA(355.3,+$P(IBCDFND,U,18),0)),IBCPOLD1=$G(^(1)) 38 38 S IBCPOLD2=$G(^IBA(355.3,+$G(IBCPOL),6)) ;; Daou/EEN adding BIN and PCN 39 ; 40 D POLICY^IBCNSP0 ; plan information 41 D INS^IBCNSP0 ; insurance company 42 D UR ; utilization review info 43 D EFFECT ; effective dates & source of info 44 D SUBSC^IBCNSP01 ; subscriber info 45 D EMP ; subscriber's employer info 46 D SPON^IBCNSP0 ; insured person's info 47 D ID^IBCNSP01 ; ins co ID numbers (IB*2*371) 48 D PLIM ; plan coverage limitations 49 D VER^IBCNSP01 ; user/verifier/editor info 50 D CONTACT^IBCNSP0 ; last insurance contact 51 D COMMENT ; comments - policy & plan 52 D RIDER^IBCNSP01 ; policy rider info 53 ; 54 S VALMCNT=+$O(^TMP("IBCNSVP",$J,""),-1) 39 S IBLCNT=0 40 D POLICY^IBCNSP0,INS^IBCNSP0,SPON^IBCNSP0,LIMBLD^IBCNSC41(36,2,.IBLCNT) 41 D CONTACT^IBCNSP0,EFFECT,UR,EMP,VER^IBCNSP01,COMMENT,^IBCNSP01 55 42 Q 56 43 ; 57 44 COMMENT ; -- Comment region 58 45 N START,OFFSET,IBL,IBI 59 S (START,IBL)=$O(^TMP("IBCNSVP",$J,""),-1)+1,OFFSET=260 S IB1ST("COMMENT")=START46 S START=49+$G(IBLCNT),OFFSET=2,IBL=0 47 I '$D(@VALMAR@(START-1)) D SET(START-1,OFFSET," ") 61 48 D SET(START,OFFSET," Comment -- Patient Policy ",IORVON,IORVOFF) 62 S IBL=IBL+1 63 D SET(IBL,OFFSET,$S($P(IBCDFND1,U,8)="":"None",1:$P(IBCDFND1,U,8))) 64 S IBL=IBL+1 65 D SET(IBL,OFFSET," ") 66 S IBL=IBL+1 67 D SET(IBL,OFFSET," Comment -- Group Plan ",IORVON,IORVOFF) 49 D SET(START+1,OFFSET,$S($P(IBCDFND1,U,8)="":"None",1:$P(IBCDFND1,U,8))) 50 I '$D(@VALMAR@(START+2)) D SET(START+2,OFFSET," ") 51 D SET(START+3,OFFSET," Comment -- Group Plan ",IORVON,IORVOFF) 68 52 S IBI=0 F S IBI=$O(^IBA(355.3,+IBCPOL,11,IBI)) Q:IBI<1 D 69 . S IBL=IBL+1 70 . D SET(IBL,OFFSET," "_$E($G(^IBA(355.3,+IBCPOL,11,IBI,0)),1,80)) 71 . Q 72 S IBL=IBL+1 D SET(IBL,OFFSET," ") 73 S IBL=IBL+1 D SET(IBL,OFFSET," ") 53 .S IBL=IBL+1 54 .D SET(START+IBL+3,OFFSET," "_$E($G(^IBA(355.3,+IBCPOL,11,IBI,0)),1,80)) 55 S IBLCNT=$G(IBLCNT)+IBL+1 D SET(START+IBL+4,OFFSET," ") 74 56 Q 75 57 ; 76 58 EFFECT ; -- Effective date region 77 59 N START,OFFSET 78 S START=1 6,OFFSET=4560 S START=14,OFFSET=45 79 61 D SET(START,OFFSET-4," Effective Dates & Source ",IORVON,IORVOFF) 80 62 D SET(START+1,OFFSET," Effective Date: "_$$DAT1^IBOUTL($P(IBCDFND,U,8))) … … 86 68 UR ; -- UR of insurance region 87 69 N START,OFFSET 88 S START=1 6,OFFSET=270 S START=14,OFFSET=2 89 71 D SET(START,OFFSET," Utilization Review Info ",IORVON,IORVOFF) 90 72 D SET(START+1,OFFSET," Require UR: "_$$EXPAND^IBTRE(355.3,.05,$P(IBCPOLD,U,5))) … … 96 78 EMP ; -- Insurance Employer Region 97 79 N OFFSET,START,IBADD 98 S START= 24,OFFSET=4080 S START=19,OFFSET=40 99 81 D SET(START,OFFSET," Subscriber's Employer Information ",IORVON,IORVOFF) 100 82 D SET(START+1,OFFSET,"Emp Sponsored Plan: "_$S(+$P(IBCDFND2,U,10):"Yes",1:"No")) … … 103 85 D SET(START+4,OFFSET," Retirement Date: "_$$DAT1^IBOUTL($P(IBCDFND2,U,12))) 104 86 D SET(START+5,OFFSET,"Claims to Employer: "_$S(+IBCDFND2:"Yes, Send to Employer",1:"No, Send to Insurance Company")) 87 ;I +IBCDFND2 W !!,"If ROI applies, make sure current consent is signed.",!! D PAUSE^VALM1 105 88 ; 106 89 D SET(START+6,OFFSET," Street: "_$P(IBCDFND2,U,2)) S IBADD=1 … … 110 93 D SET(START+7+IBADD,OFFSET," Phone: "_$P(IBCDFND2,U,8)) 111 94 ; 112 ; couple of blank lines to end this section113 D SET(START+8+IBADD,2," ")114 D SET(START+9+IBADD,2," ")115 ;116 95 EMPQ Q 117 ;118 PLIM ; plan coverage limitations/plan limitation category display119 N START,END S START=$O(^TMP("IBCNSVP",$J,""),-1)+1120 S IB1ST("PLIM")=START121 D LIMBLD^IBCNSC41(START,2)122 S END=$O(^TMP("IBCNSVP",$J,""),-1) ; last line constructed123 D SET(END+1,2," ") ; 2 blank lines to end this section124 D SET(END+2,2," ")125 PLIMX ;126 Q127 96 ; 128 97 HELP ; -- help code -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNSP0.m
r628 r636 1 IBCNSP0 ;ALB/AAS - INSURANCE MANAGEMENT - EXPANDED POLICY ;05-MAR-19932 ;;2.0;INTEGRATED BILLING;**28,43,52,85,93,103,137,229,251,363 ,371**;21-MAR-94;Build 571 IBCNSP0 ;ALB/AAS - INSURANCE MANAGEMENT - EXPANDED POLICY ;05-MAR-1993 2 ;;2.0;INTEGRATED BILLING;**28,43,52,85,93,103,137,229,251,363**;21-MAR-94;Build 35 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 6 6 CONTACT ; -- Insurance Contact Information 7 7 N OFFSET,START 8 ; 9 ; The start of this section is designed to start on the same line 10 ; as the User Information section (see VER^IBCNSP01). 11 ; 12 S START=$O(^TMP("IBCNSVP",$J,""),-1)-8 13 S IB1ST("CONTACT")=START 14 S OFFSET=42 8 S START=41+$G(IBLCNT),OFFSET=42 15 9 N IBTRC,IBTRCD,IBTCOD 16 10 S IBTCOD=$O(^IBE(356.11,"ACODE",85,0)) … … 22 16 .S IBTRCD=$G(^IBT(356.2,+IBTRC,0)) 23 17 ; 18 I '$D(@VALMAR@(START-1)) D SET(START-1,OFFSET," ") 24 19 D SET(START,OFFSET," Insurance Contact (last) ",IORVON,IORVOFF) 25 20 D SET(START+1,OFFSET," Person Contacted: "_$$EXPAND^IBTRE(356.2,.06,$P(IBTRCD,"^",6))) … … 28 23 D SET(START+4,OFFSET," Call Ref. No.: "_$$EXPAND^IBTRE(356.2,.09,$P(IBTRCD,"^",9))) 29 24 D SET(START+5,OFFSET," Contact Date: "_$$EXPAND^IBTRE(356.2,.01,$P(IBTRCD,"^"))) 30 ; no blank lines here because the User Information section is on the31 ; left and it is bigger than this section32 25 Q 33 26 ; … … 51 44 . D SET(START+IBX,OFFSET," Electronic Type: "_$$EXPAND^IBTRE(355.3,.15,$P(IBCPOLD,"^",15))) S IBX=IBX+1 52 45 D SET(START+IBX,OFFSET," Plan Filing TF: "_$P(IBCPOLD,"^",13)) S IBX=IBX+1 53 ; 46 ; -- in case pointer is missing 54 47 D SET(START+IBX,OFFSET," ePharmacy Plan ID: "_IBPLNID) S IBX=IBX+1 55 48 D SET(START+IBX,OFFSET," ePharmacy Plan Name: "_IBPLNNM) S IBX=IBX+1 56 49 D SET(START+IBX,OFFSET," ePharmacy Natl Status: "_IBPLNNA) S IBX=IBX+1 57 50 D SET(START+IBX,OFFSET," ePharmacy Local Status: "_IBPLNLA) S IBX=IBX+1 58 ;59 ; -- in case pointer is missing60 51 I '$G(^IBA(355.3,+$P(IBCDFND,"^",18),0)) D 61 52 .D SET(START+1,OFFSET,"Insurance Number: "_$P(IBCDFND,"^",2)) … … 82 73 ; 83 74 SPON ; -- Sponsor (Insured Person) Region 84 N IBC3,IB ZIP,START,OFFSET,IBA,DA,DR,DIC,DIQ85 S IBC3=$G(^DPT(DFN,.312,IBCDFN,3)) 75 N IBC3,IBSSN,IBZIP,START,OFFSET,IBA,DA,DR,DIC,DIQ 76 S IBC3=$G(^DPT(DFN,.312,IBCDFN,3)),IBSSN=$P(IBC3,"^",5) 86 77 S DA=+$P(IBC3,"^",2),DR=.01,DIQ(0)="E",DIC="^DIC(23,",DIQ="IBA" D EN^DIQ1 87 S START= $O(^TMP("IBCNSVP",$J,""),-1)+1,OFFSET=488 D SET(START,OFFSET," Insured Person's Information (use Subscriber Update Action) ",IORVON,IORVOFF)78 S START=30,OFFSET=4 79 D SET(START,OFFSET," Insured Person's Information (use Subscriber Update action) ",IORVON,IORVOFF) 89 80 D SET(START+1,OFFSET," Insured's DOB: "_$$DAT3^IBOUTL($P(IBC3,"^"))) 90 D SET(START+2,OFFSET," Insured's Sex: "_$$EXTERNAL^DILFD(2.312,3.12,,$P(IBC3,U,12)))91 D SET(START+3,OFFSET," Insured's Branch: "_$G(IBA(23,DA,.01,"E")))92 D SET(START+4,OFFSET," Insured's Rank: "_$P(IBC3,"^",3))81 D SET(START+2,OFFSET," Insured's Branch: "_$G(IBA(23,DA,.01,"E"))) 82 D SET(START+3,OFFSET," Insured's Rank: "_$P(IBC3,"^",3)) 83 D SET(START+4,OFFSET," Insured's SSN: "_$S(IBSSN]"":$E(IBSSN,1,3)_"-"_$E(IBSSN,4,5)_"-"_$E(IBSSN,6,9),1:"")) 93 84 ; 94 85 S OFFSET=43 … … 99 90 D SET(START+4,OFFSET,"St/Zip: "_$P($G(^DIC(5,+$P(IBC3,"^",9),0)),"^",2)_" "_IBZIP) 100 91 D SET(START+5,OFFSET," Phone: "_$P(IBC3,"^",11)) 101 ;102 ; blank lines at end of section103 D SET(START+6,2," ")104 D SET(START+7,2," ")105 92 Q 106 93 ; … … 115 102 W:'(LINE#5) "." 116 103 Q 117 ;118 104 GPLAN(IBPLDA) ; get data from PLAN file (#366.03) related to the 119 105 ; GROUP INSURANCE PLAN file (#355.3) and the INSURANCE COMPANY file (#36) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNSP01.m
r628 r636 1 IBCNSP01 ;ALB/AAS - INSURANCE MANAGEMENT - EXPANDED POLICY ; 05-MAR-19932 ;;2.0;INTEGRATED BILLING;**43,52,85,251 ,371,377**;21-MAR-94;Build 233 ;;Per VHA Directive 2004-038, this routine should not be modified.1 IBCNSP01 ;ALB/AAS - INSURANCE MANAGEMENT - EXPANDED POLICY ; 05-MAR-1993 2 ;;2.0;INTEGRATED BILLING;**43,52,85,251**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 ; … … 9 9 SUBSC ; -- subscriber region 10 10 N OFFSET,START 11 S START= 24,OFFSET=211 S START=19,OFFSET=2 12 12 D SET^IBCNSP(START,OFFSET," Subscriber Information ",IORVON,IORVOFF) 13 13 S Y=$P(IBCDFND,"^",6),C=$P(^DD(2.312,6,0),"^",2) D Y^DIQ 14 14 D SET^IBCNSP(START+1,OFFSET," Whose Insurance: "_Y) 15 15 D SET^IBCNSP(START+2,OFFSET," Subscriber Name: "_$P(IBCDFND,"^",17)) 16 S Y=$P(IBCDFND 4,"^",3),C=$P(^DD(2.312,4.03,0),"^",2) D Y^DIQ16 S Y=$P(IBCDFND,"^",16),C=$P(^DD(2.312,16,0),"^",2) D Y^DIQ 17 17 D SET^IBCNSP(START+3,OFFSET," Relationship: "_Y) 18 D SET^IBCNSP(START+4,OFFSET," Primary ID: "_$P(IBCDFND,"^",2))18 D SET^IBCNSP(START+4,OFFSET,"Insurance Number: "_$P(IBCDFND,"^",2)) 19 19 S Y=$P(IBCDFND,"^",20),C=$P(^DD(2.312,.2,0),"^",2) D Y^DIQ 20 20 D SET^IBCNSP(START+5,OFFSET,"Coord. Benefits: "_Y) … … 25 25 VER ; -- Entered/Verfied Region 26 26 N OFFSET,START 27 S START= $O(^TMP("IBCNSVP",$J,""),-1)+1,OFFSET=228 S IB1ST("VERIFY")=START27 S START=41+$G(IBLCNT),OFFSET=2 28 I '$D(@VALMAR@(START-1)) D SET^IBCNSP(START-1,OFFSET," ") 29 29 D SET^IBCNSP(START,OFFSET," User Information ",IORVON,IORVOFF) 30 I IBCDFND1="" D SET^IBCNSP(START+1,OFFSET,"No User Information") G VERQ 30 31 D SET^IBCNSP(START+1,OFFSET," Entered By: "_$E($P($G(^VA(200,+$P(IBCDFND1,"^",2),0)),"^",1),1,20)) 31 32 D SET^IBCNSP(START+2,OFFSET," Entered On: "_$$DAT1^IBOUTL(+IBCDFND1)) … … 34 35 D SET^IBCNSP(START+5,OFFSET," Last Updated By: "_$E($P($G(^VA(200,+$P(IBCDFND1,"^",6),0)),"^",1),1,20)) 35 36 D SET^IBCNSP(START+6,OFFSET," Last Updated On: "_$$DAT1^IBOUTL(+$P(IBCDFND1,"^",5))) 36 D SET^IBCNSP(START+7,2," ") ; 2 blank lines to end section37 D SET^IBCNSP(START+8,2," ")38 37 VERQ Q 39 ;40 ID ; Subscriber and patient primary and secondary ID's and qualifiers41 NEW START,OFFSET,IBL,G,PCE,QUAL,QUAL142 S G=IBCDFND543 S (START,IBL)=$O(^TMP("IBCNSVP",$J,""),-1)+1,OFFSET=244 S IB1ST("ID")=START45 D SET^IBCNSP(START,OFFSET," Insurance Company ID Numbers (use Subscriber Update Action) ",IORVON,IORVOFF)46 S IBL=IBL+147 D SET^IBCNSP(IBL,OFFSET," Subscriber Primary ID: "_$P(IBCDFND,U,2))48 ;49 F PCE=3,5,7 D ; subscriber secondary IDs50 . I $P(G,U,PCE)="" Q ; no secondary ID#51 . S QUAL=$P(G,U,PCE-1) ; internal qualifier code52 . S QUAL1=$S(QUAL="23":"Client#",QUAL="IG":"Ins. Policy#",QUAL="SY":"SSN",1:"Unknown")53 . S IBL=IBL+154 . D SET^IBCNSP(IBL,OFFSET,"Subscriber Secondary ID: "_$P(G,U,PCE))55 . D SET^IBCNSP(IBL,52,"ID Qual: "_QUAL_" ("_QUAL1_")")56 . Q57 ;58 ; patient=subscriber so skip over patient ID# display59 I +$P(IBCDFND,U,16)=1 G ID160 ;61 S IBL=IBL+1 D SET^IBCNSP(IBL,2," ") ; blank line62 S IBL=IBL+163 D SET^IBCNSP(IBL,OFFSET," Patient Primary ID: "_$P(G,U,1))64 ;65 F PCE=9,11,13 D ; patient secondary IDs66 . I $P(G,U,PCE)="" Q ; no secondary ID#67 . S QUAL=$P(G,U,PCE-1) ; internal qualifier code68 . S QUAL1=$S(QUAL="23":"Client#",QUAL="IG":"Ins. Policy#",QUAL="SY":"SSN",1:"Unknown")69 . S IBL=IBL+170 . D SET^IBCNSP(IBL,OFFSET," Patient Secondary ID: "_$P(G,U,PCE))71 . D SET^IBCNSP(IBL,52,"ID Qual: "_QUAL_" ("_QUAL1_")")72 . Q73 ;74 ID1 ; end of section - 2 blank lines75 S IBL=IBL+1 D SET^IBCNSP(IBL,2," ")76 S IBL=IBL+1 D SET^IBCNSP(IBL,2," ")77 IDQ ;78 Q79 38 ; 80 39 RIDER ; -- Personal policy riders 81 40 N OFFSET,START,IBI,IBL,IBPR,IBPRD 82 S START=$O(^TMP("IBCNSVP",$J,""),-1)+1,OFFSET=2,IBL=0 41 S START=53+$G(IBLCNT),OFFSET=2,IBL=0 42 I '$D(@VALMAR@(START-1)) D SET^IBCNSP(START-1,OFFSET," ") 83 43 D SET^IBCNSP(START,OFFSET," Personal Riders ",IORVON,IORVOFF) 84 44 S IBI="" F S IBI=$O(^IBA(355.7,"APP",DFN,IBCDFN,IBI)) Q:'IBI S IBPR=$O(^(IBI,0)),IBPRD=+$G(^IBA(355.7,IBPR,0)),IBL=IBL+1 D 85 . D SET^IBCNSP(START+IBL,OFFSET," Rider #"_IBL_": "_$$EXPAND^IBTRE(355.7,.01,IBPRD)) 86 . Q 87 S IBL=IBL+1 D SET^IBCNSP(START+IBL,OFFSET," ") 88 S IBL=IBL+1 D SET^IBCNSP(START+IBL,OFFSET," ") 45 .D SET^IBCNSP(START+IBL,OFFSET," Rider #"_IBL_": "_$$EXPAND^IBTRE(355.7,.01,IBPRD)) 46 S IBLCNT=$G(IBLCNT)+IBL 89 47 Q 90 48 ; 91 49 AI ; -- Add ins. verification entry 92 50 ; called from ai^ibcnsp1 51 ;N X,Y,I,J,DA,DR,DIC,DIE,DR,DD,DO,VA,VAIN,VAERR,IBQUIT,IBXIFN,IBTRN,DUOUT,IBX,IBQUIT,DTOUT 52 ;Q:'$G(DFN) 53 ;Q:'$G(IBCDFN) S IBQUIT=0 93 54 ; 94 55 ; -- see if current inpatient -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNSP1.m
r628 r636 1 IBCNSP1 ;ALB/AAS - INSURANCE MANAGEMENT - policy actions ; 22-OCT-922 ;;2.0;INTEGRATED BILLING;**6,28,40,43,52,85,103,361 ,371,377**;21-MAR-94;Build 231 IBCNSP1 ;ALB/AAS - INSURANCE MANAGEMENT - policy actions ; 22-OCT-92 2 ;;2.0;INTEGRATED BILLING;**6,28,40,43,52,85,103,361**;21-MAR-94;Build 9 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 ;;ICR#5002 for read of ^DIE input template data5 4 ; 6 5 % G EN^IBCNSP … … 80 79 S DR="8;3;1.09//;3.04" 81 80 D ^DIE K DIC,DIE,DA,DR 82 D COMPPT^IBCNSP3(DFN,IBCDFN) I IBDIF D UPDATPT^IBCNSP3(DFN,IBCDFN), UPDCLM(DFN,IBCDFN),AFTER^IBCNSEVT,^IBCNSEVT,BLD^IBCNSP81 D COMPPT^IBCNSP3(DFN,IBCDFN) I IBDIF D UPDATPT^IBCNSP3(DFN,IBCDFN),AFTER^IBCNSEVT,^IBCNSEVT,BLD^IBCNSP 83 82 L -^DPT(DFN,.312,+$P($G(IBPPOL),"^",4)) 84 83 EDQ S VALMBCK="R" Q … … 98 97 D VARS^IBCNSP3 99 98 L +^DPT(DFN,.312,+$P($G(IBPPOL),"^",4)):5 I '$T D LOCKED^IBTRCD1 G SUQ 100 ;101 D EDIT(DFN,IBCDFN) ; IB*371 - edit pat ins 2.312 subfile fields102 ;99 S DR="6;S IBAD=X;K X I '$$VET^IBCNSU1() S Y=""@10"";17///^S X=$P(^DPT(DFN,0),U);16///^S X=""01""" 100 S DR=DR_";S Y=""@20"";@10;17;16//^S X=$S(IBAD=""s"":""02"",1:"""");@20;1;.2;4.01;4.02;3.01;3.12;3.02;3.03;3.05:3.11" 101 D ^DIE K DIC,DIE,DA,DR 103 102 D COMPPT^IBCNSP3(DFN,IBCDFN) 104 103 I IBDIF D UPDATPT^IBCNSP3(DFN,IBCDFN),BLD^IBCNSP … … 119 118 D AI^IBCNSP02 120 119 Q 121 ;122 PIDEF(IBREL,FLD,IBDFN,SPDEF) ; Function to return patient file defaults123 ; Called from input template IBCN PATIENT INSURANCE124 ; IBREL = value from 2.312,4.03 field (PT. RELATIONSHIP - HIPAA)125 ; FLD = field# in file 2.312126 ; IBDFN = patient ien to file 2127 ; SPDEF = spouse default flag =1 if this field should be defaulted128 ; when the spouse is the policy holder129 ;130 ; The purpose is to provide a default value for the field when the131 ; patient and the ins. subscriber are the same.132 ;133 NEW VAL134 S VAL=""135 I +$G(IBREL)'=1,+$G(IBREL)'=18 G PIDEFX ; patient not the insured or spouse, get out136 I +$G(IBREL)=1,'$G(SPDEF) G PIDEFX ; not a field for spouse default137 I '$G(FLD) G PIDEFX ; no field# passed in138 I '$G(IBDFN) G PIDEFX ; no patient passed in139 ;140 ; Build the patient demographics area141 I '$D(^UTILITY("VADM",$J)) D142 . N VAHOW,DFN,VADM143 . S VAHOW=2,DFN=IBDFN D DEM^VADPT144 . Q145 ;146 ; Build the patient address area147 I '$D(^UTILITY("VAPA",$J)) D148 . N VAHOW,DFN,VAPA149 . S VAHOW=2,DFN=IBDFN,VAPA("P")="" D ADD^VADPT150 . Q151 ;152 I FLD=17 S VAL=$P($G(^UTILITY("VADM",$J,1)),U,1) G PIDEFX ; Name153 I FLD=3.01 S VAL=$$FMTE^XLFDT($P($G(^UTILITY("VADM",$J,3)),U,1),"5Z") G PIDEFX ; Date of Birth154 I FLD=3.02 S VAL=$$EXTERNAL^DILFD(2,.325,,$P($G(^DPT(IBDFN,.32)),U,5)) G PIDEFX ; Branch155 I FLD=3.05 S VAL=$P($G(^UTILITY("VADM",$J,2)),U,2) G PIDEFX ; SSN156 I FLD=3.06 S VAL=$P($G(^UTILITY("VAPA",$J,1)),U,1) G PIDEFX ; Street Address 1157 I FLD=3.07 S VAL=$P($G(^UTILITY("VAPA",$J,2)),U,1) G PIDEFX ; Street Address 2158 I FLD=3.08 S VAL=$P($G(^UTILITY("VAPA",$J,4)),U,1) G PIDEFX ; City159 I FLD=3.09 S VAL=$P($G(^UTILITY("VAPA",$J,5)),U,2) G PIDEFX ; State160 I FLD=3.1 S VAL=$P($G(^UTILITY("VAPA",$J,11)),U,2) G PIDEFX ; Zipcode161 I FLD=3.11 S VAL=$P($G(^UTILITY("VAPA",$J,8)),U,1) G PIDEFX ; Phone#162 I FLD=3.12 S VAL=$P($G(^UTILITY("VADM",$J,5)),U,2) G PIDEFX ; Sex163 PIDEFX ;164 Q VAL165 ;166 ASK(QUES,DEFLT) ; Function to ask Yes/No Question167 ; Returns 1 (yes), 0 (no, up-arrow, or timeout)168 NEW X,Y,DIR,DTOUT,DUOUT,DIRUT,DIROUT169 S DIR(0)="Y",DIR("A")=$G(QUES)170 S DIR("B")=$S($G(DEFLT):"Yes",1:"No")171 W ! D ^DIR W:Y !172 I $D(DIRUT) S Y=0173 ASKX ;174 Q Y175 ;176 EDIT(IBDFN,IBCDFN,IBQUIT) ; Main call to edit data in 2.312 pat ins subfile177 ; IBDFN - patient DFN178 ; IBCDFN - ien for patient insurance policy in subfile 2.312179 ; IBQUIT - Output variable. Pass by reference. Will be set to 1 if180 ; the user entered an up-arrow, timed-out, or deleted the181 ; 2.312 subfile entry by entering "@" at the .01 field182 ;183 NEW DA,DR,DIE,IBZ,IBY,X,Y,DTOUT184 NEW IDS,SUB,PAT,PCE,SUB1,PAT1185 S DA(1)=+$G(IBDFN) ; patient IEN186 S DA=+$G(IBCDFN) ; patient insurance IEN187 I 'DA!'DA(1) G EDITX188 S DIE="^DPT("_IBDFN_",.312,"189 ;190 ; Find the input template IEN for the [IBCN PATIENT INSURANCE] template191 S IBY=+$$FIND1^DIC(.402,,"X","IBCN PATIENT INSURANCE")192 I 'IBY G EDITX193 ;194 ; Build the DR array/string - ICR# 5002195 M DR(1)=^DIE(IBY,"DR",2)196 S DR=$G(DR(1,2.312))197 I DR="" G EDITX198 ;199 S $P(^DIE(IBY,0),U,7)=DT ; see TEM+2^DIE ICR# 5002200 ;201 D ^DIE ; edit subfile data202 ;203 ; If the user entered an up-arrow, or timed-out, or deleted the entry,204 ; then set the output variable IBQUIT205 I $D(Y)!$D(DTOUT)!'$D(DA) S IBQUIT=1206 ;207 F IBZ="VADM","VAPA" K ^UTILITY(IBZ,$J) ; cleanup scratch global208 ;209 D UPDCLM(IBDFN,IBCDFN) ; update editable claims210 ;211 ; Cleanup any problems in the secondary ID area212 S IDS=$G(^DPT(IBDFN,.312,IBCDFN,5)) ; whole 5 node213 S (SUB,PAT)=""214 F PCE=3:1:8 S $P(SUB,U,PCE)=$P(IDS,U,PCE-1) ; subscriber sec ID/qual215 F PCE=3:1:8 S $P(PAT,U,PCE)=$P(IDS,U,PCE+5) ; patient sec ID/qual216 ; SUB and PAT are 8-piece strings with pieces 1 and 2 being nil217 S SUB1=$$SCRUB^IBCEF21(SUB) ; scrub 8-piece string218 S PAT1=$$SCRUB^IBCEF21(PAT) ; scrub 8-piece string219 I SUB'=SUB1 S $P(^DPT(IBDFN,.312,IBCDFN,5),U,2,7)=$P(SUB1,U,3,8)220 I PAT'=PAT1 S $P(^DPT(IBDFN,.312,IBCDFN,5),U,8,13)=$P(PAT1,U,3,8)221 ;222 EDITX ;223 Q224 ;225 UPDCLM(IBDFN,IBCDFN) ; Update the Insurance nodes of claims that are still editable226 NEW IBIFN227 S IBIFN=0 F S IBIFN=$O(^DGCR(399,"C",IBDFN,IBIFN)) Q:'IBIFN D UPDCLM^IBCNSP2(IBIFN,IBDFN,IBCDFN)228 ;229 UPDCLMX ;230 Q231 ;232 PRELCNV(CODE,FLG) ; conversion between X12, NCPDP and VistA pt. relationship codes233 ; CODE - code for pt. relationship to convert234 ; FLG - 0 for X12 -> VistA conversion, 1 for VistA -> X12 conversion, 2 - for VistA -> NCPDP conversion235 ; returns converted code for pt. relationship, or null if no match found236 N I,RES,VSTR,X12STR237 S VSTR="01^02^03^08^11^15^32^33^34^35^36"238 S X12STR="18^01^19^20^39^41^32^33^29^53^G8"239 S RES=""240 I FLG=0 F I=1:1:11 S:$P(X12STR,U,I)=CODE RES=$P(VSTR,U,I) Q:RES'=""241 I FLG=1 F I=1:1:11 S:$P(VSTR,U,I)=CODE RES=$P(X12STR,U,I) Q:RES'=""242 I FLG=2,+CODE>0 S RES=$S(+CODE>3:"04",1:CODE)243 Q RES -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNSP2.m
r628 r636 1 1 IBCNSP2 ;ALB/AAS - PATIENT INSURANCE INTERFACE FOR REGISTRATION ;21-JUNE-93 2 ;;2.0;INTEGRATED BILLING;**6,28,75,82,155 ,371**;21-MAR-94;Build 573 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**6,28,75,82,155**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 % ; … … 22 22 ; 23 23 I '$$ASKCOVD(DFN,.IBCOV,.IBCOVP) S IBQUIT=1 G REGQ 24 ; -- of covered by ins but none currently active so indicate 25 ;S IBCOV=$P($G(^DPT(DFN,.31)),"^",11) 26 ;I IBCOV="Y",'$$INSURED^IBCNS1(DFN) W !!,"Covered By Health Insurance indicates 'YES' but none currently Active.",!,"Please Review!",!! 27 ; 28 ;; -- ask if covered by insuracnce 29 ;S DIE="^DPT(",DR=".3192",DA=DFN D ^DIE K DIC,DIE,DA,DR 30 ;S IBCOVP=$P($G(^DPT(DFN,.31)),"^",11) 31 ;I $D(Y)!($D(DTOUT)) S IBQUIT=1 G REGQ 32 ;I $P($G(^DPT(DFN,.31)),"^",11)'="Y",'$$INSURED^IBCNS1(DFN) S IBQUIT=1 G REGQ 24 33 ; 25 34 R1 S (IBNEW,IBNEWP,IBQUIT)=0 … … 52 61 ; -- edit patient ins. data 53 62 S IBREG=1 G:$G(IBQUIT) REGQ 54 D PAT^IBCNSEH,PATPOL^IBCNSM32(IBCDFN) ,UPDCLM(+$G(IBIFN),DFN,IBCDFN)63 D PAT^IBCNSEH,PATPOL^IBCNSM32(IBCDFN) 55 64 ; 56 65 ; -- edit policy specific data if new or have key … … 75 84 ; 76 85 FEE ; -- fee entry point to add patient insurance. 86 ;N IBFEE S IBFEE=1 D REG 77 87 D FEE^IBCNBME(DFN) 78 88 Q … … 87 97 I 'IBMCR,$$WNRBILL^IBEFUNC(IBIFN) S DGRVRCAL=1 88 98 K IBCNRTN 89 Q90 ;91 UPDCLM(IBIFN,DFN,IBCDFN) ; Update the claim's insurance nodes when edits are made92 ; to the patient insurance file.93 ; This procedure is called when a claim is being edited from IB billing94 ; screen#3 and also when the patient insurance is being edited directly.95 ;96 I '$G(IBIFN)!'$G(DFN)!'$G(IBCDFN) Q ; missing something97 I $P($G(^DGCR(399,IBIFN,0)),U,2)'=DFN Q ; mismatch of claim and DFN98 I $P($G(^DGCR(399,IBIFN,0)),U,13)'=1 Q ; claim not editable99 I '$D(^DPT(DFN,.312,IBCDFN,0)) Q ; missing pat ins data100 NEW X,Z,NODE101 S X=IBCDFN102 F Z=1:1:3 I $P($G(^DGCR(399,IBIFN,"M")),U,11+Z)=IBCDFN D Q103 . S NODE="I"_Z104 . D IX^IBCNS2(IBIFN,NODE)105 . Q106 99 Q 107 100 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNSP3.m
r628 r636 1 IBCNSP3 ;ALB/AAS - INSURANCE MANAGEMENT EDIT ; 06-JUL-932 ;;2.0;INTEGRATED BILLING;**28,52,85,251 ,371**;21-MAR-94;Build 573 ;;Per VHA Directive 2004-038, this routine should not be modified.1 IBCNSP3 ;ALB/AAS - INSURANCE MANAGEMENT EDIT ; 06-JUL-93 2 ;;2.0;INTEGRATED BILLING;**28,52,85,251**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 % G ^IBCNSM4 … … 12 12 S ^TMP($J,"IBCNSPT",2.312,DFN,+DA,3)=$G(^DPT(DFN,.312,+DA,3)) 13 13 S ^TMP($J,"IBCNSPT",2.312,DFN,+DA,4)=$G(^DPT(DFN,.312,+DA,4)) 14 S ^TMP($J,"IBCNSPT",2.312,DFN,+DA,5)=$G(^DPT(DFN,.312,+DA,5))15 14 Q 16 15 ; … … 22 21 I $G(^DPT(DFN,.312,+DA,3))'=$G(^TMP($J,"IBCNSPT",2.312,DFN,+DA,3)) S IBDIF=1 G COMPPTQ 23 22 I $G(^DPT(DFN,.312,+DA,4))'=$G(^TMP($J,"IBCNSPT",2.312,DFN,+DA,4)) S IBDIF=1 G COMPPTQ 24 I $G(^DPT(DFN,.312,+DA,5))'=$G(^TMP($J,"IBCNSPT",2.312,DFN,+DA,5)) S IBDIF=1 G COMPPTQ25 23 ; 26 24 COMPPTQ I IBDIF D:'$D(IBCOVP) COVERED^IBCNSM31(DFN,$P($G(^DPT(DFN,.31)),"^",11)) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNSU.m
r628 r636 1 IBCNSU ;ALB/AAS - INSURANCE UTILITY ROUTINE ; 19-MAY-932 ;;2.0;INTEGRATED BILLING;**28,103 ,371**; 21-MAR-94;Build 573 ;;Per VHA Directive 2004-038, this routine should not be modified.1 IBCNSU ;ALB/AAS - INSURANCE UTILITY ROUTINE ; 19-MAY-93 2 ;;2.0;INTEGRATED BILLING;**28,103**; 21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 AB(IBCPOL,IBYR,IBASK) ; -- Return entry in Annual Benefits file … … 186 186 ; 187 187 DELPQ Q X 188 ;189 DUPADDRL(DATA,IBCNS,FLD1,FLD2) ; Insurance address lines can not be duplicated190 ; DATA - Value being compared191 ; FLD1 - First field to check against192 ; FLD2 - Second field to check against (OPTIONAL)193 ;194 ; Returns 1 if this field is a duplicate of another field.195 ;196 N Z1,Z2197 Q:$G(DATA)="" 0 ; should not happen because this is invoked as an input transform198 Q:'$G(IBCNS) 1 ; stop from editing through fileman199 S DATA=$$UP^XLFSTR($G(DATA)),DATA=$$TRIM^XLFSTR(DATA)200 S Z1=$$GET1^DIQ(36,+$G(IBCNS),+$G(FLD1),"I")201 S Z1=$$UP^XLFSTR(Z1),Z1=$$TRIM^XLFSTR(Z1)202 S Z2=$$GET1^DIQ(36,+$G(IBCNS),+$G(FLD2),"I")203 S Z2=$$UP^XLFSTR(Z2),Z2=$$TRIM^XLFSTR(Z2)204 I DATA=Z1 D CLEAN^DILF Q 1205 I DATA=Z2 D CLEAN^DILF Q 1206 D CLEAN^DILF207 Q 0208 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNSU1.m
r628 r636 1 IBCNSU1 ;ALB/AAS - INSURANCE UTILITY ROUTINE ; 19-MAY-932 ;;2.0;INTEGRATED BILLING;**103,133,244 ,371**;21-MAR-94;Build 573 ;;Per VHA Directive 2004-038, this routine should not be modified.1 IBCNSU1 ;ALB/AAS - INSURANCE UTILITY ROUTINE ; 19-MAY-93 2 ;;2.0;INTEGRATED BILLING;**103,133,244**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 RCHK(X) ; -- Input transform for different revenue codes in file 36 … … 70 70 ; 71 71 N IBY,IB0 S IBY=0 72 G VETQ ; IB*2*371 - Allow edits to the patient name in all cases73 72 S IB0=$G(^DPT(+$G(DA(1)),.312,+$G(DA),0)) 74 73 I $P(IB0,"^",6)'="v" G VETQ … … 95 94 S X1=$TR(X,CHAR,"") I X1?9N,X1=L S X=X1 96 95 ; 96 ; - if "SS" is entered, and the policy belongs to the patient, 97 ; convert that string to the patient's SSN 98 I R=1,X="SS" W " ",L S X=L 99 ; 97 100 K:$L(X)>20!($L(X)<3) X 98 101 Q … … 113 116 S:IBY="" IBY=-1 114 117 HICNQ Q IBY 115 ;116 CHKQUAL(DFN,IEN,QUAL,PC1,PC2) ; check for duplicate qualifiers for patient117 ; and subscriber secondary ID's. All parameters required.118 ;119 ; DFN - internal patient#120 ; IEN - ien of 2.312 subfile121 ; QUAL - passed in response of the user (this is what is being122 ; checked to see if it is valid)123 ; PC1 - this is the piece# for one of the other qualifiers124 ; PC2 - this is the piece# for one of the other qualifiers125 ;126 ; Function returns 1 if the entered qualifier is OK.127 ; Function returns 0 if the entered qualifier is not OK. It is either128 ; a duplicate or is otherwise invalid.129 ;130 NEW OK,DATA,INS131 S OK=1132 I $G(QUAL)="" G CHKQUALX133 S DATA=$G(^DPT(+$G(DFN),.312,+$G(IEN),5))134 I $G(QUAL)=$P(DATA,U,+$G(PC1)) D CQ1 G CHKQUALX ; duplicate135 I $G(QUAL)=$P(DATA,U,+$G(PC2)) D CQ1 G CHKQUALX ; duplicate136 ;137 ; prevent the SSN qualifier when Medicare is the payer138 S INS=+$G(^DPT(+$G(DFN),.312,+$G(IEN),0))139 I $G(QUAL)="SY",$$MCRWNR^IBEFUNC(INS) D CQ2 G CHKQUALX140 ;141 CHKQUALX ;142 Q OK143 ;144 CQ1 ; specific error message#1145 S OK=0146 D EN^DDIOL("You cannot use the same qualifier more than once.",,"!!")147 D EN^DDIOL("",,"!!?5")148 Q149 ;150 CQ2 ; specific error message#2151 S OK=0152 D EN^DDIOL("You cannot use qualifier 'SY' for Medicare.",,"!!")153 D EN^DDIOL("",,"!!?5")154 Q155 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCRBC.m
r628 r636 1 1 IBCRBC ;ALB/ARH - RATES: BILL CALCULATION OF CHARGES ; 22-MAY-1996 2 ;;2.0;INTEGRATED BILLING;**52,80,106,51,137,245 ,370**;21-MAR-94;Build 53 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**52,80,106,51,137,245**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 ; Variable DGPTUPDT may be defined on entry/exit for inpt bills so the PTF will only be updated once per session … … 42 42 ; 43 43 I '$D(^TMP($J,"IBCRCC")) G END 44 ; 45 D MULTCPT^IBCRBCA1 ; adjust charges for Multiple Surgical Procedure Discount 46 D PSB^IBCRBCA2 ; adjust charges for Primary/Secondary Bundling 47 D MODADJ^IBCRBCA3 ; adjust charges for Modifier Adjustment 44 48 ; 45 49 D SORTCI^IBCRBC3 I '$D(^TMP($J,"IBCRCS")) G END … … 136 140 ; 21 procedures associated clinic 137 141 ; 22 procedures Outpatient Encounter, pointer to #409.68 138 ; 23 list of all the procedures modifiers, separated by ','139 142 ; 140 143 ; ^TMP($J,"IBCRCC",X,"CC",x) = comments explaining charge adjustements -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCRBC1.m
r628 r636 1 1 IBCRBC1 ;ALB/ARH - RATES: BILL CALCULATION BILLABLE EVENTS ; 22 MAY 96 2 ;;2.0;INTEGRATED BILLING;**52,80,106,138,51,148,245,270 ,370**;21-MAR-94;Build 53 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**52,80,106,138,51,148,245,270**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 ; For each type of Billable Event, search for items on the bill and calculate the charges … … 115 115 ; 116 116 N IBX,IBBLITEM,IBCHGMTH,IBBR,IBBDIV,IBIDRC,IBCPTARR,IBCPT,IBCPTFN,IBEVDT,IBMOD,IBDIV,IBTYPE,IBCMPNT 117 N IBPPRV,IBBS,IBCLIN,IBOE,IBSAVE,IBUNIT,IBCPTRX ,IBMODSI '$G(IBIFN)!'$G(CS) Q117 N IBPPRV,IBBS,IBCLIN,IBOE,IBSAVE,IBUNIT,IBCPTRX I '$G(IBIFN)!'$G(CS) Q 118 118 ; 119 119 D CPT^IBCRBG1(IBIFN,.IBCPTARR) Q:'IBCPTARR … … 131 131 . S IBCPT=0 F S IBCPT=$O(IBCPTARR(IBCPT)) Q:'IBCPT D 132 132 .. S IBCPTFN=0 F S IBCPTFN=$O(IBCPTARR(IBCPT,IBCPTFN)) Q:'IBCPTFN D 133 ... S IBX=IBCPTARR(IBCPT,IBCPTFN),IBEVDT=$P(IBX,U,1), (IBMOD,IBMODS)=$P(IBX,U,2)133 ... S IBX=IBCPTARR(IBCPT,IBCPTFN),IBEVDT=$P(IBX,U,1),IBMOD=$P(IBX,U,2) 134 134 ... S IBDIV=$P(IBX,U,3),IBPPRV=$P(IBX,U,4),IBCLIN=$P(IBX,U,5),IBOE=$P(IBX,U,6) 135 135 ... ; … … 146 146 ... I +IBMOD S IBMOD=$P($$CPTMOD^IBCRCU1(CS,IBCPT,IBMOD,IBEVDT),",",1) ; check CPT-MODs for billable combination 147 147 ... ; 148 ... S IBSAVE="1^"_IBCPT_U_IBDIV_U_IBTYPE_U_IBCPTFN_U_IBCMPNT_U_IBBS_U_IBPPRV_U_IBCLIN_U_IBOE _U_IBMODS148 ... S IBSAVE="1^"_IBCPT_U_IBDIV_U_IBTYPE_U_IBCPTFN_U_IBCMPNT_U_IBBS_U_IBPPRV_U_IBCLIN_U_IBOE 149 149 ... D BITMCHG^IBCRBC2(RS,CS,IBCPT,IBEVDT,IBUNIT,IBMOD,"",IBIDRC,IBSAVE) 150 150 K ^TMP($J,"IBCRC-INDT") -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCRBC2.m
r628 r636 1 1 IBCRBC2 ;ALB/ARH - RATES: BILL CALCULATION OF ITEM CHARGE ; 22-MAY-1996 2 ;;2.0;INTEGRATED BILLING;**52,106,138,148,245 ,370**;21-MAR-94;Build 53 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**52,106,138,148,245**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 ; Input: RS - rate schedule necessary to calculated modified charges … … 22 22 ; CLINIC - procedures associated clinic 23 23 ; IBOE - Outpatient Encounter, pointer to #408.69 24 ; MODS - list of all modifiers define for the procedure, separated by ','25 24 ; 26 25 ; Total charge is calculated: X = UNITS * UNIT CHARGE of the item (per unit charge (un-adjusted)) … … 35 34 BITMCHG(RS,CS,ITEM,EVDT,UNITS,MOD,INSRC,IDFRC,SAVE) ; get bill charges for a specific item, rate schedule and charge set and date set into temp array 36 35 ; 37 N IBCS0,IBDRVCD,IBBS,IBCHGARR,IBI,IBCNT,IBLN,IBCI,IBRVCD,IBPPRV,IBCHRG,IBTCHRG,IBRCHRG,IBPCHRG,IBACHRG 38 N IBMCHRG,IBMODS,IBBASE,IBCOMI '$G(ITEM)!'$G(CS)!'$G(UNITS) Q36 N IBCS0,IBDRVCD,IBBS,IBCHGARR,IBI,IBCNT,IBLN,IBCI,IBRVCD,IBPPRV,IBCHRG,IBTCHRG,IBRCHRG,IBPCHRG,IBACHRG,IBBASE,IBCOM 37 I '$G(ITEM)!'$G(CS)!'$G(UNITS) Q 39 38 ; 40 39 S RS=$G(RS),EVDT=$S(+$G(EVDT):+EVDT\1,1:DT),MOD=$G(MOD),INSRC=$G(INSRC),IDFRC=$G(IDFRC),SAVE=$G(SAVE) 41 S IBCS0=$G(^IBE(363.1,+CS,0)),IBDRVCD=$P(IBCS0,U,5),IBPPRV=$P(SAVE,U,8) ,IBMODS=$P(SAVE,U,11)40 S IBCS0=$G(^IBE(363.1,+CS,0)),IBDRVCD=$P(IBCS0,U,5),IBPPRV=$P(SAVE,U,8) 42 41 S IBBS=+ITEM I $P($G(^IBE(363.3,+$P(IBCS0,U,2),0)),U,4)'=1 S IBBS=$P(SAVE,U,7) I 'IBBS S IBBS=$P(IBCS0,U,6) 43 42 I 'IBBS Q … … 55 54 . S IBCHRG=IBCHRG+IBBASE 56 55 . S IBPCHRG=IBCHRG I +IBPPRV S IBPCHRG=$$PRVCHG^IBCRCC(CS,IBCHRG,IBPPRV,EVDT,ITEM) 57 . S IBMCHRG=+IBPCHRG I +IBMODS S IBMCHRG=$$MODCHG^IBCRCC(CS,IBPCHRG,IBMODS) 58 . S (IBCHRG,IBTCHRG)=+IBMCHRG 56 . S (IBCHRG,IBTCHRG)=+IBPCHRG 59 57 . S IBACHRG=IBTCHRG I +RS,+IBTCHRG S IBRCHRG=$$RATECHG^IBCRCC(RS,IBTCHRG,EVDT),IBACHRG=+IBRCHRG 60 58 . ; … … 64 62 . I (UNITS>1)!(+IBBASE) S IBCOM=$$COMMUB(CS,UNITS,IBBASE) I IBCOM'="" D COMMENT(IBCNT,IBCOM) 65 63 . I $P(IBPCHRG,U,2)'="" S IBCOM=$P(IBPCHRG,U,2) I IBCOM'="" D COMMENT(IBCNT,IBCOM) 66 . I $P(IBMCHRG,U,2)'="" S IBCOM=$P(IBMCHRG,U,2) I IBCOM'="" D COMMENT(IBCNT,IBCOM)67 64 . I $P(IBRCHRG,U,2)'="" S IBCOM=$P(IBRCHRG,U,2) I IBCOM'="" D COMMENT(IBCNT,IBCOM) 68 65 Q -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCRBG.m
r628 r636 1 1 IBCRBG ;ALB/ARH - RATES: BILL SOURCE EVENTS (INPT) ; 21 MAY 96 2 ;;2.0;INTEGRATED BILLING;**52,80,106,51,142,159,210,245 ,382,389**;21-MAR-94;Build 63 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**52,80,106,51,142,159,210,245**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 INPTPTF(IBIFN,CS) ; search PTF record for billable bedsections, transfer DRGs, and length of stay 6 6 ; - screens out days for pass, leave and SC treatment 7 7 ; - adds charges for only one BS if the ins company does not allow multiple bedsections per bill (36,.06) 8 ; Output: ^TMP($J,"IBCRC-INDT", BILLABLE DATE) = MOVE DT/TM ^ BILL BS ^ SC FLAG ^ DRG ^ DIV ^ SPECIALTY ^ MOVE #8 ; Output: ^TMP($J,"IBCRC-INDT", BILLABLE DATE) = MOVE DT/TM ^ BILL BS ^ SC FLAG ^ DRG ^ DIVISION ^ SPECIALTY 9 9 ; 10 10 N IB0,DFN,PTF,IBU,IBBDT,IBEDT,IBTF,IBADM,IBX,IBINSMBS … … 24 24 D PTF(PTF) ; get movements and bedsections 25 25 D PTFDV(PTF) ; reset movements and bedsections for ward/division 26 D PTFFY(PTF,IBBDT,IBEDT) ; reset movements for FY DRG change27 26 ; 28 27 D BSLOS(IBBDT,IBEDT,IBTF,IBADM,IBINSMBS) ; calculate days in bedsections within timeframe of the bill … … 35 34 PTF(PTF) ; find all movements in PTF for the admission by date and billing bedsection (501 movement) 36 35 ; the movement date is the date the patient left the bedsection 37 ; Output: ^TMP($J,"IBCRC-PTF", MOVE DT/TM)=MOVE DT/TM ^ BILL BED ^ SC FLAG ^ TRANSFER DRG ^ ^ SPECIALTY ^ MOVE #36 ; Output: ^TMP($J,"IBCRC-PTF", MOVE DT/TM)=MOVE DT/TM ^ BILL BEDSECTION ^ SC FLAG ^ TRANSFER DRG ^ ^ SPECIALTY 38 37 ; 39 38 N IBMOVE,IBMVLN,IBBILLBS,IBENDDT,IBMSC,IBMDRG S PTF=+$G(PTF) … … 44 43 . S IBMSC="" I +$P(IBMVLN,U,18)=1 S IBMSC=1 ; sc movement 45 44 . S IBMDRG=$$MVDRG(PTF,IBMOVE) ; movement DRG 46 . S ^TMP($J,"IBCRC-PTF",IBENDDT)=IBENDDT_U_IBBILLBS_U_IBMSC_U_IBMDRG_U_U_+$P(IBMVLN,U,2) _U_IBMOVE45 . S ^TMP($J,"IBCRC-PTF",IBENDDT)=IBENDDT_U_IBBILLBS_U_IBMSC_U_IBMDRG_U_U_+$P(IBMVLN,U,2) 47 46 Q 48 47 ; … … 58 57 ; the movement date is the date the patient left the bedsection, so admission date is not in PTF array 59 58 ; 60 ; Input: ^TMP($J,"IBCRC-PTF", MOVE DT/TM) = MOVE DT/TM ^ BILL BS ^ SC FLAG ^ DRG ^ DIV ^ SPECIALTY ^ MOVE #61 ; Output: ^TMP($J,"IBCRC-INDT", BILLABLE DATE) = MOVE DT/TM ^ BILL BS ^ SC FLAG ^ DRG ^ DIV ^ SPECIALTY ^ MOVE #59 ; Input: ^TMP($J,"IBCRC-PTF", MOVE DT/TM) = MOVE DT/TM ^ BILL BS ^ SC FLAG ^ DRG ^ DIVISION ^ SPECIALTY 60 ; Output: ^TMP($J,"IBCRC-INDT", BILLABLE DATE) = MOVE DT/TM ^ BILL BS ^ SC FLAG ^ DRG ^ DIVISION ^ SPECIALTY 62 61 ; 63 62 N IBSBDT,IBSEDT,IBS,IBLASTDT,IBX … … 97 96 PTFDV(PTF) ; find all ward/location transfers in PTF for the patient to determine the site/division the patient was in 98 97 ; the division of the ward will be added to the PTF bedsection movements 99 ; Input: ^TMP($J,"IBCRC-PTF", move dt/tm) = move dt/tm ^ bill bs ^ sc flag ^ move drg ^ ^ specialty ^ move #100 ; Output: ^TMP($J,"IBCRC-PTF", move dt/tm) = move dt/tm ^ bill bs ^ sc flag ^ move drg ^ WARD DIV ^ spec ^ move#98 ; Input: ^TMP($J,"IBCRC-PTF", move dt/tm) = move dt/tm ^ bill bs ^ sc flag ^ move drg ^^ specialty 99 ; Output: ^TMP($J,"IBCRC-PTF", move dt/tm) = move dt/tm ^ bill bs ^ sc flag ^ move drg ^ WARD DIV ^ specialty 101 100 ; ^TMP($J,"IBCRC-DIV", TRANSFER DATE/TIME) = WARD DIVISION 102 101 N IBTRNSF,IBTRLN,IBENDDT,IBTRDV,IBMVDT,IBTRDT … … 124 123 Q 125 124 ; 126 PTFFY(PTF,BEGDT,ENDDT) ; add movement for FY (10/1) if date range covers FY and DRG changes 127 ; the DRG may change on FY so check and if necessary add movement for pre-FY with old DRG 128 ; Input: ^TMP($J,"IBCRC-PTF", move dt/tm) = move dt/tm ^ bill bs ^ sc flag ^ move drg ^ ^ specialty ^ move # 129 ; Output: ^TMP($J,"IBCRC-PTF", move dt/tm) = move dt/tm ^ bill bs ^ sc flag ^ MOVE DRG ^ ward div ^ spec ^ move# 130 N IBBEGDT,IBENDDT,IBYRB,IBYRE,IBYR,IBFY,IBMVLN,IBMVDRG,IBMOVE,IBFYDRG Q:'$G(PTF) 131 Q:'$G(BEGDT) S IBFY=$E(BEGDT,1,3)_"1001" 132 ; 133 S IBBEGDT=BEGDT,IBENDDT=BEGDT\1 F S IBENDDT=$O(^TMP($J,"IBCRC-PTF",IBENDDT)) Q:'IBENDDT D S IBBEGDT=IBENDDT 134 . S IBYRB=$E(IBBEGDT,1,3),IBYRE=$E(IBENDDT,1,3) I (IBYRE-IBYRB)>10 Q 135 . F IBYR=IBYRB:1:IBYRE S IBFY=IBYR_"1001" I IBBEGDT<IBFY,IBENDDT>IBFY D 136 .. S IBMVLN=$G(^TMP($J,"IBCRC-PTF",IBENDDT)),IBMVDRG=$P(IBMVLN,U,4),IBMOVE=$P(IBMVLN,U,7) 137 .. S IBFYDRG=$$MVDRG(PTF,IBMOVE,IBYR_"0930") 138 .. I IBMVDRG'=IBFYDRG S $P(IBMVLN,U,4)=IBFYDRG S ^TMP($J,"IBCRC-PTF",IBFY)=IBMVLN 139 Q 140 ; 141 MVDRG(PTF,M,CDATE) ; Return the DRG for a specific PTF Movememt (M=move ifn) 142 ; CDATE is optional, used if need to calculate DRG for some day within the move, not at the end date 125 MVDRG(PTF,M) ; Return the DRG for a specific PTF Movememt (M=move ifn) 143 126 N DPT0,PTF0,PTFM0,PTF70,IBBEG,IBEND,IBDSST,IBDX,IBPRC0,IBPRC,IBDRG,IBI,IBJ,IBP 144 127 N SEX,AGE,ICDDX,ICDPRC,ICDEXP,ICDDMS,ICDTRS,ICDDRG,ICDMDC,ICDRTC,ICDDATE … … 175 158 .. F IBI=5:1:9 S IBPRC=$P(IBPRC0,U,IBI) I +IBPRC,($$ICD0^IBACSV(+IBPRC)'="") S IBJ=IBJ+1,ICDPRC(IBJ)=+IBPRC 176 159 ; 177 S ICDDATE=$ S(+$G(CDATE):CDATE,+$P(PTFM0,U,10):+$P(PTFM0,U,10),1:DT) ;date for the DRG Grouper versioning160 S ICDDATE=$P(PTFM0,U,10) ; use the movement date for the DRG Grouper versioning 178 161 D ^ICDDRG S IBDRG=$G(ICDDRG) 179 162 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCRBH1.m
r628 r636 1 1 IBCRBH1 ;ALB/ARH - RATES: BILL HELP DISPLAYS - CHARGES ; 10-OCT-1998 2 ;;2.0;INTEGRATED BILLING;**106,245 ,370**;21-MAR-94;Build 53 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**106,245**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 DISPCHG(IBIFN) ; display a bills items and their charges, display only, does not change the charges on the bill … … 36 36 .. I IBBEVNT["PROSTHETICS" D PI^IBCRBC1(IBIFN,IBRS,IBCS) 37 37 .. I IBBEVNT["PROCEDURE" D CPT^IBCRBC1(IBIFN,IBRS,IBCS) 38 ; 39 I '$D(^TMP($J,"IBCRCC")) G END 40 ; 41 D MULTCPT^IBCRBCA1 42 D PSB^IBCRBCA2 43 D MODADJ^IBCRBCA3 38 44 ; 39 45 END Q -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCRCC.m
r628 r636 1 1 IBCRCC ;ALB/ARH - RATES: CALCULATION OF ITEM CHARGE ;22-MAY-1996 2 ;;2.0;INTEGRATED BILLING;**52,80,106,138,245,223,309,347 ,370**;21-MAR-94;Build 52 ;;2.0;INTEGRATED BILLING;**52,80,106,138,245,223,309,347**;21-MAR-94;Build 24 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 91 91 Q IBX_IBPDTY 92 92 ; 93 MODCHG(CS,CHG,MODS) ; return adjusted amount due to RC modifier adjustment94 ; straight adjustment for RC Physician charges by modifier, if no modifier adjustment returns original amount95 ; Input: Charge Set, Procedure Charge, Modifiers - list with modifier IEN's separated by ','96 ; Output: discounted amount ^ comment (if discounted) ^ percent discount97 ;98 N IBCS0,IBBR0,IBMOD,IBMODS,IBMODE,IBDSCNT,IBPDTY,IBI,IBX,IBY99 S CHG=+$G(CHG),MODS=$G(MODS),(IBBR0,IBPDTY,IBMODS)="",IBDSCNT=1,IBX=+CHG100 I +$G(CS) S IBCS0=$G(^IBE(363.1,+CS,0)),IBBR0=$G(^IBE(363.3,+$P(IBCS0,U,2),0))101 I $P(IBBR0,U,1)'["RC PHYSICIAN" S MODS="" ; professional charge only102 I $P(IBBR0,U,4)'=2 S MODS="" ; CPT item only103 I 'CHG S MODS=""104 ;105 I +MODS F IBI=1:1 S IBMOD=$P(MODS,",",IBI) Q:'IBMOD S IBY=0 D106 . I IBMOD=3 S IBMODE=22,IBY=1.2,IBX=IBX*IBY ; modifier 22 at 120% adjustment107 . I IBMOD=10 S IBMODE=50,IBY=1.54,IBX=IBX*IBY ; modifier 50 at 154% adjustment108 . I +IBY S IBMODS=IBMODS_$S(IBMODS="":"",1:",")_IBMODE,IBDSCNT=IBDSCNT*IBY ; allow for multiple discounts109 I IBMODS'="" S IBPDTY=U_"Modifier "_IBMODS_" Adjustment "_(IBDSCNT*100)_"% of "_$J(CHG,0,2)_U_+IBDSCNT110 Q IBX_IBPDTY111 ;112 93 HRUNIT(HRS) ; returns Hour Units based on the Hours passed in 113 94 ; Hour Units are the hours rounded to the nearest whole hour (less than 30 minutes is 0 units) … … 121 102 ; 122 103 MNUNIT(MNS) ; return Minute Units based on the Minutes passed in 123 ; Minute Units are 15 minute intervals, rounded up after anyminutes124 N IBX S IBX=0 I +$G(MNS) S IBX=(MNS\15) S: +(MNS#15)IBX=IBX+1 I 'IBX S IBX=1104 ; Minute Units are 15 minute intervals, rounded down for less than 5 minutes 105 N IBX S IBX=0 I +$G(MNS) S IBX=(MNS\15) S:(MNS#15)>4 IBX=IBX+1 I 'IBX S IBX=1 125 106 Q IBX -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCRHBRV.m
r628 r636 1 1 IBCRHBRV ;ALB/ARH - RATES: UPLOAD (RC) VERSION FUNCTIONS ; 14-FEB-01 2 ;;2.0;INTEGRATED BILLING;**148,169,245,270,285,298,325,334,355,360,365 ,382,390**;21-MAR-94;Build 22 ;;2.0;INTEGRATED BILLING;**148,169,245,270,285,298,325,334,355,360,365**;21-MAR-94;Build 2 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; 5 ; RC functions related to Version . Update VLIST with new versions. Update FTYPE if new types of files.5 ; RC functions related to Version, most have to be updated when a new version is to be exported 6 6 ; 7 7 SELVERS() ; get version to upload from user 8 N DIR,DIRUT,DTOUT,DUOUT,IBVLIST,IBQUIT,IBVERS,IBI,IBJ,IBX,X,Y 9 ; 10 S IBVLIST=$$VERSTR(),IBQUIT=0,IBVERS=0 11 ; 12 W !!,"Select the version of Reasonable Charges to upload." 13 S DIR("?",1)="Enter the code from the list corresponding to the version of Reasonable Charges" 14 S DIR("?",2)="to upload. There are no version 1.3, 2.2, or 2.10 (ten) RC charges." S DIR("?",3)=" " 15 S DIR("?",4)="Versions: "_IBVLIST S DIR("?",5)=" " S DIR("?")="Enter version number to upload." 16 ; 17 F IBI=1:1 D I +IBQUIT Q 18 . W !!,?5,"Select one of the following:",! 19 . F IBJ=1:1 S IBX=$P(IBVLIST,",",IBJ) Q:'IBX W !,?10,IBX,?20,"Reasonable Charges version ",IBX 20 . ; 21 . W ! S DIR("A")="Enter Version" S DIR(0)="FO^1:5" D ^DIR I $D(DIRUT) S IBQUIT=1 22 . I Y>0,(","_IBVLIST_",")[(","_Y_",") S IBVERS=Y,IBQUIT=1 W " Reasonable Charges version ",IBVERS 23 ; 24 Q IBVERS 8 N DIR,DIRUT,DTOUT,DUOUT,X,Y,IB,IBV,IBVP,IBX 9 S IBV="1.0^1.1^1.2^1.4^2.0^2.1^2.3^2.4^2.5^2.6^2.7^2.8^2.9" ; List of valid version numbers 10 S IBX=0 11 W !!,"Select the version of Reasonable Charges to upload.",! 12 S DIR("?")="Enter a code from the list corresponding to the version of Reasonable Charges to upload. There was no version 1.3 nor 2.2 of Reasonable Charges." 13 S DIR(0)="SO^" 14 F IB=1:1:$L(IBV,U) S IBVP=$P(IBV,U,IB),DIR(0)=DIR(0)_+IBVP_":Reasonable Charges version "_IBVP_";" 15 D ^DIR K DIR S:$L(Y)=1 Y=Y_".0" S IBX=+$S(IBV[Y:Y,1:0) 16 Q IBX 25 17 ; 26 18 VERSION() ; return currently loaded version of RC files (1, 1.1, ...) … … 29 21 ; 30 22 VERSDT(VERS) ; return Effective Date of a version of RC files, either version passed in or currently loaded version 31 N IB I,LINE,IBX S IBX="" S VERS=+$G(VERS) I 'VERS SVERS=$$VERSION32 I +VERS F IBI=1:1 S LINE=$P($T(VLIST+IBI),";;",2,99) Q:'LINE I VERS=+LINE S IBX=$P(LINE,U,3)23 N IBX S:'$G(VERS) VERS=$$VERSION 24 S IBX=$S(VERS=1:2990901,VERS=1.1:3001102,VERS=1.2:3010508,VERS=1.4:3030429,VERS=2:3031219,VERS=2.1:3040415,VERS=2.3:3050101,VERS=2.4:3050411,VERS=2.5:3051001,VERS=2.6:3060101,VERS=2.7:3060825,VERS=2.8:3061001,VERS=2.9:3070101,1:"") 33 25 Q IBX 34 26 ; 35 27 VERSEDT(VERS) ; return Inactive Date of a version of RC files, either version passed in or currently loaded version 36 N IB I,LINE,IBX S IBX="" S VERS=+$G(VERS) I 'VERS SVERS=$$VERSION37 I +VERS F IBI=1:1 S LINE=$P($T(VLIST+IBI),";;",2,99) Q:'LINE I VERS=+LINE S IBX=$P(LINE,U,4)28 N IBX S:'$G(VERS) VERS=$$VERSION 29 S IBX=$S(VERS=1:3001101,VERS=1.1:3010507,VERS=1.2:3030428,VERS=1.4:3031218,VERS=2:3040414,VERS=2.1:3041231,VERS=2.3:3050410,VERS=2.4:3050930,VERS=2.5:3051231,VERS=2.6:3060824,VERS=2.7:3060930,VERS=2.8:3061231,1:"") 38 30 Q IBX 39 31 ; 40 VERSALL() ; return all RC versions and corresponding effective date 'VERS;EFFDT^VERS;EFFDT^...' 41 N IBI,LINE,IBX,IBC S IBX="",IBC="" 42 F IBI=1:1 S LINE=$P($T(VLIST+IBI),";;",2,99) Q:'LINE S IBX=IBX_IBC_+LINE_";"_$P(LINE,U,3),IBC=U 32 VERSALL() ; returns all RC versions and corresponding effective date 33 N IBX S IBX="1;2990901^1.1;3001102^1.2;3010508^1.4;3030429^2;3031219^2.1;3040415^2.3;3050101^2.4;3050411^2.5;3051001^2.6;3060101^2.7;3060825^2.8;3061001^2.9;3070101" 43 34 Q IBX 44 35 ; 45 VERSEND() ; return all RC versions and corresponding inactive date 'VERS;INACTIVE DT^VERS;INACTIVE DT^...' 46 N IBI,LINE,IBX,IBC S IBX="",IBC="" 47 F IBI=1:1 S LINE=$P($T(VLIST+IBI),";;",2,99) Q:'LINE I $P(LINE,U,4) S IBX=IBX_IBC_+LINE_";"_$P(LINE,U,4),IBC=U 36 VERSEND() ; returns all RC versions and corresponding inactive dates 37 N IBX S IBX="1;3001101^1.1;3010507^1.2;3030428^1.4;3031218^2;3040414^2.1;3041231^2.3;3050410^2.4;3050930^2.5;3051231^2.6;3060824^2.7;3060930^2.8;3061231" 48 38 Q IBX 39 ; 49 40 ; 50 41 VERSITE(SITE) ; returns the list of versions loaded for a particular site 51 42 ; *** uses 99201 in the RC PHYSICIAN set to check which versions/dates are loaded 52 43 ; *** so 99201 must have a pro charge in all versions, if not it must be replaced with an item that does 53 N IBCS,IBXRF,IBITM,IBVERS,IBCSFN,IBI,IBV,IBX,IBY ,IBC44 N IBCS,IBXRF,IBITM,IBVERS,IBCSFN,IBI,IBV,IBX,IBY S IBX="" 54 45 S IBVERS=$$VERSALL,IBITM=99201 55 46 ; … … 58 49 . S IBCSFN=$O(^IBE(363.1,"B",IBCS,0)) Q:'IBCSFN S IBXRF="AIVDTS"_IBCSFN 59 50 . F IBI=1:1 S IBV=$P(IBVERS,U,IBI) Q:'IBV I $O(^IBA(363.2,IBXRF,IBITM,-$P(IBV,";",2),0)) S IBY(+IBV)="" 51 S IBV="" F S IBV=$O(IBY(IBV)) Q:'IBV S IBX=IBX_IBV_"," 60 52 ; 61 S (IBX,IBC)="" F IBI=1:1 S IBV=+$P(IBVERS,U,IBI) Q:'IBV I $D(IBY(IBV)) S IBX=IBX_IBC_IBV S IBC="," 62 ; 53 I $E(IBX,$L(IBX))="," S IBX=$E(IBX,1,$L(IBX)-1) 63 54 Q IBX 64 55 ; … … 71 62 ; 72 63 MSGVERS(SITE) ; check if versions are being loaded in the correct order, should be loaded in date order 64 ; displays messages to the user: 73 65 ; - if loading a version that has already been loaded for the site 74 66 ; - if loading a version when any future versions have already been loaded for the site … … 76 68 ; *** uses 99201 in the RC PHYSICIAN set to check which versions/dates are loaded 77 69 ; *** so 99201 must have a pro charge in all versions, if not it must be replaced with an item that does 78 N IBVERS,IBVDTC,IBVERSIN,IBVERS C,IBVERSO,IBI,VERSTRQ:'$G(SITE)70 N IBVERS,IBVDTC,IBVERSIN,IBVERSO Q:'$G(SITE) 79 71 ; 80 S IBVERS=$$VERSION Q:'IBVERS S IBVDTC=$$VERSDT,IBVERSIN=","_$$VERSITE(SITE)_"," ,IBVERSC=","_IBVERS_","72 S IBVERS=$$VERSION Q:'IBVERS S IBVDTC=$$VERSDT,IBVERSIN=","_$$VERSITE(SITE)_"," 81 73 ; 82 74 ; check if loading a version that has already been loaded 83 I IBVERSIN[ IBVERSCD75 I IBVERSIN[(","_IBVERS_",") D 84 76 . W !!,?5,"*** It appears version RC v",IBVERS," has already been loaded for this site ***" 85 77 ; 86 78 ; check if loading a version when any future versions have already been loaded 87 S VERSTR=","_$$VERSTR()_",",VERSTR=$P(VERSTR,IBVERSC,2) ; all versions after current version88 F IBI=1:1 S IBVERSO=$P(VERSTR,",",IBI) Q:'IBVERSO I IBVERSIN[(","_IBVERSO_",")D89 . W !!,?5,">>> Currently trying to load RC v"_IBVERS_" but RC v"_IBVERSO_" appears to be already",!,?9,"loaded for this site. The versions should be loaded in date order."79 F IBVERSO=1,1.1,1.2,1.4,2,2.1,2.3,2.4,2.5,2.6,2.7,2.8,2.9 I IBVERSO>IBVERS D 80 . I IBVERSIN[(","_IBVERSO_",") D 81 .. W !!,?5,">>> Currently trying to load RC v"_IBVERS_" but RC v"_IBVERSO_" appears to be already",!,?9,"loaded for this site. The versions should be loaded in date order." 90 82 ; 91 83 ; check if loading a version when the last version has not yet been loaded 92 S VERSTR=","_$$VERSTR(1)_",",VERSTR=$P(VERSTR,IBVERSC,2) ; all versions before current version, reverse order93 S IBVERSO=$P(VERSTR,",",1) I +IBVERSO,IBVERSIN'[(","_IBVERSO_",") D94 . W !!,?5,"*** Currently trying to load RC v"_IBVERS_" but RC v"_IBVERSO_" does not appear to be",!,?9,"loaded for this site. The versions should be loaded in date order."95 . W !!,?5,">>> Continue only if there will never be a need to bill events before ",!,?9,$$FMTE^XLFDT(IBVDTC,2)," for this site. If RC v"_IBVERSO_" will be needed for this site then",!,?9,"load it first."84 F IBVERSO=2.9,2.8,2.7,2.6,2.5,2.4,2.3,2.1,2,1.4,1.2,1.1,1 I IBVERS>IBVERSO D Q 85 . I IBVERSIN'[(","_IBVERSO_",") D 86 .. W !!,?5,"*** Currently trying to load RC v"_IBVERS_" but RC v"_IBVERSO_" does not appear to be",!,?9,"loaded for this site. The versions should be loaded in date order." 87 .. W !!,?5,">>> Continue only if there will never be a need to bill events before ",!,?9,$$FMTE^XLFDT(IBVDTC,2)," for this site. If RC v"_IBVERSO_" will be needed for this site then",!,?9,"load it first." 96 88 ; 97 89 Q 98 90 ; 99 VERSTR(RVRS) ; returns string containing list of all Reasonable Charges versions with charges, separated by "," 100 ; RVRS - if set, returns the list of versions in reverse order 101 N IBI,LINE,IBS,IBR,IBC,IBX S (IBS,IBR,IBC,IBX)="" 102 F IBI=1:1 S LINE=$P($T(VLIST+IBI),";;",2,99) Q:'LINE S IBS=IBS_IBC_+LINE,IBR=+LINE_IBC_IBR S IBC="," 103 S IBX=IBS I +$G(RVRS) S IBX=IBR 104 Q IBX 91 FILES(IBFILES,VERS) ; source Host file name, description, and routine label that parses the file 92 ; the subscript used for the file in XTMP is 'IBCR RC '_X w/ X=the routine label that parses the file 105 93 ; 94 I $G(VERS)=1.1 G FBREAL 95 I $G(VERS)=1.2 G FCREAL 96 I $G(VERS)=1.4 G FDREAL 97 I $G(VERS)=2 G FEREAL 98 I $G(VERS)=2.1 G FFREAL 99 I $G(VERS)=2.3 G FGREAL 100 I $G(VERS)=2.4 G FHREAL 101 I $G(VERS)=2.5 G FIREAL^IBCRHBV1 102 I $G(VERS)=2.6 G FJREAL^IBCRHBV1 103 I $G(VERS)=2.7 G FKREAL^IBCRHBV1 104 I $G(VERS)=2.8 G FLREAL^IBCRHBV1 105 I $G(VERS)=2.9 G FMREAL^IBCRHBV1 106 106 ; 107 ; 108 ; 109 ; 110 ; 111 ; 112 ; File Names: 'IBRCyymmx.TXT' w/ yymm - year month of version release (except v1) 113 ; 'IBRCyymm', file version identifier prefix, from VLIST text version description 114 ; x=A-I/F, single character file identifier, from FTYPE text file description 115 ; 116 FILES(IBFILES,VERS) ; returns array of source Host Files and data for version requested, pass IBFILES by reference 117 N IBI,LINE,IBTYPE,IBFILE,IBNAME,IBDESC S VERS=+$G(VERS) I 'VERS S VERS=1 118 ; 119 ; get requested versions data 120 F IBI=1:1 S LINE=$P($T(VLIST+IBI),";;",2,99) Q:'LINE I VERS=+LINE S IBTYPE=$P(LINE,U,2),IBFILE=$P(LINE,U,5) Q 121 ; 122 ; get requested versions files 123 I +$G(IBTYPE) F IBI=1:1 S LINE=$P($T(@("FT"_IBTYPE)+IBI),";;",2,99) Q:LINE="" D 124 . S IBNAME=IBFILE_$P(LINE,":",1)_".TXT",IBDESC="RC v"_+VERS_" "_$P(LINE,":",2,99) 125 . S IBFILES(IBNAME)=IBDESC 107 FREAL S IBFILES("IBRCVA.TXT")="RC v1 Inpatient Facility Charges^A" 108 S IBFILES("IBRCVB.TXT")="RC v1 Inpatient Facility Area Factors^B" 109 S IBFILES("IBRCVC.TXT")="RC v1 Outpatient Facility Charges^C" 110 S IBFILES("IBRCVD.TXT")="RC v1 Outpatient Facility Area Factors^D" 111 S IBFILES("IBRCVE.TXT")="RC v1 Physician Charges E^E" 112 S IBFILES("IBRCVF.TXT")="RC v1 Physician Charges F^F" 113 S IBFILES("IBRCVG.TXT")="RC v1 Physician Charges G^G" 114 S IBFILES("IBRCVH.TXT")="RC v1 Physician Area Factors^H" 115 S IBFILES("IBRCVI.TXT")="RC v1 Physician Unit Area Factors^I" 126 116 Q 127 117 ; 118 FBREAL S IBFILES("IBRC0011A.TXT")="RC v1.1 Inpatient Facility Charges^A" 119 S IBFILES("IBRC0011B.TXT")="RC v1.1 Inpatient Facility Area Factors^B" 120 S IBFILES("IBRC0011C.TXT")="RC v1.1 Outpatient Facility Charges^C" 121 S IBFILES("IBRC0011D.TXT")="RC v1.1 Outpatient Facility Area Factors^D" 122 S IBFILES("IBRC0011E.TXT")="RC v1.1 Physician Charges E^E" 123 S IBFILES("IBRC0011F.TXT")="RC v1.1 Physician Charges F^F" 124 S IBFILES("IBRC0011G.TXT")="RC v1.1 Physician Charges G^G" 125 S IBFILES("IBRC0011H.TXT")="RC v1.1 Physician Area Factors^H" 126 S IBFILES("IBRC0011I.TXT")="RC v1.1 Physician Unit Area Factors^I" 127 Q 128 128 ; 129 ; versions and their critical data, add new versions here 130 VLIST ; version ^ file type/version ^ effective date ^ inactive date ^ file prefix 131 ;;1.0^1^2990901^3001101^IBRCV 132 ;;1.1^1^3001102^3010507^IBRC0011 133 ;;1.2^1^3010508^3030428^IBRC0105 134 ;;1.4^1^3030429^3031218^IBRC0304 135 ;;2.0^2^3031219^3040414^IBRC0312 136 ;;2.1^2^3040415^3041231^IBRC0404 137 ;;2.3^2^3050101^3050410^IBRC0501 138 ;;2.4^2^3050411^3050930^IBRC0504 139 ;;2.5^2^3051001^3051231^IBRC0510 140 ;;2.6^2^3060101^3060824^IBRC0601 141 ;;2.7^2^3060825^3060930^IBRC0608 142 ;;2.8^2^3061001^3061231^IBRC0610 143 ;;2.9^2^3070101^3070930^IBRC0701 144 ;;2.11^2^3071001^3071231^IBRC0710 145 ;;3.1^2^3080101^^IBRC0801 146 ;; 147 ; 148 ; 149 ; 150 ; 151 ; 152 ; 153 ; 154 FTYPE ; file type/versions and relevant data 155 ; file identifer is used with XTMP subscript 'IBCR RC ' and routine label to parse file 156 ; file identifier : file name/description ^ file identifier ^ number of columns (for v2+) 129 FCREAL S IBFILES("IBRC0105A.TXT")="RC v1.2 Inpatient Facility Charges^A" 130 S IBFILES("IBRC0105B.TXT")="RC v1.2 Inpatient Facility Area Factors^B" 131 S IBFILES("IBRC0105C.TXT")="RC v1.2 Outpatient Facility Charges^C" 132 S IBFILES("IBRC0105D.TXT")="RC v1.2 Outpatient Facility Area Factors^D" 133 S IBFILES("IBRC0105E.TXT")="RC v1.2 Physician Charges E^E" 134 S IBFILES("IBRC0105F.TXT")="RC v1.2 Physician Charges F^F" 135 S IBFILES("IBRC0105G.TXT")="RC v1.2 Physician Charges G^G" 136 S IBFILES("IBRC0105H.TXT")="RC v1.2 Physician Area Factors^H" 137 S IBFILES("IBRC0105I.TXT")="RC v1.2 Physician Unit Area Factors^I" 138 Q 157 139 ; 158 FT1 ; Reasonable Charge File Type 1 files 159 ;;A:Inpatient Facility Charges^A 160 ;;B:Inpatient Facility Area Factors^B 161 ;;C:Outpatient Facility Charges^C 162 ;;D:Outpatient Facility Area Factors^D 163 ;;E:Physician Charges E^E 164 ;;F:Physician Charges F^F 165 ;;G:Physician Charges G^G 166 ;;H:Physician Area Factors^H 167 ;;I:Physician Unit Area Factors^I 168 ;; 140 FDREAL S IBFILES("IBRC0304A.TXT")="RC v1.4 Inpatient Facility Charges^A" 141 S IBFILES("IBRC0304B.TXT")="RC v1.4 Inpatient Facility Area Factors^B" 142 S IBFILES("IBRC0304C.TXT")="RC v1.4 Outpatient Facility Charges^C" 143 S IBFILES("IBRC0304D.TXT")="RC v1.4 Outpatient Facility Area Factors^D" 144 S IBFILES("IBRC0304E.TXT")="RC v1.4 Physician Charges E^E" 145 S IBFILES("IBRC0304F.TXT")="RC v1.4 Physician Charges F^F" 146 S IBFILES("IBRC0304G.TXT")="RC v1.4 Physician Charges G^G" 147 S IBFILES("IBRC0304H.TXT")="RC v1.4 Physician Area Factors^H" 148 S IBFILES("IBRC0304I.TXT")="RC v1.4 Physician Unit Area Factors^I" 149 Q 169 150 ; 170 FT2 ; Reasonable Charges File Type 2 files 171 ;;A:Inpatient Facility Charges^A^10 172 ;;B:Outpatient Facility Charges^B^14 173 ;;C:Professional Charges^C^23 174 ;;D:Service Category Codes^D^4 175 ;;E:Area Factors^E^41 176 ;;F:VA Sites and Zip Codes^F^4 177 ;; 151 FEREAL S IBFILES("IBRC0312A.TXT")="RC v2.0 Inpatient Facility Charges^A^10" 152 S IBFILES("IBRC0312B.TXT")="RC v2.0 Outpatient Facility Charges^B^14" 153 S IBFILES("IBRC0312C.TXT")="RC v2.0 Professional Charges^C^23" 154 S IBFILES("IBRC0312D.TXT")="RC v2.0 Service Category Codes^D^4" 155 S IBFILES("IBRC0312E.TXT")="RC v2.0 Area Factors^E^41" 156 S IBFILES("IBRC0312F.TXT")="RC v2.0 VA Sites and Zip Codes^F^4" 157 Q 158 ; 159 FFREAL S IBFILES("IBRC0404A.TXT")="RC v2.1 Inpatient Facility Charges^A^10" 160 S IBFILES("IBRC0404B.TXT")="RC v2.1 Outpatient Facility Charges^B^14" 161 S IBFILES("IBRC0404C.TXT")="RC v2.1 Professional Charges^C^23" 162 S IBFILES("IBRC0404D.TXT")="RC v2.1 Service Category Codes^D^4" 163 S IBFILES("IBRC0404E.TXT")="RC v2.1 Area Factors^E^41" 164 S IBFILES("IBRC0404F.TXT")="RC v2.1 VA Sites and Zip Codes^F^4" 165 Q 166 ; 167 FGREAL S IBFILES("IBRC0501A.TXT")="RC v2.3 Inpatient Facility Charges^A^10" 168 S IBFILES("IBRC0501B.TXT")="RC v2.3 Outpatient Facility Charges^B^14" 169 S IBFILES("IBRC0501C.TXT")="RC v2.3 Professional Charges^C^23" 170 S IBFILES("IBRC0501D.TXT")="RC v2.3 Service Category Codes^D^4" 171 S IBFILES("IBRC0501E.TXT")="RC v2.3 Area Factors^E^41" 172 S IBFILES("IBRC0501F.TXT")="RC v2.3 VA Sites and Zip Codes^F^4" 173 Q 174 ; 175 FHREAL S IBFILES("IBRC0504A.TXT")="RC v2.4 Inpatient Facility Charges^A^10" 176 S IBFILES("IBRC0504B.TXT")="RC v2.4 Outpatient Facility Charges^B^14" 177 S IBFILES("IBRC0504C.TXT")="RC v2.4 Professional Charges^C^23" 178 S IBFILES("IBRC0504D.TXT")="RC v2.4 Service Category Codes^D^4" 179 S IBFILES("IBRC0504E.TXT")="RC v2.4 Area Factors^E^41" 180 S IBFILES("IBRC0504F.TXT")="RC v2.4 VA Sites and Zip Codes^F^4" 181 Q -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCRHBS8.m
r628 r636 1 1 IBCRHBS8 ;ALB/ARH - RATES: UPLOAD (RC 2+) CALCULATIONS CHARGE ; 10-OCT-03 2 ;;2.0;INTEGRATED BILLING;**245 ,382**;21-MAR-94;Build 23 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**245**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 ; … … 49 49 ; 50 50 ISNF(SITE,ITLINE) ; Return Inpatient Skilled Nursing Facility Per Diem 51 N IBCHG,IBZIP,IBAA S IBCHG=0,ITLINE=$G(ITLINE),IBZIP=$P($G(SITE),U,4) 52 I $P(ITLINE,U,2)'="SNF" G ISNFQ 53 I $P(ITLINE,U,1)'="999",$P(ITLINE,U,1)'="000" G ISNFQ 51 N IBCHG,IBZIP,IBAA S IBCHG=0,ITLINE=$G(ITLINE),IBZIP=$P($G(SITE),U,4) I $P(ITLINE,U,2)'="SNF" G ISNFQ 52 I $P(ITLINE,U,1)'="999" G ISNFQ 54 53 ; 55 54 S IBAA=$$GETAA(IBZIP) I $P(IBAA,U,1)'=IBZIP G ISNFQ -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCSC3.m
r628 r636 1 1 IBCSC3 ;ALB/MJB - MCCR SCREEN 3 (PAYER/MAILING ADDRESS) ;27 MAY 88 10:15 2 ;;2.0;INTEGRATED BILLING;**8,43,52,80,82,51,137,232,320 ,377**;21-MAR-94;Build 233 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**8,43,52,80,82,51,137,232,320**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 ;MAP TO DGCRSC3 … … 14 14 F I=0,"M","M1","U","U2" S IB(I)=$S($D(^DGCR(399,IBIFN,I)):(^(I)),1:"") 15 15 S IBOUTP=2,IBINDT=$S(+$G(IB("U")):+IB("U"),1:DT) 16 ;S Z=1,IBW=1 X IBWW W " Rate Type : ",$S($P(IB(0),U,7)']"":IBU,$D(^DGCR(399.3,$P(IB(0),U,7),0)):$P(^(0),U),1:IBUN) 16 17 ; 17 18 S X=" Rate Type : "_$S($P(IB(0),U,7)']"":IBU,$D(^DGCR(399.3,$P(IB(0),U,7),0)):$P(^(0),U),1:IBUN) … … 30 31 I $P(IB(0),U,11)="i" I $D(IBDD)>1,$D(^DGCR(399,IBIFN,"AIC")) G SHW 31 32 D UP G LST:$D(IBDD)>1 W !?4,"Insurance : NO REIMBURSABLE INSURANCE INFORMATION ON FILE",!?17,"[Add Insurance Information by entering '1' at the prompt below]" G MAIL 32 ; 33 ;W !?4,"Insurance Carrier",?40,"Whose",?66,"Relationship" S X="",$P(X,"=",81)="" W !,X 33 34 LST N IBDTIN,IBICT 34 35 S IBDTIN=+$G(IB("U")),IBICT=0 … … 44 45 SHW I $D(IBDD) S I="" F S I=$O(IBDD(I)) Q:'I D SHW1 45 46 MAIL I $$BUFFER^IBCNBU1(DFN) W !!,?17,"*** Patient has Insurance Buffer entries ***" 46 ;47 47 S IB("M")=$S($D(^DGCR(399,IBIFN,"M")):^("M"),1:""),IB("M1")=$S($D(^DGCR(399,IBIFN,"M1")):^("M1"),1:""),IB(0)=^DGCR(399,IBIFN,0) 48 48 S Z=2,IBW=1 W ! X IBWW … … 52 52 S IB("RAFLAG",2)=$S($P(IB("M"),U,2)="":0,1:$$GET1^DIQ(36,$P(IB("M"),U,2),IBRAMS,"I")) 53 53 S IB("RAFLAG",3)=$S($P(IB("M"),U,3)="":0,1:$$GET1^DIQ(36,$P(IB("M"),U,3),IBRAMS,"I")) 54 S X=0 55 I $P(IB("M1"),U,2)="",'IB("RAFLAG",1),$P(IB("M1"),U,3)="",'IB("RAFLAG",2),$P(IB("M1"),U,4)="",'IB("RAFLAG",3) S X=1 56 W " Billing Provider Secondary IDs: " 57 I X W IBUN ; no data found, unspecified not required 58 I 'X D ; data found, display below 59 . W !?5,"Primary Payer: ",$S($P(IB("M1"),U,2)]"":$P(IB("M1"),U,2),IB("RAFLAG",1):"ATT/REND ID",1:"") 60 . W !?5,"Secondary Payer: ",$S($P(IB("M1"),U,3)]"":$P(IB("M1"),U,3),IB("RAFLAG",2):"ATT/REND ID",1:"") 61 . W ?46,"Tertiary Payer: ",$S($P(IB("M1"),U,4)]"":$P(IB("M1"),U,4),IB("RAFLAG",3):"ATT/REND ID",1:"") 62 . Q 63 ; 54 S X=0 I $P(IB("M1"),U,2)="",'IB("RAFLAG",1),$P(IB("M1"),U,3)="",'IB("RAFLAG",2),$P(IB("M1"),U,4)="",'IB("RAFLAG",3) S X=1 W " Facility ID #s: ",IBUN 55 I 'X D 56 . W " Primary Payer: ",$S($P(IB("M1"),U,2)]"":$P(IB("M1"),U,2),IB("RAFLAG",1):"ATT/REND ID",1:"") 57 . W !?4,"Secondary Payer: ",$S($P(IB("M1"),U,3)]"":$P(IB("M1"),U,3),IB("RAFLAG",2):"ATT/REND ID",1:"") 58 . W ?45,"Tertiary Payer: ",$S($P(IB("M1"),U,4)]"":$P(IB("M1"),U,4),IB("RAFLAG",3):"ATT/REND ID",1:"") 64 59 S Z=3,IBW=1 W ! X IBWW 65 60 W " Mailing Address : " -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCSC5.m
r628 r636 1 1 IBCSC5 ;ALB/MJB - MCCR SCREEN 5 (OPT. EOC) ;27 MAY 88 10:15 2 ;;2.0;INTEGRATED BILLING;**52,125,51,210,266,288,287,309 ,389**;21-MAR-94;Build 63 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**52,125,51,210,266,288,287,309**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 ;MAP TO DGCRSC5 … … 58 58 . S IBY=0 F S IBY=$O(^IBA(362.5,"AIFN"_IBIFN,IBX,IBY)) Q:'IBY S IBZ=$G(^IBA(362.5,IBY,0)) I IBZ'="" D Q:X>5 59 59 .. S X=X+1 I X>5 W !,?17,"*** There are more Pros. Items associated with this bill.***" Q 60 .. W:X'=1 ! W ?17,$E($P(IBZ,U,5),1,40),?67,$$FMTE^XLFDT(+IBZ) 60 .. ;S IBN=$G(^RMPR(661,+$P(IBZ,U,3),0)) W:X'=1 ! W ?17,$E($$PIN^IBCSC5B(+IBN),1,35)," - ",$P(IBN,U,1),?65,$$FMTE^XLFDT(+IBZ) 61 .. S IBN=$$PIN^IBCSC5B(+$P(IBZ,U,3)) W:X'=1 ! W ?17,$E($P(IBN,U,2),1,35)," - ",$P(IBN,U,1),?65,$$FMTE^XLFDT(+IBZ) 61 62 Q X 62 63 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCSC5B.m
r628 r636 1 1 IBCSC5B ;ALB/ARH - ADD/ENTER PROSTHETIC ITEMS ;12/28/93 2 ;;2.0;INTEGRATED BILLING;**4,52,260,339 ,389**;21-MAR-94;Build 62 ;;2.0;INTEGRATED BILLING;**4,52,260,339**;21-MAR-94;Build 2 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; 5 5 ; 6 EN ; add/edit prosthetic items for a bill, IBIFN required 7 N IBX,DFN,IBDT1,IBDT2,IBACTION,BIFN,APROS,ALPROS,ABILL,ALBILL 6 EN ;add/edit prosthetic items for a bill, IBIFN required 8 7 S IBX=$$BILL(IBIFN) Q:'IBIFN S DFN=+IBX,IBDT1=$P(IBX,U,2),IBDT2=$P(IBX,U,3) 8 D SET(IBIFN,.IBPDA),PIDISP(DFN,IBDT1,IBDT2,.IBPDE,.IBPDA),DISP(.IBPDA) 9 E1 S IBPIFN=0,IBDT=$$ASKDT(IBDT1,IBDT2) G:'IBDT EXIT 10 S IBPD=$O(IBPDA(IBDT,0)) S:'IBPD IBPD=$O(IBPDE(IBDT,0)) S IBPD=$$ASKPD(IBPD) G:'IBPD E1 11 S IBPIFN=$G(IBPDA(IBDT,+IBPD)) I 'IBPIFN S IBPIFN=$$ADD(IBDT,IBIFN,+IBPD,+$G(IBPDE(IBDT,+IBPD))) I 'IBPIFN W " ??" G E1 12 I '$D(IBPDE(IBDT,+IBPD)) W !,"This prosthetic item does not exist in this patients prosthetics record.",! 13 D EDIT(+IBPIFN) D SET(IBIFN,.IBPDA) W ! G E1 9 14 ; 10 EN1 D PISET(DFN,IBDT1,IBDT2,.APROS,.ALPROS) D SET(IBIFN,.ABILL,.ALBILL,+$G(APROS)) 11 D PIDISP(.APROS,.ALPROS,.ABILL) D DISP(.ABILL,.ALBILL) S BIFN="" 12 ; 13 S IBACTION=$$SELECT(.ALPROS,.ALBILL) Q:'IBACTION 14 I +IBACTION=1 S BIFN=$$ADD(IBIFN,$P(IBACTION,U,2),$P(IBACTION,U,3)) G EN1 15 I +IBACTION=2 S BIFN=+$G(ABILL(+$P(IBACTION,U,2),$P(IBACTION,U,3))) 16 I +IBACTION=3 S IBX=$$ASKITM(IBDT1,IBDT2) I +IBX S BIFN=$$ADD(IBIFN,+IBX,,$P(IBX,U,2)) 17 I +BIFN D EDIT(BIFN) 18 ; 19 G EN1 15 EXIT K IBPIFN,IBX,IBDT1,IBDT2,IBPDA,IBPDE,IBPD,IBDT 20 16 Q 21 17 ; 22 SELECT(ALPROS,ALBILL) ; get which item to add/edit, select from Patient Prosthetics, Bill Items, or add a new one 23 ; returns 1 ^ PD DEL DATE ^ PI IFN - ALPROS(selected item) if item from Prosthetics selected 24 ; 2 ^ PD DEL DATE ^ X - ALBILL(selected item) if item existing on bill selected 25 ; 3 if add new item, "" if exit, -1 if redo 26 N IBX,IBY,IBZ,DIR,DTOUT,DUOUT,DIRUT,X,Y S IBY="" 27 S DIR("?")="Select the Prosthetics Item to Add or Edit." 28 S DIR("?",1)="Enter the number preceding the Item to Add or Edit." 29 S DIR("?",2)="Or enter the Item name to add an item not in the list and not in Prosthetics.",DIR("?",3)=" " 18 ASKDT(IBDT1,IBDT2,IBDT) ; 19 I +$G(IBIFN) S DIR("?")="Enter the date the item was delivered to the patient",DIR("??")="^D HELP^IBCSC5B("_IBIFN_")" 20 S DIR("A")="Select ITEM DELIVERY DATE",DIR(0)="DO^"_IBDT1_":"_IBDT2_":EX" D ^DIR K DIR,DTOUT,DIRUT 21 Q $S(Y?7N:Y,1:0) 30 22 ; 31 S DIR("A")="Select Prosthetics Item",DIR(0)="FO^1:20^K:X?1N1P.NP X" D ^DIR S IBX=Y I $D(DIRUT) G SELECTQ 23 ASKPD(PD) ; 24 N X,Y 25 S DIR("A")="Select PROSTHETIC ITEM",DIR(0)="660,4O" S:+$G(PD) DIR("B")=+$G(^RMPR(661,+$G(PD),0)) D ^DIR S:$D(DIRUT)!(Y'>0) Y="" K DIR,DIRUT 26 Q Y 32 27 ; 33 S IBZ=$G(ALPROS(IBX)) I +IBZ W " adding ",IBX S IBY="1^"_IBZ G SELECTQ 34 S IBZ=$G(ALBILL(IBX)) I +IBZ W " editing ",IBX S IBY="2^"_IBZ G SELECTQ 28 ADD(IBDT,IFN,IBPD,PIFN) ; 29 N IBX,IBY,IBDX,IBHCPCS S IBX=0,DIC="^IBA(362.5,",DIC(0)="AQL",X=IBDT K DA,DO D FILE^DICN K DA,DO,X 30 I Y>0 S DIE=DIC,(IBX,DA)=+Y,DR=".02////"_IFN_";.03////"_IBPD_";.04////"_PIFN D ^DIE K DIE,DIC,DA,DR W "... ADDED" 31 ;add dx if known 32 F IBY=1:1:4 S IBDX=+$G(^RMPR(660,PIFN,"BA"_IBY)) I IBDX,'$O(^IBA(362.3,"AIFN"_IFN,IBDX)) D 33 . S DIC="^IBA(362.3,",DIC(0)="L",DLAYGO=362.3,X=IBDX,DIC("DR")=".02////"_IFN K DD,DO D FILE^DICN S IBDX(+Y)="" 34 ;add hcpcs if known 35 ;S IBHCPCS=$P($G(^RMPR(660,PIEN,0)),"^",22) I IBHCPCS 35 36 ; 36 S DIR(0)="YO",DIR("A")="Add a New Item",DIR("B")="YES" D ^DIR K DIR S IBY=-1 I Y=1,'$D(DIRUT) S IBY=337 Q IBX 37 38 ; 38 SELECTQ Q IBY 39 ; 40 ASKITM(IBDT1,IBDT2) ; Ask for new item data when adding an item not in Prosthetics 41 ; returns: delivery date ^ prosthetic item name (from 661.1, .02) 42 N DIR,DIC,DIE,DTOUT,DUOUT,DIRUT,X,Y,IBX,IBY S (IBX,IBY)="" I '$G(IBDT1)!'$G(IBDT2) G ASKITMQ 43 ; 44 W !!,"Enter a Prosthetics Item that does not have a Prosthetics Patient record.",! 45 S DIR("A")="Select ITEM DELIVERY DATE",DIR(0)="DO^"_IBDT1_":"_IBDT2_":EX" D ^DIR S IBX=Y I Y'?7N G ASKITMQ 46 ; 47 S DIC="^RMPR(661.1,",DIC(0)="AENOQMZ",DIC("S")="I +$P(^(0),U,5)",DIC("A")="Select PROSTHETICS ITEM: " D ^DIC 48 ; 49 I +Y>0,+IBX S IBY=IBX_U_$P($G(Y(0)),U,2) 50 ; 51 ASKITMQ Q IBY 52 ; 53 ADD(IBIFN,IBDT,PIFN,IBPNAME) ; Add new Item to Bill (#362.5) 54 N IBX,IBY,IBDX,IBHCPCS,DIC,DIE,DA,DR,DLAYGO,X,Y S IBY=0,PIFN=+$G(PIFN) I ($G(IBDT)'?7N)!('$G(IBIFN)) G ADDQ 55 ; 56 I $G(PIFN),$$ONBILLPI(IBIFN,PIFN) G ADDQ ; don't add duplicates 57 I $G(IBPNAME)="" S IBPNAME=$P($$PIN(PIFN),U,2) I IBPNAME="" G ADDQ 58 ; 59 S DIC="^IBA(362.5,",DIC(0)="AQL",DLAYGO=362.5,X=IBDT K DA,DO D FILE^DICN K DA,DO,X 60 I Y>0 S (IBY,DA)=+Y,DIE=DIC,DR=".02////"_IBIFN_";.04////"_+PIFN_";.05///^S X=IBPNAME" D ^DIE K DIE,DA,DR W "... ADDED" 61 ; 62 ;add dx if known 63 I +IBY,+PIFN F IBX=1:1:4 S IBDX=+$G(^RMPR(660,PIFN,"BA"_IBX)) I IBDX,'$O(^IBA(362.3,"AIFN"_IBIFN,IBDX)) D 64 . S DIC="^IBA(362.3,",DIC(0)="L",DLAYGO=362.3,X=IBDX,DIC("DR")=".02////"_IBIFN K DD,DO D FILE^DICN S IBDX(+Y)="" 65 ;add hcpcs if known ;S IBHCPCS=$P($G(^RMPR(660,PIEN,0)),"^",22) I IBHCPCS 66 ; 67 ADDQ Q IBY 68 ; 69 EDIT(BIFN) ; 70 N DIDEL,DIE,DIC,DR,DA,X,Y Q:'$G(BIFN) W ! S DIDEL=362.5,DIE="^IBA(362.5,",DR=".01;.05",DA=BIFN D ^DIE 39 EDIT(PIFN) ; 40 S DIDEL=362.5,DIE="^IBA(362.5,",DR=".01;.03",DA=PIFN D ^DIE K DIE,DR,DA,DIC,DIDEL 71 41 Q 72 42 ; 73 SET(IBIFN,ARRB,ARRBL,PICNT) ; setup array of all prosthetic devices on bill (#362.5), array names should be passed by reference 74 ; input: PICNT - the number of items found in prosthetics (PISET) 75 ; output: ARRB(PD DELIV DATE, X) = PD IFN (362.5 ptr) ^ Cost, ARRB = BILL IFN ^ count of items on bill 76 ; ARRBL(PICNT + count of item on bill) = PD DELIV DATE ^ X 77 ; where X is the IFN of the Patient Item (660 ptr) or if not defined then a number_"Z" 78 N CNT,IBX,IBY,BIFN,RIFN,IBC,IBRC K ARRB,ARRBL S IBC="AIFN"_$G(IBIFN),ARRB="^0" Q:'$G(IBIFN) 79 D RCITEM^IBCSC5A(IBIFN,"IBRC",5) S CNT=0 80 ; 81 S IBX=0 F S IBX=$O(^IBA(362.5,IBC,IBX)) Q:'IBX S BIFN=0 F S BIFN=$O(^IBA(362.5,IBC,IBX,BIFN)) Q:'BIFN D 82 . S IBY=$G(^IBA(362.5,BIFN,0)) Q:IBY="" S CNT=CNT+1,RIFN=+$P(IBY,U,4),RIFN=$S(+RIFN:+RIFN,1:CNT_"Z") 83 . S ARRB(+IBY,RIFN)=BIFN_U_$$CHG^IBCF4(BIFN,5,.IBRC),ARRB=$G(ARRB)+1 84 S ARRB=IBIFN_U_+$G(ARRB) 85 ; 86 S CNT=+$G(PICNT),IBX=0 F S IBX=$O(ARRB(IBX)) Q:'IBX S IBY=0 F S IBY=$O(ARRB(IBX,IBY)) Q:'IBY S CNT=CNT+1,ARRBL(CNT)=IBX_U_IBY 43 SET(IFN,PDARR) ;setup array of all prosthetic devices for bill, array name should be passed by reference 44 ;returns: PDARR(PD DELIV DATE, PD ITEM (661 ptr))=PD IFN (362.5 ptr), PDARR=BILL IFN ^ PD count 45 N CNT,IBX,IBY,PIFN,IBC,IBRC K PDARR S IBC="AIFN"_$G(IFN) 46 D RCITEM^IBCSC5A(IBIFN,"IBRC",5) 47 S (CNT,IBX)=0 F S IBX=$O(^IBA(362.5,IBC,IBX)) Q:'IBX S PIFN=0 F S PIFN=$O(^IBA(362.5,IBC,IBX,PIFN)) Q:'PIFN D 48 . S IBY=$G(^IBA(362.5,PIFN,0)) Q:IBY="" S CNT=CNT+1,PDARR(+IBY,$P(IBY,U,3))=PIFN_U_$$CHG^IBCF4(PIFN,5,.IBRC) 49 S PDARR=$G(IFN)_"^"_CNT 87 50 Q 88 51 ; 89 DISP(ABILL,ALBILL) ;screen display of existing prosthetic devices for a bill, arrays should be passed by reference 90 ; input: ABILL (from SET) list of bill items 91 ; ALBILL (from SET) list of bill items, in count order 92 N IBC,IBI,BIFN,BIFN0,DDT 93 ; 52 DISP(PDARR) ;screen display of existing prosthetic devices for a bill, 53 ;input should be array returned by SET^IBCSC5B: PDARR(PD DT, PD ITEM)=PD IFN (362.5), pass by reference 54 N IBX,IBY,IBZ 94 55 W !!,?5,"----------------- Existing Prosthetic Items for Bill -----------------",! 95 S IBC=0 F S IBC=$O(ALBILL(IBC)) Q:'IBC D 96 . S DDT=+ALBILL(IBC),IBI=$P(ALBILL(IBC),U,2),BIFN=+$G(ABILL(DDT,IBI)),BIFN0=$G(^IBA(362.5,BIFN,0)) 97 . W !,?1,$J(IBC,2),")",?6,$$DATE(DDT),?16,$E($P(BIFN0,U,5),1,60) 56 S IBX=0 F S IBX=$O(PDARR(IBX)) Q:IBX="" S IBY=0 F S IBY=$O(PDARR(IBX,IBY)) Q:'IBY D 57 . S IBZ=$$PIN(IBY) W !,$$DATE(IBX),?12,$P(IBZ,U,1),?20,$P(IBZ,U,2) 98 58 W ! 99 59 Q 100 60 ; 101 PISET(DFN,DT1,DT2,ARRP,ARRPL) ; get all prosthetic items (660) for a patient and date range, arrays should pass by ref. 102 ; input: DFN = patient, DT1-DT2 range of dates to search for items 103 ; output: ARRP(PD DEL DATE (660,10), PI IFN (660 ptr)) = PI IFN (660 ptr), ARRP = count of items 104 ; ARRPL(count) = PD DEL DATE (660,10) ^ PI IFN (660 ptr) 105 ; 106 N PIFN,DDT,IBX,IBY,CNT K ARRP,ARRPL Q:'$G(DFN) S DT1=$G(DT1)-.0001,DT2=$G(DT2) S:'DT2 DT2=9999999 107 S PIFN=0 F S PIFN=$O(^RMPR(660,"C",DFN,PIFN)) Q:'PIFN D 108 . S IBX=$G(^RMPR(660,PIFN,0)) Q:IBX="" S DDT=+$P(IBX,U,12)\1 I (DDT<DT1)!(DDT>DT2) Q 109 . S ARRP(DDT,PIFN)=PIFN,ARRP=+$G(ARRP)+1 110 ; 111 S (CNT,IBX)=0 F S IBX=$O(ARRP(IBX)) Q:'IBX S IBY=0 F S IBY=$O(ARRP(IBX,IBY)) Q:'IBY S CNT=CNT+1,ARRPL(CNT)=IBX_U_IBY 61 HELP(IFN) ;called for help from prosthetics enter to display existing devices, displays devices from 660 and 399 62 I +$G(IFN) N IBX,IBPDA S IBX=$$BILL(IFN) I +IBX D SET(IFN,.IBPDA),PIDISP($P(IBX,U,1),$P(IBX,U,2),$P(IBX,U,3),"",.IBPDA),DISP(.IBPDA) 112 63 Q 113 64 ; 114 PIDISP(APROS,ALPROS,ABILL) ; display all prosthetic items (#660) for a patient and date range, arrays passed by reference, not changed 115 ; input: APROS (from PISET) patient's prosthetic items 116 ; ALPROS (from PISET) patient's prosthetics items, in count order 117 ; ABILL (from SET) list of bill's prosthetics items, only to check if item on bill 118 N IBC,DDT,PIFN,PNAME,IBY,IBX,IBICD,IBP,IBEX 65 PIDISP(DFN,DT1,DT2,ARRAY,PDARR) ; display all prosthetic items (660) for a patient and date range 66 ;PDARR (as defined by SET^IBCSC5B) passed by ref. only to check if pros. item is on the bill, not necessary, not changed 67 ;returns ARRAY(PD DEL DATE (660,10), PD ITEM (660,4=661 ptr))=RECORD (660 ptr), should pass by ref. if desired 68 N PIFN,IBX,IBY,PNAME,DDT,PI,IBICD,IBEX,IBP 69 K ARRAY S DT1=$G(DT1)-.0001,DT2=$G(DT2) S:'DT2 DT2=9999999 Q:'$G(DFN) 70 S PIFN=0 F S PIFN=$O(^RMPR(660,"C",DFN,PIFN)) Q:'PIFN D 71 . S IBX=$G(^RMPR(660,PIFN,0)),DDT=+$P(IBX,U,12)\1 I (DDT<DT1)!(DDT>DT2) Q 72 . S ARRAY(DDT,+$P(IBX,U,6))=PIFN 119 73 ; 120 W @IOF,?33,"PROSTHETICS SCREEN" 121 W !,"================================================================================",! 122 S IBC=0 F S IBC=$O(ALPROS(IBC)) Q:'IBC D 123 . S DDT=+ALPROS(IBC),PIFN=$P(ALPROS(IBC),U,2) 124 . S PNAME=$$PIN(PIFN),IBY=$G(^RMPR(660,PIFN,"AM")),IBX=$G(^RMPR(660,PIFN,0)) K IBEX 125 . ; 126 . F IBICD=1:1:4 Q:$D(IBEX) I $D(^RMPR(660,PIFN,"BA"_IBICD)) F IBP=2:1:8 I $P(^RMPR(660,PIFN,"BA"_IBICD),"^",IBP) S IBEX="("_$P($T(EXEMPT+(IBP-1)),";",3)_")" Q ; look for exemption info 127 . ; 128 . W !,$S($D(ABILL(+DDT,PIFN)):"*",1:"") 129 . W ?1,$J(IBC,2),")",?6,$$DATE(DDT),?16,$E($P(PNAME,U,2),1,27),?45,"("_$P(PNAME,U,3),")",?53,$G(IBEX),?59,$E($$EXSET^IBEFUNC($P(IBX,U,14),660,12),1,4),?64,$$EXSET^IBEFUNC($P(IBY,U,3),660,62),?71,$J(+$P(IBX,U,16),8,2) 74 W @IOF,?33,"PROSTHETICS SCREEN",!,"================================================================================",! 75 S DDT=0 F S DDT=$O(ARRAY(DDT)) Q:'DDT S PI=0 F S PI=$O(ARRAY(DDT,PI)) Q:'PI D 76 . S PIFN=ARRAY(DDT,PI),PNAME=$$PIN(PI),IBY=$G(^RMPR(660,PIFN,"AM")),IBX=$G(^RMPR(660,PIFN,0)) K IBEX 77 . ; look for exemption info 78 . F IBICD=1:1:4 Q:$D(IBEX) I $D(^RMPR(660,PIFN,"BA"_IBICD)) F IBP=2:1:8 I $P(^RMPR(660,PIFN,"BA"_IBICD),"^",IBP) S IBEX="("_$P($T(EXEMPT+(IBP-1)),";",3)_")" Q 79 . W !,$S($D(PDARR(+DDT,PI)):"*",1:"") 80 . W ?2,$$DATE(DDT),?12,$P(PNAME,U,1),$G(IBEX),?20,$E($P(PNAME,U,2),1,30),?55,$E($$EXSET^IBEFUNC($P(IBX,U,14),660,12),1,4),?62,$$EXSET^IBEFUNC($P(IBY,U,3),660,62),?70,$J(+$P(IBX,U,16),9,2) 130 81 Q 131 82 ; 132 PIN(P660,P6611) ; given Prosthetic record (#660) or PSAS HCPCS (#661.1) return Item Name 133 ; returns PSAS HCPSC ptr (661.1) ^ SHORT DESCRIPTION (661.1, .02) ^ HCPCS (661.1, .01) 134 N IBX,IBY S IBY="" 135 I +$G(P660) S P6611=+$P($G(^RMPR(660,+P660,1)),U,4) 136 I +$G(P6611) S IBX=$G(^RMPR(661.1,+P6611,0)) I IBX'="" S IBY=P6611_U_$P(IBX,U,2)_U_$P(IBX,U,1) 83 PIN(PITEM) ;given the pros item IFN (661 ptr) returns name for printing (661,.01^441,.05) 84 N IBX,IBY S IBY="" I +$G(PITEM) S IBX=+$G(^RMPR(661,+PITEM,0)) I +IBX S IBY=IBX_U_$$DESCR^PRCPUX1(0,+IBX) 137 85 Q IBY 138 86 ; 139 PINB(P3625) ; given the bill prosthetics item (#362.5) return Item Name (.05) 140 N IBY S IBY=$P($G(^IBA(362.5,+$G(P3625),0)),U,5) 141 Q IBY 142 ; 143 BILL(IBIFN) ; get bill data: returns DFN ^ Statement Covers From ^ Statement Covers To 144 N IBX,IBY S IBIFN=+$G(IBIFN) S IBX=$G(^DGCR(399,IBIFN,0)),IBY=$P(IBX,U,2) 145 S IBX=$G(^DGCR(399,IBIFN,"U")),$P(IBY,U,2)=+IBX,$P(IBY,U,3)=+$P(IBX,U,2) 146 Q IBY 147 ; 148 ONBILLPI(IBIFN,PIFN) ; return Bill Item ptr (#362.5) if the Prosthetics Item (#660) is already assigned to the bill 149 ; input: PIFN = Patient Prosthetics Item (ptr to 660) 150 ; output: BIFN = Bill Prosthetics Item (ptr to 362.5) or null if not found 151 N IBC,IBX,IBY,BIFN S IBY="" S IBC="AIFN"_$G(IBIFN) 152 S IBX=0 F S IBX=$O(^IBA(362.5,IBC,IBX)) Q:'IBX S BIFN=0 F S BIFN=$O(^IBA(362.5,IBC,IBX,BIFN)) Q:'BIFN D 153 . I +$G(PIFN),$P($G(^IBA(362.5,BIFN,0)),U,4)=PIFN S IBY=BIFN 87 BILL(IBIFN) ; display all existing prescription refills (52) for a patient and date range 88 ; (call is a short cut to calling rxdisp if have bill number) 89 N IBX,IBY S IBX=$G(^DGCR(399,+$G(IBIFN),0)),IBY=$P(IBX,U,2) 90 S IBX=$G(^DGCR(399,+IBIFN,"U")),$P(IBY,U,2)=+IBX,$P(IBY,U,3)=+$P(IBX,U,2) 154 91 Q IBY 155 92 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCSC61.m
r628 r636 1 1 IBCSC61 ;ALB/MJB - MCCR SCREEN UTILITY ;20 JUN 88 10:58 2 ;;2.0;INTEGRATED BILLING;**52,80,106,51,210,230,309 ,389**;21-MAR-94;Build 63 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**52,80,106,51,210,230,309**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 ;MAP TO IBCSC61 … … 35 35 .K ^TMP($J,"IBDRUG") 36 36 .Q 37 I $G(TYPE)=5,+$G(ITEM) S IBNAME=$P($ G(^IBA(362.5,+ITEM,0)),U,5)37 I $G(TYPE)=5,+$G(ITEM) S IBNAME=$P($$PIN^IBCSC5B(+$P($G(^IBA(362.5,+ITEM,0)),U,3)),U,2) 38 38 I $G(TYPE)=6,+$G(ITEM) S IBNAME=$P($$DRG^IBACSV(+ITEM),U,1) 39 39 I $G(TYPE)=9,+$G(ITEM) S IBNAME=$P($G(^IBA(363.21,+ITEM,0)),U,1) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCSC8H.m
r628 r636 1 1 IBCSC8H ;ALB/ARH - MCCR SCREEN 8 (BILL SPECIFIC INFO) CMS-1500 ;4/21/92 2 ;;2.0;INTEGRATED BILLING;**51,137,207,210,232,155,320,343,349 ,371**;21-MAR-94;Build 572 ;;2.0;INTEGRATED BILLING;**51,137,207,210,232,155,320,343,349**;21-MAR-94;Build 46 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; CMS-1500 screen 8 … … 7 7 ; 8 8 EN N I,IB,Y,Z 9 D ^IBCSCU S IBSR=8,IBSR1="H",IBV1="0000000 0" S:IBV IBV1="11111111" F I="U","U1","UF2","UF3","U2","M","TX",0,"U3" S IB(I)=$G(^DGCR(399,IBIFN,I))9 D ^IBCSCU S IBSR=8,IBSR1="H",IBV1="0000000" S:IBV IBV1="1111111" F I="U","U1","UF2","UF3","U2","M","TX",0,"U3" S IB(I)=$G(^DGCR(399,IBIFN,I)) 10 10 N IBZ,IBPRV,IBDATE,IBREQ,IBMRASEC,IBZ1 11 11 ; … … 91 91 ; 92 92 S Z=5,IBW=1 X IBWW 93 W " Chiropractic Data : " S Y=$P(IB("U3"),U,5) X ^DD("DD") W $S(Y'="":"INITIAL TREATMENT ON "_Y,1:IBUN)94 ;95 S Z=6,IBW=1 X IBWW96 93 W " Form Locator 19 : " S IBZ=$P($G(^DGCR(399,IBIFN,"UF31")),U,3) W $S(IBZ'="":IBZ,1:IBUN) 97 94 I $P(IB("U2"),U,14)'="" W !,?4,"Homebound : ",$$EXPAND^IBTRE(399,236,$P(IB("U2"),U,14)) … … 99 96 I $P(IB("U2"),U,16)'="" W !,?4,"Spec Prog Indicator: " S IBZ=$$EXPAND^IBTRE(399,238,$P(IB("U2"),U,16)) W $S(IBZ'="":IBZ,$$WNRBILL^IBEFUNC(IBIFN):"31",1:"") 100 97 ; 101 S Z= 7,IBW=1 X IBWW98 S Z=6,IBW=1 X IBWW 102 99 S IBREQ=+$$REQMRA^IBEFUNC(IBIFN) S:IBREQ IBREQ=1 103 100 S IBMRASEC=$$MRASEC^IBCEF4(IBIFN) … … 107 104 W $S(IBZ'=""&($P(IB("TX"),U,8+IBREQ)'=""):IBZ,'$$TXMT^IBCEF4(IBIFN):"[NOT APPLICABLE - NOT TRANSMITTABLE]",IBREQ:"NO FORCED PRINT",1:IBZ) 108 105 ; 109 S Z= 8,IBW=1 X IBWW106 S Z=7,IBW=1 X IBWW 110 107 W " Provider ID Maint : (Edit Provider ID information)",! 111 108 G ^IBCSCP -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCSCE.m
r628 r636 1 1 IBCSCE ;ALB/MRL,MJB - MCCR SCREEN EDITS ;07 JUN 88 14:35 2 ;;2.0;INTEGRATED BILLING;**52,80,91,106,51,137,236,245,287,349 ,371**;21-MAR-94;Build 572 ;;2.0;INTEGRATED BILLING;**52,80,91,106,51,137,236,245,287,349**;21-MAR-94;Build 46 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 17 17 I (IBDR20["45")!(IBDR20["56") D ^IBCSC5B G ENQ 18 18 I (IBDR20["66")!(IBDR20["76") D EDIT^IBCRBE(IBIFN) D ASKCMB^IBCU65(IBIFN) G ENQ 19 I IBDR20["85",$$FT^IBCEF(IBIFN)=2 D ^IBCSC8A G ENQ ; chiropractic data20 19 I IBDR20["84",$$FT^IBCEF(IBIFN)=3 D EN1^IBCEP6 G ENQ ;UB-04 21 I IBDR20["8 8",$$FT^IBCEF(IBIFN)=2 D EN1^IBCEP6 G ENQ ;CMS-150020 I IBDR20["87",$$FT^IBCEF(IBIFN)=2 D EN1^IBCEP6 G ENQ ;CMS-1500 22 21 F Q=1:1:9 I IBDR20[("9"_Q) D EDIT^IBCSC9 G ENQ 23 22 TMPL N IBFLIAE S IBFLIAE=1 ;to invoke EN^DGREGAED from [IB SCREEN1] -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCSCH.m
r628 r636 1 1 IBCSCH ;ALB/MJB - MCCR HELP ROUTINE ;03 JUN 88 15:25 2 ;;2.0;INTEGRATED BILLING;**52,80,106,124,138,51,148,137,161,245,232,287,348,349,374 ,371,395**;21-MAR-94;Build 32 ;;2.0;INTEGRATED BILLING;**52,80,106,124,138,51,148,137,161,245,232,287,348,349,374**;21-MAR-94;Build 16 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 19 19 . I $G(IBSCNNZ)="?MRA",$$MCRONBIL^IBEFUNC(IBIFN),$T(SCR^IBCEMVU)'="" S IBQ=1 D SCR^IBCEMVU(IBIFN) Q 20 20 . I $G(IBSCNNZ)="?ID" S IBQ=1 D DISPID^IBCEF74(IBIFN) Q 21 . I $G(IBSCNNZ)="?RX" S IBQ=1 D DISPRX^IBCSCH1(IBIFN) Q22 21 . Q 23 22 ; … … 40 39 I $$MCRONBIL^IBEFUNC(IBIFN) W !?5,"Enter '?MRA' to view Medicare Remittance Advice EOB's on file." 41 40 W !,?5,"Enter '?ID' to view all IDs to be electronically transmitted on this claim." 42 W !,?5,"Enter '?RX' to view all prescriptions on this claim."43 41 ; 44 42 I +IBSR'=9 S Z="DATA GROUPS ON SCREEN "_+IBSR W ! X IBWW D @(IBSR1_IBSR) D W … … 57 55 9 S X="Locally defined fields" Q 58 56 28 S X="Bill Remark, ICN/DCN's, Tx Auth. Code, Admit Diagnosis/Source ^Providers^Force to Print^Provider ID Maintenance^Other Facility (VA/non)" Q 59 H8 S X="Period Unable to Work^Admit Dx, ICN/DCN, Tx/Prior Auth. Code^Providers^Non-VA Facility^ Chiropractic Data^Form Locator 19^Force to Print^Provider ID Maintenance" Q57 H8 S X="Period Unable to Work^Admit Dx, ICN/DCN, Tx/Prior Auth. Code^Providers^Non-VA Facility^Form Locator 19^Force to Print" Q 60 58 PAR S X="Fed Tax #, BC/BS #, MAS Svc Pointer^Bill Signer, Billing Supervisor^Security Parameters, Outpatient CPT parameters ^Remarks, Mailgroups^Agent Cashier Address/Phone" Q 61 59 S N C,I,Z,J W !! S Z="AVAILABLE SCREENS" X IBWW -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCSCH1.m
r628 r636 1 1 IBCSCH1 ;ALB/MRL - BILLING HELPS (CONTINUED) ; 01 JUN 88 12:00 2 ;;2.0;INTEGRATED BILLING;**106,125,51,245,266 ,395**;21-MAR-94;Build 32 ;;2.0;INTEGRATED BILLING;**106,125,51,245,266**;21-MAR-94 3 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; … … 69 69 N DIR,DUOUT,DTOUT,DIRUT,IBX,X,Y S IBX=0,DIR(0)="E" D ^DIR K DIR I $D(DIRUT) S IBX=1 70 70 Q IBX 71 ;72 DISPRX(IBIFN) ; display prescriptions73 N IBHDR,IBHDR1,IBX,IBZ,IBRXL,IBNPI,IBRX,IBQ,IBORG74 S IBQ=075 ;76 I '$O(^IBA(362.4,"AIFN"_IBIFN,0)) W !!?5,"No Prescriptions Entered!",! D PAUSE^VALM1 Q77 ;78 ; get NPIs79 S IBX=$$RXSITE^IBCEF73A(IBIFN,.IBRXL)80 ;81 S IBHDR="W @IOF,!,""Prescriptions Assigned to this Bill"" X IBHDR1"82 S IBHDR1="W !,""--------------------------------------------------------------------------------"" "83 ;84 X IBHDR85 S IBRX=0 F S IBRX=$O(^IBA(362.4,"AIFN"_IBIFN,IBRX)) Q:'IBRX!(IBQ) S IBX=0 F S IBX=$O(^IBA(362.4,"AIFN"_IBIFN,IBRX,IBX)) Q:'IBX!(IBQ) D86 . S IBZ=$G(^IBA(362.4,IBX,0))87 . W !?5,"RX #: ",$P(IBZ,"^")88 . W ?50,"DATE: ",$$FMTE^XLFDT($P(IBZ,"^",3))89 . W !?5,"DRUG: ",$$EXTERNAL^DILFD(362.4,.04,"",$P(IBZ,"^",4))90 . W ?50,"NDC: ",$P(IBZ,"^",8)91 . W !?5,"DAYS SUPPLY: ",$P(IBZ,"^",6)92 . W ?50,"QUANTITY: ",$P(IBZ,"^",7)93 . S IBORG=$G(IBRXL(+$P(IBZ,"^",5),+$P(IBZ,"^",3)))94 . ; ia #453295 . S IBNPI=$S(IBORG:$P($$NPI^XUSNPI("Organization_ID",IBORG),U),1:"")96 . W !?5,"NPI INSTITUTION: ",$S(IBORG:$$EXTERNAL^DILFD(350.9,.02,"",IBORG),1:"")97 . W ?50,"RX NPI: ",$S(IBNPI>0:IBNPI,1:"")98 . W !?5,"PROVIDER: ",$S($P(IBZ,"^",5):$$RXAPI1^IBNCPUT1($P(IBZ,"^",5),4),1:""),!99 . I $Y+7>IOSL S IBQ=$$PAUSE(0)100 D PAUSE^VALM1101 ;102 Q103 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCU4.m
r628 r636 1 IBCU4 ;ALB/AAS - BILLING UTILITY ROUTINE (CONTINUED) ; 12-FEB-902 ;;2.0;INTEGRATED BILLING;**109,122,137,245,349 ,371**;21-MAR-94;Build 571 IBCU4 ;ALB/AAS - BILLING UTILITY ROUTINE (CONTINUED) ; 12-FEB-90 2 ;;2.0;INTEGRATED BILLING;**109,122,137,245,349**;21-MAR-94;Build 46 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 50 50 Q 51 51 ; 52 CHDAT ; Input transform for chiropractics-related dates (399/245,246,247) 53 ; Make sure that date entered is not after end date of the bill 54 Q:'$D(X) 55 N IBX,Y 56 S IBX=$P($G(^DGCR(399,+DA,"U")),U,2) 57 I IBX="" W !?4,*7,"No end date of the bill on file - can't enter chiropractics-related dates " K X Q 58 I X>+IBX S Y=IBX D DD^%DT W !,?4,*7,"This date can not be after the end date of the claim ("_Y_") " K X Q 59 Q 52 ; 60 53 ; 61 54 TO ;151 pseudo input x-form -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCU7.m
r628 r636 1 1 IBCU7 ;ALB/AAS - INTERCEPT SCREEN INPUT OF PROCEDURE CODES ;29-OCT-91 2 ;;2.0;INTEGRATED BILLING;**62,52,106,125,51,137,210,245,228,260,348 ,371**;21-MAR-94;Build 573 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**62,52,106,125,51,137,210,245,228,260,348**;21-MAR-94;Build 5 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 ;MAP TO DGCRU7 … … 136 136 D ^DIR K DIR 137 137 I Y'=1 S IBOK=0 G ADDTNLQ 138 S DR="W !,"" <<EPSDT>>"";50.07;W !!,"" <<HOSPICE>>"";50.03 "138 S DR="W !,"" <<EPSDT>>"";50.07;W !!,"" <<HOSPICE>>"";50.03;W !!,"" <<CHIROPRACTIC>>"";50.04;50.02;50.05;50.06" 139 139 D ^DIE 140 140 W ! -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCVA0.m
r628 r636 1 1 IBCVA0 ;ALB/MJB - SET MCCR VARIABLES CONT. ;04 AUG 88 03:02 2 ;;2.0;INTEGRATED BILLING;**52,361 ,371**;21-MAR-94;Build 572 ;;2.0;INTEGRATED BILLING;**52,361**;21-MAR-94;Build 9 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 32 32 E S IBISEX(I)=$P($G(^DPT(DFN,.312,+$P($G(^DGCR(399,IBIFN,"M")),U,I+11),3)),U,12) ; *361 replaces old calculation of insured's sex 33 33 S IBISEX(I)=$S(IBISEX(I)="M":"MALE",IBISEX(I)="F":"FEMALE",1:"UNSPECIFIED") 34 S IBIRN(I)=$P(IBDD(I,0),U,16) 35 S IBIR(I)=$$EXTERNAL^DILFD(2.312,16,,IBIRN(I)) 34 S IBIRN(I)=$P(IBDD(I,0),U,16),IBIR(I)=$S(IBIRN(I)="01":"PATIENT",IBIRN(I)="02":"SPOUSE",IBIRN(I)="03":"CHILD",IBIRN(I)="08":"EMPLOYEE",IBIRN(I)="11":"ORGAN DONOR",IBIRN(I)="18":"PARENT",IBIRN(I)=15:"PLANTIFF",1:"UNKNOWN") 35 I IBIR(I)="UNKNOWN" S IBIR(I)=$S('$D(IBDD(I,0)):"UNKNOWN",$P(IBDD(I,0),U,6)="v":"PATIENT",$P(IBDD(I,0),U,6)="s":"SPOUSE",1:"UNKNOWN") 36 ;S IBIUTL(I)=IBDD(I,0)_"^"_IBISEX(I)_"^"_IBIRN(I) 36 37 Q 37 38 ADDR ;SET ADDRESS -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCVA1.m
r628 r636 1 1 IBCVA1 ;ALB/MJB - SET MCCR VARIABLES CONT. ;09 JUN 88 14:49 2 ;;2.0;INTEGRATED BILLING;**52,80,109,51,137,210,349 ,371**;21-MAR-94;Build 572 ;;2.0;INTEGRATED BILLING;**52,80,109,51,137,210,349**;21-MAR-94;Build 46 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 89 89 S IBX=0 F S IBX=$O(^DGCR(399,IBIFN,"CV",IBX)) Q:'IBX S IBY=$G(^DGCR(399,IBIFN,"CV",IBX,0)) I +IBY D 90 90 . S IBVC=IBVC+1,IBZ=$G(^DGCR(399.1,+IBY,0)) Q:IBZ="" 91 . S IBVC(+IBY)=$P(IBZ,U,2)_U_$P(IBZ,U,1)_U_$S( $P(IBY,U,2)="":"",+$P(IBZ,U,12):$J($P(IBY,U,2),0,2),1:$P(IBY,U,2))_U_$P(IBZ,U,12)91 . S IBVC(+IBY)=$P(IBZ,U,2)_U_$P(IBZ,U,1)_U_$S(+$P(IBZ,U,12):$J($P(IBY,U,2),0,2),1:$P(IBY,U,2))_U_$P(IBZ,U,12) 92 92 Q 93 93 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBJDB1.m
r628 r636 1 1 IBJDB1 ;ALB/CPM - BILLING LAG TIME REPORT ; 27-DEC-96 2 ;;2.0;INTEGRATED BILLING;**69,80,100,118 ,165**;21-MAR-942 ;;2.0;INTEGRATED BILLING;**69,80,100,118**;21-MAR-94 3 3 ; 4 4 EN ; - Option entry point. … … 78 78 ; 79 79 D ^%ZISC 80 ENQ1 K IB,IBBDT,IB BN,IBEDT,IBCK,IBN,IBN0,IBRPT,IBPAG,IBQ,IBRUN,IBX,IBX1,IBX281 K IB X3,IBAUTH,IBDAT,IBDFN,IBNU,IBPTF,IBPOL,IBPOL1,IBTY,IBS,IBSEL,IBSEL182 K IB CT,IBDIV,IBSORT,IBTL,IBCHK,IBDCHK,DFN,POP,VAUTD,ZTDESC,ZTRTN,ZTSAVE83 K IBDR,IBH,DIROUT,DTOUT,DUOUT,DIRUT,%,%ZIS,D,X,X1,X2,Y,Y1,Z,Z1,Z2,Z380 ENQ1 K IB,IBBDT,IBEDT,IBCK,IBN,IBN0,IBRPT,IBPAG,IBQ,IBRUN,IBX,IBX1,IBX2,IBX3 81 K IBAUTH,IBDAT,IBDFN,IBNU,IBPTF,IBPOL,IBPOL1,IBTY,IBS,IBSEL,IBSEL1,IBCT 82 K IBDIV,IBSORT,IBTL,IBCHK,IBDCHK,DFN,POP,VAUTD,ZTDESC,ZTRTN,ZTSAVE 83 K DIROUT,DTOUT,DUOUT,DIRUT,%,%ZIS,D,X,X1,X2,Y,Y1,Z,Z1,Z2,Z3 84 84 Q 85 85 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBJDB11.m
r628 r636 1 1 IBJDB11 ;ALB/CPM - BILLING LAG TIME REPORT (COMPILE) ; 27-DEC-96 2 ;;2.0;INTEGRATED BILLING;**69,100,118 ,165**;21-MAR-942 ;;2.0;INTEGRATED BILLING;**69,100,118**;21-MAR-94 3 3 ; 4 4 EN ; - Entry point from IBJDB1. … … 28 28 .S IBTY=$S($P(IBN0,U,5)<3:"IN",1:"OP") ; Inpatient or outpatient claim? 29 29 .; 30 .;- Get date PTF transmitted. 31 .S IBPTF="" I IBTY="IN" S IBPTF=$$PTF($P(IBN0,U,8)) Q:'IBPTF 30 .; - Get most recent date PTF transmitted. 31 .I IBTY="IN" D Q:'IBPTF!('IBPTF&($P(IBAUTH,U,2))) 32 ..S IBPTF=$P(IBN0,U,8) I 'IBPTF Q 33 ..S IBPTF=$O(^DGP(45.83,"C",IBPTF,9999999),-1)\1 I IBPTF Q 34 ..S IBPTF=$P($G(^DGP(45.83,IBPTF,0)),U,2)\1 32 35 .; 33 36 .; - Get other claim info and build date line. … … 53 56 ..; - Get most recent check out date that has not been marked as non 54 57 ..; billable by Claims Tracking; quit if there isn't one. 55 ..I IBTY="OP" D K IBCL,IBCL1 Q:'IBCHK 56 ...D CL(IBN) ;GET LIST OF CLINICS FOR THIS BILL 58 ..I IBTY="OP" D Q:'IBCHK 57 59 ...S IBCHK=0,IBX1=IBX-.0001 58 60 ...F S IBX1=$O(^SCE("ADFN",DFN,IBX1)) Q:'IBX1!((IBX1\1)>IBX) D 59 61 ....S IBX2=0 F S IBX2=$O(^SCE("ADFN",DFN,IBX1,IBX2)) Q:'IBX2 D 60 .....;61 .....;CHECK TO SEE IF CLINICS MATCH62 .....S IBCL1=+$P($G(^SCE(IBX2,0)),U,4) Q:'$D(IBCL(IBCL1))63 62 .....I $P($G(^IBT(356,+$O(^IBT(356,"ASCE",IBX2,0)),0)),U,19) Q 64 .....S IBX3=$P($G(^SCE(IBX2,0)),U,7)\1 I IBX3,IBX3'>$P(IBAUTH,U,2) D 65 ...... S:IBX3>IBCHK IBCHK=IBX3 Q 63 .....S IBX3=$P($G(^SCE(IBX2,0)),U,7)\1 I IBX3 S IBCHK=IBX3 66 64 ..; 67 ..S X=$S(IBTY="IN":IBX1_U_ +IBPTF,1:IBX_U_IBCHK)_U_IBDAT65 ..S X=$S(IBTY="IN":IBX1_U_IBPTF,1:IBX_U_IBCHK)_U_IBDAT 68 66 ..S IBPOL1=$S(IBPOL>+X:1,1:0) ; Policy found after treatment. 69 67 ..; … … 112 110 ..F Y=1:1 S Z=$P(IBSEL1,",",Y) Q:'Z D 113 111 ...I IBRPT="D" D 114 ....S IBBN=$P(IBN0,U) S:IBPOL1 IBBN=IBBN_"*" 115 ....S Y(Z)=IBBN_U_Y(Z),Y1(Z)=$G(Y1(Z))+1 112 ....S Y(Z)=$P(IBN0,U)_U_Y(Z)_U_$S(IBPOL1:"*",1:""),Y1(Z)=$G(Y1(Z))+1 116 113 ....S ^TMP("IBJDB1",$J,IBDIV,IBTY,Z,$P(IBDFN,U)_"@@"_$P(IBDFN,U,9),Y1(Z))=Y(Z) 117 114 ...E S IBCT(IBDIV,IBTY,Z)=IBCT(IBDIV,IBTY,Z)+1,IBTL(IBDIV,IBTY,Z)=IBTL(IBDIV,IBTY,Z)+Y(Z) … … 147 144 ; 148 145 FP ; - Get first payment date, if available. 149 I '$P($G(^PRCA(430,IBN,7)),U,7) G DC; No payments made.146 I '$P($G(^PRCA(430,IBN,7)),U,7) G CL ; No payments made. 150 147 S (IBPAY,IBT)=0 F S IBT=$O(^PRCA(433,"C",IBN,IBT)) Q:'IBT D Q:IBPAY 151 148 .S IBT0=$G(^PRCA(433,IBT,0)),IBT1=$G(^(1)) … … 154 151 .S X=$S(+IBT1:+IBT1,1:$P(IBT1,U,9)\1),$P(VAL,U,4)=X,IBPAY=1 155 152 ; 156 DC; - Get date AR closed.153 CL ; - Get date AR closed. 157 154 S X=$$CLO^PRCAFN(IBN) I X>0 S $P(VAL,U,5)=X 158 155 ; … … 170 167 I IBSEL[(","_X_","),X1'<IBBDT,X1'>IBEDT S X2=1 171 168 DLQ Q X2 172 ;173 ;174 PTF(X) ; - Get most recent PTF transmission date.175 ; Input: X=IEN of PTF file entry.176 ; Output: Y=PTF date.177 N I,K,Y178 S Y=0 G:'$O(^DGP(45.83,"C",+X,0)) PTFQ179 S I=0 F S I=$O(^DGP(45.83,"C",X,I)) Q:'I D180 .S J=$P($G(^DGP(45.83,I,0)),U,2)\1 Q:J>$P(IBAUTH,U,2) S:J K(J)=""181 S I=0 F S I=$O(K(I)) Q:'I S Y=I182 ;183 PTFQ Q Y184 ;185 CL(IBN) ; - Get the clinics for bill.186 N I,J K IBCL ; IBCL=Bill clinic array.187 S I=0 F S I=$O(^DGCR(399,IBN,"CP",I)) Q:I="" D188 .S J=$P($G(^DGCR(399,IBN,"CP",I,0)),U,7) S:J IBCL(J)=""189 Q -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBJPS.m
r628 r636 1 1 IBJPS ;ALB/MAF,ARH - IBSP IB SITE PARAMETER SCREEN ;22-DEC-1995 2 ;;2.0;INTEGRATED BILLING;**39,52,70,115,143,51,137,161,155,320,348,349 ,377**;21-MAR-94;Build 232 ;;2.0;INTEGRATED BILLING;**39,52,70,115,143,51,137,161,155,320,348,349**;21-MAR-94;Build 46 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 49 49 7 ;;1.33;1.32;1.31;1.27 50 50 8 ;;1.29;1.3;1.18;1.28 51 9 ;;1.01;1.02;1.05 51 9 ;;1.01;1.02;1.05;1.04 52 52 10 ;;2.12;2.1;2.02;2.03;2.04;2.05;2.06;2.01 53 53 11 ;;2.08;2.09 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBJPS2.m
r628 r636 1 1 IBJPS2 ;ALB/MAF,ARH - IBSP IB SITE PARAMETER BUILD (cont) ;22-DEC-1995 2 ;;2.0;INTEGRATED BILLING;**39,52,115,143,51,137,161,155,320,348,349 ,377**;21-MAR-94;Build 232 ;;2.0;INTEGRATED BILLING;**39,52,115,143,51,137,161,155,320,348,349**;21-MAR-94;Build 46 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 47 47 D LEFT(2) 48 48 S IBLN=$$SET("Federal Tax #",$P(IBPD1,U,5),IBLN,IBLR,IBSEL) 49 ; 50 D RIGHT(3,"","") 51 S IBLN=$$SET("Remark on Each Bill",$P(IBPD1,U,4),IBLN,IBLR,IBSEL) 49 52 ; 50 53 D RIGHT(3,1,1) ; - Remittance/Agent Cashier Address -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBJTA1.m
r628 r636 1 1 IBJTA1 ;ALB/ARH - TPI ACTIONS ;2/14/95 2 ;;2.0;INTEGRATED BILLING;**39,137 ,377**;21-MAR-94;Build 233 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**39,137**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 CP ; -- IBJT CHANGE PATIENT action: change patient, only available on AL screen … … 46 46 ; IBARCOMM set to indicate AR Profile screen needs to be rebuilt when it is reentered 47 47 ; will cause the AR screen to be rebuilt including the new information if the AR screen is already open 48 N AUTHDT,MRADT,STATUS,VALMQUIT,DIR48 N VALMQUIT,DIR 49 49 D FULL^VALM1 50 S STATUS=$P($G(^DGCR(399,IBIFN,0)),U,13) 51 S AUTHDT=$P($G(^DGCR(399,IBIFN,"S")),U,10) 52 S MRADT=$P($G(^DGCR(399,IBIFN,"S")),U,7) 53 ; if claim status is "NOT REVIEWED" or claim status is "CANCELLED" with neither MRA request date 54 ; nor Authorization date present, display an error and bail out. 55 I STATUS=1!(STATUS=7&(MRADT="")&(AUTHDT="")) D G ARCAQ 56 .S DIR(0)="EA",DIR("A",1)="A comment can not be added for an incomplete or cancelled while incomplete claim.",DIR("A")="Press RETURN to continue: " D ^DIR K DIR 57 ; if claim status is "REQUEST MRA" or claim status is "CANCELLED" with MRA request date present, 58 ; but no Authorization date, enter MRA comments. 59 I STATUS=2!(STATUS=7&(MRADT'="")&(AUTHDT="")) D:$G(IBIFN) CMNT^IBCECOB6 G ARCAR 60 ; otherwise, enter AR comments. 50 I $P($G(^DGCR(399,IBIFN,0)),U,13)=2 D G ARCAQ 51 . S DIR(0)="EA",DIR("A",1)="A/R comments cannot be added for a bill awaiting an MRA request",DIR("A")="Press RETURN to continue: " D ^DIR K DIR 61 52 D ADJUST^RCJIBFN3(IBIFN) 62 53 I $D(^TMP("IBJTTA",$J)) S IBARCOMM=1 63 K ^TMP("IBJTTC",$J) 64 ARCAR ; rebuild comments screen 65 D BLD^IBJTTC,HDR^IBJTTC 54 K ^TMP("IBJTTC",$J) D BLD^IBJTTC,HDR^IBJTTC 66 55 ARCAQ S VALMBCK="R",VALMBG=1 67 56 Q -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBJTBA.m
r628 r636 1 1 IBJTBA ;ALB/ARH - TPI BILL CHARGE INFO SCREEN ;01-MAR-1995 2 ;;2.0;INTEGRATED BILLING;**39,80,51,137,135,309,349 ,389**;21-MAR-94;Build62 ;;2.0;INTEGRATED BILLING;**39,80,51,137,135,309,349**;21-MAR-94;Build 46 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 157 157 D SET^IBCSC5B(IBIFN,.IBARRAY) 158 158 I $D(IBARRAY) D 159 . S (Z,Z0)=0 F S Z0=$O(IBARRAY(Z0)) Q:Z0="" S Z1=0 F S Z1=$O(IBARRAY(Z0,Z1)) Q:'Z1 S Z=Z+1,IBXDATA(Z)=$$DAT1^IBOUTL(Z0)_U_$E($ $PINB^IBCSC5B(+IBARRAY(Z0,Z1)),1,39)159 . S (Z,Z0)=0 F S Z0=$O(IBARRAY(Z0)) Q:Z0="" S Z1=0 F S Z1=$O(IBARRAY(Z0,Z1)) Q:'Z1 S Z=Z+1,IBXDATA(Z)=$$DAT1^IBOUTL(Z0)_U_$E($P($$PIN^IBCSC5B(Z1),U,2),1,39) 160 160 S IBD=$$SET("",IBLN) 161 161 S IBD="PROSTHETIC REFILLS: (For TPJI display only)" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBJTCA2.m
r628 r636 1 IBJTCA2 ;ALB/ARH - TPI CLAIMS INFO BUILD (CONT) ; 16-FEB-19952 ;;2.0;INTEGRATED BILLING;**39,80,155,320 **;21-MAR-941 IBJTCA2 ;ALB/ARH - TPI CLAIMS INFO BUILD (CONT) ;7:39 PM 30 Jan 2008 2 ;;2.0;INTEGRATED BILLING;**39,80,155,320,VWEHR1**;WorldVistA 30-Jan-08 3 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 ; 5 ;Modified from FOIA VISTA, 6 ;Copyright 2008 WorldVistA. Licensed under the terms of the GNU 7 ;General Public License See attached copy of the License. 8 ; 9 ;This program is free software; you can redistribute it and/or modify 10 ;it under the terms of the GNU General Public License as published by 11 ;the Free Software Foundation; either version 2 of the License, or 12 ;(at your option) any later version. 13 ; 14 ;This program is distributed in the hope that it will be useful, 15 ;but WITHOUT ANY WARRANTY; without even the implied warranty of 16 ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 ;GNU General Public License for more details. 18 ; 19 ;You should have received a copy of the GNU General Public License along 20 ;with this program; if not, write to the Free Software Foundation, Inc., 21 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 4 22 ; 5 23 CONT ; Continuation of Claim Information Screen Build … … 28 46 I +$P(IBDS,U,17) S IBT="Cancelled: ",IBD=$$EXT(IBDS,17,18) S IBLN=$$SET(IBT,IBD,IBLN,IBLR) 29 47 ; 30 ; Patch 320 - added bill cloning history to TPJI report. 48 ; Patch 320 - added bill cloning history to TPJI report. 31 49 N IBCCR,IBCURR,IBNEXT,IBBCH,IBINDENT 32 50 S IBINDENT=0 … … 47 65 ; now go backwards for claim cloning history all the way back 48 66 S IBBCH=IBCURR 49 F S IBBCH=$Q(@IBBCH,-1) Q:IBBCH="" D 67 ; 68 ;WV/EHR REVERSE $Q REPLACEMENT; SO 01/12/08 ;VWEHR1 69 ; 70 ;F S IBBCH=$Q(@IBBCH,-1) Q:IBBCH="" D 71 F S IBBCH=$$Q^VWUTIL($NA(@IBBCH),-1) Q:IBBCH="" D 72 . ; 73 . ;END CHANGE 74 . ; 50 75 . N IBX S IBX=@IBBCH 51 76 . S IBT="Copied: " I IBINDENT S IBT=" "_IBT -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBJTRA1.m
r628 r636 1 1 IBJTRA1 ;ALB/AAS,ARH - TPI CT INSURANCE COMMUNICATIONS BUILD ; 4/1/95 2 ;;2.0;INTEGRATED BILLING;**39,91,347 ,389**;21-MAR-94;Build 62 ;;2.0;INTEGRATED BILLING;**39,91,347**;21-MAR-94;Build 24 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 61 61 S X=$$EXSET^IBJU1(IBTYP,356,.18) 62 62 I IBTYP=2 S X=X_" of "_$P($G(^DIC(40.7,+$$SCE^IBSDU(+$P(IBTRND,U,4),3),0)),U,1) 63 I IBTYP=3 S X=X_" of "_$P($$PIN^IBCSC5B(+$P(IBTRND,U,9)),U,2)63 I IBTYP=3 S Y=+$P($G(^RMPR(660,+$P(IBTRND,U,9),0)),U,6),X=X_" of "_$$EXSET^IBJU1(Y,660,4) 64 64 I IBTYP=4 S X=X_" of "_$$FILE^IBRXUTL(+$P(IBTRND,U,8),.01) 65 65 S X=X_" on "_$$DAT1^IBOUTL($P(IBTRND,U,6),"2P") -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBJTTC.m
r628 r636 1 1 IBJTTC ;ALB/ARH - TPI AR COMMENT HISTORY ; 06-MAR-1995 2 ;; 2.0;INTEGRATED BILLING;**39,377**;21-MAR-94;Build 233 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;Version 2.0 ; INTEGRATED BILLING ;**39**; 21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 ; AR Profile of Comments: This screen prints the following Comments: … … 34 34 ; 35 35 BLD ; 36 N CMLN,CMSTR,X,IBCNT,IBZ,IB0,IBI,IBX,IBD,IBDATE,IBDUZ,IBRCT5,IBLN,IBSTR,IBK,IBJ,DIWL,DIWR,DIWF,COM36 N X,IBCNT,IBI,IBX,IBD,IBRCT5,IBLN,IBSTR,IBK,IBJ,DIWL,DIWR,DIWF,COM 37 37 ; 38 38 S VALMCNT=0,IBLN=0 … … 71 71 . K ^UTILITY($J,"W") 72 72 K ^TMP("RCJIB",$J),^UTILITY($J,"W") 73 ; MRA comments74 ; check if we have any comments to display75 I $D(^DGCR(399,IBIFN,"TXC","B")) D76 .S IBLN=$$SET("",IBLN)77 .S IBSTR="",IBSTR=$$SETLN("MRA REQUEST CLAIM COMMENTS",IBSTR,25,54),IBLN=$$SET(IBSTR,IBLN)78 .S IBSTR="",IBSTR=$$SETLN("--------------------------",IBSTR,25,54),IBLN=$$SET(IBSTR,IBLN)79 .; loop through all available comments80 .S IBDATE="" F S IBDATE=$O(^DGCR(399,IBIFN,"TXC","B",IBDATE),-1) Q:IBDATE="" D81 ..S IBZ=$O(^DGCR(399,IBIFN,"TXC","B",IBDATE,"")),IB0=^DGCR(399,IBIFN,"TXC",IBZ,0),IBDUZ=$P(IB0,U,2)82 ..S IBLN=$$SET("",IBLN)83 ..S IBSTR=""84 ..S IBSTR=$$SETLN($$FMTE^XLFDT(IBDATE,"2Z"),IBSTR,14,8)85 ..S IBSTR=$$SETLN($J("Entered by "_$$GET1^DIQ(200,IBDUZ,.01),54),IBSTR,25,54)86 ..S IBLN=$$SET(IBSTR,IBLN),IBSTR=""87 ..; loop through comment lines88 ..S CMLN=0 F S CMLN=$O(^DGCR(399,IBIFN,"TXC",IBZ,1,CMLN)) Q:CMLN="" D89 ...S X=^DGCR(399,IBIFN,"TXC",IBZ,1,CMLN,0) I X'="" S DIWL=1,DIWR=54,DIWF="" D ^DIWP90 ...Q91 ..I $D(^UTILITY($J,"W")) S IBK=0 F S IBK=$O(^UTILITY($J,"W",1,IBK)) Q:'IBK D92 ...S CMSTR=$G(^UTILITY($J,"W",1,IBK,0)) S IBSTR=$$SETLN(CMSTR,IBSTR,25,54),IBLN=$$SET(IBSTR,IBLN),IBSTR=""93 ...Q94 ..K ^UTILITY($J,"W")95 ..Q96 .D CLEAN^DILF97 .Q98 73 ; 99 74 I IBLN=0 S IBLN=$$SET("",IBLN),IBLN=$$SET("No Comment Transactions Exist For This Account.",IBLN) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBRFN3.m
r628 r636 1 1 IBRFN3 ;ALB/ARH - PASS BILL/CLAIM TO AR ;3/18/96 2 ;;2.0;INTEGRATED BILLING;**61,133,210,309 ,389**;21-MAR-94;Build 63 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**61,133,210,309**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 ; Returns information on the bill passed in, all data returned in external format, for AR's RC project … … 122 122 .. S IBX=IBTMP(IBI,IBK) 123 123 .. S IBJ=IBJ+1,ARRAY("PRD")=IBJ 124 .. S ARRAY("PRD",IBJ)=$ $PINB^IBCSC5B(+IBX)_U_IBI124 .. S ARRAY("PRD",IBJ)=$P($$PIN^IBCSC5B(IBK),U,2)_U_IBI 125 125 ; 126 126 CC ; condition related to employment, auto accident (place), other accident -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBRFN4.m
r628 r636 1 1 IBRFN4 ;ALB/TMK - Supported functions for AR/IB DATA EXTRACT ;15-FEB-2005 2 ;;2.0;INTEGRATED BILLING;**301,305 ,389**;21-MAR-94;Build 63 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**301,305**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 IBAREXT(IBIFN,IBD) ; Returns data for claim IBIFN for IB/AR Extract … … 51 51 .. S IBX=IBTMP(IBI,IBK) 52 52 .. S IBJ=IBJ+1 53 .. S IBD("PRD",IBJ)=$ $PINB^IBCSC5B(+IBX)_U_IBI_U_+IBTMP53 .. S IBD("PRD",IBJ)=$P($$PIN^IBCSC5B(IBK),U,2)_U_IBI_U_+IBTMP 54 54 ; 55 55 S Z=" ",IBD("IN")="",DFN=+$P(IB(0),U,2) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBTOBI1.m
r628 r636 1 1 IBTOBI1 ;ALB/AAS - CLAIMS TRACKING BILLING INFORMATION PRINT ;27-OCT-93 2 ;;2.0;INTEGRATED BILLING;**276 ,377**;21-MAR-94;Build 233 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;2.0;INTEGRATED BILLING;**276**;21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 % ; … … 46 46 I ($Y+8)>IOSL D HDR^IBTOBI Q:IBQUIT 47 47 BI1 W !," Billing Information " 48 N IBDGCR,IBDGCRU1,IBDGCRU,IBAMNT,IBD,I,IBIFN,IB LN,IBECME48 N IBDGCR,IBDGCRU1,IBDGCRU,IBAMNT,IBD,I,IBIFN,IBADD,IBECME 49 49 S IBIFN=+$P(IBTRND,"^",11) 50 50 S IBDGCR=$G(^DGCR(399,IBIFN,0)),IBDGCRU1=$G(^("U1")),IBDGCRU=$G(^("U")) 51 51 S IBECME=$P($P($G(^DGCR(399,IBIFN,"M1")),U,8),";") 52 52 S IBAMNT=$$BILLD^IBTRED1(IBTRN) 53 S IB LN=054 S IB LN=IBLN+1,IBD(IBLN,1)=" Initial Bill: "_$P(IBDGCR,U,1)53 S IBADD=0 54 S IBD(1,1)=" Initial Bill: "_$P(IBDGCR,"^") 55 55 I IBECME D 56 . S IBD(IBLN,1)=IBD(IBLN,1)_"e" 57 . S IBLN=IBLN+1,IBD(IBLN,1)=" ECME Number: "_IBECME 58 S IBLN=IBLN+1,IBD(IBLN,1)=" Bill Status: "_$E($$EXPAND^IBTRE(399,.13,$P(IBDGCR,U,13)),1,14) 59 S IBLN=IBLN+1,IBD(IBLN,1)=" Total Charges: $ "_$J($P(IBAMNT,"^"),8) 60 S IBLN=IBLN+1,IBD(IBLN,1)=" Amount Paid: $ "_$J($P(IBAMNT,"^",2),8) 56 . S IBADD=1 57 . S IBD(1,1)=IBD(1,1)_"e" 58 . S IBD(2,1)=" ECME Number: "_IBECME 59 S IBD(2+IBADD,1)=" Bill Status: "_$E($$EXPAND^IBTRE(399,.13,$P(IBDGCR,"^",13)),1,14) 60 S IBD(3+IBADD,1)=" Total Charges: $ "_$J($P(IBAMNT,"^"),8) 61 S IBD(4+IBADD,1)=" Amount Paid: $ "_$J($P(IBAMNT,"^",2),8) 61 62 ; 62 I $P(IBTRND,U,19) D 63 . S IBLN=IBLN+1,IBD(IBLN,1)="Reason Not Billable: "_$$EXPAND^IBTRE(356,.19,$P(IBTRND,U,19)) 64 . S IBLN=IBLN+1,IBD(IBLN,1)="Additional Comment: "_$P(IBTRND1,U,8) 65 . Q 66 ; 67 I '$P(IBTRND,U,19),$L($P(IBTRND1,U,8))>0 S IBLN=IBLN+1,IBD(IBLN,1)="Additional Comment: "_$P(IBTRND1,U,8) 63 I $P(IBTRND,"^",19) S IBD(5,1)="Reason Not Billable: "_$$EXPAND^IBTRE(356,.19,$P(IBTRND,"^",19)),IBD(6,1)="Additional Comment: "_$P(IBTRND1,"^",8) 68 64 ; 69 65 S IBD(1,2)="Estimated Recv (Pri): $ "_$J($P(IBTRND,"^",21),8) … … 71 67 S IBD(3,2)="Estimated Recv (ter): $ "_$J($P(IBTRND,"^",23),8) 72 68 S IBD(4,2)=" Means Test Charges: $ "_$J($P(IBTRND,"^",28),8) 73 ;69 I $L($P($G(^IBT(356,IBTRN,1)),U,8))>0 S IBD(5,1)="Additional Comment: "_$P($G(^IBT(356,IBTRN,1)),U,8) 74 70 S I=0 F S I=$O(IBD(I)) Q:'I W !,$G(IBD(I,1)),?39,$E($G(IBD(I,2)),1,36) 75 71 W:'IBQUIT !,?4,$TR($J(" ",IOM-8)," ","-") -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBTOBI4.m
r628 r636 1 1 IBTOBI4 ;ALB/AAS - CLAIMS TRACKING BILLING INFORMATION PRINT ;27-OCT-93 2 ;;2.0;INTEGRATED BILLING;**91,125,51,210,266 ,389**;21-MAR-94;Build 62 ;;2.0;INTEGRATED BILLING;**91,125,51,210,266**;21-MAR-94 3 3 ; 4 4 CLIN ; -- output clinical information … … 94 94 4 ; -- Visit region for prosthetics 95 95 N IBDA,IBRMPR S IBDA=$P(IBTRND,"^",9) D PRODATA^IBTUTL1(IBDA) 96 S IBD(2,1)=" Item: "_$ P($$PIN^IBCSC5B(+IBDA),U,2)96 S IBD(2,1)=" Item: "_$G(IBRMPR(660,+IBDA,4,"E")) 97 97 S IBD(3,1)=" Description: "_$G(IBRMPR(660,+IBDA,24,"E")) 98 98 S IBD(4,1)=" Quantity: "_$J($G(IBRMPR(660,+IBDA,5,"E")),4) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBTRED01.m
r628 r636 1 1 IBTRED01 ;ALB/AAS - EXPAND/EDIT CLAIMS TRACKING ENTRY - CONT; 01-JUL-1993 2 ;; 2.0;INTEGRATED BILLING;**389**;21-MAR-94;Build 63 ;;Per VHA Directive 2004-038, this routine should not be modified.2 ;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94 3 ;;Per VHA Directive 10-93-142, this routine should not be modified. 4 4 ; 5 5 % I '$G(IBTRN)!($G(IORVON)="") G ^IBTRED … … 69 69 4 ; -- Visit region for prosthetics 70 70 N IBDA,IBRMPR S IBDA=$P(IBTRND,"^",9) D PRODATA^IBTUTL1(IBDA) 71 D SET^IBCNSP(START+2,OFFSET," Item: "_$ P($$PIN^IBCSC5B(+IBDA),U,2))71 D SET^IBCNSP(START+2,OFFSET," Item: "_$G(IBRMPR(660,+IBDA,4,"E"))) 72 72 D SET^IBCNSP(START+3,OFFSET," Description: "_$G(IBRMPR(660,+IBDA,24,"E"))) 73 73 D SET^IBCNSP(START+4,OFFSET," Quantity: "_$J($G(IBRMPR(660,+IBDA,5,"E")),$L($G(IBRMPR(660,+IBDA,14,"E"))))) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBTRKR5.m
r628 r636 1 1 IBTRKR5 ;ALB/AAS - CLAIMS TRACKING - ADD/TRACK PROSTHETICS ;13-JAN-94 2 ;;2.0;INTEGRATED BILLING;**13,260,312,339 ,389**;21-MAR-94;Build 62 ;;2.0;INTEGRATED BILLING;**13,260,312,339**;21-MAR-94;Build 2 3 3 ;;Per VHA Directive 2004-038, this routine should not be modified. 4 4 ; … … 82 82 ; 83 83 S IBDATA=$G(^RMPR(660,+IBDA,0)) Q:IBDATA="" 84 S DFN=$P(IBDATA,"^",2) Q:'DFN84 S DFN=$P(IBDATA,"^",2) 85 85 D CL^SDCO21(DFN,IBDT,"",.IBARR) 86 86 ; 87 87 ; -- checks copied from rmprbil v2.0 /feb 2, 1994 88 88 Q:'$D(^RMPR(660,+IBDA,"AM")) 89 Q:$P(^RMPR(660,+IBDA,0),U,9)=""!($P(^(0),U,12)="")!($P(^(0),U, 14)="V")!($P(^(0),U,2)="")!($P(^(0),U,15)="*")89 Q:$P(^RMPR(660,+IBDA,0),U,9)=""!($P(^(0),U,12)="")!($P(^(0),U,6)="")!($P(^(0),U,14)="V")!($P(^(0),U,2)="")!($P(^(0),U,15)="*") 90 90 ;Q:($P(^RMPR(660,+IBDA,"AM"),U,3)=2)!($P(^("AM"),U,3)=3) 91 91 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXA.m
r628 r636 1 IBXA ; DRIVER FOR COMPILED XREFS FOR FILE #350 ; 05/25/061 IBXA ; DRIVER FOR COMPILED XREFS FOR FILE #350 ; 10/08/06 2 2 ; 3 3 N DH,DU,DIKILL,DISET,DIKJ,DIKZ,DIKYR,DIKZA,DIK0Z,DIKZK,DIKDP,DIKM1,DIKUP,DIKUM,DV,DIIX,DIKF,DIAU,DIKNM,DIKDA,DIKLK,DIKLM,DIKY,DIXR,DIKCOND,DIKSVDA,DIKPUSH,X1,X2 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXA1.m
r628 r636 1 IBXA1 ; COMPILED XREF FOR FILE #350 ; 05/25/061 IBXA1 ; COMPILED XREF FOR FILE #350 ; 10/08/06 2 2 ; 3 3 S DIKZK=2 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXA2.m
r628 r636 1 IBXA2 ; COMPILED XREF FOR FILE #350 ; 05/25/061 IBXA2 ; COMPILED XREF FOR FILE #350 ; 10/08/06 2 2 ; 3 3 S DIKZK=1 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC1.m
r628 r636 1 IBXSC1 ; GENERATED FROM 'IB SCREEN1' INPUT TEMPLATE(#508), FILE 399; 09/05/071 IBXSC1 ; GENERATED FROM 'IB SCREEN1' INPUT TEMPLATE(#508), FILE 399;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,",DIC=DIE,DP=399,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^DGCR(399,DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC11.m
r628 r636 1 IBXSC11 ; ; 09/05/071 IBXSC11 ; ;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DPT(",DIC=DIE,DP=2,DL=2,DIEL=0,DU="" K DG,DE,DB Q:$O(^DPT(DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC110.m
r628 r636 1 IBXSC110 ; ; 09/05/071 IBXSC110 ; ;12/27/07 2 2 S X=DE(6),DIC=DIE 3 3 S A1B2TAG="PAT" D ^A1B2XFR -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC111.m
r628 r636 1 IBXSC111 ; ; 09/05/071 IBXSC111 ; ;12/27/07 2 2 S X=DG(DQ),DIC=DIE 3 3 S A1B2TAG="PAT" D ^A1B2XFR -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC112.m
r628 r636 1 IBXSC112 ; ; 09/05/071 IBXSC112 ; ;12/27/07 2 2 S X=DE(7),DIC=DIE 3 3 K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DPT(D0,.11)):^(.11),1:""),Y=$P(Y(1),U,7) X:$D(^DD(2,.117,2)) ^(2) S X=Y S DIU=X K Y S X=DIV S X="" X ^DD(2,.115,1,1,2.4) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC113.m
r628 r636 1 IBXSC113 ; ; 09/05/071 IBXSC113 ; ;12/27/07 2 2 S X=DG(DQ),DIC=DIE 3 3 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC114.m
r628 r636 1 IBXSC114 ; ; 09/05/071 IBXSC114 ; ;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DPT(",DIC=DIE,DP=2,DL=2,DIEL=0,DU="" K DG,DE,DB Q:$O(^DPT(DA,""))="" … … 152 152 S X=DE(3),DIC=DIE 153 153 D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA) 154 S X=DE(3),DIC=DIE 155 X "K ^DPT(""AZVWVOE"",$E($TR(X,""ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*()-_=+[]{}<>,./?:;'\|""),1,30),DA)" 154 156 S X=DE(3),DIIX=2_U_DIFLD D AUDIT^DIET 155 157 C3S S X="" G:DG(DQ)=X C3F1 K DB … … 162 164 S X=DG(DQ),DIC=DIE 163 165 D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA) 166 S X=DG(DQ),DIC=DIE 167 X "S ^DPT(""AZVWVOE"",$E($TR(X,""ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*()-_=+[]{}<>,./?:;'\|""),1,30),DA)=""""" 164 168 I $D(DE(3))'[0!(^DD(DP,DIFLD,"AUDIT")'="e") S X=DG(DQ),DIIX=3_U_DIFLD D AUDIT^DIET 165 169 C3F1 Q … … 180 184 ; 181 185 C5F1 S DIEZRXR(2,DIIENS)=$$OREF^DILF($NA(@$$CREF^DILF(DIE))) 182 F DIXR=60 3S DIEZRXR(2,DIXR)=""186 F DIXR=600 S DIEZRXR(2,DIXR)="" 183 187 Q 184 188 X5 S DFN=DA I X="N" D TADD^DGLOCK … … 196 200 D ^IBXSC116 197 201 C7F1 S DIEZRXR(2,DIIENS)=$$OREF^DILF($NA(@$$CREF^DILF(DIE))) 198 F DIXR=60 3S DIEZRXR(2,DIXR)=""202 F DIXR=600 S DIEZRXR(2,DIXR)="" 199 203 Q 200 204 X7 S %DT="E" D ^%DT S X=Y K:Y<1 X I $D(X) S DFN=DA D TAD^DGLOCK -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC115.m
r628 r636 1 IBXSC115 ; ; 09/05/071 IBXSC115 ; ;12/27/07 2 2 S X=DE(7),DIC=DIE 3 3 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC116.m
r628 r636 1 IBXSC116 ; ; 09/05/071 IBXSC116 ; ;12/27/07 2 2 S X=DG(DQ),DIC=DIE 3 3 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC117.m
r628 r636 1 IBXSC117 ; ; 09/05/071 IBXSC117 ; ;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DPT(",DIC=DIE,DP=2,DL=2,DIEL=0,DU="" K DG,DE,DB Q:$O(^DPT(DA,""))="" … … 57 57 C1S S X="" G:DG(DQ)=X C1F1 K DB 58 58 C1F1 S DIEZRXR(2,DIIENS)=$$OREF^DILF($NA(@$$CREF^DILF(DIE))) 59 F DIXR=60 3S DIEZRXR(2,DIXR)=""59 F DIXR=600 S DIEZRXR(2,DIXR)="" 60 60 Q 61 61 X1 S %DT="E" D ^%DT S X=Y K:Y<1 X I $D(X) S DFN=DA D TAD^DGLOCK I $D(X),(X<$P(^DPT(DFN,.121),"^",7)) K X … … 72 72 ; 73 73 C2F1 S DIEZRXR(2,DIIENS)=$$OREF^DILF($NA(@$$CREF^DILF(DIE))) 74 F DIXR=60 3S DIEZRXR(2,DIXR)=""74 F DIXR=600 S DIEZRXR(2,DIXR)="" 75 75 Q 76 76 X2 K:X[""""!($A(X)=45) X I $D(X) K:$L(X)>30!($L(X)<2) X I $D(X) S DFN=DA D TAD^DGLOCK … … 91 91 ; 92 92 C4F1 S DIEZRXR(2,DIIENS)=$$OREF^DILF($NA(@$$CREF^DILF(DIE))) 93 F DIXR=60 3S DIEZRXR(2,DIXR)=""93 F DIXR=600 S DIEZRXR(2,DIXR)="" 94 94 Q 95 95 X4 K:X[""""!($A(X)=45) X I $D(X) K:$L(X)>30!($L(X)<2) X I $D(X) S DFN=DA D TAD^DGLOCK … … 106 106 C6S S X="" G:DG(DQ)=X C6F1 K DB 107 107 C6F1 S DIEZRXR(2,DIIENS)=$$OREF^DILF($NA(@$$CREF^DILF(DIE))) 108 F DIXR=60 3S DIEZRXR(2,DIXR)=""108 F DIXR=600 S DIEZRXR(2,DIXR)="" 109 109 Q 110 110 X6 K:$L(X)>30!($L(X)<2) X I $D(X) S DFN=DA D TAD^DGLOCK … … 118 118 C7S S X="" G:DG(DQ)=X C7F1 K DB 119 119 C7F1 S DIEZRXR(2,DIIENS)=$$OREF^DILF($NA(@$$CREF^DILF(DIE))) 120 F DIXR=60 3S DIEZRXR(2,DIXR)=""120 F DIXR=600 S DIEZRXR(2,DIXR)="" 121 121 Q 122 122 X7 K:$L(X)>30!($L(X)<2) X I $D(X) S DFN=DA D TAD^DGLOCK … … 131 131 C8S S X="" G:DG(DQ)=X C8F1 K DB 132 132 C8F1 S DIEZRXR(2,DIIENS)=$$OREF^DILF($NA(@$$CREF^DILF(DIE))) 133 F DIXR=60 3S DIEZRXR(2,DIXR)=""133 F DIXR=600 S DIEZRXR(2,DIXR)="" 134 134 Q 135 135 X8 S DFN=DA D TAD^DGLOCK Q … … 147 147 D SET^DGREGDD1(DA,.1216,.121,6,$E(X,1,5)) 148 148 C9F1 S DIEZRXR(2,DIIENS)=$$OREF^DILF($NA(@$$CREF^DILF(DIE))) 149 F DIXR=60 3S DIEZRXR(2,DIXR)=""149 F DIXR=600 S DIEZRXR(2,DIXR)="" 150 150 Q 151 151 X9 K:X[""""!($A(X)=45) X I $D(X) S DFN=DA D TAD^DGLOCK I $D(X) K:$L(X)>20!($L(X)<5) X I $D(X) D ZIPIN^VAFADDR -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC118.m
r628 r636 1 IBXSC118 ; ; 09/05/071 IBXSC118 ; ;12/27/07 2 2 ;; 3 1 N X,X1,X2 S DIXR=60 3D X1(U) K X2 M X2=X D X1("F") K X1 M X1=X3 1 N X,X1,X2 S DIXR=600 D X1(U) K X2 M X2=X D X1("F") K X1 M X1=X 4 4 D 5 5 . D TEMP^DGDDDTTM -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC12.m
r628 r636 1 IBXSC12 ; ; 09/05/071 IBXSC12 ; ;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DPT(D0,.01,",DIC=DIE,DP=2.01,DL=3,DIEL=1,DU="" K DG,DE,DB Q:$O(^DPT(D0,.01,DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC13.m
r628 r636 1 IBXSC13 ; ; 09/05/071 IBXSC13 ; ;12/27/07 2 2 S X=DE(12),DIC=DIE 3 3 S DFN=DA D EN^DGMTCOR K DGMTCOR -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC14.m
r628 r636 1 IBXSC14 ; ; 09/05/071 IBXSC14 ; ;12/27/07 2 2 S X=DG(DQ),DIC=DIE 3 3 S DFN=DA D EN^DGMTCOR K DGMTCOR -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC15.m
r628 r636 1 IBXSC15 ; ; 09/05/071 IBXSC15 ; ;12/27/07 2 2 S X=DE(13),DIC=DIE 3 3 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC16.m
r628 r636 1 IBXSC16 ; ; 09/05/071 IBXSC16 ; ;12/27/07 2 2 S X=DG(DQ),DIC=DIE 3 3 X "S DFN=DA D EN^DGMTR K DGREQF" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC17.m
r628 r636 1 IBXSC17 ; ; 09/05/071 IBXSC17 ; ;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DPT(",DIC=DIE,DP=2,DL=2,DIEL=0,DU="" K DG,DE,DB Q:$O(^DPT(DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC18.m
r628 r636 1 IBXSC18 ; ; 09/05/071 IBXSC18 ; ;12/27/07 2 2 S X=DE(5),DIC=DIE 3 3 S A1B2TAG="PAT" D ^A1B2XFR -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC19.m
r628 r636 1 IBXSC19 ; ; 09/05/071 IBXSC19 ; ;12/27/07 2 2 S X=DG(DQ),DIC=DIE 3 3 S A1B2TAG="PAT" D ^A1B2XFR -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC3.m
r628 r636 1 IBXSC3 ; GENERATED FROM 'IB SCREEN3' INPUT TEMPLATE(#574), FILE 399; 02/03/081 IBXSC3 ; GENERATED FROM 'IB SCREEN3' INPUT TEMPLATE(#574), FILE 399;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,",DIC=DIE,DP=399,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^DGCR(399,DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC31.m
r628 r636 1 IBXSC31 ; ; 02/03/081 IBXSC31 ; ;12/27/07 2 2 S X=DE(22),DIC=DIE 3 3 K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"M")):^("M"),1:"") S X=$P(Y(1),U,1),X=X S DIU=X K Y S X="" X ^DD(399,112,1,1,2.4) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC32.m
r628 r636 1 IBXSC32 ; ; 02/03/081 IBXSC32 ; ;12/27/07 2 2 S X=DG(DQ),DIC=DIE 3 3 K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"M")):^("M"),1:"") S X=$P(Y(1),U,1),X=X S DIU=X K Y X ^DD(399,112,1,1,1.1) X ^DD(399,112,1,1,1.4) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC33.m
r628 r636 1 IBXSC33 ; ; 02/03/081 IBXSC33 ; ;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,",DIC=DIE,DP=399,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^DGCR(399,DA,""))="" … … 155 155 X14 I '$$SUPPPT^IBCEP7B(DA,1) S Y="@3212" 156 156 Q 157 15 D:$D(DG)>9 F^DIE17,DE S DQ=15,DW="M1;2",DV="F X",DU="",DLB="PRIMARY PROVIDER #",DIFLD=122157 15 D:$D(DG)>9 F^DIE17,DE S DQ=15,DW="M1;2",DV="F",DU="",DLB="PRIMARY PROVIDER #",DIFLD=122 158 158 S DE(DW)="C15^IBXSC33" 159 159 S Y="@" … … 166 166 ; 167 167 C15F1 Q 168 X15 K:$L(X)>13!($L(X)<3) !($TR(X," ")="")X168 X15 K:$L(X)>13!($L(X)<3) X 169 169 I $D(X),X'?.ANP K X 170 170 Q -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC34.m
r628 r636 1 IBXSC34 ; ; 02/03/081 IBXSC34 ; ;12/27/07 2 2 S X=DG(DQ),DIC=DIE 3 3 K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"MP")):^("MP"),1:"") S X=$P(Y(1),U,2),X=X S DIU=X K Y S X=DIV S X=$$BPP^IBCNS2(DA) X ^DD(399,.21,1,1,1.4) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC35.m
r628 r636 1 IBXSC35 ; ; 02/03/081 IBXSC35 ; ;12/27/07 2 2 S X=DE(15),DIC=DIE 3 3 K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S Y(1)=$S($D(^DGCR(399,D0,"M1")):^("M1"),1:"") S X=$P(Y(1),U,2)="" I X S X=DIV 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="" X ^DD(399,122,1,1,2.4) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC36.m
r628 r636 1 IBXSC36 ; ; 02/03/081 IBXSC36 ; ;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,",DIC=DIE,DP=399,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^DGCR(399,DA,""))="" … … 50 50 KEYCHK() Q:$G(DE(DW,"KEY"))="" 1 Q @DE(DW,"KEY") 51 51 BEGIN S DNM="IBXSC36",DQ=1 52 1 S DW="M1;2",DV="F X",DU="",DLB="PRIMARY PROVIDER #",DIFLD=12252 1 S DW="M1;2",DV="F",DU="",DLB="PRIMARY PROVIDER #",DIFLD=122 53 53 S DE(DW)="C1^IBXSC36" 54 54 S Y="@" … … 62 62 ; 63 63 C1F1 Q 64 X1 K:$L(X)>13!($L(X)<3) !($TR(X," ")="")X64 X1 K:$L(X)>13!($L(X)<3) X 65 65 I $D(X),X'?.ANP K X 66 66 Q … … 82 82 Q 83 83 6 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=6 G A 84 7 S DW="M1;2",DV="F X",DU="",DLB="PRIMARY PROVIDER #",DIFLD=12284 7 S DW="M1;2",DV="F",DU="",DLB="PRIMARY PROVIDER #",DIFLD=122 85 85 S DE(DW)="C7^IBXSC36" 86 86 S X="IBPSID" Q:X Q:$NA(@X)[U S X=$G(@X) … … 94 94 ; 95 95 C7F1 Q 96 X7 K:$L(X)>13!($L(X)<3) !($TR(X," ")="")X96 X7 K:$L(X)>13!($L(X)<3) X 97 97 I $D(X),X'?.ANP K X 98 98 Q … … 132 132 X18 I '$$SUPPPT^IBCEP7B(DA,2) S Y="@3222" 133 133 Q 134 19 S DW="M1;3",DV="F X",DU="",DLB="SECONDARY PROVIDER #",DIFLD=123134 19 S DW="M1;3",DV="F",DU="",DLB="SECONDARY PROVIDER #",DIFLD=123 135 135 S DE(DW)="C19^IBXSC36" 136 136 S Y="@" … … 144 144 ; 145 145 C19F1 Q 146 X19 K:$L(X)>13!($L(X)<3) !($TR(X," ")="")X146 X19 K:$L(X)>13!($L(X)<3) X 147 147 I $D(X),X'?.ANP K X 148 148 Q -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC37.m
r628 r636 1 IBXSC37 ; ; 02/03/081 IBXSC37 ; ;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,",DIC=DIE,DP=399,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^DGCR(399,DA,""))="" … … 50 50 KEYCHK() Q:$G(DE(DW,"KEY"))="" 1 Q @DE(DW,"KEY") 51 51 BEGIN S DNM="IBXSC37",DQ=1 52 1 S DW="M1;3",DV="F X",DU="",DLB="SECONDARY PROVIDER #",DIFLD=12352 1 S DW="M1;3",DV="F",DU="",DLB="SECONDARY PROVIDER #",DIFLD=123 53 53 S DE(DW)="C1^IBXSC37" 54 54 S Y="@" … … 62 62 ; 63 63 C1F1 Q 64 X1 K:$L(X)>13!($L(X)<3) !($TR(X," ")="")X64 X1 K:$L(X)>13!($L(X)<3) X 65 65 I $D(X),X'?.ANP K X 66 66 Q … … 82 82 Q 83 83 6 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=6 G A 84 7 S DW="M1;3",DV="F X",DU="",DLB="SECONDARY PROVIDER #",DIFLD=12384 7 S DW="M1;3",DV="F",DU="",DLB="SECONDARY PROVIDER #",DIFLD=123 85 85 S DE(DW)="C7^IBXSC37" 86 86 S X="IBPSID" Q:X Q:$NA(@X)[U S X=$G(@X) … … 94 94 ; 95 95 C7F1 Q 96 X7 K:$L(X)>13!($L(X)<3) !($TR(X," ")="")X96 X7 K:$L(X)>13!($L(X)<3) X 97 97 I $D(X),X'?.ANP K X 98 98 Q … … 132 132 X18 I '$$SUPPPT^IBCEP7B(DA,3) S Y="@3232" 133 133 Q 134 19 S DW="M1;4",DV="F X",DU="",DLB="TERTIARY PROVIDER #",DIFLD=124134 19 S DW="M1;4",DV="F",DU="",DLB="TERTIARY PROVIDER #",DIFLD=124 135 135 S DE(DW)="C19^IBXSC37" 136 136 S Y="@" … … 144 144 ; 145 145 C19F1 Q 146 X19 K:$L(X)>13!($L(X)<3) !($TR(X," ")="")X146 X19 K:$L(X)>13!($L(X)<3) X 147 147 I $D(X),X'?.ANP K X 148 148 Q -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC38.m
r628 r636 1 IBXSC38 ; ; 02/03/081 IBXSC38 ; ;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,",DIC=DIE,DP=399,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^DGCR(399,DA,""))="" … … 51 51 KEYCHK() Q:$G(DE(DW,"KEY"))="" 1 Q @DE(DW,"KEY") 52 52 BEGIN S DNM="IBXSC38",DQ=1 53 1 S DW="M1;4",DV="F X",DU="",DLB="TERTIARY PROVIDER #",DIFLD=12453 1 S DW="M1;4",DV="F",DU="",DLB="TERTIARY PROVIDER #",DIFLD=124 54 54 S DE(DW)="C1^IBXSC38" 55 55 S Y="@" … … 63 63 ; 64 64 C1F1 Q 65 X1 K:$L(X)>13!($L(X)<3) !($TR(X," ")="")X65 X1 K:$L(X)>13!($L(X)<3) X 66 66 I $D(X),X'?.ANP K X 67 67 Q … … 83 83 Q 84 84 6 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=6 G A 85 7 S DW="M1;4",DV="F X",DU="",DLB="TERTIARY PROVIDER #",DIFLD=12485 7 S DW="M1;4",DV="F",DU="",DLB="TERTIARY PROVIDER #",DIFLD=124 86 86 S DE(DW)="C7^IBXSC38" 87 87 S X="IBPSID" Q:X Q:$NA(@X)[U S X=$G(@X) … … 95 95 ; 96 96 C7F1 Q 97 X7 K:$L(X)>13!($L(X)<3) !($TR(X," ")="")X97 X7 K:$L(X)>13!($L(X)<3) X 98 98 I $D(X),X'?.ANP K X 99 99 Q -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC39.m
r628 r636 1 IBXSC39 ; ; 02/03/081 IBXSC39 ; ;12/27/07 2 2 ;; 3 3 1 N X,X1,X2 S DIXR=139 D X1(U) K X2 M X2=X D X1("F") K X1 M X1=X -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC4.m
r628 r636 1 IBXSC4 ; GENERATED FROM 'IB SCREEN4' INPUT TEMPLATE(#510), FILE 399; 02/03/081 IBXSC4 ; GENERATED FROM 'IB SCREEN4' INPUT TEMPLATE(#510), FILE 399;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,",DIC=DIE,DP=399,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^DGCR(399,DA,""))="" … … 164 164 Q 165 165 30 S D=0 K DE(1) ;47 166 S DIFLD=47,DGO="^IBXSC44",DC="2^399.047PA^CV^",DV="399.047M*P399.1' X",DW="0;1",DOW="VALUE CODE",DLB="Select "_DOW S:D DC=DC_D166 S DIFLD=47,DGO="^IBXSC44",DC="2^399.047PA^CV^",DV="399.047M*P399.1'",DW="0;1",DOW="VALUE CODE",DLB="Select "_DOW S:D DC=DC_D 167 167 S DU="DGCR(399.1," 168 168 G RE:D I $D(DSC(399.047))#2,$P(DSC(399.047),"I $D(^UTILITY(",1)="" X DSC(399.047) S D=$O(^(0)) S:D="" D=-1 G M30 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC41.m
r628 r636 1 IBXSC41 ; ; 02/03/081 IBXSC41 ; ;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,D0,""OT"",",DIC=DIE,DP=399.048,DL=2,DIEL=1,DU="" K DG,DE,DB Q:$O(^DGCR(399,D0,"OT",DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC42.m
r628 r636 1 IBXSC42 ; ; 02/03/081 IBXSC42 ; ;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,D0,""OC"",",DIC=DIE,DP=399.041,DL=2,DIEL=1,DU="" K DG,DE,DB Q:$O(^DGCR(399,D0,"OC",DA,""))="" … … 83 83 X7 I '$P(^DGCR(399.1,+^DGCR(399,DA(1),"OC",DA,0),0),U,10) S Y="@455" 84 84 Q 85 8 S DW="0;4",DV=" RDX",DU="",DLB="END DATE",DIFLD=.0485 8 S DW="0;4",DV="D",DU="",DLB="END DATE",DIFLD=.04 86 86 G RE 87 X8 S %DT="EX" D ^%DT S X=Y K: X<1 X I $D(X),X<$P($G(^DGCR(399,DA(1),"OC",DA,0)),U,2) KX87 X8 S %DT="EX" D ^%DT S X=Y K:Y<1 X 88 88 Q 89 89 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC43.m
r628 r636 1 IBXSC43 ; ; 02/03/081 IBXSC43 ; ;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,D0,""CC"",",DIC=DIE,DP=399.04,DL=2,DIEL=1,DU="" K DG,DE,DB Q:$O(^DGCR(399,D0,"CC",DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC44.m
r628 r636 1 IBXSC44 ; ; 02/03/081 IBXSC44 ; ;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,D0,""CV"",",DIC=DIE,DP=399.047,DL=2,DIEL=1,DU="" K DG,DE,DB Q:$O(^DGCR(399,D0,"CV",DA,""))="" … … 50 50 KEYCHK() Q:$G(DE(DW,"KEY"))="" 1 Q @DE(DW,"KEY") 51 51 BEGIN S DNM="IBXSC44",DQ=1+D G B 52 1 S DW="0;1",DV="M*P399.1' X",DU="",DLB="VALUE CODE",DIFLD=.0153 S DE(DW)="C1^IBXSC44" ,DE(DW,"INDEX")=152 1 S DW="0;1",DV="M*P399.1'",DU="",DLB="VALUE CODE",DIFLD=.01 53 S DE(DW)="C1^IBXSC44" 54 54 S DU="DGCR(399.1," 55 55 G RE:'D S DQ=2 G 2 … … 60 60 S X=DG(DQ),DIC=DIE 61 61 S ^DGCR(399,DA(1),"CV","B",$E(X,1,30),DA)="" 62 C1F1 N X,X1,X2 S DIXR=723 D C1X1(U) K X2 M X2=X D C1X1("O") K X1 M X1=X 63 K X M X=X2 D 64 . N DIEXARR M DIEXARR=X S DIEZCOND=1 65 . S X=$$COND^IBCVC(.DA,X1(1),X2(1)) 66 . S DIEZCOND=$G(X) K X M X=DIEXARR Q:'DIEZCOND 67 . D REMOVE^IBCVC(.DA) 68 G C1F2 69 C1X1(DION) K X 70 S X(1)=$G(@DIEZTMP@("V",399.047,DIIENS,.01,DION),$P($G(^DGCR(399,DA(1),"CV",DA,0)),U,1)) 71 S X=$G(X(1)) 72 Q 73 C1F2 Q 74 X1 S DIC("S")="I +$P($G(^DGCR(399.1,+Y,0)),U,11),$$ALLOWVC^IBCVC(DA(1),+Y)" D ^DIC K DIC S DIC=$G(DIE),X=+Y K:Y<0 X 62 C1F1 Q 63 X1 S DIC("S")="I +$P($G(^DGCR(399.1,+Y,0)),U,11)" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X 75 64 Q 76 65 ; 77 2 D:$D(DG)>9 F^DIE17,DE S DQ=2,DW="0;2",DV="F X",DU="",DLB="VALUE",DIFLD=.0266 2 D:$D(DG)>9 F^DIE17,DE S DQ=2,DW="0;2",DV="F",DU="",DLB="VALUE",DIFLD=.02 78 67 G RE 79 X2 K:$L(X)> 10!($L(X)<1)!'$$FORMCHK^IBCVC(X,.DA) X68 X2 K:$L(X)>9!($L(X)<1) X 80 69 I $D(X),X'?.ANP K X 81 70 Q -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC5.m
r628 r636 1 IBXSC5 ; GENERATED FROM 'IB SCREEN5' INPUT TEMPLATE(#511), FILE 399;0 2/03/081 IBXSC5 ; GENERATED FROM 'IB SCREEN5' INPUT TEMPLATE(#511), FILE 399;04/07/05 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,",DIC=DIE,DP=399,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^DGCR(399,DA,""))="" … … 155 155 Q 156 156 27 S D=0 K DE(1) ;47 157 S DIFLD=47,DGO="^IBXSC54",DC="2^399.047PA^CV^",DV="399.047M*P399.1' X",DW="0;1",DOW="VALUE CODE",DLB="Select "_DOW S:D DC=DC_D157 S DIFLD=47,DGO="^IBXSC54",DC="2^399.047PA^CV^",DV="399.047M*P399.1'",DW="0;1",DOW="VALUE CODE",DLB="Select "_DOW S:D DC=DC_D 158 158 S DU="DGCR(399.1," 159 159 G RE:D I $D(DSC(399.047))#2,$P(DSC(399.047),"I $D(^UTILITY(",1)="" X DSC(399.047) S D=$O(^(0)) S:D="" D=-1 G M27 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC51.m
r628 r636 1 IBXSC51 ; ;0 2/03/081 IBXSC51 ; ;04/07/05 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,D0,""OP"",",DIC=DIE,DP=399.043,DL=2,DIEL=1,DU="" K DG,DE,DB Q:$O(^DGCR(399,D0,"OP",DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC52.m
r628 r636 1 IBXSC52 ; ;0 2/03/081 IBXSC52 ; ;04/07/05 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,D0,""OC"",",DIC=DIE,DP=399.041,DL=2,DIEL=1,DU="" K DG,DE,DB Q:$O(^DGCR(399,D0,"OC",DA,""))="" … … 83 83 X7 I '$P(^DGCR(399.1,+^DGCR(399,DA(1),"OC",DA,0),0),U,10) S Y="@555" 84 84 Q 85 8 S DW="0;4",DV=" RDX",DU="",DLB="END DATE",DIFLD=.0485 8 S DW="0;4",DV="D",DU="",DLB="END DATE",DIFLD=.04 86 86 G RE 87 X8 S %DT="EX" D ^%DT S X=Y K: X<1 X I $D(X),X<$P($G(^DGCR(399,DA(1),"OC",DA,0)),U,2) KX87 X8 S %DT="EX" D ^%DT S X=Y K:Y<1 X 88 88 Q 89 89 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC53.m
r628 r636 1 IBXSC53 ; ;0 2/03/081 IBXSC53 ; ;04/07/05 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,D0,""CC"",",DIC=DIE,DP=399.04,DL=2,DIEL=1,DU="" K DG,DE,DB Q:$O(^DGCR(399,D0,"CC",DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC54.m
r628 r636 1 IBXSC54 ; ;0 2/03/081 IBXSC54 ; ;04/07/05 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,D0,""CV"",",DIC=DIE,DP=399.047,DL=2,DIEL=1,DU="" K DG,DE,DB Q:$O(^DGCR(399,D0,"CV",DA,""))="" … … 50 50 KEYCHK() Q:$G(DE(DW,"KEY"))="" 1 Q @DE(DW,"KEY") 51 51 BEGIN S DNM="IBXSC54",DQ=1+D G B 52 1 S DW="0;1",DV="M*P399.1' X",DU="",DLB="VALUE CODE",DIFLD=.0153 S DE(DW)="C1^IBXSC54" ,DE(DW,"INDEX")=152 1 S DW="0;1",DV="M*P399.1'",DU="",DLB="VALUE CODE",DIFLD=.01 53 S DE(DW)="C1^IBXSC54" 54 54 S DU="DGCR(399.1," 55 55 G RE:'D S DQ=2 G 2 … … 60 60 S X=DG(DQ),DIC=DIE 61 61 S ^DGCR(399,DA(1),"CV","B",$E(X,1,30),DA)="" 62 C1F1 N X,X1,X2 S DIXR=723 D C1X1(U) K X2 M X2=X D C1X1("O") K X1 M X1=X 63 K X M X=X2 D 64 . N DIEXARR M DIEXARR=X S DIEZCOND=1 65 . S X=$$COND^IBCVC(.DA,X1(1),X2(1)) 66 . S DIEZCOND=$G(X) K X M X=DIEXARR Q:'DIEZCOND 67 . D REMOVE^IBCVC(.DA) 68 G C1F2 69 C1X1(DION) K X 70 S X(1)=$G(@DIEZTMP@("V",399.047,DIIENS,.01,DION),$P($G(^DGCR(399,DA(1),"CV",DA,0)),U,1)) 71 S X=$G(X(1)) 72 Q 73 C1F2 Q 74 X1 S DIC("S")="I +$P($G(^DGCR(399.1,+Y,0)),U,11),$$ALLOWVC^IBCVC(DA(1),+Y)" D ^DIC K DIC S DIC=$G(DIE),X=+Y K:Y<0 X 62 C1F1 Q 63 X1 S DIC("S")="I +$P($G(^DGCR(399.1,+Y,0)),U,11)" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X 75 64 Q 76 65 ; 77 2 D:$D(DG)>9 F^DIE17,DE S DQ=2,DW="0;2",DV="F X",DU="",DLB="VALUE",DIFLD=.0266 2 D:$D(DG)>9 F^DIE17,DE S DQ=2,DW="0;2",DV="F",DU="",DLB="VALUE",DIFLD=.02 78 67 G RE 79 X2 K:$L(X)> 10!($L(X)<1)!'$$FORMCHK^IBCVC(X,.DA) X68 X2 K:$L(X)>9!($L(X)<1) X 80 69 I $D(X),X'?.ANP K X 81 70 Q -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC6.m
r628 r636 1 IBXSC6 ; GENERATED FROM 'IB SCREEN6' INPUT TEMPLATE(#512), FILE 399; 02/03/081 IBXSC6 ; GENERATED FROM 'IB SCREEN6' INPUT TEMPLATE(#512), FILE 399;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,",DIC=DIE,DP=399,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^DGCR(399,DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC61.m
r628 r636 1 IBXSC61 ; ; 02/03/081 IBXSC61 ; ;12/27/07 2 2 S X=DG(DQ),DIC=DIE 3 3 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,"",1) X ^DD(399,.22,1,1,1.4) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC610.m
r628 r636 1 IBXSC610 ; ; 02/03/081 IBXSC610 ; ;12/27/07 2 2 S X=DE(22),DIC=DIE 3 3 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) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC611.m
r628 r636 1 IBXSC611 ; ; 02/03/081 IBXSC611 ; ;12/27/07 2 2 S X=DG(DQ),DIC=DIE 3 3 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+DIV X ^DD(399,220,1,1,1.4) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC612.m
r628 r636 1 IBXSC612 ; ; 02/03/081 IBXSC612 ; ;12/27/07 2 2 S X=DE(12),DIC=DIE 3 3 K DIV S DIV=X,D0=DA(1),DIV(0)=D0,D1=DA,DIV(1)=D1 S Y(1)=$S($D(^DGCR(399,D0,"RC",D1,0)):^(0),1:"") S X=$P(Y(1),U,11),X=X S DIU=X K Y S X="" X ^DD(399.042,.1,1,1,2.4) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC62.m
r628 r636 1 IBXSC62 ; ; 02/03/081 IBXSC62 ; ;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,",DIC=DIE,DP=399,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^DGCR(399,DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC63.m
r628 r636 1 IBXSC63 ; ; 02/03/081 IBXSC63 ; ;12/27/07 2 2 S X=DG(DQ),DIC=DIE 3 3 K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X I $P(^DGCR(399,DA,0),U,5)<3 I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,15),X=X S DIU=X K Y S X=DIV S X=$$LOS1^IBCU64(DA) X ^DD(399,151,1,1,1.4) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC64.m
r628 r636 1 IBXSC64 ; ; 02/03/081 IBXSC64 ; ;12/27/07 2 2 S X=DG(DQ),DIC=DIE 3 3 K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X I $P(^DGCR(399,DA,0),U,5)<3 I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,15),X=X S DIU=X K Y S X=DIV S X=$$LOS1^IBCU64(DA) X ^DD(399,152,1,1,1.4) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC65.m
r628 r636 1 IBXSC65 ; ; 02/03/081 IBXSC65 ; ;12/27/07 2 2 S X=DE(23),DIC=DIE 3 3 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC66.m
r628 r636 1 IBXSC66 ; ; 02/03/081 IBXSC66 ; ;12/27/07 2 2 S X=DG(DQ),DIC=DIE 3 3 X ^DD(399,161,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,12),X=X S DIU=X K Y S X=DIV D DIS^IBCU S X=X S DIH=$G(^DGCR(399,DIV(0),"U")),DIV=X S $P(^("U"),U,12)=DIV,DIH=399,DIG=162 D ^DICR -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC67.m
r628 r636 1 IBXSC67 ; ; 02/03/081 IBXSC67 ; ;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,",DIC=DIE,DP=399,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^DGCR(399,DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC68.m
r628 r636 1 IBXSC68 ; ; 02/03/081 IBXSC68 ; ;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,D0,""RC"",",DIC=DIE,DP=399.042,DL=2,DIEL=1,DU="" K DG,DE,DB Q:$O(^DGCR(399,D0,"RC",DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC69.m
r628 r636 1 IBXSC69 ; ; 02/03/081 IBXSC69 ; ;12/27/07 2 2 S X=DG(DQ),DIC=DIE 3 3 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+DIV X ^DD(399,219,1,1,1.4) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC7.m
r628 r636 1 IBXSC7 ; GENERATED FROM 'IB SCREEN7' INPUT TEMPLATE(#513), FILE 399; 07/22/081 IBXSC7 ; GENERATED FROM 'IB SCREEN7' INPUT TEMPLATE(#513), FILE 399;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,",DIC=DIE,DP=399,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^DGCR(399,DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC71.m
r628 r636 1 IBXSC71 ; ; 07/22/081 IBXSC71 ; ;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,D0,""OP"",",DIC=DIE,DP=399.043,DL=2,DIEL=1,DU="" K DG,DE,DB Q:$O(^DGCR(399,D0,"OP",DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC710.m
r628 r636 1 IBXSC710 ; ; 07/22/081 IBXSC710 ; ;12/27/07 2 2 S X=DG(DQ),DIC=DIE 3 3 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+DIV X ^DD(399,220,1,1,1.4) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC711.m
r628 r636 1 IBXSC711 ; ; 07/22/082 S X=DE(1 2),DIC=DIE1 IBXSC711 ; ;12/27/07 2 S X=DE(11),DIC=DIE 3 3 K DIV S DIV=X,D0=DA(1),DIV(0)=D0,D1=DA,DIV(1)=D1 S Y(1)=$S($D(^DGCR(399,D0,"RC",D1,0)):^(0),1:"") S X=$P(Y(1),U,11),X=X S DIU=X K Y S X="" X ^DD(399.042,.1,1,1,2.4) 4 S X=DE(1 2),DIC=DIE4 S X=DE(11),DIC=DIE 5 5 X ^DD(399.042,.1,1,2,2.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"RC",D1,0)):^(0),1:"") S X=$P(Y(1),U,15),X=X S DIU=X K Y S X="" S DIH=$G(^DGCR(399,DIV(0),"RC",DIV(1),0)),DIV=X S $P(^(0),U,15)=DIV,DIH=399.042,DIG=.15 D ^DICR -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC712.m
r628 r636 1 IBXSC712 ; ; 07/22/081 IBXSC712 ; ;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,D0,""RC"",",DIC=DIE,DP=399.042,DL=2,DIEL=1,DU="" K DG,DE,DB Q:$O(^DGCR(399,D0,"RC",DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC72.m
r628 r636 1 IBXSC72 ; ; 07/22/081 IBXSC72 ; ;12/27/07 2 2 S X=DG(DQ),DIC=DIE 3 3 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,"",1) X ^DD(399,.22,1,1,1.4) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC73.m
r628 r636 1 IBXSC73 ; ; 07/22/081 IBXSC73 ; ;12/27/07 2 2 S X=DE(24),DIC=DIE 3 3 ; -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC74.m
r628 r636 1 IBXSC74 ; ; 07/22/081 IBXSC74 ; ;12/27/07 2 2 S X=DG(DQ),DIC=DIE 3 3 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) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC75.m
r628 r636 1 IBXSC75 ; ; 07/22/081 IBXSC75 ; ;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,",DIC=DIE,DP=399,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^DGCR(399,DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC76.m
r628 r636 1 IBXSC76 ; ; 07/22/081 IBXSC76 ; ;12/27/07 2 2 S X=DG(DQ),DIC=DIE 3 3 K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X I $P(^DGCR(399,DA,0),U,5)<3 I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,15),X=X S DIU=X K Y S X=DIV S X=$$LOS1^IBCU64(DA) X ^DD(399,151,1,1,1.4) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC77.m
r628 r636 1 IBXSC77 ; ; 07/22/081 IBXSC77 ; ;12/27/07 2 2 S X=DG(DQ),DIC=DIE 3 3 K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X I $P(^DGCR(399,DA,0),U,5)<3 I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,15),X=X S DIU=X K Y S X=DIV S X=$$LOS1^IBCU64(DA) X ^DD(399,152,1,1,1.4) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC78.m
r628 r636 1 IBXSC78 ; ; 07/22/081 IBXSC78 ; ;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,",DIC=DIE,DP=399,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^DGCR(399,DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC79.m
r628 r636 1 IBXSC79 ; ; 07/22/081 IBXSC79 ; ;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,D0,""RC"",",DIC=DIE,DP=399.042,DL=2,DIEL=1,DU="" K DG,DE,DB Q:$O(^DGCR(399,D0,"RC",DA,""))="" 4 I $D(^(0)) S %Z=^(0) S %=$P(%Z,U,1) S:%]"" DE(1)=% S %=$P(%Z,U,2) S:%]"" DE(2)=% S %=$P(%Z,U,3) S:%]"" DE(3)=% S %=$P(%Z,U,4) S:%]"" DE(4)=% S %=$P(%Z,U,5) S:%]"" DE(5)=% S %=$P(%Z,U,6) S:%]"" DE( 7)=% S %=$P(%Z,U,7) S:%]"" DE(9)=%5 I S %=$P(%Z,U, 9) S:%]"" DE(6)=% S %=$P(%Z,U,10) S:%]"" DE(12)=% S %=$P(%Z,U,12) S:%]"" DE(13)=%4 I $D(^(0)) S %Z=^(0) S %=$P(%Z,U,1) S:%]"" DE(1)=% S %=$P(%Z,U,2) S:%]"" DE(2)=% S %=$P(%Z,U,3) S:%]"" DE(3)=% S %=$P(%Z,U,4) S:%]"" DE(4)=% S %=$P(%Z,U,5) S:%]"" DE(5)=% S %=$P(%Z,U,6) S:%]"" DE(6)=% S %=$P(%Z,U,7) S:%]"" DE(8)=% 5 I S %=$P(%Z,U,10) S:%]"" DE(11)=% S %=$P(%Z,U,12) S:%]"" DE(12)=% 6 6 K %Z Q 7 7 ; … … 131 131 Q 132 132 ; 133 6 D:$D(DG)>9 F^DIE17,DE S DQ=6,DW="0;9",DV="NJ8,2",DU="",DLB="NON-COVERED CHARGE",DIFLD=.09 134 G RE 135 X6 S:X["$" X=$P(X,"$",2) K:X'?.N.1".".2N!(X>99999)!(X<0)!(X?.E1"."3.N) X 136 Q 137 ; 138 7 S DW="0;6",DV="*P81'",DU="",DLB="PROCEDURE",DIFLD=.06 139 S DE(DW)="C7^IBXSC79" 133 6 D:$D(DG)>9 F^DIE17,DE S DQ=6,DW="0;6",DV="*P81'",DU="",DLB="PROCEDURE",DIFLD=.06 134 S DE(DW)="C6^IBXSC79" 140 135 S DU="ICPT(" 141 136 G RE 142 C 7 G C7S:$D(DE(7))[0 K DB143 S X=DE( 7),DIC=DIE137 C6 G C6S:$D(DE(6))[0 K DB 138 S X=DE(6),DIC=DIE 144 139 K ^DGCR(399,"ASC1",$E(X,1,30),DA(1),DA) 145 S X=DE( 7),DIC=DIE140 S X=DE(6),DIC=DIE 146 141 K ^DGCR(399,"ASC2",DA(1),$E(X,1,30),DA) 147 C 7S S X="" G:DG(DQ)=X C7F1 K DB142 C6S S X="" G:DG(DQ)=X C6F1 K DB 148 143 S X=DG(DQ),DIC=DIE 149 144 I $$RC^IBEFUNC1(DA(1),DA) S ^DGCR(399,"ASC1",$E(X,1,30),DA(1),DA)="" 150 145 S X=DG(DQ),DIC=DIE 151 146 I $$RC^IBEFUNC1(DA(1),DA) S ^DGCR(399,"ASC2",DA(1),$E(X,1,30),DA)="" 152 C 7F1 Q153 X 7S ICPTVDT=$$BDATE^IBACSV($G(DA(1))),DIC("S")="I $$CPTACT^IBACSV(+Y,ICPTVDT)",DIC("W")="D EN^DDIOL("" ""_$P($$CPT^IBACSV(+Y,ICPTVDT),U,2),,""?0"")" D ^DIC K DIC S DIC=$G(DIE),X=+Y K:Y<0 X154 Q 155 ; 156 8 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=8 D X8D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17157 X 8I '$P(^DGCR(399,DA(1),"RC",DA,0),U,6) S Y="@758"158 Q 159 9 D:$D(DG)>9 F^DIE17,DE S DQ=9,DW="0;7",DV="P40.8'X",DU="",DLB="DIVISION",DIFLD=.07160 S DE(DW)="C 9^IBXSC79"147 C6F1 Q 148 X6 S ICPTVDT=$$BDATE^IBACSV($G(DA(1))),DIC("S")="I $$CPTACT^IBACSV(+Y,ICPTVDT)",DIC("W")="D EN^DDIOL("" ""_$P($$CPT^IBACSV(+Y,ICPTVDT),U,2),,""?0"")" D ^DIC K DIC S DIC=$G(DIE),X=+Y K:Y<0 X 149 Q 150 ; 151 7 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=7 D X7 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17 152 X7 I '$P(^DGCR(399,DA(1),"RC",DA,0),U,6) S Y="@758" 153 Q 154 8 D:$D(DG)>9 F^DIE17,DE S DQ=8,DW="0;7",DV="P40.8'X",DU="",DLB="DIVISION",DIFLD=.07 155 S DE(DW)="C8^IBXSC79" 161 156 S DU="DG(40.8," 162 157 S X=$$DEFDIV^IBCU7(DA(1)) 163 158 S Y=X 164 159 G Y 165 C 9 G C9S:$D(DE(9))[0 K DB166 S X=DE( 9),DIC=DIE160 C8 G C8S:$D(DE(8))[0 K DB 161 S X=DE(8),DIC=DIE 167 162 K ^DGCR(399,"ASC1",+$P(^DGCR(399,DA(1),"RC",DA,0),U,6),DA(1),DA) 168 S X=DE( 9),DIC=DIE163 S X=DE(8),DIC=DIE 169 164 K ^DGCR(399,"ASC2",DA(1),+$P(^DGCR(399,DA(1),"RC",DA,0),U,6),DA) 170 C 9S S X="" G:DG(DQ)=X C9F1 K DB165 C8S S X="" G:DG(DQ)=X C8F1 K DB 171 166 S X=DG(DQ),DIC=DIE 172 167 I $$RC^IBEFUNC1(DA(1),DA) S ^DGCR(399,"ASC1",$P(^DGCR(399,DA(1),"RC",DA,0),U,6),DA(1),DA)="" 173 168 S X=DG(DQ),DIC=DIE 174 169 I $$RC^IBEFUNC1(DA(1),DA) S ^DGCR(399,"ASC2",DA(1),$P(^DGCR(399,DA(1),"RC",DA,0),U,6),DA)="" 175 C 9F1 Q176 X 9Q177 10 S DQ=11;@758178 1 1 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=11 D X11D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17179 X1 1I +$P(^DGCR(399,DA(1),"RC",DA,0),U,8) W !," AUTO ADDED CHARGE - NO CHANGE TO TYPE/COMPONENT" S Y="@759"180 Q 181 1 2 D:$D(DG)>9 F^DIE17,DE S DQ=12,DW="0;10",DV="S",DU="",DLB="TYPE",DIFLD=.1182 S DE(DW)="C1 2^IBXSC79"170 C8F1 Q 171 X8 Q 172 9 S DQ=10 ;@758 173 10 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=10 D X10 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17 174 X10 I +$P(^DGCR(399,DA(1),"RC",DA,0),U,8) W !," AUTO ADDED CHARGE - NO CHANGE TO TYPE/COMPONENT" S Y="@759" 175 Q 176 11 D:$D(DG)>9 F^DIE17,DE S DQ=11,DW="0;10",DV="S",DU="",DLB="TYPE",DIFLD=.1 177 S DE(DW)="C11^IBXSC79" 183 178 S DU="1:INPT BS;2:OPT VST DT;3:RX;4:CPT;5:PROS;6:DRG;9:UNASSOCIATED;" 184 179 G RE 185 C1 2 G C12S:$D(DE(12))[0 K DB180 C11 G C11S:$D(DE(11))[0 K DB 186 181 D ^IBXSC711 187 C12S S X="" G:DG(DQ)=X C12F1 K DB 188 S X=DG(DQ),DIC=DIE 189 ; 190 S X=DG(DQ),DIC=DIE 191 ; 192 C12F1 Q 182 C11S S X="" G:DG(DQ)=X C11F1 K DB 183 S X=DG(DQ),DIC=DIE 184 ; 185 S X=DG(DQ),DIC=DIE 186 ; 187 C11F1 Q 188 X11 Q 189 12 D:$D(DG)>9 F^DIE17,DE S DQ=12,DW="0;12",DV="S",DU="",DLB="COMPONENT",DIFLD=.12 190 S DU="1:INSTITUTIONAL;2:PROFESSIONAL;" 191 G RE 193 192 X12 Q 194 13 D:$D(DG)>9 F^DIE17,DE S DQ=13,DW="0;12",DV="S",DU="",DLB="COMPONENT",DIFLD=.12 195 S DU="1:INSTITUTIONAL;2:PROFESSIONAL;" 196 G RE 197 X13 Q 193 13 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=13 D X13 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17 194 X13 I $S($P($G(^DGCR(399,DA(1),"RC",DA,0)),U,10)=3:0,1:$P($G(^(0)),U,10)'=4)!$P($G(^(0)),U,8) S Y="@759" 195 Q 198 196 14 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=14 D X14 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17 199 X14 I $ S($P($G(^DGCR(399,DA(1),"RC",DA,0)),U,10)=3:0,1:$P($G(^(0)),U,10)'=4)!$P($G(^(0)),U,8) S Y="@759"197 X14 I $P($G(^DGCR(399,DA(1),"RC",DA,0)),U,10)=4 S Y="@7581" 200 198 Q 201 199 15 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=15 D X15 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17 202 X15 I $P($G(^DGCR(399,DA(1),"RC",DA,0)),U,10)=4 S Y="@7581"200 X15 S DGRVRCAL=1 203 201 Q 204 202 16 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=16 D X16 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17 205 X16 S DGRVRCAL=1 206 Q 207 17 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=17 D X17 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17 208 X17 D LINKRX^IBCEU5(DA(1),DA) 209 Q 210 18 D:$D(DG)>9 F^DIE17 G ^IBXSC712 203 X16 D LINKRX^IBCEU5(DA(1),DA) 204 Q 205 17 D:$D(DG)>9 F^DIE17 G ^IBXSC712 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC8.m
r628 r636 1 IBXSC8 ; GENERATED FROM 'IB SCREEN8' INPUT TEMPLATE(#514), FILE 399; 09/05/071 IBXSC8 ; GENERATED FROM 'IB SCREEN8' INPUT TEMPLATE(#514), FILE 399;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,",DIC=DIE,DP=399,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^DGCR(399,DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC82.m
r628 r636 1 IBXSC82 ; GENERATED FROM 'IB SCREEN82' INPUT TEMPLATE(#577), FILE 399; 09/05/071 IBXSC82 ; GENERATED FROM 'IB SCREEN82' INPUT TEMPLATE(#577), FILE 399;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,",DIC=DIE,DP=399,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^DGCR(399,DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC821.m
r628 r636 1 IBXSC821 ; ; 09/05/071 IBXSC821 ; ;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,D0,""PRV"",",DIC=DIE,DP=399.0222,DL=2,DIEL=1,DU="" K DG,DE,DB Q:$O(^DGCR(399,D0,"PRV",DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC822.m
r628 r636 1 IBXSC822 ; ; 09/05/071 IBXSC822 ; ;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,",DIC=DIE,DP=399,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^DGCR(399,DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC823.m
r628 r636 1 IBXSC823 ; ; 09/05/071 IBXSC823 ; ;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^IBA(355.93,",DIC=DIE,DP=355.93,DL=2,DIEL=0,DU="" K DG,DE,DB Q:$O(^IBA(355.93,DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC824.m
r628 r636 1 IBXSC824 ; ; 09/05/071 IBXSC824 ; ;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,D0,""PRV"",",DIC=DIE,DP=399.0222,DL=2,DIEL=1,DU="" K DG,DE,DB Q:$O(^DGCR(399,D0,"PRV",DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC825.m
r628 r636 1 IBXSC825 ; ; 09/05/071 IBXSC825 ; ;12/27/07 2 2 S X=DG(DQ),DIC=DIE 3 3 K DIV S DIV=X,D0=DA(1),DIV(0)=D0,D1=DA,DIV(1)=D1 S Y(0)=X S X=Y(0)="SLF000" I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"PRV",D1,0)):^(0),1:"") S X=$P(Y(1),U,2),X=X S DIU=X K Y S X="" X ^DD(399.0222,.05,1,1,1.4) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC826.m
r628 r636 1 IBXSC826 ; ; 09/05/071 IBXSC826 ; ;12/27/07 2 2 S X=DG(DQ),DIC=DIE 3 3 D ATTREND^IBCU1(DA(1),DA,.13) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC827.m
r628 r636 1 IBXSC827 ; ; 09/05/071 IBXSC827 ; ;12/27/07 2 2 S X=DE(18),DIC=DIE 3 3 D ATTREND^IBCU1(DA(1),DA,.06) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC828.m
r628 r636 1 IBXSC828 ; ; 09/05/071 IBXSC828 ; ;12/27/07 2 2 S X=DG(DQ),DIC=DIE 3 3 D ATTREND^IBCU1(DA(1),DA,.06) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC829.m
r628 r636 1 IBXSC829 ; ; 09/05/071 IBXSC829 ; ;12/27/07 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,D0,""PRV"",",DIC=DIE,DP=399.0222,DL=2,DIEL=1,DU="" K DG,DE,DB Q:$O(^DGCR(399,D0,"PRV",DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC8H.m
r628 r636 1 IBXSC8H ; GENERATED FROM 'IB SCREEN8H' INPUT TEMPLATE(#515), FILE 399; 10/29/041 IBXSC8H ; GENERATED FROM 'IB SCREEN8H' INPUT TEMPLATE(#515), FILE 399;04/08/05 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,",DIC=DIE,DP=399,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^DGCR(399,DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC8H1.m
r628 r636 1 IBXSC8H1 ; ; 10/29/041 IBXSC8H1 ; ;04/08/05 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,D0,""PRV"",",DIC=DIE,DP=399.0222,DL=2,DIEL=1,DU="" K DG,DE,DB Q:$O(^DGCR(399,D0,"PRV",DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC8H2.m
r628 r636 1 IBXSC8H2 ; ; 10/29/041 IBXSC8H2 ; ;04/08/05 2 2 D DE G BEGIN 3 3 DE S DIE="^IBA(355.93,",DIC=DIE,DP=355.93,DL=2,DIEL=0,DU="" K DG,DE,DB Q:$O(^IBA(355.93,DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC8H3.m
r628 r636 1 IBXSC8H3 ; ; 10/29/041 IBXSC8H3 ; ;04/08/05 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,",DIC=DIE,DP=399,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^DGCR(399,DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXSC8H4.m
r628 r636 1 IBXSC8H4 ; ; 10/29/041 IBXSC8H4 ; ;04/08/05 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,D0,""PRV"",",DIC=DIE,DP=399.0222,DL=2,DIEL=1,DU="" K DG,DE,DB Q:$O(^DGCR(399,D0,"PRV",DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXST.m
r628 r636 1 IBXST ; GENERATED FROM 'IB STATUS' INPUT TEMPLATE(#506), FILE 399; 10/29/041 IBXST ; GENERATED FROM 'IB STATUS' INPUT TEMPLATE(#506), FILE 399;04/08/05 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,",DIC=DIE,DP=399,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^DGCR(399,DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXST1.m
r628 r636 1 IBXST1 ; ; 10/29/041 IBXST1 ; ;04/08/05 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,D0,""D1"",",DIC=DIE,DP=399.044,DL=2,DIEL=1,DU="" K DG,DE,DB Q:$O(^DGCR(399,D0,"D1",DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXST2.m
r628 r636 1 IBXST2 ; ; 10/29/041 IBXST2 ; ;04/08/05 2 2 S X=DG(DQ),DIC=DIE 3 3 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) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXST3.m
r628 r636 1 IBXST3 ; ; 10/29/041 IBXST3 ; ;04/08/05 2 2 S X=DE(19),DIC=DIE 3 3 K ^DGCR(399,"ALEX",$E(X,1,30),DA) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXST4.m
r628 r636 1 IBXST4 ; ; 10/29/041 IBXST4 ; ;04/08/05 2 2 S X=DG(DQ),DIC=DIE 3 3 S ^DGCR(399,"ALEX",$E(X,1,30),DA)="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXST5.m
r628 r636 1 IBXST5 ; ; 10/29/041 IBXST5 ; ;04/08/05 2 2 D DE G BEGIN 3 3 DE S DIE="^DGCR(399,",DIC=DIE,DP=399,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^DGCR(399,DA,""))="" -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX.m
r628 r636 1 IBXX ; DRIVER FOR COMPILED XREFS FOR FILE #399 ; 07/22/081 IBXX ; DRIVER FOR COMPILED XREFS FOR FILE #399 ; 12/27/07 2 2 ; 3 3 N DH,DU,DIKILL,DISET,DIKJ,DIKZ,DIKYR,DIKZA,DIK0Z,DIKZK,DIKDP,DIKM1,DIKUP,DIKUM,DV,DIIX,DIKF,DIAU,DIKNM,DIKDA,DIKLK,DIKLM,DIKY,DIXR,DIKCOND,DIKSVDA,DIKPUSH,X1,X2 … … 7 7 DI S DIKM1=0,DIKUM=0,DA(0)="",DV=0 F S DV=$O(DA(DV)) Q:DV'>0 S DIKUM=DIKUM+1,DIKUP(DV)=DA(DV) 8 8 S:DV="" DV=-1 S DH(1)=399,DIKUP=DA 9 I $D(DIKKS) D:DIKZ1=DH(1) ^IBXX1 S DA=DIKUP D:DIKZ1=DH(1) ^IBXX1 5D:DIKZ1'=DH(1) KILL D:DIKZ1'=DH(1) DA D:DIKZ1'=DH(1) SET D DA Q9 I $D(DIKKS) D:DIKZ1=DH(1) ^IBXX1 S DA=DIKUP D:DIKZ1=DH(1) ^IBXX14 D:DIKZ1'=DH(1) KILL D:DIKZ1'=DH(1) DA D:DIKZ1'=DH(1) SET D DA Q 10 10 I $D(DIKIL) D:DIKZ1=DH(1) ^IBXX1 S:DIKZ1=DH(1) DIKM1=1 D:DIKZ1'=DH(1) KILL S DA=DIKUP D:DIKM1>0 KIL1 D DA Q 11 I $D(DIKST) D:DIKZ1=DH(1) ^IBXX1 5D:DIKZ1'=DH(1) SET D DA Q11 I $D(DIKST) D:DIKZ1=DH(1) ^IBXX14 D:DIKZ1'=DH(1) SET D DA Q 12 12 I $D(DIKSAT) D SET1 D DA Q 13 13 Q … … 17 17 S DU=$E(DIK,1,$L(DIK)-1),DIKLK=$S(DIK[",":DU_")",1:DU) L +@DIKLK:10 K:'$T DIKLK 18 18 C I @("$O("_DIK_"DA))'>0") S DA=$$C1(DA),^(0)=$P(@(DIK_"0)"),U,1,2)_U_DA_U_DCNT K DCNT L:$D(DIKLK) -@DIKLK Q 19 S (DIKY,DA)=$O(^(DA)) G C:$P($G(^(DA,0)),U)']"" S DU=1,DCNT=DCNT+1 S:DA="" (DIKY,DA)=-1 D:DIKZ1=DH(1) ^IBXX1 5D:DIKZ1'=DH(1) SET D:DIKZ1'=DH(1) DA K DB(0) S DA=DIKY G C19 S (DIKY,DA)=$O(^(DA)) G C:$P($G(^(DA,0)),U)']"" S DU=1,DCNT=DCNT+1 S:DA="" (DIKY,DA)=-1 D:DIKZ1=DH(1) ^IBXX14 D:DIKZ1'=DH(1) SET D:DIKZ1'=DH(1) DA K DB(0) S DA=DIKY G C 20 20 Q 21 21 C1(A) Q:$P($G(@(DIK_"A,0)")),U)]"" A … … 24 24 KILL S DIKILL=1,DIKZK=2 25 25 I DIKZ1=399.0222,DIKUM'<1 S DIKM1=1 D A1^IBXX3 Q 26 I DIKZ1=399.0304,DIKUM'<1 S DIKM1=1 D A1^IBXX4,A1^IBXX1 4Q26 I DIKZ1=399.0304,DIKUM'<1 S DIKM1=1 D A1^IBXX4,A1^IBXX13 Q 27 27 I DIKZ1=399.041,DIKUM'<1 S DIKM1=1 D A1^IBXX5 Q 28 28 I DIKZ1=399.042,DIKUM'<1 S DIKM1=1 D A1^IBXX6 Q … … 33 33 I DIKZ1=399.047,DIKUM'<1 S DIKM1=1 D A1^IBXX11 Q 34 34 I DIKZ1=399.048,DIKUM'<1 S DIKM1=1 D A1^IBXX12 Q 35 I DIKZ1=399.077,DIKUM'<1 S DIKM1=1 D A1^IBXX13 Q 36 I DIKZ1=399.30416,DIKUM'<2 S DIKM1=2 D A1^IBXX14 Q 35 I DIKZ1=399.30416,DIKUM'<2 S DIKM1=2 D A1^IBXX13 Q 37 36 Q 38 37 SET S DISET=1,DIKZK=1 K DIKPUSH 39 I DIKZ1=399.0222,DIKUM'<1 S DIKM1=1 D A1^IBXX19 Q 40 I DIKZ1=399.0304,DIKUM'<1 S DIKM1=1 D A1^IBXX20,A1^IBXX30 Q 41 I DIKZ1=399.041,DIKUM'<1 S DIKM1=1 D A1^IBXX21 Q 42 I DIKZ1=399.042,DIKUM'<1 S DIKM1=1 D A1^IBXX22 Q 43 I DIKZ1=399.043,DIKUM'<1 S DIKM1=1 D A1^IBXX23 Q 44 I DIKZ1=399.044,DIKUM'<1 S DIKM1=1 D A1^IBXX24 Q 45 I DIKZ1=399.045,DIKUM'<1 S DIKM1=1 D A1^IBXX25 Q 46 I DIKZ1=399.046,DIKUM'<1 S DIKM1=1 D A1^IBXX26 Q 47 I DIKZ1=399.047,DIKUM'<1 S DIKM1=1 D A1^IBXX27 Q 48 I DIKZ1=399.048,DIKUM'<1 S DIKM1=1 D A1^IBXX28 Q 49 I DIKZ1=399.077,DIKUM'<1 S DIKM1=1 D A1^IBXX29 Q 50 I DIKZ1=399.30416,DIKUM'<2 S DIKM1=2 D A1^IBXX30 Q 38 I DIKZ1=399.0222,DIKUM'<1 S DIKM1=1 D A1^IBXX18 Q 39 I DIKZ1=399.0304,DIKUM'<1 S DIKM1=1 D A1^IBXX19,A1^IBXX28 Q 40 I DIKZ1=399.041,DIKUM'<1 S DIKM1=1 D A1^IBXX20 Q 41 I DIKZ1=399.042,DIKUM'<1 S DIKM1=1 D A1^IBXX21 Q 42 I DIKZ1=399.043,DIKUM'<1 S DIKM1=1 D A1^IBXX22 Q 43 I DIKZ1=399.044,DIKUM'<1 S DIKM1=1 D A1^IBXX23 Q 44 I DIKZ1=399.045,DIKUM'<1 S DIKM1=1 D A1^IBXX24 Q 45 I DIKZ1=399.046,DIKUM'<1 S DIKM1=1 D A1^IBXX25 Q 46 I DIKZ1=399.047,DIKUM'<1 S DIKM1=1 D A1^IBXX26 Q 47 I DIKZ1=399.048,DIKUM'<1 S DIKM1=1 D A1^IBXX27 Q 48 I DIKZ1=399.30416,DIKUM'<2 S DIKM1=2 D A1^IBXX28 Q 51 49 Q 52 50 KIL1 K @(DIK_"DA)") Q:'$D(^(0)) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX1.m
r628 r636 1 IBXX1 ; COMPILED XREF FOR FILE #399 ; 07/22/081 IBXX1 ; COMPILED XREF FOR FILE #399 ; 12/27/07 2 2 ; 3 3 S DIKZK=2 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX10.m
r628 r636 1 IBXX10 ; COMPILED XREF FOR FILE #399.046 ; 07/22/081 IBXX10 ; COMPILED XREF FOR FILE #399.046 ; 12/27/07 2 2 ; 3 3 S DA=0 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX11.m
r628 r636 1 IBXX11 ; COMPILED XREF FOR FILE #399.047 ; 07/22/081 IBXX11 ; COMPILED XREF FOR FILE #399.047 ; 12/27/07 2 2 ; 3 3 S DA=0 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX12.m
r628 r636 1 IBXX12 ; COMPILED XREF FOR FILE #399.048 ; 07/22/081 IBXX12 ; COMPILED XREF FOR FILE #399.048 ; 12/27/07 2 2 ; 3 3 S DA=0 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX13.m
r628 r636 1 IBXX13 ; COMPILED XREF FOR FILE #399. 077 ; 07/22/081 IBXX13 ; COMPILED XREF FOR FILE #399.30416 ; 12/27/07 2 2 ; 3 S DA =03 S DA(2)=DA(1) S DA(1)=0 S DA=0 4 4 A1 ; 5 I $D(DIKILL) K DIKLM S:DIKM1=1 DIKLM=1 G @DIKM1 6 0 ; 7 A S DA=$O(^DGCR(399,DA(1),"TXC",DA)) I DA'>0 S DA=0 G END 5 I $D(DIKILL) K DIKLM S:DIKM1=2 DIKLM=1 S:DIKM1'=2&'$G(DIKPUSH(2)) DIKPUSH(2)=1,DA(2)=DA(1),DA(1)=DA,DA=0 G @DIKM1 6 A S DA(1)=$O(^DGCR(399,DA(2),"CP",DA(1))) I DA(1)'>0 S DA(1)=0 G END 8 7 1 ; 9 S DIKZ(0)=$G(^DGCR(399,DA(1),"TXC",DA,0)) 8 B S DA=$O(^DGCR(399,DA(2),"CP",DA(1),"MOD",DA)) I DA'>0 S DA=0 Q:DIKM1=1 G A 9 2 ; 10 S DIKZ(0)=$G(^DGCR(399,DA(2),"CP",DA(1),"MOD",DA,0)) 11 S X=$P(DIKZ(0),U,2) 12 I X'="" K ^DGCR(399,DA(2),"CP",DA(1),"MOD","C",$E(X,1,30),DA) 10 13 S X=$P(DIKZ(0),U,1) 11 I X'="" K ^DGCR(399,DA( 1),"TXC","B",$E(X,1,30),DA)12 G:'$D(DIKLM) AQ:$D(DIKILL)13 END G ^IBXX1414 I X'="" K ^DGCR(399,DA(2),"CP",DA(1),"MOD","B",$E(X,1,30),DA) 15 G:'$D(DIKLM) B Q:$D(DIKILL) 16 END Q -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX14.m
r628 r636 1 IBXX14 ; COMPILED XREF FOR FILE #399 .30416 ; 07/22/081 IBXX14 ; COMPILED XREF FOR FILE #399 ; 12/27/07 2 2 ; 3 S DA(2)=DA(1) S DA(1)=0 S DA=0 4 A1 ; 5 I $D(DIKILL) K DIKLM S:DIKM1=2 DIKLM=1 S:DIKM1'=2&'$G(DIKPUSH(2)) DIKPUSH(2)=1,DA(2)=DA(1),DA(1)=DA,DA=0 G @DIKM1 6 A S DA(1)=$O(^DGCR(399,DA(2),"CP",DA(1))) I DA(1)'>0 S DA(1)=0 G END 7 1 ; 8 B S DA=$O(^DGCR(399,DA(2),"CP",DA(1),"MOD",DA)) I DA'>0 S DA=0 Q:DIKM1=1 G A 9 2 ; 10 S DIKZ(0)=$G(^DGCR(399,DA(2),"CP",DA(1),"MOD",DA,0)) 3 S DIKZK=1 4 S DIKZ(0)=$G(^DGCR(399,DA,0)) 5 S X=$P(DIKZ(0),U,1) 6 I X'="" S ^DGCR(399,"B",$E(X,1,30),DA)="" 7 S X=$P(DIKZ(0),U,1) 8 I X'="" D 9 .N DIK,DIV,DIU,DIN 10 .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,1)="" I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"S")):^("S"),1:"") S X=$P(Y(1),U,1),X=X S DIU=X K Y S X=DIV S X=DT X ^DD(399,.01,1,3,1.4) 11 S X=$P(DIKZ(0),U,1) 12 I X'="" D 13 .N DIK,DIV,DIU,DIN 14 .X ^DD(399,.01,1,4,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"S")):^("S"),1:"") S X=$P(Y(1),U,2),X=X S DIU=X K Y S X=DIV S X=$S(($D(DUZ)#2):DUZ,1:"") X ^DD(399,.01,1,4,1.4) 15 S X=$P(DIKZ(0),U,1) 16 I X'="" D 17 .N DIK,DIV,DIU,DIN 18 .X ^DD(399,.01,1,5,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,14),X=X S DIU=X K Y S X=DIV S X=$S($D(^IBE(350.9,1,1)):$P(^(1),U,6),1:"") X ^DD(399,.01,1,5,1.4) 19 S X=$P(DIKZ(0),U,1) 20 I X'="" D 21 .N DIK,DIV,DIU,DIN 22 .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=1 S DIH=$G(^DGCR(399,DIV(0),0)),DIV=X S $P(^(0),U,13)=DIV,DIH=399,DIG=.13 D ^DICR 23 S X=$P(DIKZ(0),U,1) 24 I X'="" D 25 .N DIK,DIV,DIU,DIN 26 .X ^DD(399,.01,1,7,1.3) I X S X=DIV 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=3 S DIH=$G(^DGCR(399,DIV(0),0)),DIV=X S $P(^(0),U,19)=DIV,DIH=399,DIG=.19 D ^DICR 27 S DIKZ(0)=$G(^DGCR(399,DA,0)) 11 28 S X=$P(DIKZ(0),U,2) 12 I X'="" K ^DGCR(399,DA(2),"CP",DA(1),"MOD","C",$E(X,1,30),DA) 13 S X=$P(DIKZ(0),U,1) 14 I X'="" K ^DGCR(399,DA(2),"CP",DA(1),"MOD","B",$E(X,1,30),DA) 15 G:'$D(DIKLM) B Q:$D(DIKILL) 16 END Q 29 I X'="" S ^DGCR(399,"C",$E(X,1,30),DA)="" 30 S X=$P(DIKZ(0),U,3) 31 I X'="" S ^DGCR(399,"D",$E(X,1,30),DA)="" 32 S X=$P(DIKZ(0),U,3) 33 I X'="" S IBN=$P(^DGCR(399,DA,0),"^",2) S:$D(IBN) ^DGCR(399,"APDT",IBN,DA,9999999-X)="" K IBN 34 S X=$P(DIKZ(0),U,3) 35 I X'="" S ^DGCR(399,"ABNDT",DA,9999999-X)="" 36 S X=$P(DIKZ(0),U,4) 37 I X'="" D 38 .N DIK,DIV,DIU,DIN 39 .X ^DD(399,.04,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,0)):^(0),1:"") S X=$P(Y(1),U,24),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,24)=DIV,DIH=399,DIG=.24 D ^DICR 40 S DIKZ(0)=$G(^DGCR(399,DA,0)) 41 S X=$P(DIKZ(0),U,5) 42 I X'="" S ^DGCR(399,"ABT",$E(X,1,30),DA)="" 43 S X=$P(DIKZ(0),U,5) 44 I X'="" D 45 .N DIK,DIV,DIU,DIN 46 .X ^DD(399,.05,1,2,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,0)):^(0),1:"") S X=$P(Y(1),U,25),X=X S DIU=X K Y S X=DIV S X=$$TRIG05^IBCU4(X,D0) S DIH=$G(^DGCR(399,DIV(0),0)),DIV=X S $P(^(0),U,25)=DIV,DIH=399,DIG=.25 D ^DICR 47 S DIKZ(0)=$G(^DGCR(399,DA,0)) 48 S X=$P(DIKZ(0),U,6) 49 I X'="" D 50 .N DIK,DIV,DIU,DIN 51 .X ^DD(399,.06,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,0)):^(0),1:"") S X=$P(Y(1),U,26),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,26)=DIV,DIH=399,DIG=.26 D ^DICR 52 S DIKZ(0)=$G(^DGCR(399,DA,0)) 53 S X=$P(DIKZ(0),U,7) 54 I X'="" D 55 .N DIK,DIV,DIU,DIN 56 .X ^DD(399,.07,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,6),X=X S DIU=X K Y S X=DIV S X=1 X ^DD(399,.07,1,1,1.4) 57 S X=$P(DIKZ(0),U,7) 58 I X'="" D 59 .N DIK,DIV,DIU,DIN 60 .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,11),X=X S DIU=X K Y S X=DIV S X=$P(^DGCR(399.3,$P(^DGCR(399,DA,0),U,7),0),U,7) X ^DD(399,.07,1,2,1.4) 61 S X=$P(DIKZ(0),U,7) 62 I X'="" S ^DGCR(399,"AD",$E(X,1,30),DA)="" 63 S DIKZ(0)=$G(^DGCR(399,DA,0)) 64 S X=$P(DIKZ(0),U,8) 65 I X'="" D 66 .N DIK,DIV,DIU,DIN 67 .X ^DD(399,.08,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,9),X=X S DIU=X K Y S X=DIV S X=2 X ^DD(399,.08,1,1,1.4) 68 S X=$P(DIKZ(0),U,8) 69 I X'="" D 70 .N DIK,DIV,DIU,DIN 71 .X ^DD(399,.08,1,2,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,8),X=X S DIU=X K Y S X=DIV S X=2 X ^DD(399,.08,1,2,1.4) 72 S X=$P(DIKZ(0),U,8) 73 I X'="" D 74 .N DIK,DIV,DIU,DIN 75 .X ^DD(399,.08,1,4,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,12),X=X S DIU=X K Y S X=DIV D DIS^IBCU S X=X X ^DD(399,.08,1,4,1.4) 76 S X=$P(DIKZ(0),U,8) 77 I X'="" S ^DGCR(399,"APTF",$E(X,1,30),DA)="" 78 S X=$P(DIKZ(0),U,8) 79 I X'="" D 80 .N DIK,DIV,DIU,DIN 81 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X I $P(^DGCR(399,DA,0),U,5)<3 I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,15),X=X S DIU=X K Y S X=DIV S X=+$$LOS1^IBCU64(DA) X ^DD(399,.08,1,6,1.4) 82 S DIKZ(0)=$G(^DGCR(399,DA,0)) 83 S X=$P(DIKZ(0),U,11) 84 I X'="" D 85 .N DIK,DIV,DIU,DIN 86 .X ^DD(399,.11,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"M")):^("M"),1:"") S X=$P(Y(1),U,12),X=X S DIU=X K Y S X=DIV D EN1^IBCU5 X ^DD(399,.11,1,1,1.4) 87 S X=$P(DIKZ(0),U,11) 88 I X'="" D EN^IBCU5 89 S X=$P(DIKZ(0),U,11) 90 I X'="" S DGRVRCAL=1 91 S X=$P(DIKZ(0),U,11) 92 I X'="" D 93 .N DIK,DIV,DIU,DIN 94 .X ^DD(399,.11,1,4,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,0)):^(0),1:"") S X=$P(Y(1),U,21),X=X S DIU=X K Y X ^DD(399,.11,1,4,1.1) X ^DD(399,.11,1,4,1.4) 95 S DIKZ(0)=$G(^DGCR(399,DA,0)) 96 S X=$P(DIKZ(0),U,13) 97 I X'="" D 98 .N DIK,DIV,DIU,DIN 99 .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,14),X=X S DIU=X K Y S X=DIV S X=DT X ^DD(399,.13,1,1,1.4) 100 S X=$P(DIKZ(0),U,13) 101 I X'="" I X>0,X<3,$P(^DGCR(399,DA,0),U,2) S ^DGCR(399,"AOP",$P(^(0),U,2),DA)="" 102 S X=$P(DIKZ(0),U,13) 103 I X'="" I +X=3 S ^DGCR(399,"AST",+X,DA)="" 104 S X=$P(DIKZ(0),U,13) 105 I X'="" D 106 .N DIK,DIV,DIU,DIN 107 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X=Y(0),X=X S X=X=2 I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"TX")):^("TX"),1:"") S X=$P(Y(1),U,5),X=X S DIU=X K Y S X=DIV S X="1N" X ^DD(399,.13,1,4,1.4) 108 S DIKZ(0)=$G(^DGCR(399,DA,0)) 109 S X=$P(DIKZ(0),U,14) 110 I X'="" D BC^IBJVDEQ 111 S X=$P(DIKZ(0),U,17) 112 I X'="" S ^DGCR(399,"AC",$E(X,1,30),DA)="" 113 S X=$P(DIKZ(0),U,19) 114 I X'="" D 115 .N DIK,DIV,DIU,DIN 116 .X ^DD(399,.19,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,0)):^(0),1:"") S X=$P(Y(1),U,9),X=X S DIU=X K Y S X=DIV S X=5 S DIH=$G(^DGCR(399,DIV(0),0)),DIV=X S $P(^(0),U,9)=DIV,DIH=399,DIG=.09 D ^DICR 117 S X=$P(DIKZ(0),U,19) 118 I X'="" S DGRVRCAL=1 119 S X=$P(DIKZ(0),U,19) 120 I X'="" D ALLID^IBCEP3(DA,.19,1) 121 S X=$P(DIKZ(0),U,19) 122 I X'="" D BILLPNS^IBCU(DA) 123 S X=$P(DIKZ(0),U,19) 124 I X'="" D ATTREND^IBCU1(DA,"","") 125 S DIKZ(0)=$G(^DGCR(399,DA,0)) 126 S X=$P(DIKZ(0),U,20) 127 I X'="" D 128 .N DIK,DIV,DIU,DIN 129 .X ^DD(399,.2,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,2),X=X S DIU=X K Y S X=DIV S X=.5 X ^DD(399,.2,1,1,1.4) 130 S DIKZ(0)=$G(^DGCR(399,DA,0)) 131 S X=$P(DIKZ(0),U,21) 132 I X'="" D 133 .N DIK,DIV,DIU,DIN 134 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"MP")):^("MP"),1:"") S X=$P(Y(1),U,2),X=X S DIU=X K Y S X=DIV S X=$$BPP^IBCNS2(DA) X ^DD(399,.21,1,1,1.4) 135 S X=$P(DIKZ(0),U,21) 136 I X'="" D 137 .N DIK,DIV,DIU,DIN 138 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X=('$$REQMRA^IBEFUNC(DA)&$$NEEDMRA^IBEFUNC(DA)) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"TX")):^("TX"),1:"") S X=$P(Y(1),U,5),X=X S DIU=X K Y S X=DIV S X=0 X ^DD(399,.21,1,2,1.4) 139 S X=$P(DIKZ(0),U,21) 140 I X'="" D 141 .N DIK,DIV,DIU,DIN 142 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X=$S($$WNRBILL^IBEFUNC(DA,X):1,1:0) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"TX")):^("TX"),1:"") S X=$P(Y(1),U,8),X=X S DIU=X K Y S X="" X ^DD(399,.21,1,3,1.4) 143 S DIKZ(0)=$G(^DGCR(399,DA,0)) 144 S X=$P(DIKZ(0),U,22) 145 I X'="" D 146 .N DIK,DIV,DIU,DIN 147 .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,"",1) X ^DD(399,.22,1,1,1.4) 148 S X=$P(DIKZ(0),U,22) 149 I X'="" D 150 .N DIK,DIV,DIU,DIN 151 .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,3),X=X S DIU=X K Y S X=DIV S X=$$PRVNUM^IBCU(DA,"",2) X ^DD(399,.22,1,2,1.4) 152 S X=$P(DIKZ(0),U,22) 153 I X'="" D 154 .N DIK,DIV,DIU,DIN 155 .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,4),X=X S DIU=X K Y S X=DIV S X=$$PRVNUM^IBCU(DA,"",3) X ^DD(399,.22,1,3,1.4) 156 S X=$P(DIKZ(0),U,22) 157 END G ^IBXX15 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX15.m
r628 r636 1 IBXX15 ; COMPILED XREF FOR FILE #399 ; 07/22/081 IBXX15 ; COMPILED XREF FOR FILE #399.0222 ; 12/27/07 2 2 ; 3 S DIKZK=14 S DIKZ(0)=$G(^DGCR(399,DA,0))5 S X=$P(DIKZ(0),U,1)6 I X'="" S ^DGCR(399,"B",$E(X,1,30),DA)=""7 S X=$P(DIKZ(0),U,1)8 3 I X'="" D 9 4 .N DIK,DIV,DIU,DIN 10 .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,1)="" I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"S")):^("S"),1:"") S X=$P(Y(1),U,1),X=X S DIU=X K Y S X=DIV S X=DT X ^DD(399,.01,1,3,1.4) 11 S X=$P(DIKZ(0),U,1) 12 I X'="" D 13 .N DIK,DIV,DIU,DIN 14 .X ^DD(399,.01,1,4,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"S")):^("S"),1:"") S X=$P(Y(1),U,2),X=X S DIU=X K Y S X=DIV S X=$S(($D(DUZ)#2):DUZ,1:"") X ^DD(399,.01,1,4,1.4) 15 S X=$P(DIKZ(0),U,1) 16 I X'="" D 17 .N DIK,DIV,DIU,DIN 18 .X ^DD(399,.01,1,5,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,14),X=X S DIU=X K Y S X=DIV S X=$S($D(^IBE(350.9,1,1)):$P(^(1),U,6),1:"") X ^DD(399,.01,1,5,1.4) 19 S X=$P(DIKZ(0),U,1) 20 I X'="" D 21 .N DIK,DIV,DIU,DIN 22 .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=1 S DIH=$G(^DGCR(399,DIV(0),0)),DIV=X S $P(^(0),U,13)=DIV,DIH=399,DIG=.13 D ^DICR 23 S X=$P(DIKZ(0),U,1) 24 I X'="" D 25 .N DIK,DIV,DIU,DIN 26 .X ^DD(399,.01,1,7,1.3) I X S X=DIV 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=3 S DIH=$G(^DGCR(399,DIV(0),0)),DIV=X S $P(^(0),U,19)=DIV,DIH=399,DIG=.19 D ^DICR 27 S DIKZ(0)=$G(^DGCR(399,DA,0)) 28 S X=$P(DIKZ(0),U,2) 29 I X'="" S ^DGCR(399,"C",$E(X,1,30),DA)="" 30 S X=$P(DIKZ(0),U,3) 31 I X'="" S ^DGCR(399,"D",$E(X,1,30),DA)="" 32 S X=$P(DIKZ(0),U,3) 33 I X'="" S IBN=$P(^DGCR(399,DA,0),"^",2) S:$D(IBN) ^DGCR(399,"APDT",IBN,DA,9999999-X)="" K IBN 34 S X=$P(DIKZ(0),U,3) 35 I X'="" S ^DGCR(399,"ABNDT",DA,9999999-X)="" 36 S X=$P(DIKZ(0),U,4) 37 I X'="" D 38 .N DIK,DIV,DIU,DIN 39 .X ^DD(399,.04,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,0)):^(0),1:"") S X=$P(Y(1),U,24),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,24)=DIV,DIH=399,DIG=.24 D ^DICR 40 S DIKZ(0)=$G(^DGCR(399,DA,0)) 41 S X=$P(DIKZ(0),U,5) 42 I X'="" S ^DGCR(399,"ABT",$E(X,1,30),DA)="" 43 S X=$P(DIKZ(0),U,5) 44 I X'="" D 45 .N DIK,DIV,DIU,DIN 46 .X ^DD(399,.05,1,2,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,0)):^(0),1:"") S X=$P(Y(1),U,25),X=X S DIU=X K Y S X=DIV S X=$$TRIG05^IBCU4(X,D0) S DIH=$G(^DGCR(399,DIV(0),0)),DIV=X S $P(^(0),U,25)=DIV,DIH=399,DIG=.25 D ^DICR 47 S DIKZ(0)=$G(^DGCR(399,DA,0)) 48 S X=$P(DIKZ(0),U,6) 49 I X'="" D 50 .N DIK,DIV,DIU,DIN 51 .X ^DD(399,.06,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,0)):^(0),1:"") S X=$P(Y(1),U,26),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,26)=DIV,DIH=399,DIG=.26 D ^DICR 52 S DIKZ(0)=$G(^DGCR(399,DA,0)) 53 S X=$P(DIKZ(0),U,7) 54 I X'="" D 55 .N DIK,DIV,DIU,DIN 56 .X ^DD(399,.07,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,6),X=X S DIU=X K Y S X=DIV S X=1 X ^DD(399,.07,1,1,1.4) 57 S X=$P(DIKZ(0),U,7) 58 I X'="" D 59 .N DIK,DIV,DIU,DIN 60 .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,11),X=X S DIU=X K Y S X=DIV S X=$P(^DGCR(399.3,$P(^DGCR(399,DA,0),U,7),0),U,7) X ^DD(399,.07,1,2,1.4) 61 S X=$P(DIKZ(0),U,7) 62 I X'="" S ^DGCR(399,"AD",$E(X,1,30),DA)="" 63 S DIKZ(0)=$G(^DGCR(399,DA,0)) 64 S X=$P(DIKZ(0),U,8) 65 I X'="" D 66 .N DIK,DIV,DIU,DIN 67 .X ^DD(399,.08,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,9),X=X S DIU=X K Y S X=DIV S X=2 X ^DD(399,.08,1,1,1.4) 68 S X=$P(DIKZ(0),U,8) 69 I X'="" D 70 .N DIK,DIV,DIU,DIN 71 .X ^DD(399,.08,1,2,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,8),X=X S DIU=X K Y S X=DIV S X=2 X ^DD(399,.08,1,2,1.4) 72 S X=$P(DIKZ(0),U,8) 73 I X'="" D 74 .N DIK,DIV,DIU,DIN 75 .X ^DD(399,.08,1,4,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,12),X=X S DIU=X K Y S X=DIV D DIS^IBCU S X=X X ^DD(399,.08,1,4,1.4) 76 S X=$P(DIKZ(0),U,8) 77 I X'="" S ^DGCR(399,"APTF",$E(X,1,30),DA)="" 78 S X=$P(DIKZ(0),U,8) 79 I X'="" D 80 .N DIK,DIV,DIU,DIN 81 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X I $P(^DGCR(399,DA,0),U,5)<3 I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,15),X=X S DIU=X K Y S X=DIV S X=+$$LOS1^IBCU64(DA) X ^DD(399,.08,1,6,1.4) 82 S DIKZ(0)=$G(^DGCR(399,DA,0)) 83 S X=$P(DIKZ(0),U,11) 84 I X'="" D 85 .N DIK,DIV,DIU,DIN 86 .X ^DD(399,.11,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"M")):^("M"),1:"") S X=$P(Y(1),U,12),X=X S DIU=X K Y S X=DIV D EN1^IBCU5 X ^DD(399,.11,1,1,1.4) 87 S X=$P(DIKZ(0),U,11) 88 I X'="" D EN^IBCU5 89 S X=$P(DIKZ(0),U,11) 90 I X'="" S DGRVRCAL=1 91 S X=$P(DIKZ(0),U,11) 92 I X'="" D 93 .N DIK,DIV,DIU,DIN 94 .X ^DD(399,.11,1,4,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,0)):^(0),1:"") S X=$P(Y(1),U,21),X=X S DIU=X K Y X ^DD(399,.11,1,4,1.1) X ^DD(399,.11,1,4,1.4) 95 S DIKZ(0)=$G(^DGCR(399,DA,0)) 96 S X=$P(DIKZ(0),U,13) 97 I X'="" D 98 .N DIK,DIV,DIU,DIN 99 .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,14),X=X S DIU=X K Y S X=DIV S X=DT X ^DD(399,.13,1,1,1.4) 100 S X=$P(DIKZ(0),U,13) 101 I X'="" I X>0,X<3,$P(^DGCR(399,DA,0),U,2) S ^DGCR(399,"AOP",$P(^(0),U,2),DA)="" 102 S X=$P(DIKZ(0),U,13) 103 I X'="" I +X=3 S ^DGCR(399,"AST",+X,DA)="" 104 S X=$P(DIKZ(0),U,13) 105 I X'="" D 106 .N DIK,DIV,DIU,DIN 107 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X=Y(0),X=X S X=X=2 I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"TX")):^("TX"),1:"") S X=$P(Y(1),U,5),X=X S DIU=X K Y S X=DIV S X="1N" X ^DD(399,.13,1,4,1.4) 108 S DIKZ(0)=$G(^DGCR(399,DA,0)) 109 S X=$P(DIKZ(0),U,14) 110 I X'="" D BC^IBJVDEQ 111 S X=$P(DIKZ(0),U,17) 112 I X'="" S ^DGCR(399,"AC",$E(X,1,30),DA)="" 113 S X=$P(DIKZ(0),U,19) 114 I X'="" D 115 .N DIK,DIV,DIU,DIN 116 .X ^DD(399,.19,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,0)):^(0),1:"") S X=$P(Y(1),U,9),X=X S DIU=X K Y S X=DIV S X=5 S DIH=$G(^DGCR(399,DIV(0),0)),DIV=X S $P(^(0),U,9)=DIV,DIH=399,DIG=.09 D ^DICR 117 S X=$P(DIKZ(0),U,19) 118 I X'="" S DGRVRCAL=1 119 S X=$P(DIKZ(0),U,19) 120 I X'="" D ALLID^IBCEP3(DA,.19,1) 121 S X=$P(DIKZ(0),U,19) 122 I X'="" D BILLPNS^IBCU(DA) 123 S X=$P(DIKZ(0),U,19) 124 I X'="" D ATTREND^IBCU1(DA,"","") 125 S DIKZ(0)=$G(^DGCR(399,DA,0)) 126 S X=$P(DIKZ(0),U,20) 127 I X'="" D 128 .N DIK,DIV,DIU,DIN 129 .X ^DD(399,.2,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,2),X=X S DIU=X K Y S X=DIV S X=.5 X ^DD(399,.2,1,1,1.4) 130 S DIKZ(0)=$G(^DGCR(399,DA,0)) 131 S X=$P(DIKZ(0),U,21) 132 I X'="" D 133 .N DIK,DIV,DIU,DIN 134 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"MP")):^("MP"),1:"") S X=$P(Y(1),U,2),X=X S DIU=X K Y S X=DIV S X=$$BPP^IBCNS2(DA) X ^DD(399,.21,1,1,1.4) 135 S X=$P(DIKZ(0),U,21) 136 I X'="" D 137 .N DIK,DIV,DIU,DIN 138 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X=('$$REQMRA^IBEFUNC(DA)&$$NEEDMRA^IBEFUNC(DA)) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"TX")):^("TX"),1:"") S X=$P(Y(1),U,5),X=X S DIU=X K Y S X=DIV S X=0 X ^DD(399,.21,1,2,1.4) 139 S X=$P(DIKZ(0),U,21) 140 I X'="" D 141 .N DIK,DIV,DIU,DIN 142 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X=$S($$WNRBILL^IBEFUNC(DA,X):1,1:0) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"TX")):^("TX"),1:"") S X=$P(Y(1),U,8),X=X S DIU=X K Y S X="" X ^DD(399,.21,1,3,1.4) 143 S DIKZ(0)=$G(^DGCR(399,DA,0)) 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) 144 6 S X=$P(DIKZ(0),U,22) 145 7 I X'="" D 146 8 .N DIK,DIV,DIU,DIN 147 .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,"",1) X ^DD(399,.22,1,1,1.4)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) 148 10 S X=$P(DIKZ(0),U,22) 149 11 I X'="" D 150 12 .N DIK,DIV,DIU,DIN 151 .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, 3),X=X S DIU=X K Y S X=DIV S X=$$PRVNUM^IBCU(DA,"",2) X ^DD(399,.22,1,2,1.4)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) 152 14 S X=$P(DIKZ(0),U,22) 153 15 I X'="" D 154 16 .N DIK,DIV,DIU,DIN 155 .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,4),X=X S DIU=X K Y S X=DIV S X=$$PRVNUM^IBCU(DA,"",3) X ^DD(399,.22,1,3,1.4)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) 156 18 S X=$P(DIKZ(0),U,22) 19 I X'="" D 20 .N DIK,DIV,DIU,DIN 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) 22 S DIKZ(0)=$G(^DGCR(399,DA,0)) 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) 26 I X'="" D 27 .N DIK,DIV,DIU,DIN 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 29 S DIKZ(0)=$G(^DGCR(399,DA,0)) 30 S X=$P(DIKZ(0),U,27) 31 I X'="" D 32 .N DIK,DIV,DIU,DIN 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) 38 I X'="" D 39 .N DIK,DIV,DIU,DIN 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) 42 I X'="" D 43 .N DIK,DIV,DIU,DIN 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) 49 I X'="" D 50 .N DIK,DIV,DIU,DIN 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) 53 I X'="" D 54 .N DIK,DIV,DIU,DIN 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) 57 I X'="" D 58 .N DIK,DIV,DIU,DIN 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) 61 I X'="" D 62 .N DIK,DIV,DIU,DIN 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) 68 I X'="" D 69 .N DIK,DIV,DIU,DIN 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) 72 I X'="" D 73 .N DIK,DIV,DIU,DIN 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) 76 I X'="" D 77 .N DIK,DIV,DIU,DIN 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) 83 I X'="" D 84 .N DIK,DIV,DIU,DIN 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) 87 I X'="" D 88 .N DIK,DIV,DIU,DIN 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) 92 I X'="" D 93 .N DIK,DIV,DIU,DIN 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) 96 I X'="" D 97 .N DIK,DIV,DIU,DIN 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) 101 I X'="" D 102 .N DIK,DIV,DIU,DIN 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) 108 I X'="" D 109 .N DIK,DIV,DIU,DIN 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) 113 I X'="" D 114 .N DIK,DIV,DIU,DIN 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) 117 I X'="" D 118 .N DIK,DIV,DIU,DIN 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) 121 I X'="" D 122 .N DIK,DIV,DIU,DIN 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) 126 I X'="" D 127 .N DIK,DIV,DIU,DIN 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) 131 I X'="" D 132 .N DIK,DIV,DIU,DIN 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) 157 135 END G ^IBXX16 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX16.m
r628 r636 1 IBXX16 ; COMPILED XREF FOR FILE #399.0222 ; 07/22/081 IBXX16 ; COMPILED XREF FOR FILE #399.0222 ; 12/27/07 2 2 ; 3 3 I X'="" D 4 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,"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) 7 I X'="" D 8 .N DIK,DIV,DIU,DIN 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) 11 I X'="" D 12 .N DIK,DIV,DIU,DIN 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) 15 I X'="" D 16 .N DIK,DIV,DIU,DIN 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) 19 I X'="" D 20 .N DIK,DIV,DIU,DIN 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) 22 S DIKZ(0)=$G(^DGCR(399,DA,0)) 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) 26 I X'="" D 27 .N DIK,DIV,DIU,DIN 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 29 S DIKZ(0)=$G(^DGCR(399,DA,0)) 30 S X=$P(DIKZ(0),U,27) 31 I X'="" D 32 .N DIK,DIV,DIU,DIN 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) 38 I X'="" D 39 .N DIK,DIV,DIU,DIN 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) 42 I X'="" D 43 .N DIK,DIV,DIU,DIN 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) 49 I X'="" D 50 .N DIK,DIV,DIU,DIN 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) 53 I X'="" D 54 .N DIK,DIV,DIU,DIN 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) 57 I X'="" D 58 .N DIK,DIV,DIU,DIN 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) 61 I X'="" D 62 .N DIK,DIV,DIU,DIN 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) 68 I X'="" D 69 .N DIK,DIV,DIU,DIN 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) 72 I X'="" D 73 .N DIK,DIV,DIU,DIN 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) 76 I X'="" D 77 .N DIK,DIV,DIU,DIN 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) 83 I X'="" D 84 .N DIK,DIV,DIU,DIN 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) 87 I X'="" D 88 .N DIK,DIV,DIU,DIN 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) 92 I X'="" D 93 .N DIK,DIV,DIU,DIN 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) 96 I X'="" D 97 .N DIK,DIV,DIU,DIN 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) 101 I X'="" D 102 .N DIK,DIV,DIU,DIN 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) 108 I X'="" D 109 .N DIK,DIV,DIU,DIN 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) 113 I X'="" D 114 .N DIK,DIV,DIU,DIN 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) 117 I X'="" D 118 .N DIK,DIV,DIU,DIN 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) 121 I X'="" D 122 .N DIK,DIV,DIU,DIN 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) 126 I X'="" D 127 .N DIK,DIV,DIU,DIN 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")) 5 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X I $$COBN^IBCEF(DA)=1 I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"TX")):^("TX"),1:"") S X=$P(Y(1),U,5),X=X S DIU=X K Y X ^DD(399,101,1,2,1.1) X ^DD(399,101,1,2,1.4) 130 6 S X=$P(DIKZ("M"),U,1) 131 7 I X'="" D 132 8 .N DIK,DIV,DIU,DIN 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)9 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X=$S($$MCRWNR^IBEFUNC(X):$$COBN^IBCEF(DA)=1,1:0) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"TX")):^("TX"),1:"") S X=$P(Y(1),U,8),X=X S DIU=X K Y S X="" X ^DD(399,101,1,3,1.4) 134 10 S X=$P(DIKZ("M"),U,1) 11 I X'="" D 12 .N DIK,DIV,DIU,DIN 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,10),X=X S DIU=X K Y S X=DIV S X=$$PRVQUAL^IBCU(DA,X,1) X ^DD(399,101,1,4,1.4) 14 S DIKZ("M")=$G(^DGCR(399,DA,"M")) 15 S X=$P(DIKZ("M"),U,2) 16 I X'="" D 17 .N DIK,DIV,DIU,DIN 18 .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,3),X=X S DIU=X K Y S X=DIV S X=$$PRVNUM^IBCU(DA,X,2) X ^DD(399,102,1,2,1.4) 19 S X=$P(DIKZ("M"),U,2) 20 I X'="" D 21 .N DIK,DIV,DIU,DIN 22 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X I $$COBN^IBCEF(DA)=2 I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"TX")):^("TX"),1:"") S X=$P(Y(1),U,5),X=X S DIU=X K Y X ^DD(399,102,1,3,1.1) X ^DD(399,102,1,3,1.4) 23 S X=$P(DIKZ("M"),U,2) 24 I X'="" D 25 .N DIK,DIV,DIU,DIN 26 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X=$S($$MCRWNR^IBEFUNC(X):$$COBN^IBCEF(DA)=2,1:0) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"TX")):^("TX"),1:"") S X=$P(Y(1),U,8),X=X S DIU=X K Y S X="" X ^DD(399,102,1,4,1.4) 27 S X=$P(DIKZ("M"),U,2) 28 I X'="" D 29 .N DIK,DIV,DIU,DIN 30 .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,X,2) X ^DD(399,102,1,5,1.4) 31 S DIKZ("M")=$G(^DGCR(399,DA,"M")) 32 S X=$P(DIKZ("M"),U,3) 33 I X'="" D 34 .N DIK,DIV,DIU,DIN 35 .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,4),X=X S DIU=X K Y S X=DIV S X=$$PRVNUM^IBCU(DA,X,3) X ^DD(399,103,1,2,1.4) 36 S X=$P(DIKZ("M"),U,3) 37 I X'="" D 38 .N DIK,DIV,DIU,DIN 39 .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,X,3) X ^DD(399,103,1,3,1.4) 40 S DIKZ("M")=$G(^DGCR(399,DA,"M")) 41 S X=$P(DIKZ("M"),U,11) 42 I X'="" D MAILIN^IBCU5 43 S X=$P(DIKZ("M"),U,11) 44 I X'="" S DGRVRCAL=1 45 S X=$P(DIKZ("M"),U,12) 46 I X'="" D 47 .N DIK,DIV,DIU,DIN 48 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"M")):^("M"),1:"") S X=$P(Y(1),U,1),X=X S DIU=X K Y X ^DD(399,112,1,1,1.1) X ^DD(399,112,1,1,1.4) 49 S X=$P(DIKZ("M"),U,12) 50 I X'="" D IX^IBCNS2(DA,"I1") 51 S X=$P(DIKZ("M"),U,12) 52 I X'="" D 53 .N DIK,DIV,DIU,DIN 54 .X ^DD(399,112,1,3,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"MP")):^("MP"),1:"") S X=$P(Y(1),U,2),X=X S DIU=X K Y S X=DIV S X=$$BPP^IBCNS2(DA,1) X ^DD(399,112,1,3,1.4) 55 S DIKZ("M")=$G(^DGCR(399,DA,"M")) 56 S X=$P(DIKZ("M"),U,13) 57 I X'="" D 58 .N DIK,DIV,DIU,DIN 59 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"M")):^("M"),1:"") S X=$P(Y(1),U,2),X=X S DIU=X K Y X ^DD(399,113,1,1,1.1) X ^DD(399,113,1,1,1.4) 60 S X=$P(DIKZ("M"),U,13) 61 I X'="" D IX^IBCNS2(DA,"I2") 62 S X=$P(DIKZ("M"),U,13) 63 I X'="" D 64 .N DIK,DIV,DIU,DIN 65 .X ^DD(399,113,1,3,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"MP")):^("MP"),1:"") S X=$P(Y(1),U,2),X=X S DIU=X K Y S X=DIV S X=$$BPP^IBCNS2(DA,1) X ^DD(399,113,1,3,1.4) 66 S DIKZ("M")=$G(^DGCR(399,DA,"M")) 67 S X=$P(DIKZ("M"),U,14) 68 I X'="" D 69 .N DIK,DIV,DIU,DIN 70 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"M")):^("M"),1:"") S X=$P(Y(1),U,3),X=X S DIU=X K Y X ^DD(399,114,1,1,1.1) X ^DD(399,114,1,1,1.4) 71 S X=$P(DIKZ("M"),U,14) 72 I X'="" D IX^IBCNS2(DA,"I3") 73 S X=$P(DIKZ("M"),U,14) 74 I X'="" D 75 .N DIK,DIV,DIU,DIN 76 .X ^DD(399,114,1,3,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"MP")):^("MP"),1:"") S X=$P(Y(1),U,2),X=X S DIU=X K Y S X=DIV S X=$$BPP^IBCNS2(DA) X ^DD(399,114,1,3,1.4) 77 S DIKZ("MP")=$G(^DGCR(399,DA,"MP")) 78 S X=$P(DIKZ("MP"),U,1) 79 I X'="" D 80 .N DIK,DIV,DIU,DIN 81 .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,135,1,2,1.4) 82 S X=$P(DIKZ("MP"),U,1) 83 I X'="" D MAILA^IBCU5 84 S X=$P(DIKZ("MP"),U,1) 85 I X'="" S DGRVRCAL=1 86 S DIKZ("MP")=$G(^DGCR(399,DA,"MP")) 87 S X=$P(DIKZ("MP"),U,2) 88 I X'="" D 89 .N DIK,DIV,DIU,DIN 90 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X='$$WNRBILL^IBEFUNC(DA) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"MP")):^("MP"),1:"") S X=$P(Y(1),U,1),X=X S DIU=X K Y X ^DD(399,136,1,1,1.1) X ^DD(399,136,1,1,1.4) 91 S DIKZ("U")=$G(^DGCR(399,DA,"U")) 92 S X=$P(DIKZ("U"),U,1) 93 I X'="" D 94 .N DIK,DIV,DIU,DIN 95 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X I $P(^DGCR(399,DA,0),U,5)<3 I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,15),X=X S DIU=X K Y S X=DIV S X=$$LOS1^IBCU64(DA) X ^DD(399,151,1,1,1.4) 96 S X=$P(DIKZ("U"),U,1) 97 I X'="" S DGRVRCAL=1 98 S X=$P(DIKZ("U"),U,1) 99 I X'="" D 100 .N DIK,DIV,DIU,DIN 101 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X I +$G(^DGCR(399,DA,"U1"))=0 I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U1")):^("U1"),1:"") S X=$P(Y(1),U,1),X=X S DIU=X K Y S X=DIV S X=0 X ^DD(399,151,1,3,1.4) 102 S X=$P(DIKZ("U"),U,1) 103 I X'="" S:$P(^DGCR(399,DA,0),"^",2) ^DGCR(399,"APDS",$P(^(0),U,2),-X,DA)="" 104 S DIKZ("U")=$G(^DGCR(399,DA,"U")) 105 S X=$P(DIKZ("U"),U,2) 106 I X'="" D 107 .N DIK,DIV,DIU,DIN 108 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X I $P(^DGCR(399,DA,0),U,5)<3 I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,15),X=X S DIU=X K Y S X=DIV S X=$$LOS1^IBCU64(DA) X ^DD(399,152,1,1,1.4) 109 S X=$P(DIKZ("U"),U,2) 110 I X'="" S DGRVRCAL=1 111 S DIKZ("U")=$G(^DGCR(399,DA,"U")) 112 S X=$P(DIKZ("U"),U,11) 113 I X'="" D 114 .N DIK,DIV,DIU,DIN 115 .X ^DD(399,161,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,12),X=X S DIU=X K Y S X=DIV D DIS^IBCU S X=X S DIH=$G(^DGCR(399,DIV(0),"U")),DIV=X S $P(^("U"),U,12)=DIV,DIH=399,DIG=162 D ^DICR 116 S DIKZ("U")=$G(^DGCR(399,DA,"U")) 117 S X=$P(DIKZ("U"),U,15) 118 I X'="" D 119 .N DIK,DIV,DIU,DIN 120 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X=($P($G(^DGCR(399,DA,"U2")),U,2)=""&$$INPAT^IBCEF(DA,1)) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U2")):^("U2"),1:"") S X=$P(Y(1),U,2),X=X S DIU=X K Y S X=DIV S X=DIV X ^DD(399,165,1,1,1.4) 121 S X=$P(DIKZ("U"),U,15) 122 I X'="" D 123 .N DIK,DIV,DIU,DIN 124 .X ^DD(399,165,1,2,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U2")):^("U2"),1:"") S X=$P(Y(1),U,3),X=X S DIU=X K Y S X=DIV N Z S X=$$LOS1^IBCU64(DA,.Z),X=+$G(Z) X ^DD(399,165,1,2,1.4) 125 S DIKZ("U2")=$G(^DGCR(399,DA,"U2")) 126 S X=$P(DIKZ("U2"),U,4) 127 I X'="" D 128 .N DIK,DIV,DIU,DIN 129 .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+DIV X ^DD(399,218,1,1,1.4) 130 S X=$P(DIKZ("U2"),U,4) 131 I X'="" D 132 .N DIK,DIV,DIU,DIN 133 .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,3),X=X S DIU=X K Y S X=DIV S X="PRIOR PAYMENT(S)" X ^DD(399,218,1,2,1.4) 134 S DIKZ("U2")=$G(^DGCR(399,DA,"U2")) 135 S X=$P(DIKZ("U2"),U,5) 136 I X'="" D 137 .N DIK,DIV,DIU,DIN 138 .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+DIV X ^DD(399,219,1,1,1.4) 139 S X=$P(DIKZ("U2"),U,5) 140 I X'="" D 141 .N DIK,DIV,DIU,DIN 142 .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,3),X=X S DIU=X K Y S X=DIV S X="PRIOR PAYMENT(S)" X ^DD(399,219,1,2,1.4) 143 S DIKZ("U2")=$G(^DGCR(399,DA,"U2")) 144 S X=$P(DIKZ("U2"),U,6) 145 I X'="" D 146 .N DIK,DIV,DIU,DIN 147 .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+DIV X ^DD(399,220,1,1,1.4) 148 S X=$P(DIKZ("U2"),U,6) 135 149 END G ^IBXX17 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX17.m
r628 r636 1 IBXX17 ; COMPILED XREF FOR FILE #399.0222 ; 07/22/081 IBXX17 ; COMPILED XREF FOR FILE #399.0222 ; 12/27/07 2 2 ; 3 3 I X'="" D 4 4 .N DIK,DIV,DIU,DIN 5 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X I $$COBN^IBCEF(DA)=1 I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"TX")):^("TX"),1:"") S X=$P(Y(1),U,5),X=X S DIU=X K Y X ^DD(399,101,1,2,1.1) X ^DD(399,101,1,2,1.4) 6 S X=$P(DIKZ("M"),U,1) 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,3),X=X S DIU=X K Y S X=DIV S X="PRIOR PAYMENT(S)" X ^DD(399,220,1,2,1.4) 6 S DIKZ("U2")=$G(^DGCR(399,DA,"U2")) 7 S X=$P(DIKZ("U2"),U,10) 7 8 I X'="" D 8 9 .N DIK,DIV,DIU,DIN 9 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y( 0)=X S X=$S($$MCRWNR^IBEFUNC(X):$$COBN^IBCEF(DA)=1,1:0) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"TX")):^("TX"),1:"") S X=$P(Y(1),U,8),X=X S DIU=X K Y S X="" X ^DD(399,101,1,3,1.4)10 S X=$P(DIKZ(" M"),U,1)10 .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 X ^DD(399,232,1,1,1.1) X ^DD(399,232,1,1,1.4) 11 S X=$P(DIKZ("U2"),U,10) 11 12 I X'="" D 12 13 .N DIK,DIV,DIU,DIN 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,10),X=X S DIU=X K Y S X=DIV S X=$$PRVQUAL^IBCU(DA,X,1) X ^DD(399,101,1,4,1.4) 14 S DIKZ("M")=$G(^DGCR(399,DA,"M")) 15 S X=$P(DIKZ("M"),U,2) 14 .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,1.4) 15 S X=$P(DIKZ("U2"),U,10) 16 16 I X'="" D 17 17 .N DIK,DIV,DIU,DIN 18 .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,3),X=X S DIU=X K Y S X=DIV S X=$$PRVNUM^IBCU(DA,X,2) X ^DD(399,102,1,2,1.4) 19 S X=$P(DIKZ("M"),U,2) 20 I X'="" D 21 .N DIK,DIV,DIU,DIN 22 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X I $$COBN^IBCEF(DA)=2 I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"TX")):^("TX"),1:"") S X=$P(Y(1),U,5),X=X S DIU=X K Y X ^DD(399,102,1,3,1.1) X ^DD(399,102,1,3,1.4) 23 S X=$P(DIKZ("M"),U,2) 24 I X'="" D 25 .N DIK,DIV,DIU,DIN 26 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X=$S($$MCRWNR^IBEFUNC(X):$$COBN^IBCEF(DA)=2,1:0) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"TX")):^("TX"),1:"") S X=$P(Y(1),U,8),X=X S DIU=X K Y S X="" X ^DD(399,102,1,4,1.4) 27 S X=$P(DIKZ("M"),U,2) 28 I X'="" D 29 .N DIK,DIV,DIU,DIN 30 .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,X,2) X ^DD(399,102,1,5,1.4) 18 .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=DIV S X=$P($$TAXGET^IBCEP81(X),U,2) X ^DD(399,232,1,4,1.4) 19 S DIKZ("M1")=$G(^DGCR(399,DA,"M1")) 20 S X=$P(DIKZ("M1"),U,8) 21 I X'="" S ^DGCR(399,"AG",$E(X,1,30),DA)="" 22 CR1 S DIXR=139 23 K X 31 24 S DIKZ("M")=$G(^DGCR(399,DA,"M")) 32 S X=$P(DIKZ("M"),U,3) 33 I X'="" D 34 .N DIK,DIV,DIU,DIN 35 .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,4),X=X S DIU=X K Y S X=DIV S X=$$PRVNUM^IBCU(DA,X,3) X ^DD(399,103,1,2,1.4) 36 S X=$P(DIKZ("M"),U,3) 37 I X'="" D 38 .N DIK,DIV,DIU,DIN 39 .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,X,3) X ^DD(399,103,1,3,1.4) 25 S X(1)=$P(DIKZ("M"),U,1) 26 S X(2)=$P(DIKZ("M"),U,2) 27 S X(3)=$P(DIKZ("M"),U,3) 28 S X(4)=$P(DIKZ("M"),U,13) 29 S X(5)=$P(DIKZ("M"),U,12) 30 S X(6)=$P(DIKZ("M"),U,14) 31 S X=$G(X(1)) 32 D 33 . K X1,X2 M X1=X,X2=X 34 . N DIKXARR M DIKXARR=X S DIKCOND=1 35 . S X=$S($O(^DGCR(399,DA,"PRV",0)):1,1:0) 36 . S DIKCOND=$G(X) K X M X=DIKXARR 37 . Q:'DIKCOND 38 . D:X1(1)'=X2(1)!(X1(5)'=X2(5)) SETID^IBCEP3(DA,1) D:X1(2)'=X2(2)!(X1(4)'=X2(4)) SETID^IBCEP3(DA,2) D:X1(3)'=X2(3)!(X1(6)'=X2(6)) SETID^IBCEP3(DA,3) 39 CR2 S DIXR=430 40 K X 40 41 S DIKZ("M")=$G(^DGCR(399,DA,"M")) 41 S X=$P(DIKZ("M"),U,11) 42 I X'="" D MAILIN^IBCU5 43 S X=$P(DIKZ("M"),U,11) 44 I X'="" S DGRVRCAL=1 45 S X=$P(DIKZ("M"),U,12) 46 I X'="" D 47 .N DIK,DIV,DIU,DIN 48 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"M")):^("M"),1:"") S X=$P(Y(1),U,1),X=X S DIU=X K Y X ^DD(399,112,1,1,1.1) X ^DD(399,112,1,1,1.4) 49 S X=$P(DIKZ("M"),U,12) 50 I X'="" D IX^IBCNS2(DA,"I1") 51 S X=$P(DIKZ("M"),U,12) 52 I X'="" D 53 .N DIK,DIV,DIU,DIN 54 .X ^DD(399,112,1,3,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"MP")):^("MP"),1:"") S X=$P(Y(1),U,2),X=X S DIU=X K Y S X=DIV S X=$$BPP^IBCNS2(DA,1) X ^DD(399,112,1,3,1.4) 55 S DIKZ("M")=$G(^DGCR(399,DA,"M")) 56 S X=$P(DIKZ("M"),U,13) 57 I X'="" D 58 .N DIK,DIV,DIU,DIN 59 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"M")):^("M"),1:"") S X=$P(Y(1),U,2),X=X S DIU=X K Y X ^DD(399,113,1,1,1.1) X ^DD(399,113,1,1,1.4) 60 S X=$P(DIKZ("M"),U,13) 61 I X'="" D IX^IBCNS2(DA,"I2") 62 S X=$P(DIKZ("M"),U,13) 63 I X'="" D 64 .N DIK,DIV,DIU,DIN 65 .X ^DD(399,113,1,3,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"MP")):^("MP"),1:"") S X=$P(Y(1),U,2),X=X S DIU=X K Y S X=DIV S X=$$BPP^IBCNS2(DA,1) X ^DD(399,113,1,3,1.4) 66 S DIKZ("M")=$G(^DGCR(399,DA,"M")) 67 S X=$P(DIKZ("M"),U,14) 68 I X'="" D 69 .N DIK,DIV,DIU,DIN 70 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"M")):^("M"),1:"") S X=$P(Y(1),U,3),X=X S DIU=X K Y X ^DD(399,114,1,1,1.1) X ^DD(399,114,1,1,1.4) 71 S X=$P(DIKZ("M"),U,14) 72 I X'="" D IX^IBCNS2(DA,"I3") 73 S X=$P(DIKZ("M"),U,14) 74 I X'="" D 75 .N DIK,DIV,DIU,DIN 76 .X ^DD(399,114,1,3,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"MP")):^("MP"),1:"") S X=$P(Y(1),U,2),X=X S DIU=X K Y S X=DIV S X=$$BPP^IBCNS2(DA) X ^DD(399,114,1,3,1.4) 77 S DIKZ("MP")=$G(^DGCR(399,DA,"MP")) 78 S X=$P(DIKZ("MP"),U,1) 79 I X'="" D 80 .N DIK,DIV,DIU,DIN 81 .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,135,1,2,1.4) 82 S X=$P(DIKZ("MP"),U,1) 83 I X'="" D MAILA^IBCU5 84 S X=$P(DIKZ("MP"),U,1) 85 I X'="" S DGRVRCAL=1 86 S DIKZ("MP")=$G(^DGCR(399,DA,"MP")) 87 S X=$P(DIKZ("MP"),U,2) 88 I X'="" D 89 .N DIK,DIV,DIU,DIN 90 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X='$$WNRBILL^IBEFUNC(DA) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"MP")):^("MP"),1:"") S X=$P(Y(1),U,1),X=X S DIU=X K Y X ^DD(399,136,1,1,1.1) X ^DD(399,136,1,1,1.4) 91 S DIKZ("U")=$G(^DGCR(399,DA,"U")) 92 S X=$P(DIKZ("U"),U,1) 93 I X'="" D 94 .N DIK,DIV,DIU,DIN 95 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X I $P(^DGCR(399,DA,0),U,5)<3 I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,15),X=X S DIU=X K Y S X=DIV S X=$$LOS1^IBCU64(DA) X ^DD(399,151,1,1,1.4) 96 S X=$P(DIKZ("U"),U,1) 97 I X'="" S DGRVRCAL=1 98 S X=$P(DIKZ("U"),U,1) 99 I X'="" D 100 .N DIK,DIV,DIU,DIN 101 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X I +$G(^DGCR(399,DA,"U1"))=0 I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U1")):^("U1"),1:"") S X=$P(Y(1),U,1),X=X S DIU=X K Y S X=DIV S X=0 X ^DD(399,151,1,3,1.4) 102 S X=$P(DIKZ("U"),U,1) 103 I X'="" S:$P(^DGCR(399,DA,0),"^",2) ^DGCR(399,"APDS",$P(^(0),U,2),-X,DA)="" 104 S DIKZ("U")=$G(^DGCR(399,DA,"U")) 105 S X=$P(DIKZ("U"),U,2) 106 I X'="" D 107 .N DIK,DIV,DIU,DIN 108 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X I $P(^DGCR(399,DA,0),U,5)<3 I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,15),X=X S DIU=X K Y S X=DIV S X=$$LOS1^IBCU64(DA) X ^DD(399,152,1,1,1.4) 109 S X=$P(DIKZ("U"),U,2) 110 I X'="" S DGRVRCAL=1 111 S DIKZ("U")=$G(^DGCR(399,DA,"U")) 112 S X=$P(DIKZ("U"),U,11) 113 I X'="" D 114 .N DIK,DIV,DIU,DIN 115 .X ^DD(399,161,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,12),X=X S DIU=X K Y S X=DIV D DIS^IBCU S X=X S DIH=$G(^DGCR(399,DIV(0),"U")),DIV=X S $P(^("U"),U,12)=DIV,DIH=399,DIG=162 D ^DICR 116 S DIKZ("U")=$G(^DGCR(399,DA,"U")) 117 S X=$P(DIKZ("U"),U,15) 118 I X'="" D 119 .N DIK,DIV,DIU,DIN 120 .K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X=($P($G(^DGCR(399,DA,"U2")),U,2)=""&$$INPAT^IBCEF(DA,1)) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U2")):^("U2"),1:"") S X=$P(Y(1),U,2),X=X S DIU=X K Y S X=DIV S X=DIV X ^DD(399,165,1,1,1.4) 121 S X=$P(DIKZ("U"),U,15) 122 I X'="" D 123 .N DIK,DIV,DIU,DIN 124 .X ^DD(399,165,1,2,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U2")):^("U2"),1:"") S X=$P(Y(1),U,3),X=X S DIU=X K Y S X=DIV N Z S X=$$LOS1^IBCU64(DA,.Z),X=+$G(Z) X ^DD(399,165,1,2,1.4) 125 S DIKZ("U2")=$G(^DGCR(399,DA,"U2")) 126 S X=$P(DIKZ("U2"),U,4) 127 I X'="" D 128 .N DIK,DIV,DIU,DIN 129 .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+DIV X ^DD(399,218,1,1,1.4) 130 S X=$P(DIKZ("U2"),U,4) 131 I X'="" D 132 .N DIK,DIV,DIU,DIN 133 .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,3),X=X S DIU=X K Y S X=DIV S X="PRIOR PAYMENT(S)" X ^DD(399,218,1,2,1.4) 134 S DIKZ("U2")=$G(^DGCR(399,DA,"U2")) 135 S X=$P(DIKZ("U2"),U,5) 136 I X'="" D 137 .N DIK,DIV,DIU,DIN 138 .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+DIV X ^DD(399,219,1,1,1.4) 139 S X=$P(DIKZ("U2"),U,5) 140 I X'="" D 141 .N DIK,DIV,DIU,DIN 142 .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,3),X=X S DIU=X K Y S X=DIV S X="PRIOR PAYMENT(S)" X ^DD(399,219,1,2,1.4) 143 S DIKZ("U2")=$G(^DGCR(399,DA,"U2")) 144 S X=$P(DIKZ("U2"),U,6) 145 I X'="" D 146 .N DIK,DIV,DIU,DIN 147 .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+DIV X ^DD(399,220,1,1,1.4) 148 S X=$P(DIKZ("U2"),U,6) 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 DIKZ(0)=$G(^DGCR(399,DA,0)) 46 S X(4)=$P(DIKZ(0),U,2) 47 S X=$G(X(1)) 48 D 49 . K X1,X2 M X1=X,X2=X 50 . N CURR S CURR=+$$COBN^IBCEF(DA) I $G(X(4)),$G(X(CURR)) S ^DGCR(399,"AE",X(4),X(CURR),DA)="" 51 CR3 K X 149 52 END G ^IBXX18 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX18.m
r628 r636 1 IBXX18 ; COMPILED XREF FOR FILE #399.0222 ; 07/22/081 IBXX18 ; COMPILED XREF FOR FILE #399.0222 ; 12/27/07 2 2 ; 3 S DA(1)=DA S DA=0 4 A1 ; 5 I $D(DISET) K DIKLM S:DIKM1=1 DIKLM=1 G @DIKM1 6 0 ; 7 A S DA=$O(^DGCR(399,DA(1),"PRV",DA)) I DA'>0 S DA=0 G END 8 1 ; 9 S DIKZ(0)=$G(^DGCR(399,DA(1),"PRV",DA,0)) 10 S X=$P(DIKZ(0),U,1) 11 I X'="" S ^DGCR(399,DA(1),"PRV","B",$E(X,1,30),DA)="" 12 S X=$P(DIKZ(0),U,1) 3 13 I X'="" D 4 14 .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,3),X=X S DIU=X K Y S X=DIV S X="PRIOR PAYMENT(S)" X ^DD(399,220,1,2,1.4) 6 S DIKZ("U2")=$G(^DGCR(399,DA,"U2")) 7 S X=$P(DIKZ("U2"),U,10) 15 .K DIV S DIV=X,D0=DA(1),DIV(0)=D0,D1=DA,DIV(1)=D1 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,"PRV",D1,0)):^(0),1:"") S X=$P(Y(1),U,4),X=X S DIU=X K Y S X="" X ^DD(399.0222,.01,1,2,1.4) 16 S X=$P(DIKZ(0),U,1) 17 I X'="" S ^DGCR(399,DA(1),"PRV","C",$E($$EXTERNAL^DILFD(399.0222,.01,,X),1,30),DA)="" 18 S X=$P(DIKZ(0),U,1) 19 I X'="" S ^DGCR(399,DA(1),"PRV","C",$$LOW^XLFSTR($E($$EXTERNAL^DILFD(399.0222,.01,,X),1,30)),DA)="" 20 S DIKZ(0)=$G(^DGCR(399,DA(1),"PRV",DA,0)) 21 S X=$P(DIKZ(0),U,2) 8 22 I X'="" D 9 23 .N DIK,DIV,DIU,DIN 10 . 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 X ^DD(399,232,1,1,1.1) X ^DD(399,232,1,1,1.4)11 S X=$P(DIKZ( "U2"),U,10)24 .X ^DD(399.0222,.02,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"PRV",D1,0)):^(0),1:"") S X=$P(Y(1),U,5),X=X S DIU=X K Y S X="" X ^DD(399.0222,.02,1,1,1.4) 25 S X=$P(DIKZ(0),U,2) 12 26 I X'="" D 13 27 .N DIK,DIV,DIU,DIN 14 . 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,1.4)15 S X=$P(DIKZ( "U2"),U,10)28 .X ^DD(399.0222,.02,1,2,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"PRV",D1,0)):^(0),1:"") S X=$P(Y(1),U,3),X=X S DIU=X K Y S X=DIV S X=$$EXTCR^IBCEU5(X) X ^DD(399.0222,.02,1,2,1.4) 29 S X=$P(DIKZ(0),U,2) 16 30 I X'="" D 17 31 .N DIK,DIV,DIU,DIN 18 .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=DIV S X=$P($$TAXGET^IBCEP81(X),U,2) X ^DD(399,232,1,4,1.4) 19 S DIKZ("M1")=$G(^DGCR(399,DA,"M1")) 20 S X=$P(DIKZ("M1"),U,8) 21 I X'="" S ^DGCR(399,"AG",$E(X,1,30),DA)="" 22 CR1 S DIXR=139 23 K X 24 S DIKZ("M")=$G(^DGCR(399,DA,"M")) 25 S X(1)=$P(DIKZ("M"),U,1) 26 S X(2)=$P(DIKZ("M"),U,2) 27 S X(3)=$P(DIKZ("M"),U,3) 28 S X(4)=$P(DIKZ("M"),U,13) 29 S X(5)=$P(DIKZ("M"),U,12) 30 S X(6)=$P(DIKZ("M"),U,14) 31 S X=$G(X(1)) 32 D 33 . K X1,X2 M X1=X,X2=X 34 . N DIKXARR M DIKXARR=X S DIKCOND=1 35 . S X=$S($O(^DGCR(399,DA,"PRV",0)):1,1:0) 36 . S DIKCOND=$G(X) K X M X=DIKXARR 37 . Q:'DIKCOND 38 . D:X1(1)'=X2(1)!(X1(5)'=X2(5)) SETID^IBCEP3(DA,1) D:X1(2)'=X2(2)!(X1(4)'=X2(4)) SETID^IBCEP3(DA,2) D:X1(3)'=X2(3)!(X1(6)'=X2(6)) SETID^IBCEP3(DA,3) 39 CR2 S DIXR=477 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 DIKZ(0)=$G(^DGCR(399,DA,0)) 46 S X(4)=$P(DIKZ(0),U,2) 47 S X=$G(X(1)) 48 D 49 . K X1,X2 M X1=X,X2=X 50 . N CURR S CURR=+$$COBN^IBCEF(DA) I $G(X(4)),$G(X(CURR)) S ^DGCR(399,"AE",X(4),X(CURR),DA)="" 51 CR3 K X 32 .X ^DD(399.0222,.02,1,3,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"PRV",D1,0)):^(0),1:"") S X=$P(Y(1),U,8),X=X S DIU=X K Y S X=DIV S X=$$SPEC^IBCEU(X) X ^DD(399.0222,.02,1,3,1.4) 33 S X=$P(DIKZ(0),U,2) 34 I X'="" D 35 .N DIK,DIV,DIU,DIN 36 .K DIV S DIV=X,D0=DA(1),DIV(0)=D0,D1=DA,DIV(1)=D1 S Y(1)=$S($D(^DGCR(399,D0,"PRV",D1,0)):^(0),1:"") S X=$P(Y(1),U,15),X=X S DIU=X K Y S X=DIV S X=$P($$GETTAX^IBCEF73A(X),U,2) X ^DD(399.0222,.02,1,7,1.4) 37 S DIKZ(0)=$G(^DGCR(399,DA(1),"PRV",DA,0)) 38 S X=$P(DIKZ(0),U,5) 39 I X'="" D 40 .N DIK,DIV,DIU,DIN 41 .K DIV S DIV=X,D0=DA(1),DIV(0)=D0,D1=DA,DIV(1)=D1 S Y(0)=X S X=Y(0)="SLF000" I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"PRV",D1,0)):^(0),1:"") S X=$P(Y(1),U,2),X=X S DIU=X K Y S X="" X ^DD(399.0222,.05,1,1,1.4) 42 S X=$P(DIKZ(0),U,5) 43 I X'="" D ATTREND^IBCU1(DA(1),DA,.05) 44 S DIKZ(0)=$G(^DGCR(399,DA(1),"PRV",DA,0)) 45 S X=$P(DIKZ(0),U,6) 46 I X'="" D ATTREND^IBCU1(DA(1),DA,.06) 47 S X=$P(DIKZ(0),U,7) 48 I X'="" D ATTREND^IBCU1(DA(1),DA,.07) 49 S X=$P(DIKZ(0),U,12) 50 I X'="" D ATTREND^IBCU1(DA(1),DA,.12) 51 S X=$P(DIKZ(0),U,13) 52 I X'="" D ATTREND^IBCU1(DA(1),DA,.13) 53 S X=$P(DIKZ(0),U,14) 54 I X'="" D ATTREND^IBCU1(DA(1),DA,.14) 55 G:'$D(DIKLM) A Q:$D(DISET) 52 56 END G ^IBXX19 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX19.m
r628 r636 1 IBXX19 ; COMPILED XREF FOR FILE #399.0 222 ; 07/22/081 IBXX19 ; COMPILED XREF FOR FILE #399.0304 ; 12/27/07 2 2 ; 3 S DA (1)=DA S DA=03 S DA=0 4 4 A1 ; 5 5 I $D(DISET) K DIKLM S:DIKM1=1 DIKLM=1 G @DIKM1 6 6 0 ; 7 A S DA=$O(^DGCR(399,DA(1)," PRV",DA)) I DA'>0 S DA=0 G END7 A S DA=$O(^DGCR(399,DA(1),"CP",DA)) I DA'>0 S DA=0 G END 8 8 1 ; 9 S DIKZ(0)=$G(^DGCR(399,DA(1)," PRV",DA,0))9 S DIKZ(0)=$G(^DGCR(399,DA(1),"CP",DA,0)) 10 10 S X=$P(DIKZ(0),U,1) 11 I X'="" S ^DGCR(399,DA(1)," PRV","B",$E(X,1,30),DA)=""11 I X'="" S ^DGCR(399,DA(1),"CP","B",$E(X,1,30),DA)="" 12 12 S X=$P(DIKZ(0),U,1) 13 I X'="" I $P(X,";",2)="ICPT(",$D(^DGCR(399,DA(1),"CP",DA,0)),$P(^(0),"^",2) S ^DGCR(399,"ASD",-$P(^(0),"^",2),+X,DA(1),DA)="" 14 S X=$P(DIKZ(0),U,2) 15 I X'="" I $D(^DGCR(399,DA(1),"CP",DA,0)),+^(0),$P($P(^(0),"^",1),";",2)="ICPT(" S ^DGCR(399,"ASD",-X,+^(0),DA(1),DA)="" 16 S X=$P(DIKZ(0),U,4) 17 I X'="" S ^DGCR(399,DA(1),"CP","D",$E(X,1,30),DA)="" 18 S X=$P(DIKZ(0),U,5) 19 I X'="" S DGRVRCAL=1 20 S X=$P(DIKZ(0),U,5) 21 I X'="" S ^DGCR(399,DA(1),"CP","ASC",$E(X,1,30),DA)="" 22 S X=$P(DIKZ(0),U,7) 13 23 I X'="" D 14 24 .N DIK,DIV,DIU,DIN 15 .K DIV S DIV=X,D0=DA(1),DIV(0)=D0,D1=DA,DIV(1)=D1 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,"PRV",D1,0)):^(0),1:"") S X=$P(Y(1),U,4),X=X S DIU=X K Y S X="" X ^DD(399.0222,.01,1,2,1.4) 16 S X=$P(DIKZ(0),U,1) 17 I X'="" S ^DGCR(399,DA(1),"PRV","C",$E($$EXTERNAL^DILFD(399.0222,.01,,X),1,30),DA)="" 18 S X=$P(DIKZ(0),U,1) 19 I X'="" S ^DGCR(399,DA(1),"PRV","C",$$LOW^XLFSTR($E($$EXTERNAL^DILFD(399.0222,.01,,X),1,30)),DA)="" 20 S DIKZ(0)=$G(^DGCR(399,DA(1),"PRV",DA,0)) 21 S X=$P(DIKZ(0),U,2) 25 .K DIV S DIV=X,D0=DA(1),DIV(0)=D0,D1=DA,DIV(1)=D1 S Y(1)=$S($D(^DGCR(399,D0,"CP",D1,0)):^(0),1:"") S X=$P(Y(1),U,6),X=X S DIU=X K Y X ^DD(399.0304,6,1,1,1.1) X ^DD(399.0304,6,1,1,1.4) 26 S DIKZ(0)=$G(^DGCR(399,DA(1),"CP",DA,0)) 27 S X=$P(DIKZ(0),U,10) 22 28 I X'="" D 23 29 .N DIK,DIV,DIU,DIN 24 .X ^DD(399.0222,.02,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"PRV",D1,0)):^(0),1:"") S X=$P(Y(1),U,5),X=X S DIU=X K Y S X="" X ^DD(399.0222,.02,1,1,1.4) 25 S X=$P(DIKZ(0),U,2) 26 I X'="" D 27 .N DIK,DIV,DIU,DIN 28 .X ^DD(399.0222,.02,1,2,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"PRV",D1,0)):^(0),1:"") S X=$P(Y(1),U,3),X=X S DIU=X K Y S X=DIV S X=$$EXTCR^IBCEU5(X) X ^DD(399.0222,.02,1,2,1.4) 29 S X=$P(DIKZ(0),U,2) 30 I X'="" D 31 .N DIK,DIV,DIU,DIN 32 .X ^DD(399.0222,.02,1,3,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"PRV",D1,0)):^(0),1:"") S X=$P(Y(1),U,8),X=X S DIU=X K Y S X=DIV S X=$$SPEC^IBCEU(X) X ^DD(399.0222,.02,1,3,1.4) 33 S X=$P(DIKZ(0),U,2) 34 I X'="" D 35 .N DIK,DIV,DIU,DIN 36 .K DIV S DIV=X,D0=DA(1),DIV(0)=D0,D1=DA,DIV(1)=D1 S Y(1)=$S($D(^DGCR(399,D0,"PRV",D1,0)):^(0),1:"") S X=$P(Y(1),U,15),X=X S DIU=X K Y S X=DIV S X=$P($$GETTAX^IBCEF73A(X),U,2) X ^DD(399.0222,.02,1,7,1.4) 37 S DIKZ(0)=$G(^DGCR(399,DA(1),"PRV",DA,0)) 38 S X=$P(DIKZ(0),U,5) 39 I X'="" D 40 .N DIK,DIV,DIU,DIN 41 .K DIV S DIV=X,D0=DA(1),DIV(0)=D0,D1=DA,DIV(1)=D1 S Y(0)=X S X=Y(0)="SLF000" I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"PRV",D1,0)):^(0),1:"") S X=$P(Y(1),U,2),X=X S DIU=X K Y S X="" X ^DD(399.0222,.05,1,1,1.4) 42 S X=$P(DIKZ(0),U,5) 43 I X'="" D ATTREND^IBCU1(DA(1),DA,.05) 44 S DIKZ(0)=$G(^DGCR(399,DA(1),"PRV",DA,0)) 45 S X=$P(DIKZ(0),U,6) 46 I X'="" D ATTREND^IBCU1(DA(1),DA,.06) 47 S X=$P(DIKZ(0),U,7) 48 I X'="" D ATTREND^IBCU1(DA(1),DA,.07) 49 S X=$P(DIKZ(0),U,12) 50 I X'="" D ATTREND^IBCU1(DA(1),DA,.12) 51 S X=$P(DIKZ(0),U,13) 52 I X'="" D ATTREND^IBCU1(DA(1),DA,.13) 53 S X=$P(DIKZ(0),U,14) 54 I X'="" D ATTREND^IBCU1(DA(1),DA,.14) 30 .X ^DD(399.0304,9,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"CP",D1,0)):^(0),1:"") S X=$P(Y(1),U,16),X=X S DIU=X K Y S X="" X ^DD(399.0304,9,1,1,1.4) 55 31 G:'$D(DIKLM) A Q:$D(DISET) 56 32 END G ^IBXX20 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX2.m
r628 r636 1 IBXX2 ; COMPILED XREF FOR FILE #399.0222 ; 07/22/081 IBXX2 ; COMPILED XREF FOR FILE #399.0222 ; 12/27/07 2 2 ; 3 3 I X'="" D … … 55 55 . Q:'DIKCOND 56 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) 57 CR2 S DIXR=4 7757 CR2 S DIXR=430 58 58 K X 59 59 S DIKZ("M")=$G(^DGCR(399,DA,"M")) -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX20.m
r628 r636 1 IBXX20 ; COMPILED XREF FOR FILE #399.0 304 ; 07/22/081 IBXX20 ; COMPILED XREF FOR FILE #399.041 ; 12/27/07 2 2 ; 3 3 S DA=0 … … 5 5 I $D(DISET) K DIKLM S:DIKM1=1 DIKLM=1 G @DIKM1 6 6 0 ; 7 A S DA=$O(^DGCR(399,DA(1)," CP",DA)) I DA'>0 S DA=0 G END7 A S DA=$O(^DGCR(399,DA(1),"OC",DA)) I DA'>0 S DA=0 G END 8 8 1 ; 9 S DIKZ(0)=$G(^DGCR(399,DA(1)," CP",DA,0))9 S DIKZ(0)=$G(^DGCR(399,DA(1),"OC",DA,0)) 10 10 S X=$P(DIKZ(0),U,1) 11 I X'="" S ^DGCR(399,DA(1),"CP","B",$E(X,1,30),DA)="" 12 S X=$P(DIKZ(0),U,1) 13 I X'="" I $P(X,";",2)="ICPT(",$D(^DGCR(399,DA(1),"CP",DA,0)),$P(^(0),"^",2) S ^DGCR(399,"ASD",-$P(^(0),"^",2),+X,DA(1),DA)="" 14 S X=$P(DIKZ(0),U,2) 15 I X'="" I $D(^DGCR(399,DA(1),"CP",DA,0)),+^(0),$P($P(^(0),"^",1),";",2)="ICPT(" S ^DGCR(399,"ASD",-X,+^(0),DA(1),DA)="" 16 S X=$P(DIKZ(0),U,4) 17 I X'="" S ^DGCR(399,DA(1),"CP","D",$E(X,1,30),DA)="" 18 S X=$P(DIKZ(0),U,5) 19 I X'="" S DGRVRCAL=1 20 S X=$P(DIKZ(0),U,5) 21 I X'="" S ^DGCR(399,DA(1),"CP","ASC",$E(X,1,30),DA)="" 22 S X=$P(DIKZ(0),U,7) 23 I X'="" D 24 .N DIK,DIV,DIU,DIN 25 .K DIV S DIV=X,D0=DA(1),DIV(0)=D0,D1=DA,DIV(1)=D1 S Y(1)=$S($D(^DGCR(399,D0,"CP",D1,0)):^(0),1:"") S X=$P(Y(1),U,6),X=X S DIU=X K Y X ^DD(399.0304,6,1,1,1.1) X ^DD(399.0304,6,1,1,1.4) 26 S DIKZ(0)=$G(^DGCR(399,DA(1),"CP",DA,0)) 27 S X=$P(DIKZ(0),U,10) 28 I X'="" D 29 .N DIK,DIV,DIU,DIN 30 .X ^DD(399.0304,9,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"CP",D1,0)):^(0),1:"") S X=$P(Y(1),U,16),X=X S DIU=X K Y S X="" X ^DD(399.0304,9,1,1,1.4) 11 I X'="" S ^DGCR(399,DA(1),"OC","B",$E(X,1,30),DA)="" 31 12 G:'$D(DIKLM) A Q:$D(DISET) 32 13 END G ^IBXX21 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX21.m
r628 r636 1 IBXX21 ; COMPILED XREF FOR FILE #399.04 1 ; 07/22/081 IBXX21 ; COMPILED XREF FOR FILE #399.042 ; 12/27/07 2 2 ; 3 3 S DA=0 … … 5 5 I $D(DISET) K DIKLM S:DIKM1=1 DIKLM=1 G @DIKM1 6 6 0 ; 7 A S DA=$O(^DGCR(399,DA(1)," OC",DA)) I DA'>0 S DA=0 G END7 A S DA=$O(^DGCR(399,DA(1),"RC",DA)) I DA'>0 S DA=0 G END 8 8 1 ; 9 S DIKZ(0)=$G(^DGCR(399,DA(1)," OC",DA,0))9 S DIKZ(0)=$G(^DGCR(399,DA(1),"RC",DA,0)) 10 10 S X=$P(DIKZ(0),U,1) 11 I X'="" S ^DGCR(399,DA(1),"OC","B",$E(X,1,30),DA)="" 11 I X'="" S ^DGCR(399,DA(1),"RC","B",$E(X,1,30),DA)="" 12 S X=$P(DIKZ(0),U,1) 13 I X'="" I $P(^DGCR(399,DA(1),"RC",DA,0),U,5) S ^DGCR(399,DA(1),"RC","ABS",$P(^DGCR(399,DA(1),"RC",DA,0),U,5),$E(X,1,30),DA)="" 14 S X=$P(DIKZ(0),U,2) 15 I X'="" D 21^IBCU2 16 S X=$P(DIKZ(0),U,3) 17 I X'="" D 31^IBCU2 18 S X=$P(DIKZ(0),U,4) 19 I X'="" S DGXRF=1 D TC^IBCU2 K DGXRF 20 S X=$P(DIKZ(0),U,5) 21 I X'="" S ^DGCR(399,DA(1),"RC","ABS",$E(X,1,30),+^DGCR(399,DA(1),"RC",DA,0),DA)="" 22 S X=$P(DIKZ(0),U,6) 23 I X'="" I $$RC^IBEFUNC1(DA(1),DA) S ^DGCR(399,"ASC1",$E(X,1,30),DA(1),DA)="" 24 S X=$P(DIKZ(0),U,6) 25 I X'="" I $$RC^IBEFUNC1(DA(1),DA) S ^DGCR(399,"ASC2",DA(1),$E(X,1,30),DA)="" 26 S X=$P(DIKZ(0),U,7) 27 I X'="" I $$RC^IBEFUNC1(DA(1),DA) S ^DGCR(399,"ASC1",$P(^DGCR(399,DA(1),"RC",DA,0),U,6),DA(1),DA)="" 28 S X=$P(DIKZ(0),U,7) 29 I X'="" I $$RC^IBEFUNC1(DA(1),DA) S ^DGCR(399,"ASC2",DA(1),$P(^DGCR(399,DA(1),"RC",DA,0),U,6),DA)="" 30 S X=$P(DIKZ(0),U,15) 31 I X'="" S ^DGCR(399,DA(1),"RC","ACP",$E(X,1,30),DA)="" 12 32 G:'$D(DIKLM) A Q:$D(DISET) 13 33 END G ^IBXX22 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX22.m
r628 r636 1 IBXX22 ; COMPILED XREF FOR FILE #399.04 2 ; 07/22/081 IBXX22 ; COMPILED XREF FOR FILE #399.043 ; 12/27/07 2 2 ; 3 3 S DA=0 … … 5 5 I $D(DISET) K DIKLM S:DIKM1=1 DIKLM=1 G @DIKM1 6 6 0 ; 7 A S DA=$O(^DGCR(399,DA(1)," RC",DA)) I DA'>0 S DA=0 G END7 A S DA=$O(^DGCR(399,DA(1),"OP",DA)) I DA'>0 S DA=0 G END 8 8 1 ; 9 S DIKZ(0)=$G(^DGCR(399,DA(1)," RC",DA,0))9 S DIKZ(0)=$G(^DGCR(399,DA(1),"OP",DA,0)) 10 10 S X=$P(DIKZ(0),U,1) 11 I X'="" S ^DGCR(399, DA(1),"RC","B",$E(X,1,30),DA)=""11 I X'="" S ^DGCR(399,"AOPV",$P(^DGCR(399,DA(1),0),U,2),$E(X,1,30),DA(1))="" 12 12 S X=$P(DIKZ(0),U,1) 13 I X'="" I $P(^DGCR(399,DA(1),"RC",DA,0),U,5) S ^DGCR(399,DA(1),"RC","ABS",$P(^DGCR(399,DA(1),"RC",DA,0),U,5),$E(X,1,30),DA)="" 14 S X=$P(DIKZ(0),U,2) 15 I X'="" D 21^IBCU2 16 S X=$P(DIKZ(0),U,3) 17 I X'="" D 31^IBCU2 18 S X=$P(DIKZ(0),U,4) 19 I X'="" S DGXRF=1 D TC^IBCU2 K DGXRF 20 S X=$P(DIKZ(0),U,5) 21 I X'="" S ^DGCR(399,DA(1),"RC","ABS",$E(X,1,30),+^DGCR(399,DA(1),"RC",DA,0),DA)="" 22 S X=$P(DIKZ(0),U,6) 23 I X'="" I $$RC^IBEFUNC1(DA(1),DA) S ^DGCR(399,"ASC1",$E(X,1,30),DA(1),DA)="" 24 S X=$P(DIKZ(0),U,6) 25 I X'="" I $$RC^IBEFUNC1(DA(1),DA) S ^DGCR(399,"ASC2",DA(1),$E(X,1,30),DA)="" 26 S X=$P(DIKZ(0),U,7) 27 I X'="" I $$RC^IBEFUNC1(DA(1),DA) S ^DGCR(399,"ASC1",$P(^DGCR(399,DA(1),"RC",DA,0),U,6),DA(1),DA)="" 28 S X=$P(DIKZ(0),U,7) 29 I X'="" I $$RC^IBEFUNC1(DA(1),DA) S ^DGCR(399,"ASC2",DA(1),$P(^DGCR(399,DA(1),"RC",DA,0),U,6),DA)="" 30 S X=$P(DIKZ(0),U,15) 31 I X'="" S ^DGCR(399,DA(1),"RC","ACP",$E(X,1,30),DA)="" 13 I X'="" S DGRVRCAL=1 32 14 G:'$D(DIKLM) A Q:$D(DISET) 33 15 END G ^IBXX23 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX23.m
r628 r636 1 IBXX23 ; COMPILED XREF FOR FILE #399.04 3 ; 07/22/081 IBXX23 ; COMPILED XREF FOR FILE #399.044 ; 12/27/07 2 2 ; 3 3 S DA=0 … … 5 5 I $D(DISET) K DIKLM S:DIKM1=1 DIKLM=1 G @DIKM1 6 6 0 ; 7 A S DA=$O(^DGCR(399,DA(1)," OP",DA)) I DA'>0 S DA=0 G END7 A S DA=$O(^DGCR(399,DA(1),"D1",DA)) I DA'>0 S DA=0 G END 8 8 1 ; 9 S DIKZ(0)=$G(^DGCR(399,DA(1)," OP",DA,0))9 S DIKZ(0)=$G(^DGCR(399,DA(1),"D1",DA,0)) 10 10 S X=$P(DIKZ(0),U,1) 11 I X'="" S ^DGCR(399,"AOPV",$P(^DGCR(399,DA(1),0),U,2),$E(X,1,30),DA(1))="" 12 S X=$P(DIKZ(0),U,1) 13 I X'="" S DGRVRCAL=1 11 I X'="" S ^DGCR(399,DA(1),"D1","B",$E(X,1,30),DA)="" 14 12 G:'$D(DIKLM) A Q:$D(DISET) 15 13 END G ^IBXX24 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX24.m
r628 r636 1 IBXX24 ; COMPILED XREF FOR FILE #399.04 4 ; 07/22/081 IBXX24 ; COMPILED XREF FOR FILE #399.045 ; 12/27/07 2 2 ; 3 3 S DA=0 … … 5 5 I $D(DISET) K DIKLM S:DIKM1=1 DIKLM=1 G @DIKM1 6 6 0 ; 7 A S DA=$O(^DGCR(399,DA(1),"D 1",DA)) I DA'>0 S DA=0 G END7 A S DA=$O(^DGCR(399,DA(1),"D2",DA)) I DA'>0 S DA=0 G END 8 8 1 ; 9 S DIKZ(0)=$G(^DGCR(399,DA(1),"D 1",DA,0))9 S DIKZ(0)=$G(^DGCR(399,DA(1),"D2",DA,0)) 10 10 S X=$P(DIKZ(0),U,1) 11 I X'="" S ^DGCR(399,DA(1),"D 1","B",$E(X,1,30),DA)=""11 I X'="" S ^DGCR(399,DA(1),"D2","B",$E(X,1,30),DA)="" 12 12 G:'$D(DIKLM) A Q:$D(DISET) 13 13 END G ^IBXX25 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX25.m
r628 r636 1 IBXX25 ; COMPILED XREF FOR FILE #399.04 5 ; 07/22/081 IBXX25 ; COMPILED XREF FOR FILE #399.046 ; 12/27/07 2 2 ; 3 3 S DA=0 … … 5 5 I $D(DISET) K DIKLM S:DIKM1=1 DIKLM=1 G @DIKM1 6 6 0 ; 7 A S DA=$O(^DGCR(399,DA(1)," D2",DA)) I DA'>0 S DA=0 G END7 A S DA=$O(^DGCR(399,DA(1),"R",DA)) I DA'>0 S DA=0 G END 8 8 1 ; 9 S DIKZ(0)=$G(^DGCR(399,DA(1)," D2",DA,0))9 S DIKZ(0)=$G(^DGCR(399,DA(1),"R",DA,0)) 10 10 S X=$P(DIKZ(0),U,1) 11 I X'="" S ^DGCR(399,DA(1),"D2","B",$E(X,1,30),DA)="" 11 I X'="" S ^DGCR(399,DA(1),"R","B",$E(X,1,30),DA)="" 12 S X=$P(DIKZ(0),U,4) 13 I X'="" S ^DGCR(399,DA(1),"R","AC",$E(X,1,30),DA)="" 12 14 G:'$D(DIKLM) A Q:$D(DISET) 13 15 END G ^IBXX26 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX26.m
r628 r636 1 IBXX26 ; COMPILED XREF FOR FILE #399.04 6 ; 07/22/081 IBXX26 ; COMPILED XREF FOR FILE #399.047 ; 12/27/07 2 2 ; 3 3 S DA=0 … … 5 5 I $D(DISET) K DIKLM S:DIKM1=1 DIKLM=1 G @DIKM1 6 6 0 ; 7 A S DA=$O(^DGCR(399,DA(1)," R",DA)) I DA'>0 S DA=0 G END7 A S DA=$O(^DGCR(399,DA(1),"CV",DA)) I DA'>0 S DA=0 G END 8 8 1 ; 9 S DIKZ(0)=$G(^DGCR(399,DA(1)," R",DA,0))9 S DIKZ(0)=$G(^DGCR(399,DA(1),"CV",DA,0)) 10 10 S X=$P(DIKZ(0),U,1) 11 I X'="" S ^DGCR(399,DA(1),"R","B",$E(X,1,30),DA)="" 12 S X=$P(DIKZ(0),U,4) 13 I X'="" S ^DGCR(399,DA(1),"R","AC",$E(X,1,30),DA)="" 11 I X'="" S ^DGCR(399,DA(1),"CV","B",$E(X,1,30),DA)="" 14 12 G:'$D(DIKLM) A Q:$D(DISET) 15 13 END G ^IBXX27 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX27.m
r628 r636 1 IBXX27 ; COMPILED XREF FOR FILE #399.04 7 ; 07/22/081 IBXX27 ; COMPILED XREF FOR FILE #399.048 ; 12/27/07 2 2 ; 3 3 S DA=0 … … 5 5 I $D(DISET) K DIKLM S:DIKM1=1 DIKLM=1 G @DIKM1 6 6 0 ; 7 A S DA=$O(^DGCR(399,DA(1)," CV",DA)) I DA'>0 S DA=0 G END7 A S DA=$O(^DGCR(399,DA(1),"OT",DA)) I DA'>0 S DA=0 G END 8 8 1 ; 9 S DIKZ(0)=$G(^DGCR(399,DA(1)," CV",DA,0))9 S DIKZ(0)=$G(^DGCR(399,DA(1),"OT",DA,0)) 10 10 S X=$P(DIKZ(0),U,1) 11 I X'="" S ^DGCR(399,DA(1)," CV","B",$E(X,1,30),DA)=""11 I X'="" S ^DGCR(399,DA(1),"OT","B",$E(X,1,30),DA)="" 12 12 G:'$D(DIKLM) A Q:$D(DISET) 13 13 END G ^IBXX28 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX28.m
r628 r636 1 IBXX28 ; COMPILED XREF FOR FILE #399. 048 ; 07/22/081 IBXX28 ; COMPILED XREF FOR FILE #399.30416 ; 12/27/07 2 2 ; 3 S DA =03 S DA(2)=DA(1) S DA(1)=0 S DA=0 4 4 A1 ; 5 I $D(DISET) K DIKLM S:DIKM1=1 DIKLM=1 G @DIKM1 6 0 ; 7 A S DA=$O(^DGCR(399,DA(1),"OT",DA)) I DA'>0 S DA=0 G END 5 I $D(DISET) K DIKLM S:DIKM1=2 DIKLM=1 S:DIKM1'=2&'$G(DIKPUSH(2)) DIKPUSH(2)=1,DA(2)=DA(1),DA(1)=DA,DA=0 G @DIKM1 6 A S DA(1)=$O(^DGCR(399,DA(2),"CP",DA(1))) I DA(1)'>0 S DA(1)=0 G END 8 7 1 ; 9 S DIKZ(0)=$G(^DGCR(399,DA(1),"OT",DA,0)) 8 B S DA=$O(^DGCR(399,DA(2),"CP",DA(1),"MOD",DA)) I DA'>0 S DA=0 Q:DIKM1=1 G A 9 2 ; 10 S DIKZ(0)=$G(^DGCR(399,DA(2),"CP",DA(1),"MOD",DA,0)) 10 11 S X=$P(DIKZ(0),U,1) 11 I X'="" S ^DGCR(399,DA(1),"OT","B",$E(X,1,30),DA)="" 12 G:'$D(DIKLM) A Q:$D(DISET) 13 END G ^IBXX29 12 I X'="" S ^DGCR(399,DA(2),"CP",DA(1),"MOD","B",$E(X,1,30),DA)="" 13 S X=$P(DIKZ(0),U,2) 14 I X'="" S ^DGCR(399,DA(2),"CP",DA(1),"MOD","C",$E(X,1,30),DA)="" 15 G:'$D(DIKLM) B Q:$D(DISET) 16 END Q -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX3.m
r628 r636 1 IBXX3 ; COMPILED XREF FOR FILE #399.0222 ; 07/22/081 IBXX3 ; COMPILED XREF FOR FILE #399.0222 ; 12/27/07 2 2 ; 3 3 S DA(1)=DA S DA=0 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX4.m
r628 r636 1 IBXX4 ; COMPILED XREF FOR FILE #399.0304 ; 07/22/081 IBXX4 ; COMPILED XREF FOR FILE #399.0304 ; 12/27/07 2 2 ; 3 3 S DA=0 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX5.m
r628 r636 1 IBXX5 ; COMPILED XREF FOR FILE #399.041 ; 07/22/081 IBXX5 ; COMPILED XREF FOR FILE #399.041 ; 12/27/07 2 2 ; 3 3 S DA=0 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX6.m
r628 r636 1 IBXX6 ; COMPILED XREF FOR FILE #399.042 ; 07/22/081 IBXX6 ; COMPILED XREF FOR FILE #399.042 ; 12/27/07 2 2 ; 3 3 S DA=0 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX7.m
r628 r636 1 IBXX7 ; COMPILED XREF FOR FILE #399.043 ; 07/22/081 IBXX7 ; COMPILED XREF FOR FILE #399.043 ; 12/27/07 2 2 ; 3 3 S DA=0 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX8.m
r628 r636 1 IBXX8 ; COMPILED XREF FOR FILE #399.044 ; 07/22/081 IBXX8 ; COMPILED XREF FOR FILE #399.044 ; 12/27/07 2 2 ; 3 3 S DA=0 -
FOIAVistA/tag/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBXX9.m
r628 r636 1 IBXX9 ; COMPILED XREF FOR FILE #399.045 ; 07/22/081 IBXX9 ; COMPILED XREF FOR FILE #399.045 ; 12/27/07 2 2 ; 3 3 S DA=0
Note:
See TracChangeset
for help on using the changeset viewer.