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

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

initial load of WorldVistAEHR

File size: 1.7 KB
RevLine 
[613]1IBCBB8 ;ALB/BGA - CON'T MEDICARE EDIT CHECKS ;08/12/98
2 ;;2.0;INTEGRATED BILLING;**51,137,210,349**;21-MAR-94;Build 46
3 ;;Per VHA Directive 2004-038, this routine should not be modified.
4 ;
5 ; UB-04 CLAIM CERTIFICATE ID NUMBER
6 I '$$VALID(IBIFN) S IBQUIT=$$IBER^IBCBB3(.IBER,215) Q:IBQUIT
7 ;
8 ; Req. on Primary Payor when Medicare is secondary and value 12-15,43
9 I $$COBN^IBCEF(IBIFN)=2 D Q:IBQUIT
10 . I $O(IBVALCD(16),-1)'<12!$D(IBVALCD(43)) D
11 . . K IBXDATA D F^IBCEF("N-ALL INSURED EMPLOYER INFO",,,IBIFN)
12 . . ; employer name^city^state abbreviation^state ien
13 . . ;I '$O(IBXDATA(0)) S IBQUIT=$$IBER^IBCBB3(.IBER,222) Q
14 . . ; Employer name missing
15 . . ;I $P($G(IBXDATA(1)),U)="" S IBQUIT=$$IBER^IBCBB3(.IBER,222)
16 . . ; Employer address missing
17 . . ;I $TR($P($G(IBXDATA(1)),U,2,4),U)="" S IBQUIT=$$IBER^IBCBB3(.IBER,223)
18 . ;
19 . ; Insured's Group Number
20 . ; if Medicare is secondary, need insurance group number for primary
21 . K IBXDATA D F^IBCEF("N-ALL INSURANCE GROUP NUMBER",,,IBIFN)
22 . I $P($G(IBXDATA(1)),U)="" S IBQUIT=$$IBER^IBCBB3(.IBER,225)
23 ;
24 ; UB-04 Diagnosis Codes
25 K IBXDATA D F^IBCEF("N-DIAGNOSES",,,IBIFN)
26 ;
27 S IBI=0
28 F S IBI=$O(IBXDATA(IBI)) Q:'IBI D Q:IBQUIT
29 . S IBDXC=$P($$ICD9^IBACSV(+$P(IBXDATA(IBI),U)),U)
30 . ; no duplicate dx
31 . I IBDXC'="",$D(IBDXARY(IBDXC)) S IBQUIT=$$IBER^IBCBB3(.IBER,227)
32 . I IBDXC'="",'$D(IBDXARY(IBDXC)) S IBDXARY(IBDXC)=IBXDATA(IBI)
33 Q:IBQUIT
34 ;
35 Q
36 ;
37VALID(IBIFN) ; Verify HIC # is valid
38 N VAL,IBXDATA
39 S VAL=1
40 G:'$$MCRWNR^IBEFUNC(+$$CURR^IBCEF2(IBIFN)) VALQ
41 ;
42 K IBXDATA D F^IBCEF("N-CURR INSURED ID",,,IBIFN)
43 ;
44 I $G(IBXDATA)="" S VAL=0 G VALQ
45 ;
46 S IBXDATA=$TR(IBXDATA,"-")
47 I $L(IBXDATA)<9 S VAL=0 G VALQ
48 ; HIC # must pass standard MEDICARE edits
49 I '$$VALHIC^IBCNSMM(IBXDATA) S VAL=0
50 ;
51VALQ Q VAL
52 ;
Note: See TracBrowser for help on using the repository browser.