RCDPESPC ;AITC/MBS - ePayment Lockbox Site Parameter Reports ; 4/23/19 8:52am
;;4.5;Accounts Receivable;**349,424**;Mar 20, 1995;Build 11
;Per VA Directive 6402, this routine should not be modified.
;
Q
;
APOST(AUPSTYP,ONOFF) ;EP from RCDPESP Turn Auto-Posting On/Off for Medical,RX,TRICARE Claims
; PRCA*4.5*345
; PRCA*4.5*424 Moved from RCDPESP because of routine size
; Input: AUPSTYP - 0 - Medical Auto-Posting
; 1 - Pharmacy Auto-Posting
; 2 - TRICARE Auto-Posting
; 3 - Zero Pay Auto-Posting ;*PRCA*4.5.424 Added line
; Output: ONOFF passed by ref. 1 - Auto-Posting, 0 otherwise
; Returns: 1 - User '^' or timed out, 0 otherwise
N APCT,DIR,DIROUT,DIRUT,DTOUT,DUOUT,FLD,FDAEDI,RCAUDVAL
S FLD=$S(AUPSTYP=0:.02,AUPSTYP=1:1.01,AUPSTYP=2:1.05,1:1.11) ; PRCA*4.5*349 - Add TRICARE, PRCA*4.5*424 - Add ZERO PAY
S APCT=$$GET1^DIQ(344.61,"1,",FLD,"I")
S DIR(0)="YA",DIR("B")=$S((APCT=1)!(APCT=""):"Yes",1:"No")
S DIR("A")=$$PADPRMPT^RCDPESPB($$GET1^DID(344.61,FLD,,"TITLE"))
S DIR("?")=$$GET1^DID(344.61,FLD,,"HELP-PROMPT")
D ^DIR
I $D(DTOUT)!$D(DUOUT) Q 1
S ONOFF=Y
I APCT'=Y D ; User updated value
. S FDAEDI(344.61,"1,",FLD)=Y
. D FILE^DIE(,"FDAEDI")
. ;
. ; Changed D NOTIFY to D NOTIFY^RCDPESP
. D NOTIFY^RCDPESP(Y,AUPSTYP)
. S RCAUDVAL(1)="344.61^"_FLD_"^1^"_Y_U_APCT
. ;
. ; Changed D AUDIT to D AUDIT^RCDPESP
. D AUDIT^RCDPESP(.RCAUDVAL)
Q 0
; PRCA*4.5*349 - New subroutine to display parameter settings by category
SPRPT ; EP from RCDPESP1
; Site parameter report entry point updated to select categories
; Input: RCTYPE - Type of report (Medical/Rx/TRICARE/All)
; RCCATS - List of categories selected for report
; RCLSTMGR - 1 if user selected to display report in List Manager
; RCNTR - counter
; RCFLD - DD field number
; RCHDR - header information
; RCPARM - parameters
; RCSTOP - exit flag
N CATS,J,LN,NUMCATS,RCACTV,RCCARCD,RCCIEN,RCCODE,RCDATA,RCDESC,RCFLD,RCGLB,RCHDR,RCI,RCITEM,RCNTR,RCPARM,RCSTAT,RCSTOP,RCSTRING,V,X,XX,Y
;
S X="RC" F S X=$O(^TMP($J,X)) Q:'($E(X,1,2)="RC") K ^TMP($J,X) ; clear out old data
;
S NUMCATS=$L(RCCATS,U)
S RCCATS=$$SRTCATS(RCCATS)
;
; RCGLB - ^TMP global storage locations
; ^TMP($J,"RC342") - AR SITE PARAMETER file (#342)
; ^TMP($J,"RC344.6") - RCDPE AUTO-PAY EXCLUSION file (#344.6)
; ^TMP($J,"RC344.61") - RCDPE PARAMETER file (#344.61)
F J=342,344.6,344.61 S RCGLB(J)=$NA(^TMP($J,"RC"_J)) K @RCGLB(J)
;
S RCHDR("RUNDATE")=$$FMTE^XLFDT($$NOW^XLFDT,"10S")
S RCHDR("PGNMBR")=0 ; page number
;
; AR SITE PARAMETER file (#342)
D GETS^DIQ(342,"1,",".01;.14;.15;7.02;7.03;7.04;7.05;7.06;7.07;7.08;7.09","E",RCGLB(342)) ; PRCA*4.5*345
; RCDPE PARAMETER file (#344.61), *future build*, add Tricare auto-decrease fields
S Y=".02;.03;.04;.05;.06;.07;.1;.11;.12;.13;1.01;1.02;1.03;1.04" ; PRCA*4.5*345
S Y=Y_";1.05;1.06;1.07;1.08;1.09;1.1" ; PRCA*4.5*349 - Add TRICARE
S Y=Y_";1.11" ; PRCA*4.5*424 - Add Zero Pay Auto Post parameter
D GETS^DIQ(344.61,"1,",Y,"E",RCGLB(344.61)) ; PRCA*4.5*321/PRCA*4.5*326/PRCA*4.5*332
; add site to header data
S RCHDR("SITE")="Site: "_@RCGLB(342)@(342,"1,",.01,"E")
;
; get auto-post and auto-decrease settings, save zero node
S X=$G(^RCY(344.61,1,0))
S XX=$G(^RCY(344.61,1,1)) ; PRCA*4.5*349 - Added line
S RCPARM("AUTO-POST")=$P(X,U,2)
S RCPARM("AUTO-DECREASE")=$P(X,U,3)
S RCPARM(344.61,0)=X
S RCPARM(344.61,1)=XX ; PRCA*4.5*349 - Added line
S RCPARM("RX AUTO-POST")=$P(XX,U,1)
S RCPARM("RX AUTO-DECREASE")=$P(XX,U,2) ; PRCA*4.5*349 - Added line
S RCPARM("TRI AUTO-POST")=$P(XX,U,5) ; PRCA*4.5*349 - Added line
S RCPARM("TRI AUTO-DECREASE")=$P(XX,U,6) ; PRCA*4.5*349 - Added line
;
; Display categories in order selected
F I=1:1:NUMCATS D
. S LN="RPT"_$P(RCCATS,U,I) D @LN
;
D AD2RPT^RCDPESP1(" "),AD2RPT^RCDPESP1($$ENDORPRT^RCDPEARL)
;
I $G(RCLSTMGR) Q ; PRCA*4.5*349 - If displaying as ListMan report, return here and let ListMan handle it
;
S RCSTOP=0 U IO D SPHDR^RCDPESP1(.RCHDR)
S J=0 F S J=$O(^TMP($J,"RC SP REPORT",J)) Q:'J!RCSTOP S Y=^TMP($J,"RC SP REPORT",J,0) D
. I $E(Y,1)=$C(12),J>1 D ASK^RCDPEARL(.RCSTOP) I 'RCSTOP D SPHDR^RCDPESP1(.RCHDR) S Y=$E(Y,2,$L(Y))
. W !,Y Q:'$O(^TMP($J,"RC SP REPORT",J)) ; quit if last line
. I '$G(ZTSK),$E(IOST,1,2)="C-",$Y+3>IOSL D ASK^RCDPEARL(.RCSTOP) I 'RCSTOP D SPHDR^RCDPESP1(.RCHDR) Q
. Q:RCSTOP Q:$Y+2<IOSL
. D SPHDR^RCDPESP1(.RCHDR)
;
I '$G(ZTSK),$E(IOST,1,2)="C-",'RCSTOP D ASK^RCDPEARL(.RCSTOP)
;
; close device
U IO(0) D ^%ZISC
K @RCGLB(344.6) ; delete old data
S X="RC" F S X=$O(^TMP($J,X)) Q:'($E(X,1,2)="RC") K ^TMP($J,X) ; clean up
;
Q
;
RPTGN ; Display General EDI Lockbox Site Parameters
D AD2RPT^RCDPESP1($C(12)_"### General EDI Lockbox Site Parameters ###")
; 7.02:7.04 - EFT/ERA days unmatched
F RCFLD=7.02,7.03,7.04 D
. S Y=$$GET1^DID(342,RCFLD,,"LABEL")_": "_@RCGLB(342)@(342,"1,",RCFLD,"E")
. D AD2RPT^RCDPESP1(Y)
;Workload notification day parameter
S Y=$$GET1^DID(344.61,.1,,"LABEL")_": "_@RCGLB(344.61)@(344.61,"1,",.1,"E") ; PRCA*4.5*321
D AD2RPT^RCDPESP1(Y)
Q
;
RPTFP ; Display First Party Parameters
D AD2RPT^RCDPESP1($C(12)_"### First Party Parameters ###")
; .14:.15 - First Party
F RCFLD=.14,.15 D
. S Y=$$GET1^DID(342,RCFLD,,"TITLE")_": "_@RCGLB(342)@(342,"1,",RCFLD,"E")
. D AD2RPT^RCDPESP1(Y)
Q
;
RPTAA ; Display Auto-Audit Parameters
D AD2RPT^RCDPESP1($C(12)_"### Auto-Audit Site Parameters ###")
; 7.05:7.09 - Auto Audit
F RCFLD=7.05,7.06,7.07,7.08,7.09 D ; EFT and ERA days unmatched - PRCA*4.5*321
. I RCTYPE="P",(RCFLD=7.05)!(RCFLD=7.07)!(RCFLD=7.09) Q ; PRCA*4.5*349 Exclude TRICARE
. I RCTYPE="M",(RCFLD=7.06)!(RCFLD=7.08)!(RCFLD=7.09) Q ; PRCA*4.5*349 Exclude TRICARE
. I RCTYPE="T",RCFLD>7.04,RCFLD<7.09 Q ; PRCA*4.5*349 Line Added TRICARE
. S Y=$$GET1^DID(342,RCFLD,,"TITLE")_": "_@RCGLB(342)@(342,"1,",RCFLD,"E")
. I RCFLD=7.05 D AD2RPT^RCDPESP1(" ")
. I (RCFLD=7.06)&(RCTYPE="P") D AD2RPT^RCDPESP1(" ")
. I (RCFLD=7.09),(RCTYPE="T") D AD2RPT^RCDPESP1(" ")
. D AD2RPT^RCDPESP1(Y)
Q
;
RPTAP ; Display Auto-Post Parameters
D AD2RPT^RCDPESP1($C(12)_"### Auto-Post Parameters ###")
I (RCTYPE="M")!(RCTYPE="A") D
. D AD2RPT^RCDPESP1("*** Medical Auto-Post Parameters ***")
. D MEDAUTOP^RCDPESP1(.RCPARM) ; Display Medical Claim parameters
;
I (RCTYPE="P")!(RCTYPE="A") D
. D AD2RPT^RCDPESP1("*** Pharmacy Auto-Post Parameters ***")
. D RXAUTOP^RCDPESP1(.RCPARM) ; Display Rx parameters
;
I (RCTYPE="T")!(RCTYPE="A") D
. D AD2RPT^RCDPESP1("*** TRICARE Auto-Post Parameters ***")
. D TRIAUTOP^RCDPESP1(.RCPARM) ; Display TRICARE parameters
;
D ZPARAMS ; Display Zero Pay Auto=Post Parameter PRCA*4.5*424
Q
;
RPTAD ; Auto-Decrease Parameteers
D AD2RPT^RCDPESP1($C(12)_"### Auto-Decrease Parameters ###")
I (RCTYPE="M")!(RCTYPE="A") D
. D AD2RPT^RCDPESP1("*** Medical Auto-Decrease Parameters ***")
. I '$$AUTOPON(0) D Q
. . D AD2RPT^RCDPESP1(" ")
. . D AD2RPT^RCDPESP1("NOTICE: Medical Auto-Decrease unavailable because Auto-Posting of Medical Claims is currently disabled")
. . D AD2RPT^RCDPESP1(" ")
. D MEDAUTOD^RCDPESP1(.RCPARM,RCTYPE) ; Display Medical Claim parameters
;
I (RCTYPE="P")!(RCTYPE="A") D
. D AD2RPT^RCDPESP1("*** Pharmacy Auto-Decrease Parameters ***")
. I '$$AUTOPON(1) D Q
. . D AD2RPT^RCDPESP1(" ")
. . D AD2RPT^RCDPESP1("NOTICE: Pharmacy Auto-Decrease unavailable because Auto-Posting of Pharmacy Claims is currently disabled")
. . D AD2RPT^RCDPESP1(" ")
. D RXAUTOD^RCDPESP1(.RCPARM,RCTYPE) ; Display Rx parameters
;
I (RCTYPE="T")!(RCTYPE="A") D
. D AD2RPT^RCDPESP1("*** TRICARE Auto-Decrease Parameters ***")
. I '$$AUTOPON(2) D Q
. . D AD2RPT^RCDPESP1(" ")
. . D AD2RPT^RCDPESP1("NOTICE: TRICARE Auto-Decrease unavailable because Auto-Posting of TRICARE Claims is currently disabled")
. . D AD2RPT^RCDPESP1(" ")
. D TRIAUTOD^RCDPESP1(.RCPARM,RCTYPE) ; Display TRICARE parameters ; RCDPE PARAMETER file (#344.61)
Q
;
RPTLK ; Display EFT Lock-Out Parameters
D AD2RPT^RCDPESP1($C(12)_"### EFT Lock-Out Parameters ###")
; ^DD(344.61,.06,0) > "MEDICAL EFT POST PREVENT DAYS"
; ^DD(344.61,.07,0) > "PHARMACY EFT POST PREVENT DAYS"
; ^DD(344.61,.13,0) > "TRICARE EFT POST PREVENT DAYS"
F RCFLD=.06,.07,.13 D
. Q:(RCFLD=.06)&'((RCTYPE="M")!(RCTYPE="A")) ; Don't display if not showing Medical parameters
. Q:(RCFLD=.07)&'((RCTYPE="P")!(RCTYPE="A")) ; Don't display if not showing Rx parameters
. Q:(RCFLD=.13)&'((RCTYPE="T")!(RCTYPE="A")) ; PRCA*4.5*349 - Don't display if not showing TRICARE params
. S Y=$$GET1^DID(344.61,RCFLD,,"TITLE")_" "_@RCGLB(344.61)@(344.61,"1,",RCFLD,"E")
. D AD2RPT^RCDPESP1(Y)
Q
;
; PRCA*4.5*424 Added Subroutine ZPARAMS
ZPARAMS ; Display Zero Pay Auto-Post Parameters for Report
; Input: RCGLB - ^TMP($J,"RC344.61") - RCDPE PARAMETER file (#344.61)
N V,X,Y
D AD2RPT^RCDPESP1(" ")
D AD2RPT^RCDPESP1("*** ZERO PAYMENT AMOUNT ERA Auto-Post Parameters ***")
S X=$$GET1^DID(344.61,1.11,,"TITLE") ;
S V=" (Y/N)" S:X[V X=$P(X,V,1)_$P(X,V,2) ; Remove yes/no prompt
S Y=X_" "_@RCGLB(344.61)@(344.61,"1,",1.11,"E")
D AD2RPT^RCDPESP1(Y)
D AD2RPT^RCDPESP1(" ")
Q
;
SRTCATS(CATS) ; If user selected both Auto-Post and Auto-Decrease, ensure AD displays after AP
N ADL,APL,I
F I=1:1:NUMCATS D
. I $P(CATS,U,I)="AP" S APL=I Q
. I $P(CATS,U,I)="AD" S ADL=I
I $G(APL),$G(ADL),APL>ADL D
. S APL=$F(CATS,"AP")
. S CATS=$E(CATS,1,APL-4)_$E(CATS,APL,$L(CATS))
. S $P(CATS,U,ADL)="AP;AD"
. S CATS=$TR(CATS,";",U)
Q CATS
;
; PRCA*4.5*349 - Added new subroutine to present parameters by category
ENCATS ; EP from RCDPESP
; Filter questions by category
; Input: CATS - List of categories to display
;
; Call below answers:
; NUMBER OF DAYS EFT UNMATCHED
; NUMBER OF DAYS ERA UNMATCHED
; # OF DAYS ENTRY CAN REMAIN IN SUSP
N I,LN,NUMCATS,RCQUIT
S RCQUIT=0,(APL,ADL)=0,NUMCATS=$L(CATS,U)
; If user selected both Auto-Post and Auto-Decrease, ensure AD will display after AP
S CATS=$$SRTCATS(CATS)
; Display categories in order selected
F I=1:1:NUMCATS D Q:RCQUIT
. S LN=$P(CATS,U,I) D @LN
D EXIT^RCDPESP
Q
;
GN ; Ask General EDI Lockbox Site Questions
W #,"### General EDI Lockbox Site Parameters ###",!
S Y=$$GEN ; General EDI Lockbox Site parameters
I Y S RCQUIT=1
Q
;
FP ; Ask First Party Questions
W #,"### First Party Parameters ###",!
S RCQUIT=$$FIRSTP ; First party parameters
Q
;
; PRCA*4.5*304 - Enable/disable auto-auditing of paper bills
AA ; Ask Auto-Audit Questions
W #,"### Auto-Audit Site Parameters ###",!
S RCQUIT=$$AUDIT^RCDPESP5 ; Auto-Audit site parameters
;
Q
;
;
AP ; Ask Auto-Post Questions
W #,"### Auto-Post Parameters ###",!
W !,"*** Medical Auto-Post Parameters ***",!
S RCQUIT=$$MAUTOP^RCDPESP
I '$G(RCQUIT) D
. W !!,"*** Pharmacy Auto-Post Parameters ***",!
. S RCQUIT=$$RXAUTOP^RCDPESP
I '$G(RCQUIT) D
. W !!,"*** TRICARE Auto-Post Parameters ***",!
. S RCQUIT=$$TAUTOP^RCDPESP
I '$G(RCQUIT) D
. W !!,"*** ZERO PAY Auto-Post Parameters ***",!
. S RCQUIT=$$APOST(3)
W !
Q
;
;
AD ; Ask Auto-Decrease Questions
W #,"### Auto-Decrease Parameters ###",!
W !,"*** Medical Auto-Decrease Parameters ***"
S RCQUIT=$$MAUTOD
I '$G(RCQUIT) D
. W !!,"*** Pharmacy Auto-Decrease Parameters ***"
. S RCQUIT=$$RXAUTOD
I '$G(RCQUIT) D
. W !!,"*** TRICARE Auto-Decrease Parameters ***"
. S RCQUIT=$$TAUTOD
W !
Q
;
LK ; Ask EFT Lock-Out Questions
W #,"### EFT Lock-Out Parameters ###",!
S RCQUIT=$$EFTLK^RCDPESP ; Set EFT lock-out paramters
Q
;
; PRCA*4.5*349 - Added to provide one place to get list of categories
LSTCATS(CATS,SHORT) ; Return list of categories
S SHORT=+$G(SHORT)
S CATS("GN")="General EDI Lockbox Site"_$S('SHORT:" Parameters",1:"")
S CATS("AA")="Auto-Audit Site"_$S('SHORT:" Parameters",1:"")
S CATS("FP")="First Party"_$S('SHORT:" Parameters",1:"")
S CATS("AP")="Auto-Post"_$S('SHORT:" Parameters",1:"")
S CATS("AD")="Auto-Decrease"_$S('SHORT:" Parameters",1:"")
S CATS("LK")="EFT Lock-Out"_$S('SHORT:" Parameters",1:"")
Q
;
; PRCA*4.5*349 - New function to prompt for categories
CATS() ; Get categories to display
N CATS,CTLST,DIR
S CTLST=""
D LSTCATS(.CATS)
S DIR(0)="SO^"_$$BLDCATS("")_"AL:All",DIR("B")="All"
D ^DIR
I Y="AL" S CTLST=Y G QCATS
F Q:$D(DIRUT) S CTLST=$S($L(CTLST):CTLST_U,1:"")_Y D
. K DIR
. S DIR(0)="SO^"_$$BLDCATS(CTLST)
. D ^DIR
S:Y=U CTLST=""
QCATS Q CTLST
;
; PRCA*4.5*349 - New function to support CATS()
BLDCATS(CUR) ; Build set of code string for categories question
N I,OUT
S OUT=""
S I="" F S I=$O(CATS(I)) Q:I="" D
. S:CUR'[(I) OUT=OUT_I_":"_CATS(I)_";"
Q OUT
;
; PRCA*4.5*349 - New function to display "general" questions (including bulletin day)
; as separate from First Party questions
GEN() ; General Questions
N RSLT S RSLT=""
I '$D(^RC(342,1,0)) D BEG^RCMSITE
S:'$D(^RC(342,1,0)) RSLT="^no site defined" ; can't continue
;
Q:RSLT]"" RSLT
N DA,DR,DIE,Y
S RSLT=0
S DA=1,DR="7.02:7.04",DIE="^RC(342,"
D ^DIE
S RSLT=$S($D(Y):1,1:0)
I 'RSLT Q $$BULLDAY^RCDPESP
Q RSLT
;
; PRCA*4.5*349 - New function to ask First Party questions as their own category
FIRSTP() ; First Party questions
N RSLT S RSLT=""
I '$D(^RC(342,1,0)) D BEG^RCMSITE
S:'$D(^RC(342,1,0)) RSLT="^no site defined" ; can't continue
;
Q:RSLT]"" RSLT
N DA,DIE,DR,Y
S DA=1,DR="[RCDPE FIRST PARTY]",DIE="^RC(342," D ^DIE
S RSLT=$S($D(Y):"^user aborted",1:1) ; if Y remains from ^DIE call
Q 'RSLT
;
; PRCA*4.5*349 - New function to ask only Medical Auto-Decrease questions if Auto-Post enabled
MAUTOD() ; Medical Claims Auto-Decrease Questions
; Returns: 1 - User '^' or timed out, 0 otherwise
N ONOFF,RCQUIT
S RCQUIT=0
S ONOFF=$$GET1^DIQ(344.61,"1,",.02,"I")
; Do not display Auto-Decrease questions when Auto-Post Disabled
I ONOFF=0 D Q 0
. W !,"NOTICE: Medical Auto-Decrease unavailable because Auto-Posting of Medical Claims is currently disabled"
; Enable/disable Auto-Decrease of medical claims with payments
S RCQUIT=$$PAID^RCDPESP7(0) ; PRCA*4.5*345 - Added 0 parameter
Q:RCQUIT=1 1
Q:RCQUIT=2 0 ; Auto-Decrease of Med Claims w/Payments is OFF
;
; Enable/disable Auto-Decrease of Med Claims with/No Payments
S RCQUIT=$$NOPAY^RCDPESP7(0) ; PRCA*4.5*345 - Added 0 parameter
I RCQUIT=1 Q 1
; Set/Reset payer exclusions for medical claim decrease
D EXCLLIST^RCDPESP(2) ; Display exclusion list
S RCQUIT=$$SETEXCL^RCDPESP(2)
Q:RCQUIT 1
D EXCLLIST^RCDPESP(2) ; Display exclusion list
;
Q 0
;
; PRCA*4.5*349 - New function to ask only Pharmacy Auto-Decrease questions if Auto-Post enabled
RXAUTOD() ; Enable/disable Auto-Decrease of pharmacy claims with payments
; Returns: 1 - User '^' or timed out, 0 otherwise
N ONOFF,RETURN
S RETURN=0
S ONOFF=$$GET1^DIQ(344.61,"1,",1.01,"I")
; Do not display Auto-Decrease questions when Auto-Post Disabled
I ONOFF=0 D Q 0
. W !,"NOTICE: Pharmacy Auto-Decrease unavailable because Auto-Posting of Pharmacy Claims is currently disabled"
; Enable/disable Auto-Decrease of Rx claims with payments
S RETURN=$$PAID^RCDPESP7(1)
Q:RETURN=1 1
Q:RETURN=2 0
;
; Set/Reset payer exclusions for pharmacy claim decrease
D EXCLLIST^RCDPESP(4) ; Display the exclusion list
Q:$$SETEXCL^RCDPESP(4) 1
D EXCLLIST^RCDPESP(4) ; Display the exclusion list
Q 0
;
; PRCA*4.5*349 - New function to ask only TRICARE Auto-Decrease questions if Auto-Post enabled
TAUTOD() ; Enable/disable Auto-Decrease of TRICARE claims with payments
; Returns: 1 - User '^' or timed out, 0 otherwise
N ONOFF,RETURN
S RETURN=0
S ONOFF=$$GET1^DIQ(344.61,"1,",1.05,"I")
; Do not display Auto-Decrease questions when Auto-Post Disabled
I ONOFF=0 D Q 0
. W !,"NOTICE: TRICARE Auto-Decrease unavailable because Auto-Posting of TRICARE Claims is currently disabled"
;
; Enable/disable Auto-Decrease of TRICARE claims with payments
S RETURN=$$PAID^RCDPESP7(2)
Q:RETURN=1 1
Q:RETURN=2 0 ; Auto-Decrease of TRICARE Claims w/Payments is OFF
;
; Enable/disable Auto-Decrease of TRICARE with/No Payments
S RETURN=$$NOPAY^RCDPESP7(2)
I RETURN=1 Q 1
;
; Set/Reset payer exclusions for TRICARE claim decrease
D EXCLLIST^RCDPESP(6) ; Display the exclusion list
Q:$$SETEXCL^RCDPESP(6) 1
D EXCLLIST^RCDPESP(6) ; Display the exclusion list
W !
Q 0
;
; PRCA*4.5*349 - Added function
AUTOPON(WHICH) ; Is Auto-Post on for the selected parameters?
; Input: WHICH - 0 - Medical, 1 - Rx, 2 - TRICARE (defaults to 0 - Medical)
; Returns: 1 if Auto-Posting is turned on for the selected parameter type
; 0 if Auto-Posting is turned off for the selected parameter type
S WHICH=+$G(WHICH)
Q $$GET1^DIQ(344.61,"1,",$S(WHICH=0:.02,WHICH=1:1.01,1:1.05),"I")
;
MPARAMS(RCPARM) ; Display Medical Parameters for Report
; Input: RCPARM("AUTO-DECREASE") - 1 if Medical Auto-Posting is turned for claims w/Payments
; 0 otherwise
; RCPARM("AUTO-POST") - 1 if Medical Auto-Posting is Turned on, 0 otherwise
; @RCGLB(344.6) - LIST^DIC array of fields
; @RCGLB(344.61) - LIST^DIC array of fields
; PRCA*4.5*349 - Added method
D AD2RPT^RCDPESP1("### Medical Claims Auto-Post/Auto-Decrease Parameters ###")
D MEDAUTOP^RCDPESP1(.RCPARM)
D AD2RPT^RCDPESP1(" ")
D MEDAUTOD^RCDPESP1(.RCPARM,RCTYPE)
;
Q
;
RXPARAMS(RCPARM) ; Display Rx Parameters for Report
; PRCA*4.5*349 - New method
; Input: RCPARM("RX AUTO-DECREASE") - 1 if Rx Auto-Posting is turned for claims w/Payments
; 0 otherwise
; RCPARM("RX AUTO-POST") - 1 if Rx Auto-Posting is Turned on, 0 otherwise
; @RCGLB(344.6) - LIST^DIC array of fields
; @RCGLB(344.61) - LIST^DIC array of fields
D AD2RPT^RCDPESP1("### Pharmacy Auto-Post/Auto-Decrease Parameters ###")
D RXAUTOP^RCDPESP1(.RCPARM)
D AD2RPT^RCDPESP1(" ")
D RXAUTOD^RCDPESP1(.RCPARM,RCTYPE)
Q
;
TPARAMS(RCPARM) ; Display TRICARE Parameters for Report
; Input: RCPARM("TRI AUTO-DECREASE") - 1 if TRICARE Auto-Posting is turned for claims w/Payments
; 0 otherwise
; RCPARM("TRI AUTO-POST") - 1 if TRICARE Auto-Posting is Turned on, 0 otherwise
; @RCGLB(344.6) - LIST^DIC array of fields
; @RCGLB(344.61) - LIST^DIC array of fields
; PRCA*4.5*349 - Added method
D AD2RPT^RCDPESP1("### TRICARE Auto-Post/Auto-Decrease Parameters ###")
D TRIAUTOP^RCDPESP1(.RCPARM)
D AD2RPT^RCDPESP1(" ")
D TRIAUTOD^RCDPESP1(.RCPARM,RCTYPE)
Q
;
LMHDR(HDR,RCTYPE,RCCATS) ; EP from RCDPESP1
; HDR passed by ref.
; PRCA*4.5*349 - New subroutine to build ListMan Header
; Inputs: RCTYPE - M - Medical, P - Pharmacy, T - TRICARE, A - ALL
; RCCATS - GN - General EDI Lockbox Site
; AA - Auto-Audit Site
; FP - First Party
; AP - Auto-Post"
; AD - Auto-Decrease
; LK - EFT Lock-Out
; Outputs: HDR - Passed by reference
;
N CNT,CUR,CTLST,P,X,Y
S HDR("TITLE")="EDI LOCKBOX PARAMETERS REPORT "
;
S X="Medical/Pharmacy/TRICARE: "
S X=X_$S(RCTYPE="A":"ALL",RCTYPE="M":"MEDICAL",RCTYPE="P":"PHARMACY",RCTYPE="T":"TRICARE",1:"")
S HDR(1)="Site: "_$$GET1^DIQ(342,"1,",.01,"E")
S HDR(1)=HDR(1)_$J(X,IOM-($L(HDR(1))+1))
; Add categories
S Y="Categories: "
S CNT=$L(RCCATS,U),CUR=""
D LSTCATS^RCDPESPC(.CTLST,1)
S CTLST("AL")="All"
F I=1:1:CNT D
. S X=$G(CTLST($P(RCCATS,U,I)))
. I ($L(Y)+$L(X))>IOM D
. . W !,Y
. . S Y=" "
. S Y=Y_X
. I I<CNT S Y=Y_", "
S HDR(2)=Y
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRCDPESPC 19992 printed Dec 13, 2024@01:45:21 Page 2
RCDPESPC ;AITC/MBS - ePayment Lockbox Site Parameter Reports ; 4/23/19 8:52am
+1 ;;4.5;Accounts Receivable;**349,424**;Mar 20, 1995;Build 11
+2 ;Per VA Directive 6402, this routine should not be modified.
+3 ;
+4 QUIT
+5 ;
APOST(AUPSTYP,ONOFF) ;EP from RCDPESP Turn Auto-Posting On/Off for Medical,RX,TRICARE Claims
+1 ; PRCA*4.5*345
+2 ; PRCA*4.5*424 Moved from RCDPESP because of routine size
+3 ; Input: AUPSTYP - 0 - Medical Auto-Posting
+4 ; 1 - Pharmacy Auto-Posting
+5 ; 2 - TRICARE Auto-Posting
+6 ; 3 - Zero Pay Auto-Posting ;*PRCA*4.5.424 Added line
+7 ; Output: ONOFF passed by ref. 1 - Auto-Posting, 0 otherwise
+8 ; Returns: 1 - User '^' or timed out, 0 otherwise
+9 NEW APCT,DIR,DIROUT,DIRUT,DTOUT,DUOUT,FLD,FDAEDI,RCAUDVAL
+10 ; PRCA*4.5*349 - Add TRICARE, PRCA*4.5*424 - Add ZERO PAY
SET FLD=$SELECT(AUPSTYP=0:.02,AUPSTYP=1:1.01,AUPSTYP=2:1.05,1:1.11)
+11 SET APCT=$$GET1^DIQ(344.61,"1,",FLD,"I")
+12 SET DIR(0)="YA"
SET DIR("B")=$SELECT((APCT=1)!(APCT=""):"Yes",1:"No")
+13 SET DIR("A")=$$PADPRMPT^RCDPESPB($$GET1^DID(344.61,FLD,,"TITLE"))
+14 SET DIR("?")=$$GET1^DID(344.61,FLD,,"HELP-PROMPT")
+15 DO ^DIR
+16 IF $DATA(DTOUT)!$DATA(DUOUT)
QUIT 1
+17 SET ONOFF=Y
+18 ; User updated value
IF APCT'=Y
Begin DoDot:1
+19 SET FDAEDI(344.61,"1,",FLD)=Y
+20 DO FILE^DIE(,"FDAEDI")
+21 ;
+22 ; Changed D NOTIFY to D NOTIFY^RCDPESP
+23 DO NOTIFY^RCDPESP(Y,AUPSTYP)
+24 SET RCAUDVAL(1)="344.61^"_FLD_"^1^"_Y_U_APCT
+25 ;
+26 ; Changed D AUDIT to D AUDIT^RCDPESP
+27 DO AUDIT^RCDPESP(.RCAUDVAL)
End DoDot:1
+28 QUIT 0
+29 ; PRCA*4.5*349 - New subroutine to display parameter settings by category
SPRPT ; EP from RCDPESP1
+1 ; Site parameter report entry point updated to select categories
+2 ; Input: RCTYPE - Type of report (Medical/Rx/TRICARE/All)
+3 ; RCCATS - List of categories selected for report
+4 ; RCLSTMGR - 1 if user selected to display report in List Manager
+5 ; RCNTR - counter
+6 ; RCFLD - DD field number
+7 ; RCHDR - header information
+8 ; RCPARM - parameters
+9 ; RCSTOP - exit flag
+10 NEW CATS,J,LN,NUMCATS,RCACTV,RCCARCD,RCCIEN,RCCODE,RCDATA,RCDESC,RCFLD,RCGLB,RCHDR,RCI,RCITEM,RCNTR,RCPARM,RCSTAT,RCSTOP,RCSTRING,V,X,XX,Y
+11 ;
+12 ; clear out old data
SET X="RC"
FOR
SET X=$ORDER(^TMP($JOB,X))
if '($EXTRACT(X,1,2)="RC")
QUIT
KILL ^TMP($JOB,X)
+13 ;
+14 SET NUMCATS=$LENGTH(RCCATS,U)
+15 SET RCCATS=$$SRTCATS(RCCATS)
+16 ;
+17 ; RCGLB - ^TMP global storage locations
+18 ; ^TMP($J,"RC342") - AR SITE PARAMETER file (#342)
+19 ; ^TMP($J,"RC344.6") - RCDPE AUTO-PAY EXCLUSION file (#344.6)
+20 ; ^TMP($J,"RC344.61") - RCDPE PARAMETER file (#344.61)
+21 FOR J=342,344.6,344.61
SET RCGLB(J)=$NAME(^TMP($JOB,"RC"_J))
KILL @RCGLB(J)
+22 ;
+23 SET RCHDR("RUNDATE")=$$FMTE^XLFDT($$NOW^XLFDT,"10S")
+24 ; page number
SET RCHDR("PGNMBR")=0
+25 ;
+26 ; AR SITE PARAMETER file (#342)
+27 ; PRCA*4.5*345
DO GETS^DIQ(342,"1,",".01;.14;.15;7.02;7.03;7.04;7.05;7.06;7.07;7.08;7.09","E",RCGLB(342))
+28 ; RCDPE PARAMETER file (#344.61), *future build*, add Tricare auto-decrease fields
+29 ; PRCA*4.5*345
SET Y=".02;.03;.04;.05;.06;.07;.1;.11;.12;.13;1.01;1.02;1.03;1.04"
+30 ; PRCA*4.5*349 - Add TRICARE
SET Y=Y_";1.05;1.06;1.07;1.08;1.09;1.1"
+31 ; PRCA*4.5*424 - Add Zero Pay Auto Post parameter
SET Y=Y_";1.11"
+32 ; PRCA*4.5*321/PRCA*4.5*326/PRCA*4.5*332
DO GETS^DIQ(344.61,"1,",Y,"E",RCGLB(344.61))
+33 ; add site to header data
+34 SET RCHDR("SITE")="Site: "_@RCGLB(342)@(342,"1,",.01,"E")
+35 ;
+36 ; get auto-post and auto-decrease settings, save zero node
+37 SET X=$GET(^RCY(344.61,1,0))
+38 ; PRCA*4.5*349 - Added line
SET XX=$GET(^RCY(344.61,1,1))
+39 SET RCPARM("AUTO-POST")=$PIECE(X,U,2)
+40 SET RCPARM("AUTO-DECREASE")=$PIECE(X,U,3)
+41 SET RCPARM(344.61,0)=X
+42 ; PRCA*4.5*349 - Added line
SET RCPARM(344.61,1)=XX
+43 SET RCPARM("RX AUTO-POST")=$PIECE(XX,U,1)
+44 ; PRCA*4.5*349 - Added line
SET RCPARM("RX AUTO-DECREASE")=$PIECE(XX,U,2)
+45 ; PRCA*4.5*349 - Added line
SET RCPARM("TRI AUTO-POST")=$PIECE(XX,U,5)
+46 ; PRCA*4.5*349 - Added line
SET RCPARM("TRI AUTO-DECREASE")=$PIECE(XX,U,6)
+47 ;
+48 ; Display categories in order selected
+49 FOR I=1:1:NUMCATS
Begin DoDot:1
+50 SET LN="RPT"_$PIECE(RCCATS,U,I)
DO @LN
End DoDot:1
+51 ;
+52 DO AD2RPT^RCDPESP1(" ")
DO AD2RPT^RCDPESP1($$ENDORPRT^RCDPEARL)
+53 ;
+54 ; PRCA*4.5*349 - If displaying as ListMan report, return here and let ListMan handle it
IF $GET(RCLSTMGR)
QUIT
+55 ;
+56 SET RCSTOP=0
USE IO
DO SPHDR^RCDPESP1(.RCHDR)
+57 SET J=0
FOR
SET J=$ORDER(^TMP($JOB,"RC SP REPORT",J))
if 'J!RCSTOP
QUIT
SET Y=^TMP($JOB,"RC SP REPORT",J,0)
Begin DoDot:1
+58 IF $EXTRACT(Y,1)=$CHAR(12)
IF J>1
DO ASK^RCDPEARL(.RCSTOP)
IF 'RCSTOP
DO SPHDR^RCDPESP1(.RCHDR)
SET Y=$EXTRACT(Y,2,$LENGTH(Y))
+59 ; quit if last line
WRITE !,Y
if '$ORDER(^TMP($JOB,"RC SP REPORT",J))
QUIT
+60 IF '$GET(ZTSK)
IF $EXTRACT(IOST,1,2)="C-"
IF $Y+3>IOSL
DO ASK^RCDPEARL(.RCSTOP)
IF 'RCSTOP
DO SPHDR^RCDPESP1(.RCHDR)
QUIT
+61 if RCSTOP
QUIT
if $Y+2<IOSL
QUIT
+62 DO SPHDR^RCDPESP1(.RCHDR)
End DoDot:1
+63 ;
+64 IF '$GET(ZTSK)
IF $EXTRACT(IOST,1,2)="C-"
IF 'RCSTOP
DO ASK^RCDPEARL(.RCSTOP)
+65 ;
+66 ; close device
+67 USE IO(0)
DO ^%ZISC
+68 ; delete old data
KILL @RCGLB(344.6)
+69 ; clean up
SET X="RC"
FOR
SET X=$ORDER(^TMP($JOB,X))
if '($EXTRACT(X,1,2)="RC")
QUIT
KILL ^TMP($JOB,X)
+70 ;
+71 QUIT
+72 ;
RPTGN ; Display General EDI Lockbox Site Parameters
+1 DO AD2RPT^RCDPESP1($CHAR(12)_"### General EDI Lockbox Site Parameters ###")
+2 ; 7.02:7.04 - EFT/ERA days unmatched
+3 FOR RCFLD=7.02,7.03,7.04
Begin DoDot:1
+4 SET Y=$$GET1^DID(342,RCFLD,,"LABEL")_": "_@RCGLB(342)@(342,"1,",RCFLD,"E")
+5 DO AD2RPT^RCDPESP1(Y)
End DoDot:1
+6 ;Workload notification day parameter
+7 ; PRCA*4.5*321
SET Y=$$GET1^DID(344.61,.1,,"LABEL")_": "_@RCGLB(344.61)@(344.61,"1,",.1,"E")
+8 DO AD2RPT^RCDPESP1(Y)
+9 QUIT
+10 ;
RPTFP ; Display First Party Parameters
+1 DO AD2RPT^RCDPESP1($CHAR(12)_"### First Party Parameters ###")
+2 ; .14:.15 - First Party
+3 FOR RCFLD=.14,.15
Begin DoDot:1
+4 SET Y=$$GET1^DID(342,RCFLD,,"TITLE")_": "_@RCGLB(342)@(342,"1,",RCFLD,"E")
+5 DO AD2RPT^RCDPESP1(Y)
End DoDot:1
+6 QUIT
+7 ;
RPTAA ; Display Auto-Audit Parameters
+1 DO AD2RPT^RCDPESP1($CHAR(12)_"### Auto-Audit Site Parameters ###")
+2 ; 7.05:7.09 - Auto Audit
+3 ; EFT and ERA days unmatched - PRCA*4.5*321
FOR RCFLD=7.05,7.06,7.07,7.08,7.09
Begin DoDot:1
+4 ; PRCA*4.5*349 Exclude TRICARE
IF RCTYPE="P"
IF (RCFLD=7.05)!(RCFLD=7.07)!(RCFLD=7.09)
QUIT
+5 ; PRCA*4.5*349 Exclude TRICARE
IF RCTYPE="M"
IF (RCFLD=7.06)!(RCFLD=7.08)!(RCFLD=7.09)
QUIT
+6 ; PRCA*4.5*349 Line Added TRICARE
IF RCTYPE="T"
IF RCFLD>7.04
IF RCFLD<7.09
QUIT
+7 SET Y=$$GET1^DID(342,RCFLD,,"TITLE")_": "_@RCGLB(342)@(342,"1,",RCFLD,"E")
+8 IF RCFLD=7.05
DO AD2RPT^RCDPESP1(" ")
+9 IF (RCFLD=7.06)&(RCTYPE="P")
DO AD2RPT^RCDPESP1(" ")
+10 IF (RCFLD=7.09)
IF (RCTYPE="T")
DO AD2RPT^RCDPESP1(" ")
+11 DO AD2RPT^RCDPESP1(Y)
End DoDot:1
+12 QUIT
+13 ;
RPTAP ; Display Auto-Post Parameters
+1 DO AD2RPT^RCDPESP1($CHAR(12)_"### Auto-Post Parameters ###")
+2 IF (RCTYPE="M")!(RCTYPE="A")
Begin DoDot:1
+3 DO AD2RPT^RCDPESP1("*** Medical Auto-Post Parameters ***")
+4 ; Display Medical Claim parameters
DO MEDAUTOP^RCDPESP1(.RCPARM)
End DoDot:1
+5 ;
+6 IF (RCTYPE="P")!(RCTYPE="A")
Begin DoDot:1
+7 DO AD2RPT^RCDPESP1("*** Pharmacy Auto-Post Parameters ***")
+8 ; Display Rx parameters
DO RXAUTOP^RCDPESP1(.RCPARM)
End DoDot:1
+9 ;
+10 IF (RCTYPE="T")!(RCTYPE="A")
Begin DoDot:1
+11 DO AD2RPT^RCDPESP1("*** TRICARE Auto-Post Parameters ***")
+12 ; Display TRICARE parameters
DO TRIAUTOP^RCDPESP1(.RCPARM)
End DoDot:1
+13 ;
+14 ; Display Zero Pay Auto=Post Parameter PRCA*4.5*424
DO ZPARAMS
+15 QUIT
+16 ;
RPTAD ; Auto-Decrease Parameteers
+1 DO AD2RPT^RCDPESP1($CHAR(12)_"### Auto-Decrease Parameters ###")
+2 IF (RCTYPE="M")!(RCTYPE="A")
Begin DoDot:1
+3 DO AD2RPT^RCDPESP1("*** Medical Auto-Decrease Parameters ***")
+4 IF '$$AUTOPON(0)
Begin DoDot:2
+5 DO AD2RPT^RCDPESP1(" ")
+6 DO AD2RPT^RCDPESP1("NOTICE: Medical Auto-Decrease unavailable because Auto-Posting of Medical Claims is currently disabled")
+7 DO AD2RPT^RCDPESP1(" ")
End DoDot:2
QUIT
+8 ; Display Medical Claim parameters
DO MEDAUTOD^RCDPESP1(.RCPARM,RCTYPE)
End DoDot:1
+9 ;
+10 IF (RCTYPE="P")!(RCTYPE="A")
Begin DoDot:1
+11 DO AD2RPT^RCDPESP1("*** Pharmacy Auto-Decrease Parameters ***")
+12 IF '$$AUTOPON(1)
Begin DoDot:2
+13 DO AD2RPT^RCDPESP1(" ")
+14 DO AD2RPT^RCDPESP1("NOTICE: Pharmacy Auto-Decrease unavailable because Auto-Posting of Pharmacy Claims is currently disabled")
+15 DO AD2RPT^RCDPESP1(" ")
End DoDot:2
QUIT
+16 ; Display Rx parameters
DO RXAUTOD^RCDPESP1(.RCPARM,RCTYPE)
End DoDot:1
+17 ;
+18 IF (RCTYPE="T")!(RCTYPE="A")
Begin DoDot:1
+19 DO AD2RPT^RCDPESP1("*** TRICARE Auto-Decrease Parameters ***")
+20 IF '$$AUTOPON(2)
Begin DoDot:2
+21 DO AD2RPT^RCDPESP1(" ")
+22 DO AD2RPT^RCDPESP1("NOTICE: TRICARE Auto-Decrease unavailable because Auto-Posting of TRICARE Claims is currently disabled")
+23 DO AD2RPT^RCDPESP1(" ")
End DoDot:2
QUIT
+24 ; Display TRICARE parameters ; RCDPE PARAMETER file (#344.61)
DO TRIAUTOD^RCDPESP1(.RCPARM,RCTYPE)
End DoDot:1
+25 QUIT
+26 ;
RPTLK ; Display EFT Lock-Out Parameters
+1 DO AD2RPT^RCDPESP1($CHAR(12)_"### EFT Lock-Out Parameters ###")
+2 ; ^DD(344.61,.06,0) > "MEDICAL EFT POST PREVENT DAYS"
+3 ; ^DD(344.61,.07,0) > "PHARMACY EFT POST PREVENT DAYS"
+4 ; ^DD(344.61,.13,0) > "TRICARE EFT POST PREVENT DAYS"
+5 FOR RCFLD=.06,.07,.13
Begin DoDot:1
+6 ; Don't display if not showing Medical parameters
if (RCFLD=.06)&'((RCTYPE="M")!(RCTYPE="A"))
QUIT
+7 ; Don't display if not showing Rx parameters
if (RCFLD=.07)&'((RCTYPE="P")!(RCTYPE="A"))
QUIT
+8 ; PRCA*4.5*349 - Don't display if not showing TRICARE params
if (RCFLD=.13)&'((RCTYPE="T")!(RCTYPE="A"))
QUIT
+9 SET Y=$$GET1^DID(344.61,RCFLD,,"TITLE")_" "_@RCGLB(344.61)@(344.61,"1,",RCFLD,"E")
+10 DO AD2RPT^RCDPESP1(Y)
End DoDot:1
+11 QUIT
+12 ;
+13 ; PRCA*4.5*424 Added Subroutine ZPARAMS
ZPARAMS ; Display Zero Pay Auto-Post Parameters for Report
+1 ; Input: RCGLB - ^TMP($J,"RC344.61") - RCDPE PARAMETER file (#344.61)
+2 NEW V,X,Y
+3 DO AD2RPT^RCDPESP1(" ")
+4 DO AD2RPT^RCDPESP1("*** ZERO PAYMENT AMOUNT ERA Auto-Post Parameters ***")
+5 ;
SET X=$$GET1^DID(344.61,1.11,,"TITLE")
+6 ; Remove yes/no prompt
SET V=" (Y/N)"
if X[V
SET X=$PIECE(X,V,1)_$PIECE(X,V,2)
+7 SET Y=X_" "_@RCGLB(344.61)@(344.61,"1,",1.11,"E")
+8 DO AD2RPT^RCDPESP1(Y)
+9 DO AD2RPT^RCDPESP1(" ")
+10 QUIT
+11 ;
SRTCATS(CATS) ; If user selected both Auto-Post and Auto-Decrease, ensure AD displays after AP
+1 NEW ADL,APL,I
+2 FOR I=1:1:NUMCATS
Begin DoDot:1
+3 IF $PIECE(CATS,U,I)="AP"
SET APL=I
QUIT
+4 IF $PIECE(CATS,U,I)="AD"
SET ADL=I
End DoDot:1
+5 IF $GET(APL)
IF $GET(ADL)
IF APL>ADL
Begin DoDot:1
+6 SET APL=$FIND(CATS,"AP")
+7 SET CATS=$EXTRACT(CATS,1,APL-4)_$EXTRACT(CATS,APL,$LENGTH(CATS))
+8 SET $PIECE(CATS,U,ADL)="AP;AD"
+9 SET CATS=$TRANSLATE(CATS,";",U)
End DoDot:1
+10 QUIT CATS
+11 ;
+12 ; PRCA*4.5*349 - Added new subroutine to present parameters by category
ENCATS ; EP from RCDPESP
+1 ; Filter questions by category
+2 ; Input: CATS - List of categories to display
+3 ;
+4 ; Call below answers:
+5 ; NUMBER OF DAYS EFT UNMATCHED
+6 ; NUMBER OF DAYS ERA UNMATCHED
+7 ; # OF DAYS ENTRY CAN REMAIN IN SUSP
+8 NEW I,LN,NUMCATS,RCQUIT
+9 SET RCQUIT=0
SET (APL,ADL)=0
SET NUMCATS=$LENGTH(CATS,U)
+10 ; If user selected both Auto-Post and Auto-Decrease, ensure AD will display after AP
+11 SET CATS=$$SRTCATS(CATS)
+12 ; Display categories in order selected
+13 FOR I=1:1:NUMCATS
Begin DoDot:1
+14 SET LN=$PIECE(CATS,U,I)
DO @LN
End DoDot:1
if RCQUIT
QUIT
+15 DO EXIT^RCDPESP
+16 QUIT
+17 ;
GN ; Ask General EDI Lockbox Site Questions
+1 WRITE #,"### General EDI Lockbox Site Parameters ###",!
+2 ; General EDI Lockbox Site parameters
SET Y=$$GEN
+3 IF Y
SET RCQUIT=1
+4 QUIT
+5 ;
FP ; Ask First Party Questions
+1 WRITE #,"### First Party Parameters ###",!
+2 ; First party parameters
SET RCQUIT=$$FIRSTP
+3 QUIT
+4 ;
+5 ; PRCA*4.5*304 - Enable/disable auto-auditing of paper bills
AA ; Ask Auto-Audit Questions
+1 WRITE #,"### Auto-Audit Site Parameters ###",!
+2 ; Auto-Audit site parameters
SET RCQUIT=$$AUDIT^RCDPESP5
+3 ;
+4 QUIT
+5 ;
+6 ;
AP ; Ask Auto-Post Questions
+1 WRITE #,"### Auto-Post Parameters ###",!
+2 WRITE !,"*** Medical Auto-Post Parameters ***",!
+3 SET RCQUIT=$$MAUTOP^RCDPESP
+4 IF '$GET(RCQUIT)
Begin DoDot:1
+5 WRITE !!,"*** Pharmacy Auto-Post Parameters ***",!
+6 SET RCQUIT=$$RXAUTOP^RCDPESP
End DoDot:1
+7 IF '$GET(RCQUIT)
Begin DoDot:1
+8 WRITE !!,"*** TRICARE Auto-Post Parameters ***",!
+9 SET RCQUIT=$$TAUTOP^RCDPESP
End DoDot:1
+10 IF '$GET(RCQUIT)
Begin DoDot:1
+11 WRITE !!,"*** ZERO PAY Auto-Post Parameters ***",!
+12 SET RCQUIT=$$APOST(3)
End DoDot:1
+13 WRITE !
+14 QUIT
+15 ;
+16 ;
AD ; Ask Auto-Decrease Questions
+1 WRITE #,"### Auto-Decrease Parameters ###",!
+2 WRITE !,"*** Medical Auto-Decrease Parameters ***"
+3 SET RCQUIT=$$MAUTOD
+4 IF '$GET(RCQUIT)
Begin DoDot:1
+5 WRITE !!,"*** Pharmacy Auto-Decrease Parameters ***"
+6 SET RCQUIT=$$RXAUTOD
End DoDot:1
+7 IF '$GET(RCQUIT)
Begin DoDot:1
+8 WRITE !!,"*** TRICARE Auto-Decrease Parameters ***"
+9 SET RCQUIT=$$TAUTOD
End DoDot:1
+10 WRITE !
+11 QUIT
+12 ;
LK ; Ask EFT Lock-Out Questions
+1 WRITE #,"### EFT Lock-Out Parameters ###",!
+2 ; Set EFT lock-out paramters
SET RCQUIT=$$EFTLK^RCDPESP
+3 QUIT
+4 ;
+5 ; PRCA*4.5*349 - Added to provide one place to get list of categories
LSTCATS(CATS,SHORT) ; Return list of categories
+1 SET SHORT=+$GET(SHORT)
+2 SET CATS("GN")="General EDI Lockbox Site"_$SELECT('SHORT:" Parameters",1:"")
+3 SET CATS("AA")="Auto-Audit Site"_$SELECT('SHORT:" Parameters",1:"")
+4 SET CATS("FP")="First Party"_$SELECT('SHORT:" Parameters",1:"")
+5 SET CATS("AP")="Auto-Post"_$SELECT('SHORT:" Parameters",1:"")
+6 SET CATS("AD")="Auto-Decrease"_$SELECT('SHORT:" Parameters",1:"")
+7 SET CATS("LK")="EFT Lock-Out"_$SELECT('SHORT:" Parameters",1:"")
+8 QUIT
+9 ;
+10 ; PRCA*4.5*349 - New function to prompt for categories
CATS() ; Get categories to display
+1 NEW CATS,CTLST,DIR
+2 SET CTLST=""
+3 DO LSTCATS(.CATS)
+4 SET DIR(0)="SO^"_$$BLDCATS("")_"AL:All"
SET DIR("B")="All"
+5 DO ^DIR
+6 IF Y="AL"
SET CTLST=Y
GOTO QCATS
+7 FOR
if $DATA(DIRUT)
QUIT
SET CTLST=$SELECT($LENGTH(CTLST):CTLST_U,1:"")_Y
Begin DoDot:1
+8 KILL DIR
+9 SET DIR(0)="SO^"_$$BLDCATS(CTLST)
+10 DO ^DIR
End DoDot:1
+11 if Y=U
SET CTLST=""
QCATS QUIT CTLST
+1 ;
+2 ; PRCA*4.5*349 - New function to support CATS()
BLDCATS(CUR) ; Build set of code string for categories question
+1 NEW I,OUT
+2 SET OUT=""
+3 SET I=""
FOR
SET I=$ORDER(CATS(I))
if I=""
QUIT
Begin DoDot:1
+4 if CUR'[(I)
SET OUT=OUT_I_":"_CATS(I)_";"
End DoDot:1
+5 QUIT OUT
+6 ;
+7 ; PRCA*4.5*349 - New function to display "general" questions (including bulletin day)
+8 ; as separate from First Party questions
GEN() ; General Questions
+1 NEW RSLT
SET RSLT=""
+2 IF '$DATA(^RC(342,1,0))
DO BEG^RCMSITE
+3 ; can't continue
if '$DATA(^RC(342,1,0))
SET RSLT="^no site defined"
+4 ;
+5 if RSLT]""
QUIT RSLT
+6 NEW DA,DR,DIE,Y
+7 SET RSLT=0
+8 SET DA=1
SET DR="7.02:7.04"
SET DIE="^RC(342,"
+9 DO ^DIE
+10 SET RSLT=$SELECT($DATA(Y):1,1:0)
+11 IF 'RSLT
QUIT $$BULLDAY^RCDPESP
+12 QUIT RSLT
+13 ;
+14 ; PRCA*4.5*349 - New function to ask First Party questions as their own category
FIRSTP() ; First Party questions
+1 NEW RSLT
SET RSLT=""
+2 IF '$DATA(^RC(342,1,0))
DO BEG^RCMSITE
+3 ; can't continue
if '$DATA(^RC(342,1,0))
SET RSLT="^no site defined"
+4 ;
+5 if RSLT]""
QUIT RSLT
+6 NEW DA,DIE,DR,Y
+7 SET DA=1
SET DR="[RCDPE FIRST PARTY]"
SET DIE="^RC(342,"
DO ^DIE
+8 ; if Y remains from ^DIE call
SET RSLT=$SELECT($DATA(Y):"^user aborted",1:1)
+9 QUIT 'RSLT
+10 ;
+11 ; PRCA*4.5*349 - New function to ask only Medical Auto-Decrease questions if Auto-Post enabled
MAUTOD() ; Medical Claims Auto-Decrease Questions
+1 ; Returns: 1 - User '^' or timed out, 0 otherwise
+2 NEW ONOFF,RCQUIT
+3 SET RCQUIT=0
+4 SET ONOFF=$$GET1^DIQ(344.61,"1,",.02,"I")
+5 ; Do not display Auto-Decrease questions when Auto-Post Disabled
+6 IF ONOFF=0
Begin DoDot:1
+7 WRITE !,"NOTICE: Medical Auto-Decrease unavailable because Auto-Posting of Medical Claims is currently disabled"
End DoDot:1
QUIT 0
+8 ; Enable/disable Auto-Decrease of medical claims with payments
+9 ; PRCA*4.5*345 - Added 0 parameter
SET RCQUIT=$$PAID^RCDPESP7(0)
+10 if RCQUIT=1
QUIT 1
+11 ; Auto-Decrease of Med Claims w/Payments is OFF
if RCQUIT=2
QUIT 0
+12 ;
+13 ; Enable/disable Auto-Decrease of Med Claims with/No Payments
+14 ; PRCA*4.5*345 - Added 0 parameter
SET RCQUIT=$$NOPAY^RCDPESP7(0)
+15 IF RCQUIT=1
QUIT 1
+16 ; Set/Reset payer exclusions for medical claim decrease
+17 ; Display exclusion list
DO EXCLLIST^RCDPESP(2)
+18 SET RCQUIT=$$SETEXCL^RCDPESP(2)
+19 if RCQUIT
QUIT 1
+20 ; Display exclusion list
DO EXCLLIST^RCDPESP(2)
+21 ;
+22 QUIT 0
+23 ;
+24 ; PRCA*4.5*349 - New function to ask only Pharmacy Auto-Decrease questions if Auto-Post enabled
RXAUTOD() ; Enable/disable Auto-Decrease of pharmacy claims with payments
+1 ; Returns: 1 - User '^' or timed out, 0 otherwise
+2 NEW ONOFF,RETURN
+3 SET RETURN=0
+4 SET ONOFF=$$GET1^DIQ(344.61,"1,",1.01,"I")
+5 ; Do not display Auto-Decrease questions when Auto-Post Disabled
+6 IF ONOFF=0
Begin DoDot:1
+7 WRITE !,"NOTICE: Pharmacy Auto-Decrease unavailable because Auto-Posting of Pharmacy Claims is currently disabled"
End DoDot:1
QUIT 0
+8 ; Enable/disable Auto-Decrease of Rx claims with payments
+9 SET RETURN=$$PAID^RCDPESP7(1)
+10 if RETURN=1
QUIT 1
+11 if RETURN=2
QUIT 0
+12 ;
+13 ; Set/Reset payer exclusions for pharmacy claim decrease
+14 ; Display the exclusion list
DO EXCLLIST^RCDPESP(4)
+15 if $$SETEXCL^RCDPESP(4)
QUIT 1
+16 ; Display the exclusion list
DO EXCLLIST^RCDPESP(4)
+17 QUIT 0
+18 ;
+19 ; PRCA*4.5*349 - New function to ask only TRICARE Auto-Decrease questions if Auto-Post enabled
TAUTOD() ; Enable/disable Auto-Decrease of TRICARE claims with payments
+1 ; Returns: 1 - User '^' or timed out, 0 otherwise
+2 NEW ONOFF,RETURN
+3 SET RETURN=0
+4 SET ONOFF=$$GET1^DIQ(344.61,"1,",1.05,"I")
+5 ; Do not display Auto-Decrease questions when Auto-Post Disabled
+6 IF ONOFF=0
Begin DoDot:1
+7 WRITE !,"NOTICE: TRICARE Auto-Decrease unavailable because Auto-Posting of TRICARE Claims is currently disabled"
End DoDot:1
QUIT 0
+8 ;
+9 ; Enable/disable Auto-Decrease of TRICARE claims with payments
+10 SET RETURN=$$PAID^RCDPESP7(2)
+11 if RETURN=1
QUIT 1
+12 ; Auto-Decrease of TRICARE Claims w/Payments is OFF
if RETURN=2
QUIT 0
+13 ;
+14 ; Enable/disable Auto-Decrease of TRICARE with/No Payments
+15 SET RETURN=$$NOPAY^RCDPESP7(2)
+16 IF RETURN=1
QUIT 1
+17 ;
+18 ; Set/Reset payer exclusions for TRICARE claim decrease
+19 ; Display the exclusion list
DO EXCLLIST^RCDPESP(6)
+20 if $$SETEXCL^RCDPESP(6)
QUIT 1
+21 ; Display the exclusion list
DO EXCLLIST^RCDPESP(6)
+22 WRITE !
+23 QUIT 0
+24 ;
+25 ; PRCA*4.5*349 - Added function
AUTOPON(WHICH) ; Is Auto-Post on for the selected parameters?
+1 ; Input: WHICH - 0 - Medical, 1 - Rx, 2 - TRICARE (defaults to 0 - Medical)
+2 ; Returns: 1 if Auto-Posting is turned on for the selected parameter type
+3 ; 0 if Auto-Posting is turned off for the selected parameter type
+4 SET WHICH=+$GET(WHICH)
+5 QUIT $$GET1^DIQ(344.61,"1,",$SELECT(WHICH=0:.02,WHICH=1:1.01,1:1.05),"I")
+6 ;
MPARAMS(RCPARM) ; Display Medical Parameters for Report
+1 ; Input: RCPARM("AUTO-DECREASE") - 1 if Medical Auto-Posting is turned for claims w/Payments
+2 ; 0 otherwise
+3 ; RCPARM("AUTO-POST") - 1 if Medical Auto-Posting is Turned on, 0 otherwise
+4 ; @RCGLB(344.6) - LIST^DIC array of fields
+5 ; @RCGLB(344.61) - LIST^DIC array of fields
+6 ; PRCA*4.5*349 - Added method
+7 DO AD2RPT^RCDPESP1("### Medical Claims Auto-Post/Auto-Decrease Parameters ###")
+8 DO MEDAUTOP^RCDPESP1(.RCPARM)
+9 DO AD2RPT^RCDPESP1(" ")
+10 DO MEDAUTOD^RCDPESP1(.RCPARM,RCTYPE)
+11 ;
+12 QUIT
+13 ;
RXPARAMS(RCPARM) ; Display Rx Parameters for Report
+1 ; PRCA*4.5*349 - New method
+2 ; Input: RCPARM("RX AUTO-DECREASE") - 1 if Rx Auto-Posting is turned for claims w/Payments
+3 ; 0 otherwise
+4 ; RCPARM("RX AUTO-POST") - 1 if Rx Auto-Posting is Turned on, 0 otherwise
+5 ; @RCGLB(344.6) - LIST^DIC array of fields
+6 ; @RCGLB(344.61) - LIST^DIC array of fields
+7 DO AD2RPT^RCDPESP1("### Pharmacy Auto-Post/Auto-Decrease Parameters ###")
+8 DO RXAUTOP^RCDPESP1(.RCPARM)
+9 DO AD2RPT^RCDPESP1(" ")
+10 DO RXAUTOD^RCDPESP1(.RCPARM,RCTYPE)
+11 QUIT
+12 ;
TPARAMS(RCPARM) ; Display TRICARE Parameters for Report
+1 ; Input: RCPARM("TRI AUTO-DECREASE") - 1 if TRICARE Auto-Posting is turned for claims w/Payments
+2 ; 0 otherwise
+3 ; RCPARM("TRI AUTO-POST") - 1 if TRICARE Auto-Posting is Turned on, 0 otherwise
+4 ; @RCGLB(344.6) - LIST^DIC array of fields
+5 ; @RCGLB(344.61) - LIST^DIC array of fields
+6 ; PRCA*4.5*349 - Added method
+7 DO AD2RPT^RCDPESP1("### TRICARE Auto-Post/Auto-Decrease Parameters ###")
+8 DO TRIAUTOP^RCDPESP1(.RCPARM)
+9 DO AD2RPT^RCDPESP1(" ")
+10 DO TRIAUTOD^RCDPESP1(.RCPARM,RCTYPE)
+11 QUIT
+12 ;
LMHDR(HDR,RCTYPE,RCCATS) ; EP from RCDPESP1
+1 ; HDR passed by ref.
+2 ; PRCA*4.5*349 - New subroutine to build ListMan Header
+3 ; Inputs: RCTYPE - M - Medical, P - Pharmacy, T - TRICARE, A - ALL
+4 ; RCCATS - GN - General EDI Lockbox Site
+5 ; AA - Auto-Audit Site
+6 ; FP - First Party
+7 ; AP - Auto-Post"
+8 ; AD - Auto-Decrease
+9 ; LK - EFT Lock-Out
+10 ; Outputs: HDR - Passed by reference
+11 ;
+12 NEW CNT,CUR,CTLST,P,X,Y
+13 SET HDR("TITLE")="EDI LOCKBOX PARAMETERS REPORT "
+14 ;
+15 SET X="Medical/Pharmacy/TRICARE: "
+16 SET X=X_$SELECT(RCTYPE="A":"ALL",RCTYPE="M":"MEDICAL",RCTYPE="P":"PHARMACY",RCTYPE="T":"TRICARE",1:"")
+17 SET HDR(1)="Site: "_$$GET1^DIQ(342,"1,",.01,"E")
+18 SET HDR(1)=HDR(1)_$JUSTIFY(X,IOM-($LENGTH(HDR(1))+1))
+19 ; Add categories
+20 SET Y="Categories: "
+21 SET CNT=$LENGTH(RCCATS,U)
SET CUR=""
+22 DO LSTCATS^RCDPESPC(.CTLST,1)
+23 SET CTLST("AL")="All"
+24 FOR I=1:1:CNT
Begin DoDot:1
+25 SET X=$GET(CTLST($PIECE(RCCATS,U,I)))
+26 IF ($LENGTH(Y)+$LENGTH(X))>IOM
Begin DoDot:2
+27 WRITE !,Y
+28 SET Y=" "
End DoDot:2
+29 SET Y=Y_X
+30 IF I<CNT
SET Y=Y_", "
End DoDot:1
+31 SET HDR(2)=Y
+32 QUIT