IBCNERP7 ;DAOU/BHS - eIV STATISTICAL REPORT ;10-JUN-2002
;;2.0;INTEGRATED BILLING;**184,416,528,621,687,752**;21-MAR-94;Build 20
;;Per VA Directive 6402, this routine should not be modified.
;
; eIV - Insurance Verification Interface
;
; Input parameter: N/A
; Other relevant variables:
; IBCNERTN = "IBCNERP7" (current routine name for queueing the
; COMPILE process)
; IBCNESPC("BEGDTM") = start date/time for date/time range
; IBCNESPC("ENDDTM") = end date/time for date/time range
; IBCNESPC("SECTS") = list of sections to display on the report
; 1 = All (Outgoing, Incoming and General),
; 2 = Outgoing - Inquiry Response data,
; 3 = Incoming - Inquiry Transmission data,
; 4 = General - Ins Buffer data, Outstanding
; Inquiries, Communication Failures, Retries
; may equal a list of values if '1' is not the
; the only value
; IBCNESPC("MM") = "", not for MailMan message OR
; MAILGROUP, generate as MailMan message for this
; MAILGROUP as defined in IB site
; parameters
; IBOUT = "E" for Excel or "R" for report format
;
; Only enter routine from EN or MAILMSG tags
Q
;
; Entry pt
EN ;
; Init vars
N STOP,IBCNERTN,POP,IBCNESPC,IBOUT
;
S STOP=0
S IBCNERTN="IBCNERP7"
W @IOF
W !,"eIV Statistical Report",!
W !,"Please select the timeframe for which to view the Insurance"
W !,"Verification statistics and current status."
;
; Default to MailMan flag to No from the EN tag
S IBCNESPC("MM")=""
;
; Prompts for Payer Report
; Date Range parameters
S10 D DTMRNG I STOP G EXIT
; Sort by parameter - Payer or Total Inquiries (Payer Report)
S20 D SECTS I STOP G:$$STOP^IBCNERP1 EXIT G S10
; Select report type 528 - baa
S30 S IBOUT=$$OUT I STOP G:$$STOP^IBCNERP1 EXIT G S20
; Select the output device
S50 ;D DEVICE^IBCNERP1(IBCNERTN,.IBCNESPC,IBOUT) I STOP G:$$STOP^IBCNERP1 EXIT G S20
D DEVICE^IBCNERP1(IBCNERTN,.IBCNESPC,IBOUT) I STOP G EXIT ;IB*752/DTG - remove step back if upcaret and go to exit
;
EXIT ; Quit this routine
Q
;
;
DTMRNG ; Determine the start and end date/times for the report
; Init vars
N DIR,X,Y,DIRUT
;
W !
;
DTMRNG0 ;/ckb - IB*2*687 - Added the DTMRNG0 tag.
S DIR(0)="DO^::ERX"
S DIR("A")="Start DATE/TIME"
S DIR("?",1)=" Enter Start DATE/TIME for report range."
S DIR("?")=" The time element is required."
D ^DIR K DIR
I $D(DIRUT) S STOP=1 G DTMRNGX
;/ckb-IB*2*687 - Added the following date validation.
I Y>$$NOW^XLFDT D G DTMRNG0
. W !!," The Start DATE/TIME entered cannot in the future."
. W !," Please reenter."
. W !
S IBCNESPC("BEGDTM")=Y
;
DTMRNG1 S DIR(0)="D^::ERX"
S DIR("A")=" End DATE/TIME"
S DIR("?",1)=" Enter End DATE/TIME for report range."
S DIR("?")=" The time element is required."
D ^DIR K DIR
I $D(DIRUT) S STOP=1 G DTMRNGX
I Y<IBCNESPC("BEGDTM") D G DTMRNG1
. W !," The End Date/Time must not precede the Start Date/Time."
. W !," Please reenter."
;/ckb-IB*2*687 - Added the following date validation.
I Y>$$NOW^XLFDT D G DTMRNG1
. W !!," The End DATE/TIME entered cannot in the future."
. W !," Please reenter."
. W !
S IBCNESPC("ENDDTM")=Y
;
DTMRNGX ; DTMRNG exit pt
Q
;
;
SECTS ; Prompt to allow users to include the available sections in the report
; Init vars
N DIR,X,Y,DIRUT
;
W !
; IB*2.0*621 - Updated Help Text for Entry 4
S DIR(0)="L^1:4"
S DIR("A",1)="Choose all sections to be reviewed"
S DIR("A",2)="1 - All = All report sections (Default)"
S DIR("A",3)="2 - Outgoing Data = Inquiry Transmission statistics"
S DIR("A",4)="3 - Incoming Data = Inquiry Response statistics"
S DIR("A",5)="4 - Current Status/Payer Activity = Responses Pending, Queued Inquiries,"
S DIR("A",6)=" Ins Buffer Entries, Payer Activity, etc."
S DIR("A")="Select one or more sections: "
S DIR("B")=1
S DIR("?",1)=" Please select one or more sections of the report to view."
S DIR("?",2)=" To select multiple sections, enter a comma-separated list"
S DIR("?",3)=" (ex. 2,4)."
S DIR("?",4)=" 1 - Include all sections in the report. (Default)"
S DIR("?",5)=" 2 - Include statistics on inquiries transmitted during the"
S DIR("?",6)=" timeframe by extract type."
S DIR("?",7)=" 3 - Include statistics on responses received during the"
S DIR("?",8)=" timeframe by extract type."
S DIR("?",9)=" 4 - Include statistics on the Current Status of the system and Payer"
S DIR("?",10)=" Activity. The totals in the Current Status section--including responses"
;IB*752/DTG remove reference to deferred inquiries
;S DIR("?",11)=" pending, queued inquiries, deferred inquiries, insurance companies"
S DIR("?",11)=" pending, queued inquiries, insurance companies without national ID,"
;/ckb-IB*2,0*687 - Reworded the text for the line below and adjusted the following lines accordingly.
;S DIR("?",12)=" without national ID, eIV Payers disabled locally, and insurance buffer"
S DIR("?",12)=" eIV Payers locally enabled is NO, and insurance buffer entries--are"
S DIR("?",13)=" independent of the report date range. The totals in the Payer Activity"
S DIR("?",14)=" section reflect activity during the report date range."
S DIR("?")=" "
D ^DIR K DIR
I $D(DIRUT) S STOP=1 G SECTSX
; Default to all if 1 is included OR if 2,3 and 4 are included in any
; order
S Y=","_Y
I Y[(",1,") S IBCNESPC("SECTS")=1 G SECTSX
I Y[(",2,"),Y[(",3,"),Y[(",4,") S IBCNESPC("SECTS")=1 G SECTSX
S IBCNESPC("SECTS")=Y
;
SECTSX ; SECTS exit pt
Q
;
;
MAILMSG ; Tag to be called by TaskMan to generate report with default values
; and send as MailMan message
; Init vars
N IBCNERTN,IBCNESPC,EDT,BDT,TM,IBOUT
;
; -- set the mail message to display in a report format
S IBOUT="R"
;
; Default report parameters
; Start Date/Time - End Date/Time range
; Determine start time based on IB site parameter
S TM=$$GET1^DIQ(350.9,"1,",51.03,"E")
I TM=""!(+TM=0) S TM="2400"
S EDT=$$DT^XLFDT
S BDT=$$FMADD^XLFDT(EDT,-1)
S IBCNESPC("BEGDTM")=+(BDT_"."_TM)
S IBCNESPC("ENDDTM")=+(EDT_"."_TM)
; Display all sections
S IBCNESPC("SECTS")=1
; Set MailMan flag to IB site parameter MAILGROUP
S IBCNESPC("MM")=$$MGRP^IBCNEUT5
; If there is no MailGroup to send message - do not continue
I IBCNESPC("MM")="" QUIT
; If the send MailMan message parameter is turned off, stop the process
I '$P($G(^IBE(350.9,1,51)),U,2) QUIT
;
; Set routine parameter
S IBCNERTN="IBCNERP7"
;
; Initialize scratch global
KILL ^TMP($J,IBCNERTN)
; Compile the report data
D EN^IBCNERP8(IBCNERTN,.IBCNESPC)
; Print the report - to MailMan
I '$G(ZTSTOP) D EN^IBCNERP9(IBCNERTN,.IBCNESPC,IBOUT)
;
; Kill scratch global
KILL ^TMP($J,IBCNERTN)
;
; Purge the task record
I $D(ZTQUEUED) S ZTREQ="@"
;
; MAILMSG exit pt
Q
; 528 - baa : Add option to ouput data in excel format
OUT() ; Prompt to allow users to select output format
N DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
W !
S DIR(0)="SA^E:Excel;R:Report"
S DIR("A")="(E)xcel Format or (R)eport Format: "
S DIR("B")="Report"
D ^DIR I $D(DIRUT) S STOP=1 Q ""
Q Y
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBCNERP7 7641 printed Dec 13, 2024@02:15:04 Page 2
IBCNERP7 ;DAOU/BHS - eIV STATISTICAL REPORT ;10-JUN-2002
+1 ;;2.0;INTEGRATED BILLING;**184,416,528,621,687,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 parameter: N/A
+7 ; Other relevant variables:
+8 ; IBCNERTN = "IBCNERP7" (current routine name for queueing the
+9 ; COMPILE process)
+10 ; IBCNESPC("BEGDTM") = start date/time for date/time range
+11 ; IBCNESPC("ENDDTM") = end date/time for date/time range
+12 ; IBCNESPC("SECTS") = list of sections to display on the report
+13 ; 1 = All (Outgoing, Incoming and General),
+14 ; 2 = Outgoing - Inquiry Response data,
+15 ; 3 = Incoming - Inquiry Transmission data,
+16 ; 4 = General - Ins Buffer data, Outstanding
+17 ; Inquiries, Communication Failures, Retries
+18 ; may equal a list of values if '1' is not the
+19 ; the only value
+20 ; IBCNESPC("MM") = "", not for MailMan message OR
+21 ; MAILGROUP, generate as MailMan message for this
+22 ; MAILGROUP as defined in IB site
+23 ; parameters
+24 ; IBOUT = "E" for Excel or "R" for report format
+25 ;
+26 ; Only enter routine from EN or MAILMSG tags
+27 QUIT
+28 ;
+29 ; Entry pt
EN ;
+1 ; Init vars
+2 NEW STOP,IBCNERTN,POP,IBCNESPC,IBOUT
+3 ;
+4 SET STOP=0
+5 SET IBCNERTN="IBCNERP7"
+6 WRITE @IOF
+7 WRITE !,"eIV Statistical Report",!
+8 WRITE !,"Please select the timeframe for which to view the Insurance"
+9 WRITE !,"Verification statistics and current status."
+10 ;
+11 ; Default to MailMan flag to No from the EN tag
+12 SET IBCNESPC("MM")=""
+13 ;
+14 ; Prompts for Payer Report
+15 ; Date Range parameters
S10 DO DTMRNG
IF STOP
GOTO EXIT
+1 ; Sort by parameter - Payer or Total Inquiries (Payer Report)
S20 DO SECTS
IF STOP
if $$STOP^IBCNERP1
GOTO EXIT
GOTO S10
+1 ; Select report type 528 - baa
S30 SET IBOUT=$$OUT
IF STOP
if $$STOP^IBCNERP1
GOTO EXIT
GOTO S20
+1 ; Select the output device
S50 ;D DEVICE^IBCNERP1(IBCNERTN,.IBCNESPC,IBOUT) I STOP G:$$STOP^IBCNERP1 EXIT G S20
+1 ;IB*752/DTG - remove step back if upcaret and go to exit
DO DEVICE^IBCNERP1(IBCNERTN,.IBCNESPC,IBOUT)
IF STOP
GOTO EXIT
+2 ;
EXIT ; Quit this routine
+1 QUIT
+2 ;
+3 ;
DTMRNG ; Determine the start and end date/times for the report
+1 ; Init vars
+2 NEW DIR,X,Y,DIRUT
+3 ;
+4 WRITE !
+5 ;
DTMRNG0 ;/ckb - IB*2*687 - Added the DTMRNG0 tag.
+1 SET DIR(0)="DO^::ERX"
+2 SET DIR("A")="Start DATE/TIME"
+3 SET DIR("?",1)=" Enter Start DATE/TIME for report range."
+4 SET DIR("?")=" The time element is required."
+5 DO ^DIR
KILL DIR
+6 IF $DATA(DIRUT)
SET STOP=1
GOTO DTMRNGX
+7 ;/ckb-IB*2*687 - Added the following date validation.
+8 IF Y>$$NOW^XLFDT
Begin DoDot:1
+9 WRITE !!," The Start DATE/TIME entered cannot in the future."
+10 WRITE !," Please reenter."
+11 WRITE !
End DoDot:1
GOTO DTMRNG0
+12 SET IBCNESPC("BEGDTM")=Y
+13 ;
DTMRNG1 SET DIR(0)="D^::ERX"
+1 SET DIR("A")=" End DATE/TIME"
+2 SET DIR("?",1)=" Enter End DATE/TIME for report range."
+3 SET DIR("?")=" The time element is required."
+4 DO ^DIR
KILL DIR
+5 IF $DATA(DIRUT)
SET STOP=1
GOTO DTMRNGX
+6 IF Y<IBCNESPC("BEGDTM")
Begin DoDot:1
+7 WRITE !," The End Date/Time must not precede the Start Date/Time."
+8 WRITE !," Please reenter."
End DoDot:1
GOTO DTMRNG1
+9 ;/ckb-IB*2*687 - Added the following date validation.
+10 IF Y>$$NOW^XLFDT
Begin DoDot:1
+11 WRITE !!," The End DATE/TIME entered cannot in the future."
+12 WRITE !," Please reenter."
+13 WRITE !
End DoDot:1
GOTO DTMRNG1
+14 SET IBCNESPC("ENDDTM")=Y
+15 ;
DTMRNGX ; DTMRNG exit pt
+1 QUIT
+2 ;
+3 ;
SECTS ; Prompt to allow users to include the available sections in the report
+1 ; Init vars
+2 NEW DIR,X,Y,DIRUT
+3 ;
+4 WRITE !
+5 ; IB*2.0*621 - Updated Help Text for Entry 4
+6 SET DIR(0)="L^1:4"
+7 SET DIR("A",1)="Choose all sections to be reviewed"
+8 SET DIR("A",2)="1 - All = All report sections (Default)"
+9 SET DIR("A",3)="2 - Outgoing Data = Inquiry Transmission statistics"
+10 SET DIR("A",4)="3 - Incoming Data = Inquiry Response statistics"
+11 SET DIR("A",5)="4 - Current Status/Payer Activity = Responses Pending, Queued Inquiries,"
+12 SET DIR("A",6)=" Ins Buffer Entries, Payer Activity, etc."
+13 SET DIR("A")="Select one or more sections: "
+14 SET DIR("B")=1
+15 SET DIR("?",1)=" Please select one or more sections of the report to view."
+16 SET DIR("?",2)=" To select multiple sections, enter a comma-separated list"
+17 SET DIR("?",3)=" (ex. 2,4)."
+18 SET DIR("?",4)=" 1 - Include all sections in the report. (Default)"
+19 SET DIR("?",5)=" 2 - Include statistics on inquiries transmitted during the"
+20 SET DIR("?",6)=" timeframe by extract type."
+21 SET DIR("?",7)=" 3 - Include statistics on responses received during the"
+22 SET DIR("?",8)=" timeframe by extract type."
+23 SET DIR("?",9)=" 4 - Include statistics on the Current Status of the system and Payer"
+24 SET DIR("?",10)=" Activity. The totals in the Current Status section--including responses"
+25 ;IB*752/DTG remove reference to deferred inquiries
+26 ;S DIR("?",11)=" pending, queued inquiries, deferred inquiries, insurance companies"
+27 SET DIR("?",11)=" pending, queued inquiries, insurance companies without national ID,"
+28 ;/ckb-IB*2,0*687 - Reworded the text for the line below and adjusted the following lines accordingly.
+29 ;S DIR("?",12)=" without national ID, eIV Payers disabled locally, and insurance buffer"
+30 SET DIR("?",12)=" eIV Payers locally enabled is NO, and insurance buffer entries--are"
+31 SET DIR("?",13)=" independent of the report date range. The totals in the Payer Activity"
+32 SET DIR("?",14)=" section reflect activity during the report date range."
+33 SET DIR("?")=" "
+34 DO ^DIR
KILL DIR
+35 IF $DATA(DIRUT)
SET STOP=1
GOTO SECTSX
+36 ; Default to all if 1 is included OR if 2,3 and 4 are included in any
+37 ; order
+38 SET Y=","_Y
+39 IF Y[(",1,")
SET IBCNESPC("SECTS")=1
GOTO SECTSX
+40 IF Y[(",2,")
IF Y[(",3,")
IF Y[(",4,")
SET IBCNESPC("SECTS")=1
GOTO SECTSX
+41 SET IBCNESPC("SECTS")=Y
+42 ;
SECTSX ; SECTS exit pt
+1 QUIT
+2 ;
+3 ;
MAILMSG ; Tag to be called by TaskMan to generate report with default values
+1 ; and send as MailMan message
+2 ; Init vars
+3 NEW IBCNERTN,IBCNESPC,EDT,BDT,TM,IBOUT
+4 ;
+5 ; -- set the mail message to display in a report format
+6 SET IBOUT="R"
+7 ;
+8 ; Default report parameters
+9 ; Start Date/Time - End Date/Time range
+10 ; Determine start time based on IB site parameter
+11 SET TM=$$GET1^DIQ(350.9,"1,",51.03,"E")
+12 IF TM=""!(+TM=0)
SET TM="2400"
+13 SET EDT=$$DT^XLFDT
+14 SET BDT=$$FMADD^XLFDT(EDT,-1)
+15 SET IBCNESPC("BEGDTM")=+(BDT_"."_TM)
+16 SET IBCNESPC("ENDDTM")=+(EDT_"."_TM)
+17 ; Display all sections
+18 SET IBCNESPC("SECTS")=1
+19 ; Set MailMan flag to IB site parameter MAILGROUP
+20 SET IBCNESPC("MM")=$$MGRP^IBCNEUT5
+21 ; If there is no MailGroup to send message - do not continue
+22 IF IBCNESPC("MM")=""
QUIT
+23 ; If the send MailMan message parameter is turned off, stop the process
+24 IF '$PIECE($GET(^IBE(350.9,1,51)),U,2)
QUIT
+25 ;
+26 ; Set routine parameter
+27 SET IBCNERTN="IBCNERP7"
+28 ;
+29 ; Initialize scratch global
+30 KILL ^TMP($JOB,IBCNERTN)
+31 ; Compile the report data
+32 DO EN^IBCNERP8(IBCNERTN,.IBCNESPC)
+33 ; Print the report - to MailMan
+34 IF '$GET(ZTSTOP)
DO EN^IBCNERP9(IBCNERTN,.IBCNESPC,IBOUT)
+35 ;
+36 ; Kill scratch global
+37 KILL ^TMP($JOB,IBCNERTN)
+38 ;
+39 ; Purge the task record
+40 IF $DATA(ZTQUEUED)
SET ZTREQ="@"
+41 ;
+42 ; MAILMSG exit pt
+43 QUIT
+44 ; 528 - baa : Add option to ouput data in excel format
OUT() ; Prompt to allow users to select output format
+1 NEW DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
+2 WRITE !
+3 SET DIR(0)="SA^E:Excel;R:Report"
+4 SET DIR("A")="(E)xcel Format or (R)eport Format: "
+5 SET DIR("B")="Report"
+6 DO ^DIR
IF $DATA(DIRUT)
SET STOP=1
QUIT ""
+7 QUIT Y
+8 ;