IBJPI ;DAOU/BHS - IBJP eIV SITE PARAMETERS SCREEN ; 01-APR-2015
;;2.0;INTEGRATED BILLING;**184,271,316,416,438,479,506,528,549,601,621,659,668,687,702,732,763,771**;21-MAR-94;Build 26
;;Per VA Directive 6402, this routine should not be modified.
;
;/vd-IB*2*668 - Removed the SSVI logic introduced with IB*2*528 in its entirety within VistA.
;
; eIV - Electronic Insurance Verification Interface parameters
;
EN ; main entry pt for IBJP IIV SITE PARAMS
N CTRLCOL,POP,VALMCNT,VALMHDR,X,%DT
D EN^VALM("IBJP IIV SITE PARAMETERS")
Q
;
HDR ; header
S VALMHDR(1)="Only authorized persons may edit this data."
Q
;
INIT ; init vars & list array
K ^TMP($J,"IBJPI")
; Kills data and video control arrays with active list
D CLEAN^VALM10
D BLD
Q
;
HELP ; help
; IB*2.0*601,IB*2.0*621/DM adjust help text
D FULL^VALM1
W @IOF
;IB*732/CKB - modified the text & added text for the Fix Corrupt Buffers action
W !,"This screen displays all the eIV and IIU Site Parameters used to manage"
W !,"electronic Insurance Verification."
W !!,"The General Parameters section concerns overall parameters for"
W !,"monitoring the interface and controlling eIV and IIU communication"
W !,"between VistA and the EC located in Austin."
W !!,"The Batch Extracts section concerns extract-specific parameters"
W !,"including active/inactive status and selection criteria. Parameters"
W !,"associated with a specific extract may also be detailed here."
W !!,"The Fix Corrupt Buffers action allows a user to list or fix corrupted entries in"
W !,"the INSURANCE VERIFICATION PROCESSOR file (#355.33) aka ""the buffer file""."
D PAUSE^VALM1
W @IOF
S VALMBCK="R"
Q
;
EXIT ; exit
K ^TMP($J,"IBJPI")
D CLEAN^VALM10
Q
;
BLD ; Creates the body of the worklist
; IB*2.0*549 - rewrote this entire method and all methods called from it to
; change to a totally new display of fields
N ELINEL,ELINER,SLINE,STARTR
S VALMCNT=0,SLINE=1
D BLDGENE(SLINE,.ELINEL) ; Build Editable General Parameters
D BLDGENNL(ELINEL,.STARTR,.ELINEL) ; Build Non-Editable Gen Param left
D BLDGENNR(STARTR,.ELINER) ; Build Non-Editable Gen Param Right
S SLINE=$S(ELINEL>ELINER:ELINEL,1:ELINER)
D BLDGENNB(SLINE,.ELINEL) ; Build Non-Editable Bottom Params
D BLDBE(ELINEL,.ELINEL) ; Build Batch Extract Gen Parameters
D BLDGENNS(.ELINEL) ; Build Non-Editable IIU Parameters - vd/IB*2*687
S VALMCNT=ELINEL-1
Q
;
BLDGENE(SLINE,ELINE) ; Build the General Editable Parameters Section
; Input: SLINE - Starting Section Line Number
; ELINE - Current Ending Section Line Number
; Output: ELINE - Updated Ending Section Line Number
;
;IB*771/TAZ - Completely restructured the section
N STRTLN,XX ;/vd-IB*2*687 - added the STRTLN variable
S ELINE=$$SETN("General Parameters (editable)",SLINE,1,1)
S ELINE=$$SET(" Misc. Settings","",ELINE,1)
S ELINE=$$SET(" Insurance Import Enabled: ",$$GET1^DIQ(350.9,"1,",54.01),ELINE,1)
S ELINE=$$SET(" HMS Directory: ",$$GET1^DIQ(350.9,"1,",13.01),ELINE,1)
;IB*763/CKB - Added display for INSURANCE IMPORT SWITCH
;S STRTLN=ELINE
S ELINE=$$SET(" EII Active: ",$$GET1^DIQ(350.9,"1,",13.02),ELINE,1)
;S ELINE=STRTLN
S ELINE=$$SET("",$J("",40),ELINE,1) ; Spacing Blank Line
S ELINE=$$SET(" IIU Settings ","",ELINE,1)
;/vd-IB*2*687 - Added the following 3 lines.
;S STRTLN=ELINE
S ELINE=$$SET(" IIU Enabled: ",$$GET1^DIQ(350.9,"1,",53.02),ELINE,1)
S ELINE=$$SET("",$J("",40),ELINE,1) ; Spacing Blank Line
S ELINE=$$SET(" eIV Settings ","",ELINE,1)
S ELINE=$$SET(" Medicare Payer: ",$$GET1^DIQ(350.9,"1,",51.25),ELINE,1)
;IB*702/TAZ - Added display for EIV NO GRP NUM A/U
;S ELINE=STRTLN
S ELINE=$$SET(" eIV No Group # Auto-Update: ",$$GET1^DIQ(350.9,"1,",51.34),ELINE,1)
S ELINE=$$SET(" Daily Buffer Rpt Mail Group: ",$$GET1^DIQ(350.9,"1,",54.02),ELINE,1)
;
;The next line adds blank lines to force the non-editable to a new page
;If any lines are added above this line will need to be adjusted.
F XX=1:1:3 S ELINE=$$SET("",$J("",40),ELINE,1) ; Spacing Blank Line
;
Q
;
BLDGENNL(SLINE,STARTR,ELINE) ; Build the Left portion of the General
; Non-Editable Parameters Section
; Input: SLINE - Starting Section Line Number
; ELINE - Current Ending Section Line Number
; Output: STARTR - Line to start displaying General Non-Editable Right
; Section
; ELINE - Updated Ending Section Line Number
;
N XX
S ELINE=$$SET("",$J("",40),SLINE,1) ; Spacing Blank Line
S ELINE=$$SETN("eIV Parameters (non-editable)",ELINE,1,1) ;/vd-IB*2*687 - changed the text for this line.
S STARTR=ELINE ; Start of Right Section
S ELINE=$$SET(" Freshness Days: ",$$GET1^DIQ(350.9,"1,",51.01),ELINE,1)
S ELINE=$$SET(" Timeout Days: ",$$GET1^DIQ(350.9,"1,",51.05),ELINE,1)
S ELINE=$$SET(" Timeout Mailman Msg: ",$$GET1^DIQ(350.9,"1,",51.07),ELINE,1)
S ELINE=$$SET(" Default STC: ",$$GET1^DIQ(350.9,"1,",60.01),ELINE,1)
S ELINE=$$SET(" Master Switch Realtime: ",$$GET1^DIQ(350.9,"1,",51.27),ELINE,1)
S ELINE=$$SET(" CMS MBI Payer: ",$$GET1^DIQ(350.9,"1,","MBI PAYER"),ELINE,1) ; IB*2.0*601/DM
S ELINE=$$SET(" EICD Payer: ",$$GET1^DIQ(350.9,"1,","EICD PAYER"),ELINE,1) ; IB*2.0*621/DM
Q
;
BLDGENNR(SLINE,ELINE) ; Build the Right portion of the General
; Non-Editable Parameters Section
; Input: SLINE - Starting Section Line Number
; ELINE - Current Ending Section Line Number
; Output: ELINE - Updated Ending Section Line Number
;
S ELINE=SLINE
;/vd-IB*2*659 - Moved the HL7 Max # to the bottom of the 2nd column and
; inserted the Medicare Freshness Days to the top of the 2nd column.
S ELINE=$$SET("Medicare Freshness Days: ",$$GET1^DIQ(350.9,"1,",51.32),ELINE,39)
S ELINE=$$SET(" Retry Flag: ",$$GET1^DIQ(350.9,"1,",51.26),ELINE,41)
S ELINE=$$SET(" Number of Retries: ",$$GET1^DIQ(350.9,"1,",51.06),ELINE,41)
S ELINE=$$SET(" Mail Group: ",$$MGRP^IBCNEUT5,ELINE,41)
S ELINE=$$SET("Master Switch Nightly: ",$$GET1^DIQ(350.9,"1,",51.28),ELINE,41)
S ELINE=$$SET(" HL7 Max #: ",$$GET1^DIQ(350.9,"1,",51.15),ELINE,41)
Q
;
BLDGENNB(SLINE,ELINE) ; Build the General Non-Editable Bottom Parameters Section
; Input: SLINE - Starting Section Line Number
; ELINE - Current Ending Section Line Number
; Output: ELINE - Updated Ending Section Line Number
;
N XX
S ELINE=$$SET("",$J("",40),SLINE,1) ; Spacing Blank Line
S XX=$$GET1^DIQ(350.9,"1,",51.2)
S:XX="" XX="NO"
S ELINE=$$SET("Send MailMan Message if Communication Problem: ",XX,ELINE,1)
S XX=$$GET1^DIQ(350.9,"1,",51.02)
S:XX="" XX="NO"
S XX=$$GET1^DIQ(350.9,"1,",51.02)_" at "_$$GET1^DIQ(350.9,"1,",51.03)
S ELINE=$$SET(" Receive MailMan Message, Daily Statistical: ",XX,ELINE,1)
Q
;
BLDBE(SLINE,ELINE) ; Build the Batch Extract Parameters Section
; Input: SLINE - Starting Section Line Number
; ELINE - Current Ending Section Line Number
; Output: ELINE - Updated Ending Section Line Number
;
;IB*771/TAZ - Added blank lines to start section on a new page
N IBEX,IBEX1,IBEIVB,IBST,IEN,XX
F XX=1:1:6 S ELINE=$$SET("",$J("",40),ELINE,1) ; Spacing Blank Line
S ELINE=$$SETN("Batch Extracts",ELINE,1,1)
;/vd-IB*2*687 - Commented the following section of code and re-wrote it to make it cleaner.
; Also renamed variable IBIIVB to IBEIVB to better reflect the application name
;S ELINE=$$SET(" Extract Selection Maximum # to","",ELINE,1)
;S ELINE=$$SETN("Name On/Off Criteria Extract/Day",ELINE,1,"",1)
;
; Loop thru extracts
;S IEN=0
;F D Q:'IEN
;. S IEN=$O(^IBE(350.9,1,51.17,IEN))
;. Q:'IEN
;. S IBIIVB=$G(^IBE(350.9,1,51.17,IEN,0)) ; Batch Extract multiple line
;. S IBEX=+$P(IBIIVB,"^",1) ; Type
;. Q:'$F(".1.2.","."_IBEX_".")
;. S IBST=$$FO^IBCNEUT1($S($P(IBIIVB,"^",1)'="":$$GET1^DIQ(350.9002,IEN_",1,",.01,"E"),1:""),14)
;. S IBST=IBST_$$FO^IBCNEUT1($S(+$P(IBIIVB,"^",2):"ON",1:"OFF"),9)
;. S IBEX1=$S(+$P(IBIIVB,U,3)'=0:+$P(IBIIVB,"^",3),1:$P(IBIIVB,"^",3))
;. S IBEX2=$S(+$P(IBIIVB,U,4)'=0:+$P(IBIIVB,"^",4),1:$P(IBIIVB,"^",4))
;. S IBST=IBST_$$FO^IBCNEUT1($S(IBEX=1:"n/a",IBEX=2:IBEX1,IBEX=3:IBEX1_"/"_IBEX2,1:"ERROR"),13)
;. S IBST=IBST_$$FO^IBCNEUT1($S(+$P(IBIIVB,"^",5):+$P(IBIIVB,"^",5),1:$P(IBIIVB,"^",5)),14)
;. S ELINE=$$SET(IBST,"",ELINE,1)
;; IB*2.0*621/DM display EICD extract (#4), eventually, other extracts will migrate to this structure
;S ELINE=$$SET("",$J("",40),ELINE,1) ; Spacing Blank Line
;S ELINE=$$SET("",$J("",40),ELINE,1) ; Spacing Blank Line
;S ELINE=$$SET(" Extract Start Days Days After Maximum # to","",ELINE,1)
;S ELINE=$$SETN("Name On/Off From Today Start Freq. Extract/Day",ELINE,1,"",1)
;I $$GET1^DIQ(350.9002,"4,1,",.01)="EICD" D
;. S IBEX=$$SETTINGS^IBCNEDE7(4) ; collect EICD parameters
;. S IBST=$$FO^IBCNEUT1("EICD",14)
;. S IBST=IBST_$$FO^IBCNEUT1($S(+IBEX:"ON",1:"OFF"),9)
;. S IBST=IBST_$$FO^IBCNEUT1(+$P(IBEX,"^",6),13) ; Start Days
;. S IBST=IBST_$$FO^IBCNEUT1(+$P(IBEX,"^",7),13) ; Days After
;. S IBST=IBST_$$FO^IBCNEUT1(+$P(IBEX,"^",8),8) ; Frequency
;. S IBST=IBST_$$FO^IBCNEUT1(+$P(IBEX,"^",4),8) ; Max extract
;. S ELINE=$$SET(IBST,"",ELINE,1)
;
;/vd-IB*2*687 - Beginning of new/restructured code.
N APPTBE,BENAME,FRESHDAY
S FRESHDAY=$$GET1^DIQ(350.9,"1,",51.01) ; FRESHNESS DAYS - used by Buffer/Appt as "Frequency"
S ELINE=$$SET(" Extract Start Days Days After Maximum # to","",ELINE,1)
S ELINE=$$SETN("Name On/Off From Today Start Freq. Extract/Day",ELINE,1,"",1)
;
; Loop thru Batch Extracts.
S IEN=0
F S IEN=$O(^IBE(350.9,1,51.17,IEN)) Q:'IEN D
. S IBEX=+$P($G(^IBE(350.9,1,51.17,IEN,0)),U) ; Type
. I "^1^2^4^"'[(U_IBEX_U) Q ; Only want Buffer, Appt and EICD Batch Extracts.
. S IBEIVB=$$SETTINGS^IBCNEDE7(IBEX) ; collect specific extract's site parameter settings
. S BENAME=$S($P(IBEIVB,U,1)'="":$$GET1^DIQ(350.9002,IEN_",1,",.01,"E"),1:"")
. I BENAME="Appt" S APPTBE=1,BENAME=BENAME_" *" ; If this is the APPT extract, need to add footnote.
. S IBST=$$FO^IBCNEUT1(BENAME,14) ; Extract Name
. S IBST=IBST_$$FO^IBCNEUT1($S(+$P(IBEIVB,"^",1):"ON",1:"OFF"),9)
. S IBEX1=$P(IBEIVB,U,6)
. S IBST=IBST_$$FO^IBCNEUT1($S("^1^2^"[(U_IBEX_U):"Today",IBEX=4:IBEX1,1:"n/a"),13) ; Start Days
. S IBST=IBST_$$FO^IBCNEUT1($S(IBEX=1:"Today",IBEX=2:$$GET1^DIQ(350.9002,IEN_",1,",.03),IBEX=4:+$P(IBEIVB,U,7),1:"n/a"),13) ; Days After Start
. S IBST=IBST_$$FO^IBCNEUT1($S(IBEX=4:+$P(IBEIVB,U,8),1:FRESHDAY),8) ; Frequency
. S IBST=IBST_$$FO^IBCNEUT1(+$P(IBEIVB,U,4),8) ; Max extract
. S ELINE=$$SET(IBST,"",ELINE,1)
;/vd-IB*2*687 - End of new/restructured code.
;
I +APPTBE D ;/vd-IB*2*687 - Added to indicate "APPT" Buffer Entry.
. S ELINE=$$SET("","",ELINE,1) ; Spacing Blank Line
. S ELINE=$$SET(" * Appt extract - Medicare frequency is "_$$GET1^DIQ(350.9,"1,",51.32)_" days","",ELINE,1)
Q
;
;/vd - IB*2.0*687 - The BLDGENNS module was added for the IIU Parameters.
BLDGENNS(ELINE) ; Build the IIU Parameters Non-editable Section
; Input: SLINE - Starting Section Line Number
; ELINE - Current Ending Section Line Number
; Output: ELINE - Updated Ending Section Line Number
;
N STRTLN,XX
S ELINE=$$SET("",$J("",40),ELINE,1) ; Spacing Blank Line
S ELINE=$$SETN("IIU Parameters (non-editable)",ELINE,1,1)
S STRTLN=ELINE
S ELINE=$$SET(" Max Days of Recent Visit: ",$$GET1^DIQ(350.9,"1,",53.03),ELINE,1)
S ELINE=$$SET("Min Days Before Sharing Again: ",$$GET1^DIQ(350.9,"1,",53.04),ELINE,1)
S ELINE=$$SET(" IIU Master Switch: ",$$GET1^DIQ(350.9,"1,",53.01),ELINE,1)
S ELINE=STRTLN
S ELINE=$$SET(" Purging Sent Records: ",$$GET1^DIQ(350.9,"1,",53.05),ELINE,41)
S ELINE=$$SET(" Purging Received Records: ",$$GET1^DIQ(350.9,"1,",53.07),ELINE,41)
S ELINE=$$SET(" Purging Candidate Records: ",$$GET1^DIQ(350.9,"1,",53.06),ELINE,41)
Q
;
SET(LABEL,DATA,LINE,COL) ; Sets text into the body of the worklist
; Input: LABEL - Label text to set into the line
; DATA - Field Data to set into the line
; LINE - Line to set LABEL and DATA into
; COL - Starting column position in LINE to insert
; LABEL_DATA text
; Returns: LINE - Updated Line by 1
;
N IBY
S IBY=LABEL_DATA
D SET1(IBY,LINE,COL,$L(IBY))
S LINE=LINE+1
Q LINE
;
SETN(TITLE,LINE,COL,RV,ULINE) ; Sets a field Section title into the body of the worklist
; Input: TITLE - Text to be used for the field Section Title
; LINE - Line number in the body to insert the field section title
; COL - Starting Column position to set Section Title into
; RV - 1 - Set Reverse Video, 0 or null don't use Reverse Video
; Optional, defaults to ""
; ULINE - 1 - Set Underline, 0 or null don't use underline
; Optional, defaults to ""
; Returns: LINE - Line number increased by 1
;
N IBY
S IBY=" "_TITLE_" "
D SET1(IBY,LINE,COL,$L(IBY),$G(RV),$G(ULINE))
S LINE=LINE+1
Q LINE
;
SET1(TEXT,LINE,COL,WIDTH,RV,ULINE) ; Sets the TMP array with body data
; Input: TEXT - Text to be set into the specified line
; LINE - Line to set TEXT into
; COL - Column of LINE to set TEXT into
; WIDTH - Width of the TEXT being set into line
; RV - 1 - Set Reverse Video, 0 or null don't use
; Reverse Video
; Optional, defaults to ""
; ULINE - 1 - Set Underline, 0 or null don't use
; Underline
; Optional, defaults to ""
; ^TMP($J,"IBJPI") - Current ^TMP array
; Output: ^TMP($J,"IBJPI") - Updated ^TMP array
;
N IBX
S IBX=$G(^TMP($J,"IBJPI",LINE,0))
S IBX=$$SETSTR^VALM1(TEXT,IBX,COL,WIDTH)
D SET^VALM10(LINE,IBX)
D:$G(RV)'="" CNTRL^VALM10(LINE,COL,WIDTH,IORVON,IORVOFF)
D:$G(ULINE)'="" CNTRL^VALM10(LINE,COL,WIDTH,IOUON,IOUOFF)
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBJPI 14872 printed Oct 16, 2024@18:24:10 Page 2
IBJPI ;DAOU/BHS - IBJP eIV SITE PARAMETERS SCREEN ; 01-APR-2015
+1 ;;2.0;INTEGRATED BILLING;**184,271,316,416,438,479,506,528,549,601,621,659,668,687,702,732,763,771**;21-MAR-94;Build 26
+2 ;;Per VA Directive 6402, this routine should not be modified.
+3 ;
+4 ;/vd-IB*2*668 - Removed the SSVI logic introduced with IB*2*528 in its entirety within VistA.
+5 ;
+6 ; eIV - Electronic Insurance Verification Interface parameters
+7 ;
EN ; main entry pt for IBJP IIV SITE PARAMS
+1 NEW CTRLCOL,POP,VALMCNT,VALMHDR,X,%DT
+2 DO EN^VALM("IBJP IIV SITE PARAMETERS")
+3 QUIT
+4 ;
HDR ; header
+1 SET VALMHDR(1)="Only authorized persons may edit this data."
+2 QUIT
+3 ;
INIT ; init vars & list array
+1 KILL ^TMP($JOB,"IBJPI")
+2 ; Kills data and video control arrays with active list
+3 DO CLEAN^VALM10
+4 DO BLD
+5 QUIT
+6 ;
HELP ; help
+1 ; IB*2.0*601,IB*2.0*621/DM adjust help text
+2 DO FULL^VALM1
+3 WRITE @IOF
+4 ;IB*732/CKB - modified the text & added text for the Fix Corrupt Buffers action
+5 WRITE !,"This screen displays all the eIV and IIU Site Parameters used to manage"
+6 WRITE !,"electronic Insurance Verification."
+7 WRITE !!,"The General Parameters section concerns overall parameters for"
+8 WRITE !,"monitoring the interface and controlling eIV and IIU communication"
+9 WRITE !,"between VistA and the EC located in Austin."
+10 WRITE !!,"The Batch Extracts section concerns extract-specific parameters"
+11 WRITE !,"including active/inactive status and selection criteria. Parameters"
+12 WRITE !,"associated with a specific extract may also be detailed here."
+13 WRITE !!,"The Fix Corrupt Buffers action allows a user to list or fix corrupted entries in"
+14 WRITE !,"the INSURANCE VERIFICATION PROCESSOR file (#355.33) aka ""the buffer file""."
+15 DO PAUSE^VALM1
+16 WRITE @IOF
+17 SET VALMBCK="R"
+18 QUIT
+19 ;
EXIT ; exit
+1 KILL ^TMP($JOB,"IBJPI")
+2 DO CLEAN^VALM10
+3 QUIT
+4 ;
BLD ; Creates the body of the worklist
+1 ; IB*2.0*549 - rewrote this entire method and all methods called from it to
+2 ; change to a totally new display of fields
+3 NEW ELINEL,ELINER,SLINE,STARTR
+4 SET VALMCNT=0
SET SLINE=1
+5 ; Build Editable General Parameters
DO BLDGENE(SLINE,.ELINEL)
+6 ; Build Non-Editable Gen Param left
DO BLDGENNL(ELINEL,.STARTR,.ELINEL)
+7 ; Build Non-Editable Gen Param Right
DO BLDGENNR(STARTR,.ELINER)
+8 SET SLINE=$SELECT(ELINEL>ELINER:ELINEL,1:ELINER)
+9 ; Build Non-Editable Bottom Params
DO BLDGENNB(SLINE,.ELINEL)
+10 ; Build Batch Extract Gen Parameters
DO BLDBE(ELINEL,.ELINEL)
+11 ; Build Non-Editable IIU Parameters - vd/IB*2*687
DO BLDGENNS(.ELINEL)
+12 SET VALMCNT=ELINEL-1
+13 QUIT
+14 ;
BLDGENE(SLINE,ELINE) ; Build the General Editable Parameters Section
+1 ; Input: SLINE - Starting Section Line Number
+2 ; ELINE - Current Ending Section Line Number
+3 ; Output: ELINE - Updated Ending Section Line Number
+4 ;
+5 ;IB*771/TAZ - Completely restructured the section
+6 ;/vd-IB*2*687 - added the STRTLN variable
NEW STRTLN,XX
+7 SET ELINE=$$SETN("General Parameters (editable)",SLINE,1,1)
+8 SET ELINE=$$SET(" Misc. Settings","",ELINE,1)
+9 SET ELINE=$$SET(" Insurance Import Enabled: ",$$GET1^DIQ(350.9,"1,",54.01),ELINE,1)
+10 SET ELINE=$$SET(" HMS Directory: ",$$GET1^DIQ(350.9,"1,",13.01),ELINE,1)
+11 ;IB*763/CKB - Added display for INSURANCE IMPORT SWITCH
+12 ;S STRTLN=ELINE
+13 SET ELINE=$$SET(" EII Active: ",$$GET1^DIQ(350.9,"1,",13.02),ELINE,1)
+14 ;S ELINE=STRTLN
+15 ; Spacing Blank Line
SET ELINE=$$SET("",$JUSTIFY("",40),ELINE,1)
+16 SET ELINE=$$SET(" IIU Settings ","",ELINE,1)
+17 ;/vd-IB*2*687 - Added the following 3 lines.
+18 ;S STRTLN=ELINE
+19 SET ELINE=$$SET(" IIU Enabled: ",$$GET1^DIQ(350.9,"1,",53.02),ELINE,1)
+20 ; Spacing Blank Line
SET ELINE=$$SET("",$JUSTIFY("",40),ELINE,1)
+21 SET ELINE=$$SET(" eIV Settings ","",ELINE,1)
+22 SET ELINE=$$SET(" Medicare Payer: ",$$GET1^DIQ(350.9,"1,",51.25),ELINE,1)
+23 ;IB*702/TAZ - Added display for EIV NO GRP NUM A/U
+24 ;S ELINE=STRTLN
+25 SET ELINE=$$SET(" eIV No Group # Auto-Update: ",$$GET1^DIQ(350.9,"1,",51.34),ELINE,1)
+26 SET ELINE=$$SET(" Daily Buffer Rpt Mail Group: ",$$GET1^DIQ(350.9,"1,",54.02),ELINE,1)
+27 ;
+28 ;The next line adds blank lines to force the non-editable to a new page
+29 ;If any lines are added above this line will need to be adjusted.
+30 ; Spacing Blank Line
FOR XX=1:1:3
SET ELINE=$$SET("",$JUSTIFY("",40),ELINE,1)
+31 ;
+32 QUIT
+33 ;
BLDGENNL(SLINE,STARTR,ELINE) ; Build the Left portion of the General
+1 ; Non-Editable Parameters Section
+2 ; Input: SLINE - Starting Section Line Number
+3 ; ELINE - Current Ending Section Line Number
+4 ; Output: STARTR - Line to start displaying General Non-Editable Right
+5 ; Section
+6 ; ELINE - Updated Ending Section Line Number
+7 ;
+8 NEW XX
+9 ; Spacing Blank Line
SET ELINE=$$SET("",$JUSTIFY("",40),SLINE,1)
+10 ;/vd-IB*2*687 - changed the text for this line.
SET ELINE=$$SETN("eIV Parameters (non-editable)",ELINE,1,1)
+11 ; Start of Right Section
SET STARTR=ELINE
+12 SET ELINE=$$SET(" Freshness Days: ",$$GET1^DIQ(350.9,"1,",51.01),ELINE,1)
+13 SET ELINE=$$SET(" Timeout Days: ",$$GET1^DIQ(350.9,"1,",51.05),ELINE,1)
+14 SET ELINE=$$SET(" Timeout Mailman Msg: ",$$GET1^DIQ(350.9,"1,",51.07),ELINE,1)
+15 SET ELINE=$$SET(" Default STC: ",$$GET1^DIQ(350.9,"1,",60.01),ELINE,1)
+16 SET ELINE=$$SET(" Master Switch Realtime: ",$$GET1^DIQ(350.9,"1,",51.27),ELINE,1)
+17 ; IB*2.0*601/DM
SET ELINE=$$SET(" CMS MBI Payer: ",$$GET1^DIQ(350.9,"1,","MBI PAYER"),ELINE,1)
+18 ; IB*2.0*621/DM
SET ELINE=$$SET(" EICD Payer: ",$$GET1^DIQ(350.9,"1,","EICD PAYER"),ELINE,1)
+19 QUIT
+20 ;
BLDGENNR(SLINE,ELINE) ; Build the Right portion of the General
+1 ; Non-Editable Parameters Section
+2 ; Input: SLINE - Starting Section Line Number
+3 ; ELINE - Current Ending Section Line Number
+4 ; Output: ELINE - Updated Ending Section Line Number
+5 ;
+6 SET ELINE=SLINE
+7 ;/vd-IB*2*659 - Moved the HL7 Max # to the bottom of the 2nd column and
+8 ; inserted the Medicare Freshness Days to the top of the 2nd column.
+9 SET ELINE=$$SET("Medicare Freshness Days: ",$$GET1^DIQ(350.9,"1,",51.32),ELINE,39)
+10 SET ELINE=$$SET(" Retry Flag: ",$$GET1^DIQ(350.9,"1,",51.26),ELINE,41)
+11 SET ELINE=$$SET(" Number of Retries: ",$$GET1^DIQ(350.9,"1,",51.06),ELINE,41)
+12 SET ELINE=$$SET(" Mail Group: ",$$MGRP^IBCNEUT5,ELINE,41)
+13 SET ELINE=$$SET("Master Switch Nightly: ",$$GET1^DIQ(350.9,"1,",51.28),ELINE,41)
+14 SET ELINE=$$SET(" HL7 Max #: ",$$GET1^DIQ(350.9,"1,",51.15),ELINE,41)
+15 QUIT
+16 ;
BLDGENNB(SLINE,ELINE) ; Build the General Non-Editable Bottom Parameters Section
+1 ; Input: SLINE - Starting Section Line Number
+2 ; ELINE - Current Ending Section Line Number
+3 ; Output: ELINE - Updated Ending Section Line Number
+4 ;
+5 NEW XX
+6 ; Spacing Blank Line
SET ELINE=$$SET("",$JUSTIFY("",40),SLINE,1)
+7 SET XX=$$GET1^DIQ(350.9,"1,",51.2)
+8 if XX=""
SET XX="NO"
+9 SET ELINE=$$SET("Send MailMan Message if Communication Problem: ",XX,ELINE,1)
+10 SET XX=$$GET1^DIQ(350.9,"1,",51.02)
+11 if XX=""
SET XX="NO"
+12 SET XX=$$GET1^DIQ(350.9,"1,",51.02)_" at "_$$GET1^DIQ(350.9,"1,",51.03)
+13 SET ELINE=$$SET(" Receive MailMan Message, Daily Statistical: ",XX,ELINE,1)
+14 QUIT
+15 ;
BLDBE(SLINE,ELINE) ; Build the Batch Extract Parameters Section
+1 ; Input: SLINE - Starting Section Line Number
+2 ; ELINE - Current Ending Section Line Number
+3 ; Output: ELINE - Updated Ending Section Line Number
+4 ;
+5 ;IB*771/TAZ - Added blank lines to start section on a new page
+6 NEW IBEX,IBEX1,IBEIVB,IBST,IEN,XX
+7 ; Spacing Blank Line
FOR XX=1:1:6
SET ELINE=$$SET("",$JUSTIFY("",40),ELINE,1)
+8 SET ELINE=$$SETN("Batch Extracts",ELINE,1,1)
+9 ;/vd-IB*2*687 - Commented the following section of code and re-wrote it to make it cleaner.
+10 ; Also renamed variable IBIIVB to IBEIVB to better reflect the application name
+11 ;S ELINE=$$SET(" Extract Selection Maximum # to","",ELINE,1)
+12 ;S ELINE=$$SETN("Name On/Off Criteria Extract/Day",ELINE,1,"",1)
+13 ;
+14 ; Loop thru extracts
+15 ;S IEN=0
+16 ;F D Q:'IEN
+17 ;. S IEN=$O(^IBE(350.9,1,51.17,IEN))
+18 ;. Q:'IEN
+19 ;. S IBIIVB=$G(^IBE(350.9,1,51.17,IEN,0)) ; Batch Extract multiple line
+20 ;. S IBEX=+$P(IBIIVB,"^",1) ; Type
+21 ;. Q:'$F(".1.2.","."_IBEX_".")
+22 ;. S IBST=$$FO^IBCNEUT1($S($P(IBIIVB,"^",1)'="":$$GET1^DIQ(350.9002,IEN_",1,",.01,"E"),1:""),14)
+23 ;. S IBST=IBST_$$FO^IBCNEUT1($S(+$P(IBIIVB,"^",2):"ON",1:"OFF"),9)
+24 ;. S IBEX1=$S(+$P(IBIIVB,U,3)'=0:+$P(IBIIVB,"^",3),1:$P(IBIIVB,"^",3))
+25 ;. S IBEX2=$S(+$P(IBIIVB,U,4)'=0:+$P(IBIIVB,"^",4),1:$P(IBIIVB,"^",4))
+26 ;. S IBST=IBST_$$FO^IBCNEUT1($S(IBEX=1:"n/a",IBEX=2:IBEX1,IBEX=3:IBEX1_"/"_IBEX2,1:"ERROR"),13)
+27 ;. S IBST=IBST_$$FO^IBCNEUT1($S(+$P(IBIIVB,"^",5):+$P(IBIIVB,"^",5),1:$P(IBIIVB,"^",5)),14)
+28 ;. S ELINE=$$SET(IBST,"",ELINE,1)
+29 ;; IB*2.0*621/DM display EICD extract (#4), eventually, other extracts will migrate to this structure
+30 ;S ELINE=$$SET("",$J("",40),ELINE,1) ; Spacing Blank Line
+31 ;S ELINE=$$SET("",$J("",40),ELINE,1) ; Spacing Blank Line
+32 ;S ELINE=$$SET(" Extract Start Days Days After Maximum # to","",ELINE,1)
+33 ;S ELINE=$$SETN("Name On/Off From Today Start Freq. Extract/Day",ELINE,1,"",1)
+34 ;I $$GET1^DIQ(350.9002,"4,1,",.01)="EICD" D
+35 ;. S IBEX=$$SETTINGS^IBCNEDE7(4) ; collect EICD parameters
+36 ;. S IBST=$$FO^IBCNEUT1("EICD",14)
+37 ;. S IBST=IBST_$$FO^IBCNEUT1($S(+IBEX:"ON",1:"OFF"),9)
+38 ;. S IBST=IBST_$$FO^IBCNEUT1(+$P(IBEX,"^",6),13) ; Start Days
+39 ;. S IBST=IBST_$$FO^IBCNEUT1(+$P(IBEX,"^",7),13) ; Days After
+40 ;. S IBST=IBST_$$FO^IBCNEUT1(+$P(IBEX,"^",8),8) ; Frequency
+41 ;. S IBST=IBST_$$FO^IBCNEUT1(+$P(IBEX,"^",4),8) ; Max extract
+42 ;. S ELINE=$$SET(IBST,"",ELINE,1)
+43 ;
+44 ;/vd-IB*2*687 - Beginning of new/restructured code.
+45 NEW APPTBE,BENAME,FRESHDAY
+46 ; FRESHNESS DAYS - used by Buffer/Appt as "Frequency"
SET FRESHDAY=$$GET1^DIQ(350.9,"1,",51.01)
+47 SET ELINE=$$SET(" Extract Start Days Days After Maximum # to","",ELINE,1)
+48 SET ELINE=$$SETN("Name On/Off From Today Start Freq. Extract/Day",ELINE,1,"",1)
+49 ;
+50 ; Loop thru Batch Extracts.
+51 SET IEN=0
+52 FOR
SET IEN=$ORDER(^IBE(350.9,1,51.17,IEN))
if 'IEN
QUIT
Begin DoDot:1
+53 ; Type
SET IBEX=+$PIECE($GET(^IBE(350.9,1,51.17,IEN,0)),U)
+54 ; Only want Buffer, Appt and EICD Batch Extracts.
IF "^1^2^4^"'[(U_IBEX_U)
QUIT
+55 ; collect specific extract's site parameter settings
SET IBEIVB=$$SETTINGS^IBCNEDE7(IBEX)
+56 SET BENAME=$SELECT($PIECE(IBEIVB,U,1)'="":$$GET1^DIQ(350.9002,IEN_",1,",.01,"E"),1:"")
+57 ; If this is the APPT extract, need to add footnote.
IF BENAME="Appt"
SET APPTBE=1
SET BENAME=BENAME_" *"
+58 ; Extract Name
SET IBST=$$FO^IBCNEUT1(BENAME,14)
+59 SET IBST=IBST_$$FO^IBCNEUT1($SELECT(+$PIECE(IBEIVB,"^",1):"ON",1:"OFF"),9)
+60 SET IBEX1=$PIECE(IBEIVB,U,6)
+61 ; Start Days
SET IBST=IBST_$$FO^IBCNEUT1($SELECT("^1^2^"[(U_IBEX_U):"Today",IBEX=4:IBEX1,1:"n/a"),13)
+62 ; Days After Start
SET IBST=IBST_$$FO^IBCNEUT1($SELECT(IBEX=1:"Today",IBEX=2:$$GET1^DIQ(350.9002,IEN_",1,",.03),IBEX=4:+$PIECE(IBEIVB,U,7),1:"n/a"),13)
+63 ; Frequency
SET IBST=IBST_$$FO^IBCNEUT1($SELECT(IBEX=4:+$PIECE(IBEIVB,U,8),1:FRESHDAY),8)
+64 ; Max extract
SET IBST=IBST_$$FO^IBCNEUT1(+$PIECE(IBEIVB,U,4),8)
+65 SET ELINE=$$SET(IBST,"",ELINE,1)
End DoDot:1
+66 ;/vd-IB*2*687 - End of new/restructured code.
+67 ;
+68 ;/vd-IB*2*687 - Added to indicate "APPT" Buffer Entry.
IF +APPTBE
Begin DoDot:1
+69 ; Spacing Blank Line
SET ELINE=$$SET("","",ELINE,1)
+70 SET ELINE=$$SET(" * Appt extract - Medicare frequency is "_$$GET1^DIQ(350.9,"1,",51.32)_" days","",ELINE,1)
End DoDot:1
+71 QUIT
+72 ;
+73 ;/vd - IB*2.0*687 - The BLDGENNS module was added for the IIU Parameters.
BLDGENNS(ELINE) ; Build the IIU Parameters Non-editable Section
+1 ; Input: SLINE - Starting Section Line Number
+2 ; ELINE - Current Ending Section Line Number
+3 ; Output: ELINE - Updated Ending Section Line Number
+4 ;
+5 NEW STRTLN,XX
+6 ; Spacing Blank Line
SET ELINE=$$SET("",$JUSTIFY("",40),ELINE,1)
+7 SET ELINE=$$SETN("IIU Parameters (non-editable)",ELINE,1,1)
+8 SET STRTLN=ELINE
+9 SET ELINE=$$SET(" Max Days of Recent Visit: ",$$GET1^DIQ(350.9,"1,",53.03),ELINE,1)
+10 SET ELINE=$$SET("Min Days Before Sharing Again: ",$$GET1^DIQ(350.9,"1,",53.04),ELINE,1)
+11 SET ELINE=$$SET(" IIU Master Switch: ",$$GET1^DIQ(350.9,"1,",53.01),ELINE,1)
+12 SET ELINE=STRTLN
+13 SET ELINE=$$SET(" Purging Sent Records: ",$$GET1^DIQ(350.9,"1,",53.05),ELINE,41)
+14 SET ELINE=$$SET(" Purging Received Records: ",$$GET1^DIQ(350.9,"1,",53.07),ELINE,41)
+15 SET ELINE=$$SET(" Purging Candidate Records: ",$$GET1^DIQ(350.9,"1,",53.06),ELINE,41)
+16 QUIT
+17 ;
SET(LABEL,DATA,LINE,COL) ; Sets text into the body of the worklist
+1 ; Input: LABEL - Label text to set into the line
+2 ; DATA - Field Data to set into the line
+3 ; LINE - Line to set LABEL and DATA into
+4 ; COL - Starting column position in LINE to insert
+5 ; LABEL_DATA text
+6 ; Returns: LINE - Updated Line by 1
+7 ;
+8 NEW IBY
+9 SET IBY=LABEL_DATA
+10 DO SET1(IBY,LINE,COL,$LENGTH(IBY))
+11 SET LINE=LINE+1
+12 QUIT LINE
+13 ;
SETN(TITLE,LINE,COL,RV,ULINE) ; Sets a field Section title into the body of the worklist
+1 ; Input: TITLE - Text to be used for the field Section Title
+2 ; LINE - Line number in the body to insert the field section title
+3 ; COL - Starting Column position to set Section Title into
+4 ; RV - 1 - Set Reverse Video, 0 or null don't use Reverse Video
+5 ; Optional, defaults to ""
+6 ; ULINE - 1 - Set Underline, 0 or null don't use underline
+7 ; Optional, defaults to ""
+8 ; Returns: LINE - Line number increased by 1
+9 ;
+10 NEW IBY
+11 SET IBY=" "_TITLE_" "
+12 DO SET1(IBY,LINE,COL,$LENGTH(IBY),$GET(RV),$GET(ULINE))
+13 SET LINE=LINE+1
+14 QUIT LINE
+15 ;
SET1(TEXT,LINE,COL,WIDTH,RV,ULINE) ; Sets the TMP array with body data
+1 ; Input: TEXT - Text to be set into the specified line
+2 ; LINE - Line to set TEXT into
+3 ; COL - Column of LINE to set TEXT into
+4 ; WIDTH - Width of the TEXT being set into line
+5 ; RV - 1 - Set Reverse Video, 0 or null don't use
+6 ; Reverse Video
+7 ; Optional, defaults to ""
+8 ; ULINE - 1 - Set Underline, 0 or null don't use
+9 ; Underline
+10 ; Optional, defaults to ""
+11 ; ^TMP($J,"IBJPI") - Current ^TMP array
+12 ; Output: ^TMP($J,"IBJPI") - Updated ^TMP array
+13 ;
+14 NEW IBX
+15 SET IBX=$GET(^TMP($JOB,"IBJPI",LINE,0))
+16 SET IBX=$$SETSTR^VALM1(TEXT,IBX,COL,WIDTH)
+17 DO SET^VALM10(LINE,IBX)
+18 if $GET(RV)'=""
DO CNTRL^VALM10(LINE,COL,WIDTH,IORVON,IORVOFF)
+19 if $GET(ULINE)'=""
DO CNTRL^VALM10(LINE,COL,WIDTH,IOUON,IOUOFF)
+20 QUIT
+21 ;