IBCEP81 ;ALB/KJH - NPI and Taxonomy Functions ;19 Apr 2008 5:17 PM ;;2.0;INTEGRATED BILLING;**343,391**;21-MAR-94;Build 39 ;;Per VHA Directive 2004-038, this routine should not be modified. ; ; Must call at an entry point Q ; ; NPIREQ - Extrinsic function that will return a flag indicating ; if the NPI 'drop dead date' has passed. ; Input ; IBDT - Date to check (internal Fileman format) ; Output ; 1 - On or after the May 23, 2008 drop dead date ; 0 - Prior to the May 23, 2008 drop dead date NPIREQ(IBDT) ; Check NPI drop dead date N IBCHKDT S IBCHKDT=3080523 Q $S(IBDT0,IBNPI=IBOLDNPI,$D(^VA(200,"ANPI",IBOLDNPI)) Q 1 I IBNPI="" Q "" S DUP=$$DUP(IBNPI) ;Duplicate in 355.93 I DUP'="",DUP'=IBIEN Q 11 ;Replacing an NPI that is associated to NEW PERSON file with another NPI that is associated with the NEW PERSON file I $G(IBOLDNPI)>0,$D(^VA(200,"ANPI",IBOLDNPI)),$D(^VA(200,"ANPI",IBNPI)) Q 14 ;Already an inactive NPI S IBIEN2=$O(^IBA(355.93,"NPIHISTORY",IBNPI,"")) D:$G(IBIEN2)'="" . S IBIEN1=$O(^IBA(355.93,IBIEN2,"NPISTATUS","C",IBNPI,""),-1) I $G(IBIEN1)'="",$D(^IBA(355.93,IBIEN2,"NPISTATUS","NPISTATUS",0,IBIEN1)) Q 12 ;Check for existence in New Person ;file (#200) and/or Institution file (#4) S IBVA200=$$QI^XUSNPI(IBNPI) I $E($P(IBVA200,U,4),1,8)="Inactive" Q 13 I $P(IBVA200,U)="Individual_ID",$P(IBVA200,U,4)["Active" Q 1 I $P(IBVA200,U)="Organization_ID",$P(IBVA200,U,4)["Active" Q 9 I $D(^DIC(4,"ANPI",IBNPI)) Q 9 Q 0 ; PRENPI(IBIEN) ;Pre-NPI edit messages N IBNPI,IBVA200 Q:$G(IBIEN)="" S IBNPI=$P($G(^IBA(355.93,IBIEN,0)),U,14) Q:$G(IBNPI)="" S IBVA200=$$QI^XUSNPI(IBNPI) ;NPI that exists in 355.93 also is used in 200 I $P(IBVA200,U,1)="Individual_ID",$P(IBVA200,U,4)["Active" D . W !!,"The NPI of ",IBNPI," is also associated with the INDIVIDUAL provider ",!,$$GET1^DIQ(200,$P(IBVA200,U,2),.01)," in the NEW PERSON file." . W !!,"You are updating ",$S($$GET1^DIQ(355.93,IBIEN,.02,"I")=1:"a FACILITY/GROUP",$$GET1^DIQ(355.93,IBIEN,.02,"I")=2:"an INDIVIDUAL",1:"a")," provider in the" . W !,"IB NON/OTHER VA BILLING PROVIDER file.",! ;The NPI used in 355.93 is inactive in 200 I $P(IBVA200,U,1)="Individual_ID",$P(IBVA200,U,4)["Inactive" D . W !!,"The NPI of ",IBNPI," is also associated with the INDIVIDUAL provider ",!,$$GET1^DIQ(200,$P(IBVA200,U,2),.01)," as INACTIVE in the NEW PERSON file." . W !!,"You are updating ",$S($$GET1^DIQ(355.93,IBIEN,.02,"I")=1:"a FACILITY/GROUP",$$GET1^DIQ(355.93,IBIEN,.02,"I")=2:"an INDIVIDUAL",1:"a")," provider in the" . W !,"IB NON/OTHER VA BILLING PROVIDER file.",! Q