IBCNERPA ;DAOU/BHS - IBCNE eIV RESPONSE REPORT (cont'd) ;03-JUN-2002
;;2.0;INTEGRATED BILLING;**184,271,345,416,528,752**;21-MAR-94;Build 20
;;Per VA Directive 6402, this routine should not be modified.
;
; eIV - Insurance Verification Interface
;
; Input from IBCNERP1/2:
; IBCNERTN="IBCNERP1" - Driver rtn
; IBCNESPC("BEGDT")=Start Dt, IBCNESPC("ENDDT")=End Dt
; IBCNESPC("PYR")=Pyr IEN OR "" for all
; IBCNESPC("PAT")=Pat IEN OR "" for all
; IBCNESPC("TYPE")=A (All Responses) OR M (Most Recent Responses) for
; unique Pyr/Pt pair
; IBCNESPC("SORT")=1 (PyrNm) OR 2 (PatNm)
; IBCNESPC("TRCN")=Trace #^IEN, if non-null, all params null
; IBCNESPC("RFLAG")=Report Flag used to indicate which report is being
; run. Response Report (O), Inactive Report (1), or Ambiguous
; Report (2).
; IBCNESPC("DTEXP")=Expiration date used in the inactive policy report
; IBOUT="R" for Report format or "E" for Excel format
;
; Based on structure of eIV Response File (#365)
; ^TMP($J,IBCNERTN,S1,S2,CT,0) based on ^IBCN(365,DA,0)
; IBCNERTN="IBCNERP1", S1=PyrName(SORT=1) or PatNm(SORT=2),
; S2=PatName(SORT=1) or PyrName(SORT=2), CT=Seq ct
; ^TMP($J,IBCNERTN,S1,S2,CT,1) based on ^IBCN(365,DA,1)
; ^TMP($J,IBCNERTN,S1,S2,2,EBCT) based on ^IBCN(365,DA,2)
; EBCT=E/B IEN (365.02)
; ^TMP($J,IBCNERTN,S1,S2,2,EBCT,NTCT)=based on ^IBCN(365,DA,2,EB,NT)
; NTCT=Notes Ct, may not be Notes IEN, if line wrapped (365.021)
; ^TMP($J,IBCNERTN,S1,S2,2,CNCT) based on ^IBCN(365,DA,3)
; CNCT=Cont Pers IEN (365.03)
; ^TMP($J,IBCNERTN,S1,S2,4,CT)= err txt based on ^IBCN(365,DA,4)
; CT=1/2 if >60 ch long
; Must call at one of the entry points, EN3 or EN6
Q
;
EN3(IBCNERTN,IBCNESPC,IBOUT) ; Entry pt. Calls IBCNERP3
N IBBDT,IBEDT,IBPY,IBPT,IBTYP,IBSRT,CRT,MAXCNT,IBPXT
N IBPGC,X,Y,DIR,DTOUT,DUOUT,LIN,IBTRC,IPRF,IBRDT
N IBXTFEED,IBFEED ;IB*752/DTG correct for excessive line feeds at end of report
S IBBDT=$G(IBCNESPC("BEGDT")),IBEDT=$G(IBCNESPC("ENDDT"))
S IBPY=$G(IBCNESPC("PYR")),IBPT=$G(IBCNESPC("PAT"))
S IBTYP=$G(IBCNESPC("TYPE")),IBSRT=$G(IBCNESPC("SORT"))
S IBTRC=$P($G(IBCNESPC("TRCN")),U,1),(IBPXT,IBPGC)=0
S IBEXP=$G(IBCNESPC("DTEXP"))
S IPRF=$G(IBCNESPC("RFLAG"))
S IBRDT=$$FMTE^XLFDT($$NOW^XLFDT,1)
; Determine IO params
I "^R^E^"'[(U_$G(IBOUT)_U) S IBOUT="R"
I IOST["C-" S MAXCNT=IOSL-3,CRT=1,IBXTFEED=21 ;IB*752/DTG correct for excessive line feeds at end of report
E S MAXCNT=IOSL-6,CRT=0,IBXTFEED=50 ;IB*752/DTG
D PRINT^IBCNERP3(IBCNERTN,IBBDT,IBEDT,IBPY,IBPT,IBTYP,IBSRT,.IBPGC,.IBPXT,MAXCNT,CRT,IBTRC,IBEXP,IPRF,IBRDT,IBOUT,IBXTFEED)
I $G(ZTSTOP)!IBPXT G EXIT3
I CRT,IBPGC>0,'$D(ZTQUEUED) D
. ;IB*752/DTG correct for excessive line feeds at end of report
. ;I MAXCNT<51 F LIN=1:1:(MAXCNT-$Y) W !
. I MAXCNT<51 F LIN=1:1:(IBXTFEED-$Y) W !
. S DIR(0)="E" D ^DIR K DIR
EXIT3 ; Exit pt
Q
;
;
EN6(IBCNERTN,IBCNESPC,IBOUT) ; Entry pt. Calls IBCNERP6
;
; Init vars
N CRT,MAXCNT,IBPXT,IBPGC,IBBDT,IBEDT,IBPY,IBSRT,IBDTL
N X,Y,DIR,DTOUT,DUOUT,LIN,TOTALS
;
S IBBDT=$G(IBCNESPC("BEGDT"))
S IBEDT=$G(IBCNESPC("ENDDT"))
S IBPY=$G(IBCNESPC("PYR"))
S IBDTL=$G(IBCNESPC("DTL"))
S IBSRT=$G(IBCNESPC("SORT"))
S (IBPXT,IBPGC)=0
;
; Determine IO parameters
I IOST["C-" S MAXCNT=IOSL-3,CRT=1
E S MAXCNT=IOSL-6,CRT=0
;
D PRINT^IBCNERP6(IBCNERTN,IBBDT,IBEDT,IBPY,IBDTL,IBSRT,.IBPGC,.IBPXT,MAXCNT,CRT,IBOUT)
I $G(ZTSTOP)!IBPXT G EXIT6
I CRT,IBPGC>0,'$D(ZTQUEUED) D
. I MAXCNT<51 F LIN=1:1:(MAXCNT-$Y) W !
. S DIR(0)="E" D ^DIR K DIR
;
EXIT6 ; Exit pt
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBCNERPA 3641 printed Oct 16, 2024@18:15:47 Page 2
IBCNERPA ;DAOU/BHS - IBCNE eIV RESPONSE REPORT (cont'd) ;03-JUN-2002
+1 ;;2.0;INTEGRATED BILLING;**184,271,345,416,528,752**;21-MAR-94;Build 20
+2 ;;Per VA Directive 6402, this routine should not be modified.
+3 ;
+4 ; eIV - Insurance Verification Interface
+5 ;
+6 ; Input from IBCNERP1/2:
+7 ; IBCNERTN="IBCNERP1" - Driver rtn
+8 ; IBCNESPC("BEGDT")=Start Dt, IBCNESPC("ENDDT")=End Dt
+9 ; IBCNESPC("PYR")=Pyr IEN OR "" for all
+10 ; IBCNESPC("PAT")=Pat IEN OR "" for all
+11 ; IBCNESPC("TYPE")=A (All Responses) OR M (Most Recent Responses) for
+12 ; unique Pyr/Pt pair
+13 ; IBCNESPC("SORT")=1 (PyrNm) OR 2 (PatNm)
+14 ; IBCNESPC("TRCN")=Trace #^IEN, if non-null, all params null
+15 ; IBCNESPC("RFLAG")=Report Flag used to indicate which report is being
+16 ; run. Response Report (O), Inactive Report (1), or Ambiguous
+17 ; Report (2).
+18 ; IBCNESPC("DTEXP")=Expiration date used in the inactive policy report
+19 ; IBOUT="R" for Report format or "E" for Excel format
+20 ;
+21 ; Based on structure of eIV Response File (#365)
+22 ; ^TMP($J,IBCNERTN,S1,S2,CT,0) based on ^IBCN(365,DA,0)
+23 ; IBCNERTN="IBCNERP1", S1=PyrName(SORT=1) or PatNm(SORT=2),
+24 ; S2=PatName(SORT=1) or PyrName(SORT=2), CT=Seq ct
+25 ; ^TMP($J,IBCNERTN,S1,S2,CT,1) based on ^IBCN(365,DA,1)
+26 ; ^TMP($J,IBCNERTN,S1,S2,2,EBCT) based on ^IBCN(365,DA,2)
+27 ; EBCT=E/B IEN (365.02)
+28 ; ^TMP($J,IBCNERTN,S1,S2,2,EBCT,NTCT)=based on ^IBCN(365,DA,2,EB,NT)
+29 ; NTCT=Notes Ct, may not be Notes IEN, if line wrapped (365.021)
+30 ; ^TMP($J,IBCNERTN,S1,S2,2,CNCT) based on ^IBCN(365,DA,3)
+31 ; CNCT=Cont Pers IEN (365.03)
+32 ; ^TMP($J,IBCNERTN,S1,S2,4,CT)= err txt based on ^IBCN(365,DA,4)
+33 ; CT=1/2 if >60 ch long
+34 ; Must call at one of the entry points, EN3 or EN6
+35 QUIT
+36 ;
EN3(IBCNERTN,IBCNESPC,IBOUT) ; Entry pt. Calls IBCNERP3
+1 NEW IBBDT,IBEDT,IBPY,IBPT,IBTYP,IBSRT,CRT,MAXCNT,IBPXT
+2 NEW IBPGC,X,Y,DIR,DTOUT,DUOUT,LIN,IBTRC,IPRF,IBRDT
+3 ;IB*752/DTG correct for excessive line feeds at end of report
NEW IBXTFEED,IBFEED
+4 SET IBBDT=$GET(IBCNESPC("BEGDT"))
SET IBEDT=$GET(IBCNESPC("ENDDT"))
+5 SET IBPY=$GET(IBCNESPC("PYR"))
SET IBPT=$GET(IBCNESPC("PAT"))
+6 SET IBTYP=$GET(IBCNESPC("TYPE"))
SET IBSRT=$GET(IBCNESPC("SORT"))
+7 SET IBTRC=$PIECE($GET(IBCNESPC("TRCN")),U,1)
SET (IBPXT,IBPGC)=0
+8 SET IBEXP=$GET(IBCNESPC("DTEXP"))
+9 SET IPRF=$GET(IBCNESPC("RFLAG"))
+10 SET IBRDT=$$FMTE^XLFDT($$NOW^XLFDT,1)
+11 ; Determine IO params
+12 IF "^R^E^"'[(U_$GET(IBOUT)_U)
SET IBOUT="R"
+13 ;IB*752/DTG correct for excessive line feeds at end of report
IF IOST["C-"
SET MAXCNT=IOSL-3
SET CRT=1
SET IBXTFEED=21
+14 ;IB*752/DTG
IF '$TEST
SET MAXCNT=IOSL-6
SET CRT=0
SET IBXTFEED=50
+15 DO PRINT^IBCNERP3(IBCNERTN,IBBDT,IBEDT,IBPY,IBPT,IBTYP,IBSRT,.IBPGC,.IBPXT,MAXCNT,CRT,IBTRC,IBEXP,IPRF,IBRDT,IBOUT,IBXTFEED)
+16 IF $GET(ZTSTOP)!IBPXT
GOTO EXIT3
+17 IF CRT
IF IBPGC>0
IF '$DATA(ZTQUEUED)
Begin DoDot:1
+18 ;IB*752/DTG correct for excessive line feeds at end of report
+19 ;I MAXCNT<51 F LIN=1:1:(MAXCNT-$Y) W !
+20 IF MAXCNT<51
FOR LIN=1:1:(IBXTFEED-$Y)
WRITE !
+21 SET DIR(0)="E"
DO ^DIR
KILL DIR
End DoDot:1
EXIT3 ; Exit pt
+1 QUIT
+2 ;
+3 ;
EN6(IBCNERTN,IBCNESPC,IBOUT) ; Entry pt. Calls IBCNERP6
+1 ;
+2 ; Init vars
+3 NEW CRT,MAXCNT,IBPXT,IBPGC,IBBDT,IBEDT,IBPY,IBSRT,IBDTL
+4 NEW X,Y,DIR,DTOUT,DUOUT,LIN,TOTALS
+5 ;
+6 SET IBBDT=$GET(IBCNESPC("BEGDT"))
+7 SET IBEDT=$GET(IBCNESPC("ENDDT"))
+8 SET IBPY=$GET(IBCNESPC("PYR"))
+9 SET IBDTL=$GET(IBCNESPC("DTL"))
+10 SET IBSRT=$GET(IBCNESPC("SORT"))
+11 SET (IBPXT,IBPGC)=0
+12 ;
+13 ; Determine IO parameters
+14 IF IOST["C-"
SET MAXCNT=IOSL-3
SET CRT=1
+15 IF '$TEST
SET MAXCNT=IOSL-6
SET CRT=0
+16 ;
+17 DO PRINT^IBCNERP6(IBCNERTN,IBBDT,IBEDT,IBPY,IBDTL,IBSRT,.IBPGC,.IBPXT,MAXCNT,CRT,IBOUT)
+18 IF $GET(ZTSTOP)!IBPXT
GOTO EXIT6
+19 IF CRT
IF IBPGC>0
IF '$DATA(ZTQUEUED)
Begin DoDot:1
+20 IF MAXCNT<51
FOR LIN=1:1:(MAXCNT-$Y)
WRITE !
+21 SET DIR(0)="E"
DO ^DIR
KILL DIR
End DoDot:1
+22 ;
EXIT6 ; Exit pt
+1 QUIT
+2 ;