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

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

initial load of FOIAVistA 6/30/08 version

File size: 2.6 KB
Line 
1IBCBB21 ;ALB/AAS - CONTINUATION OF EDIT CHECK ROUTINE FOR UB-04 ;2-NOV-89
2 ;;2.0;INTEGRATED BILLING;**51,137,210,232,155,291,348,349**;21-MAR-94;Build 46
3 ;;Per VHA Directive 2004-038, this routine should not be modified.
4 ;
5EN(IBZPRC92) ;
6 ;
7 N ECODE,IBTXMT,IBXDATA,IBLPRT,IBI,Z,Z0,Z1,IBREQMRA
8 I '$D(IBZPRC92) D ALLPROC^IBCVA1(IBIFN,.IBZPRC92)
9 S IBREQMRA=$$REQMRA^IBEFUNC(IBIFN) ; MRA?
10 K IBQUIT S IBQUIT=0
11 S (Z,Z0,Z1)=0
12 F S Z=$O(IBZPRC92(Z)) Q:'Z S:IBZPRC92(Z)["CPT" Z0=Z0+1 S:IBZPRC92(Z)["ICD" Z1=Z1+1
13 S IBTXMT=$$TXMT^IBCEF4(IBIFN)
14 S IBZPRC92=Z0_U_Z1 ;Save # of CPT's and ICD9's
15 ; More than 50 procedures on a bill - must print locally
16 I IBTXMT,(+IBZPRC92>50!(+$P(IBZPRC92,U,2)>50)) D Q:IBQUIT
17 . I 'IBREQMRA S IBQUIT=$$IBER^IBCBB3(.IBER,308) Q
18 . I '$P(IBNDTX,U,9) S IBQUIT=$$IBER^IBCBB3(.IBER,325)
19 ; If ICD9 procedures with dates and charges, bill 11x or 83x needs operating physician
20 I IBTOB12="11",$P(IBZPRC92,U,2),'$$CKPROV^IBCEU(IBIFN,2) S IBER=IBER_"IB304;"
21 I IBTOB12="83",$P(IBZPRC92,U,2),'$$CKPROV^IBCEU(IBIFN,2) S IBER=IBER_"IB312;"
22 ;
23 ; If any CPT procedures have more than 2 modifiers, warn
24 S Z=0 F S Z=$O(IBZPRC92(Z)) Q:'Z I $P(IBZPRC92(Z),U)["ICPT(",$L($P(IBZPRC92(Z),U,15),",")>2 S Z0="Proc "_$$PRCD^IBCEF1($P(IBZPRC92(Z),U))_" has > 2 modifiers - only first 2 will be used" D WARN^IBCBB11(Z0)
25 ;
26 I $$WNRBILL^IBEFUNC(IBIFN),$$MRATYPE^IBEFUNC(IBIFN)'="A" S IBER=IBER_"IB086;"
27 ;
28 ; UB-04 Diagnosis Codes
29 K IBXDATA D F^IBCEF("N-DIAGNOSES",,,IBIFN)
30 ;
31 ; Only 9 dx's allowed per claim plus 1 E-code
32 S (Z,ECODE,IBI)=0 F S Z=$O(IBXDATA(Z)) Q:'Z D Q:IBER["309;"
33 . S IBI=IBI+1
34 . I $E($$ICD9^IBACSV(+$P(IBXDATA(Z),U)))="E" S:ECODE IBQUIT=$$IBER^IBCBB3(.IBER,301) S:'ECODE IBI=IBI-1,ECODE=1
35 . ; max DX check does not apply to MRAs
36 . I IBTXMT,IBI>9 D
37 .. I 'IBREQMRA Q:$P(IBNDTX,U,8) S IBER=IBER_"IB309;" Q
38 .. I '$P(IBNDTX,U,9) S IBER=IBER_"IB326;"
39 ;
40 I 'IBI S IBER=IBER_"IB071;" ;Require Diag code NOIS:OKL-0304-72495
41 I IBI,$$INPAT^IBCEF(IBIFN,1),$E($$ICD9^IBACSV(+$P(IBXDATA(1),U)))="V" S Z="Principal Dx V-code may not be valid" D WARN^IBCBB11(Z)
42 I '$$OCC10^IBCBB2(IBIFN,.IBXDATA,3) S IBER=IBER_"IB093;"
43 ;
44 K ^TMP($J,"IBC-RC")
45 D F^IBCEF("N-UB-04 SERVICE LINE (PRINT)",,,IBIFN)
46 S (Z0,IBI)=0 F S IBI=$O(^TMP($J,"IBC-RC",IBI)) Q:'IBI S Z=$G(^(IBI)) Q:+$P(Z,U,2)=1 I $P(Z,U,2),$P(Z,U,1)=1 D
47 . I IBER'["IB090;",$P(Z,U,2)>1,($P(Z,U,7)>99999.99!($P(Z,U,8)>99999.99)) S IBER=IBER_"IB090;"
48 . Q:$P(Z,U,2)'<180&($P(Z,U,2)'>189) ;Pass days (LOA) don't matter
49 . I '$P(Z,U,7),'$P(Z,U,8),'Z0,$$COBN^IBCEF(IBIFN)'>1 S Z0="Rev Code(s) having a 0-charge will not be transmitted for the bill" D WARN^IBCBB11(Z0) S Z0=1
50 K ^TMP($J,"IBC-RC")
51 Q
52 ;
Note: See TracBrowser for help on using the repository browser.