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

IBJPI.m

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