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

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

revised back to 6/30/08 version

File size: 3.3 KB
RevLine 
[623]1IBCBB11 ;ALB/AAS - CONTINUATION OF EDIT CHECK ROUTINE ;12 Jun 2006 3:45 PM
2 ;;2.0;INTEGRATED BILLING;**51,343,363**;21-MAR-94;Build 35
3 ;;Per VHA Directive 2004-038, this routine should not be modified.
4 ;
5WARN(IBDISP) ; Set warning in global
6 ; DISP = warning text to display
7 ;
8 N Z
9 S Z=+$O(^TMP($J,"BILL-WARN",""),-1)
10 I Z=0 S ^TMP($J,"BILL-WARN",1)=$J("",5)_"**Warnings**:",Z=1
11 S Z=Z+1,^TMP($J,"BILL-WARN",Z)=$J("",5)_IBDISP
12 Q
13 ;
14MULTDIV(IBIFN,IBND0) ; Check for multiple divisions on a bill ien IBIFN
15 ; IBND0 = 0-node of bill
16 ;
17 ; Function returns 1 if more than 1 division found on bill
18 N Z,Z0,Z1,MULT
19 S MULT=0,Z1=$P(IBND0,U,22)
20 I Z1 D
21 . S Z=0 F S Z=$O(^DGCR(399,IBIFN,"RC",Z)) Q:'Z S Z0=$P(^(Z,0),U,7) I Z0,Z0'=Z1 S MULT=1 Q
22 . S Z=0 F S Z=$O(^DGCR(399,IBIFN,"CP",Z)) Q:'Z S Z0=$P(^(Z,0),U,6) I Z0,Z0'=Z1 S MULT=2 Q
23 I 'Z1 S MULT=3
24 Q MULT
25 ;
26 ;; PREGNANCY DX CODES: V22**-V24**, V27**-V28**, 630**-677**
27 ;; FLU SHOTS PROCEDURE CODES: 90724, G0008, 90732, G0009
28 ;
29 ; Check for required NPIs
30NPICHK ;
31 N IBNPIS,IBNONPI,IBNPIREQ,Z
32 S IBNPIREQ=$$NPIREQ^IBCEP81(DT) ; Check if NPI is required
33 ; Check providers
34 S IBNPIS=$$PROVNPI^IBCEF73A(IBIFN,.IBNONPI)
35 I $L(IBNONPI) F Z=1:1:$L(IBNONPI,U) D
36 . I IBNPIREQ S IBER=IBER_"IB"_(140+$P(IBNONPI,U,Z))_";" Q ; If required, set error
37 . D WARN("NPI for the "_$P("referring^operating^rendering^attending^supervising^^^^other",U,$P(IBNONPI,U,Z))_" provider has no value") ; Else, set warning
38 ; Check organizations
39 S IBNONPI=""
40 S IBNPIS=$$ORGNPI^IBCEF73A(IBIFN,.IBNONPI)
41 I $L(IBNONPI) F Z=1:1:$L(IBNONPI,U) D
42 . I IBNPIREQ S IBER=IBER_"IB"_(160+$P(IBNONPI,U,Z))_";" Q ; If required, set error
43 . ; PRXM/KJH - Changed descriptions.
44 . D WARN("NPI for the "_$P("Division^Non-VA Service Facility^Billing Provider",U,$P(IBNONPI,U,Z))_" has no value") ; Else, set warning
45 Q
46 ;
47 ; Check for required taxonomies
48TAXCHK ;
49 N IBTAXS,IBNOTAX,IBTAXREQ,Z
50 S IBTAXREQ=$$TAXREQ^IBCEP81(DT) ; Check if taxonomy is required
51 ; Check providers
52 S IBTAXS=$$PROVTAX^IBCEF73A(IBIFN,.IBNOTAX)
53 I $L(IBNOTAX) F Z=1:1:$L(IBNOTAX,U) D
54 . I IBTAXREQ S IBER=IBER_"IB"_(250+$P(IBNOTAX,U,Z))_";" Q ; If required, set error
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
56 ; Check organizations
57 S IBNOTAX=""
58 S IBTAXS=$$ORGTAX^IBCEF73A(IBIFN,.IBNOTAX)
59 I $L(IBNOTAX) F Z=1:1:$L(IBNOTAX,U) D
60 . I IBTAXREQ S IBER=IBER_"IB"_(164+$P(IBNOTAX,U,Z))_";" Q ; If required, set error
61 . ; PRXM/KJH - Changed descriptions.
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
63 Q
64 ;
65VALNDC(IBIFN,IBDFN) ; IB*2*363 - validate NDC# between PRESCRIPTION file (#52)
66 ; and IB BILL/CLAIMS PRESCRIPTION REFILL file (#362.4)
67 ; input - IBIFN = internal entry number of the billing record in the BILL/CLAIMS file (#399)
68 ; IBDFN = internal entry number of patient record in the PATIENT file (#2)
69 N IBX,IBRXCOL
70 ; call program that determines if NDC differences exist
71 D VALNDC^IBEFUNC3(IBIFN,IBDFN,.IBRXCOL)
72 Q:'$D(IBRXCOL)
73 ; at least one RX on the IB record has an NDC discrepancy
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))
75 Q
Note: See TracBrowser for help on using the repository browser.