Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: IBCBB14

IBCBB14.m

Go to the documentation of this file.
  1. IBCBB14 ;ALB/WCJ - CONTINUATION OF EDIT CHECK ROUTINE FOR EPHARM ;15 Mar 2018 9:50 PM
  1. ;;2.0;INTEGRATED BILLING;**591,592,624**;21-MAR-94;Build 10
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. ;
  1. Q
  1. VALNDC(IBIFN,IBDFN) ; IB*2*363 - validate NDC# between PRESCRIPTION file (#52)
  1. ; and IB BILL/CLAIMS PRESCRIPTION REFILL file (#362.4)
  1. ; input - IBIFN = internal entry number of the billing record in the BILL/CLAIMS file (#399)
  1. ; IBDFN = internal entry number of patient record in the PATIENT file (#2)
  1. N IBX,IBRXCOL
  1. ; call program that determines if NDC differences exist
  1. D VALNDC^IBEFUNC3(IBIFN,IBDFN,.IBRXCOL)
  1. Q:'$D(IBRXCOL)
  1. ; at least one RX on the IB record has an NDC discrepancy
  1. S IBX=0 F S IBX=$O(IBRXCOL(IBX)) Q:'IBX D WARN^IBCBB11("NDC# on Bill does not equal the NDC# on Rx "_IBRXCOL(IBX))
  1. Q
  1. ;
  1. RXNPI(IBIFN) ; check for multiple pharmacy npi's on the same bill
  1. N IBORG,IBRXNPI,IBX,IBY
  1. S IBORG=$$RXSITE^IBCEF73A(IBIFN,.IBORG)
  1. 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))=""
  1. S (IBX,IBY)=0 F S IBX=$O(IBRXNPI(IBX)) Q:'IBX S IBY=IBY+1
  1. I IBY>1 D WARN^IBCBB11("Bill has prescriptions resulting from "_IBY_" different NPI locations")
  1. Q
  1. ;
  1. ROICHK(IBIFN,IBDFN,IBINS) ; ROI Check
  1. ; Verify that an ROI is on file if the drug is flagged as sensitive.
  1. ; No ROI is required if the Date of Service is on or after the
  1. ; Mission Act Implementation Date (1/28/2019).
  1. ; input - IBIFN = IEN of the Bill/Claims file (#399)
  1. ; IBDFN = IEN of the patient
  1. ; IBINS = IEN of the payer insurance company (#36)
  1. ; OUTPUT - 0 = no error
  1. ; 1 = a prescription is sensitive and there is no ROI on file
  1. ;
  1. N IBX,IBY0,IBRXIEN,IBDT,IBDRUG,ROIQ
  1. S ROIQ=0
  1. S IBX=0 F S IBX=$O(^IBA(362.4,"C",IBIFN,IBX)) Q:'IBX D
  1. .S IBY0=^IBA(362.4,IBX,0),IBRXIEN=$P(IBY0,U,5) I 'IBRXIEN Q
  1. .S IBDT=$P(IBY0,U,3),IBDRUG=$P(IBY0,U,4)
  1. .D ZERO^IBRXUTL(IBDRUG)
  1. .I $$SENS^IBNCPDR(IBDRUG) D ; Sensitive Diagnosis Drug - check for ROI
  1. .. ; Skip ROI check if the DOS is on or after the Mission Act date.
  1. .. I $$MACHK^IBNCPDR4(IBDT) Q
  1. .. I $$ROI^IBNCPDR4(IBDFN,IBDRUG,IBINS,IBDT) Q ;ROI is on file
  1. .. D WARN^IBCBB11("ROI not on file for prescription "_$$RXAPI1^IBNCPUT1(IBRXIEN,.01,"E"))
  1. .. S ROIQ=1
  1. ROICHKQ ;
  1. K ^TMP($J,"IBDRUG")
  1. Q ROIQ
  1. ;