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

IBCNETST.m

Go to the documentation of this file.
  1. IBCNETST ;DAOU/ALA - eIV Gate-keeper test scenarios ; 11-OCT-2017
  1. ;;2.0;INTEGRATED BILLING;**601,732,778**;21-MAR-94;Build 28
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. ;
  1. ;**Program Description**
  1. ;This program serves as a gate-keeper to protect FSC from receiving unexpected
  1. ;transmissions from a test account via the electronic Insurance Verification
  1. ;interface. Unexpected transmission have been known to take down their test
  1. ;systems. DO NOT alter or remove this routine.
  1. ;
  1. ; IB*2*601/DM XMITOK() Gate-keeper routine moved from IBCNEUT7
  1. ; IB*2*732/TZ added Test patients for auto-update with no group number
  1. ; IB*2*732/CKB added Test patients for 'Blues'
  1. ; IB*2*778/DJW changed acceptable SUBSCRIBER ID for 2 of the scenarios
  1. ;
  1. Q
  1. ;
  1. XMITOK(TQIEN) ;EP
  1. ; Checks if the site is a test site (not a production site) and if so
  1. ; only allows transactions in the eIV queue that meet specific criteria
  1. ; to be transmitted to FSC. Prevents invalid transmissions from a test
  1. ; site to FSC which blocks the interface and need to be manually resolved
  1. ; at FSC.
  1. ; Input: TQIEN - IEN of the IIV Transmission Queue entry
  1. ; Returns: 1 - Ok to add item to the eIV queue
  1. ; 0 - Not ok to add item to the eIV queue
  1. ;
  1. N DFN,GOOD,GRPNUM,IBIEN,IBCNMPI,IENS,IVPIEN,MCARE,PATDOB,PATID,PATNM,PATSEX,PAYRNM,PIEN
  1. N SUBID,SUBNM,TSITE,XX
  1. ;
  1. ; First check to see if the site is a test or a production site
  1. S TSITE=$S($$PROD^XUPROD(1):0,1:1)
  1. Q:'TSITE 1 ; Production site no checks done
  1. ;Q 0 ;Don't send anything
  1. ;
  1. S MCARE=$$GET1^DIQ(350.9,"1,",51.25,"E") ; Medicare Payer Name
  1. ;S XX=$G(^IBCN(365.1,TQIEN,0)) ; IB*732 - invalid code
  1. S (GRPNUM,PATID,SUBID,SUBNM)=""
  1. S DFN=$$GET1^DIQ(365.1,TQIEN_",",.02,"I") ; Patient IEN
  1. S PATNM=$$GET1^DIQ(2,DFN_",",.01,"I") ; Patient Name
  1. S IBCNMPI=$$GET1^DIQ(2,DFN_",",991.01,"I") ; Integration Control Number MPI
  1. ; Quit if the Integration Control Number MPI is null - MUST be present
  1. Q:IBCNMPI="" 0
  1. ;
  1. ; If the patient name contains "EICD" they are test scenario's for the "EICD" process.
  1. I PATNM["EICD" Q 1
  1. ;
  1. S PIEN=$$GET1^DIQ(365.1,TQIEN_",",.03,"I") ; Payer IEN
  1. S IBIEN=$$GET1^DIQ(365.1,TQIEN_",",.13,"I") ; Insurance multiple number
  1. ;
  1. ; If the insurance multiple is not in the transmission queue, get the
  1. ; following fields from the Insurance Verification Processor file
  1. I IBIEN="" D
  1. . S IVPIEN=$$GET1^DIQ(365.1,TQIEN_",",.05,"I") ; IVP file IEN
  1. . S GRPNUM=$$GET1^DIQ(355.33,IVPIEN_",",90.02) ; Group Plan Number
  1. . S PATID=$$GET1^DIQ(355.33,IVPIEN_",",62.01) ; Group Plan Number
  1. . S SUBID=$$GET1^DIQ(355.33,IVPIEN_",",90.03) ; Subscriber ID
  1. . S SUBNM=$$GET1^DIQ(355.33,IVPIEN_",",91.01) ; Subscriber Name
  1. E D
  1. . S IENS=IBIEN_","_DFN_","
  1. . S XX=$$GET1^DIQ(2.312,IENS,.18,"I") ; IEN of the Group Plan
  1. . S GRPNUM=$$GET1^DIQ(355.3,XX_",",2.02) ; Group Plan Number
  1. . S PATID=$$GET1^DIQ(2.312,IENS,5.01) ; Patient ID
  1. . S SUBID=$$GET1^DIQ(2.312,IENS,1) ; Subscriber ID
  1. . S SUBNM=$$GET1^DIQ(2.312,IENS,7.01) ; Subscriber NM
  1. ;
  1. I (SUBID="")!(SUBNM="") Q 0 ; Key elements not defined
  1. S XX=$$GET1^DIQ(2,DFN_",",.03,"I") ; Internal Patient DOB
  1. S PATDOB=$TR($$FMTE^XLFDT(XX,"7DZ"),"/","") ; YYYYMMDD format
  1. S PATSEX=$$GET1^DIQ(2,DFN_",",.02,"I") ; Patient Sex
  1. S PATNM=$$GET1^DIQ(2,DFN_",",.01,"I") ; Patient Name
  1. S PAYRNM=$$GET1^DIQ(365.12,PIEN_",",.01) ; Payer Name
  1. S PAYRNM=$$UP^XLFSTR(PAYRNM)
  1. S GOOD=0
  1. ;
  1. I PAYRNM="CMS MBI ONLY" G MBI ; this is an MBI test
  1. ;
  1. I PAYRNM="AETNA",GRPNUM="GRP NUM 13805",SUBID="111111AE" D Q:GOOD 1
  1. . Q:SUBNM'="IBSUB,ACTIVE"
  1. . Q:PATDOB'="19220202"
  1. . Q:PATSEX'="M"
  1. . S GOOD=1
  1. ;
  1. I PAYRNM="AETNA",GRPNUM="GRP NUM 13188",SUBID="111111FG" D Q:GOOD 1
  1. . Q:SUBNM'="IBSUB,INACTIVE"
  1. . Q:PATDOB'="19480101"
  1. . Q:PATSEX'="F"
  1. . S GOOD=1
  1. ;
  1. ; IB*778/DJW SUBID below is more generic
  1. I PAYRNM="CIGNA",GRPNUM="GRP NUM 5442",SUBID="87654321CI" D Q:GOOD 1
  1. . Q:SUBNM'="IBSUB,AAAERROR"
  1. . Q:PATDOB'="19470211"
  1. . Q:PATSEX'="M"
  1. . S GOOD=1
  1. ;
  1. I PAYRNM="AETNA",GRPNUM="AET1234",SUBID="W1234561111" D Q:GOOD 1
  1. . Q:SUBNM'="IBINS,ACTIVE" ; Note this patient is male
  1. . Q:PATID'="W123452222"
  1. . Q:PATNM'="IBDEP,ACTIVE"
  1. . Q:PATDOB'="19900304"
  1. . Q:PATSEX'="F" ; Note this is subscriber's spouse
  1. . S GOOD=1
  1. ;
  1. I MCARE'="",PAYRNM=MCARE,SUBID="333113333A",SUBNM="IB,PATIENT" D Q:GOOD 1
  1. . Q:PATDOB'="19350309"
  1. . Q:PATSEX'="M"
  1. . S GOOD=1
  1. ;
  1. I MCARE'="",PAYRNM=MCARE,SUBID="111223333A",SUBNM="IBSUB,TWOTRLRS" D Q:GOOD 1
  1. . Q:PATDOB'="19550505"
  1. . Q:PATSEX'="M"
  1. . S GOOD=1
  1. ;
  1. ; Added for testing "Stop trigger of EIV Response", FSC's initial response
  1. ; indicates no insurance identified therefore there are no policies to reverify
  1. ; automatically.
  1. I PAYRNM="AETNA",GRPNUM="GRP NUM 13805",SUBID="222222AE" D Q:GOOD 1
  1. . Q:SUBNM'="IBSUB,CANNOTFIND"
  1. . Q:PATDOB'="19220707"
  1. . Q:PATSEX'="M"
  1. . S GOOD=1
  1. ;
  1. I PAYRNM="CIGNA",GRPNUM="GRP NUM 5442",SUBID="222222CI" D Q:GOOD 1
  1. . Q:SUBNM'="IBSUB,ACTIVE"
  1. . Q:PATDOB'="19220202"
  1. . Q:PATSEX'="M"
  1. . S GOOD=1
  1. ;
  1. ; IB*2*732/TAZ - Added Non-medicare patient scenario for auto-update, no group number
  1. I PAYRNM="CIGNA",GRPNUM="GRP NUM 5337",SUBID="555555NO" D Q:GOOD 1
  1. . Q:SUBNM'="IBSUB,NOGROUPNUM"
  1. . Q:PATDOB'="19380311"
  1. . Q:PATSEX'="M"
  1. . S GOOD=1
  1. ;
  1. ; IB*2*732/TAZ - Added Medicare patient scenario for auto-update, no group number
  1. ; IB*778/DJW SUBID below is more generic
  1. I PAYRNM="CMS",GRPNUM="PART A",SUBID="12345678ME" D Q:GOOD 1
  1. . Q:SUBNM'="IB,MEDICARENOGRP"
  1. . Q:PATDOB'="19381110"
  1. . Q:PATSEX'="F"
  1. . S GOOD=1
  1. ;
  1. ; IB*2*732/CKB - Added patient scenario for 'Blues' testing
  1. I PAYRNM="BCBS OF COLORADO",GRPNUM="BLU1234",SUBID="COL98765" D Q:GOOD 1
  1. . Q:SUBNM'="IBSUB,BLUECROSS WGRP"
  1. . Q:PATDOB'="19420826"
  1. . Q:PATSEX'="M"
  1. . S GOOD=1
  1. ;
  1. ; IB*2*732/CKB - Added patient scenario for 'Blues' testing
  1. I PAYRNM="BCBS OF COLORADO",GRPNUM="BLU1234",SUBID="COL56789" D Q:GOOD 1
  1. . Q:SUBNM'="IBSUB,BLUECROSS WOGRP"
  1. . Q:PATDOB'="19420101"
  1. . Q:PATSEX'="M"
  1. . S GOOD=1
  1. Q 0
  1. ;
  1. MBI ;
  1. ; IB*2*601//DM - MBI testing scenarios
  1. I PAYRNM="CMS MBI ONLY",SUBID="MBIrequest" D Q:GOOD 1
  1. . Q:SUBNM'="IB,MBIPATIENTONE"
  1. . Q:PATDOB'="19380311"
  1. . Q:PATSEX'="M"
  1. . S GOOD=1
  1. ;
  1. I PAYRNM="CMS MBI ONLY",SUBID="MBIrequest" D Q:GOOD 1
  1. . Q:SUBNM'="IB,MBIPATIENTTWO"
  1. . Q:PATDOB'="19381110"
  1. . Q:PATSEX'="M"
  1. . S GOOD=1
  1. ;
  1. I PAYRNM="CMS MBI ONLY",SUBID="MBIrequest" D Q:GOOD 1
  1. . Q:SUBNM'="IB,MBIPATIENTTHREE"
  1. . Q:PATDOB'="19470530"
  1. . Q:PATSEX'="M"
  1. . S GOOD=1
  1. ;
  1. I PAYRNM="CMS MBI ONLY",SUBID="MBIrequest" D Q:GOOD 1
  1. . Q:SUBNM'="IB,MBIPATIENTFOUR"
  1. . Q:PATDOB'="19500130"
  1. . Q:PATSEX'="M"
  1. . S GOOD=1
  1. ;
  1. I PAYRNM="CMS MBI ONLY",SUBID="MBIrequest" D Q:GOOD 1
  1. . Q:SUBNM'="IB,MBIPATIENTFIVE"
  1. . Q:PATDOB'="19500827"
  1. . Q:PATSEX'="M"
  1. . S GOOD=1
  1. ;
  1. I PAYRNM="CMS MBI ONLY",SUBID="MBIrequest" D Q:GOOD 1
  1. . Q:SUBNM'="IB,MBIPATIENTSIX"
  1. . Q:PATDOB'="19471022"
  1. . Q:PATSEX'="M"
  1. . S GOOD=1
  1. ;
  1. I PAYRNM="CMS MBI ONLY",SUBID="MBIrequest" D Q:GOOD 1
  1. . Q:SUBNM'="IB,MBIPATIENTSEVEN"
  1. . Q:PATDOB'="19490603"
  1. . Q:PATSEX'="M"
  1. . S GOOD=1
  1. ;
  1. I PAYRNM="CMS MBI ONLY",SUBID="MBIrequest" D Q:GOOD 1
  1. . Q:SUBNM'="IB,MBIPATIENTEIGHT"
  1. . Q:PATDOB'="19470921"
  1. . Q:PATSEX'="M"
  1. . S GOOD=1
  1. ;
  1. I PAYRNM="CMS MBI ONLY",SUBID="MBIrequest" D Q:GOOD 1
  1. . Q:SUBNM'="IB,MBIPATIENTNINE"
  1. . Q:PATDOB'="19430301"
  1. . Q:PATSEX'="M"
  1. . S GOOD=1
  1. ;
  1. I PAYRNM="CMS MBI ONLY",SUBID="MBIrequest" D Q:GOOD 1
  1. . Q:SUBNM'="IB,MBIPATIENTTEN"
  1. . Q:PATDOB'="19580129"
  1. . Q:PATSEX'="M"
  1. . S GOOD=1
  1. ;
  1. Q 0