IBCISC ;DSI/ESG - IB EDIT SCREENS ?CLA FUNCTIONALITY ;23-FEB-2001
;;2.0;INTEGRATED BILLING;**161,348**;21-MAR-94;Build 5
;;Per VHA Directive 10-93-142, this routine should not be modified.
;
; Cannot be called from the top
Q
;
CLA(IBIFN) ; Entry point for ?CLA processing
; This is called by routine IBCSCH.
NEW DIR,X,Y,DTOUT,DUOUT,DIRUT,DIROUT
;
0 ; Clear screen and display header information
W @IOF
W !!?21,"VistA-ClaimsManager Interface Options"
;
; Check the bill form type to make sure it's a 1500.
I $$CK1^IBCIUT1(IBIFN) D G CLAX
. W !!?5,"ClaimsManager is only available for CMS-1500 claims."
. W !!?5,"The form type of the bill you're editing"
. W " (",$G(IBBNO),") is "
. W $$EXTERNAL^DILFD(399,.19,"",$P(^DGCR(399,IBIFN,0),U,19)),"."
. I $P(^DGCR(399,IBIFN,0),U,27) D
.. W !?5,"The charge type of this bill is "
.. W $$EXTERNAL^DILFD(399,.27,"",$P(^DGCR(399,IBIFN,0),U,27)),"."
.. Q
. D EOP
. Q
;
; Check for a form type change
D CKFT^IBCIUT1(IBIFN)
;
; Display the options available and let the user choose
S DIR("A")="Select option or press RETURN to continue"
S DIR(0)="SO^1:Test Send to ClaimsManager;2:Display ClaimsManager Errors;3:Show ClaimsManager Information"
D ^DIR K DIR
I 'Y G CLAX
I Y=1 D TESTSEND G CLAX
I Y=2 D DISPERR G CLAX
I Y=3 D STATS G CLAX
CLAX ;
Q
;
;
TESTSEND ;
; Send the data to ClaimsManager as it currently exists
; and display any errors that ClaimsManager finds.
;
NEW NUMBER,IBCISNT,IBCISTAT,IBCIREDT,IBCIERR
;
; Check for the ClaimsManager working OK flag
I '$$CK2^IBCIUT1() D G TSTSNDX
. W !!?5,"The VistA-ClaimsManager Interface is not currently working."
. W !!?5,"Please try again later."
. D EOP
. Q
;
; Check to see if the bill is no longer editable. We only want to
; do test sends if the bill is still editable.
I '$F(".1.","."_$P($G(^DGCR(399,IBIFN,0)),U,13)_".") D G TSTSNDX ;DSI/DJW 3/21/02
. W !!?5,"This bill is no longer editable. The ClaimsManager interface"
. W !?5,"Test Send functionality is not available for this bill."
. D EOP
. Q
;
; Refresh the data in file 351.9 if either of these functions
; report that there are no line items. We've got to know what's
; going on in this case. (esg - 3/20/02)
I '$$LITMS^IBCIUT1(IBIFN)!'$$CKLI^IBCIUT1(IBIFN) D UPDT^IBCIADD1
;
; Check for the existence of line items
I '$$CKLI^IBCIUT1(IBIFN) D MSG4^IBCIST,EOP G TSTSNDX
;
; Send to ClaimsManager after setting IBCISNT=3 to indicate test send
S IBCISNT=3
D ST2^IBCIST
;
; No errors found by ClaimsManager
I IBCISTAT=3 D EOP G TSTSNDX
;
; Errors were found by ClaimsManager
I IBCISTAT=4 D G TSTSNDX
. W !!?5,"ClaimsManager found "
. S NUMBER=$O(^TMP("IBCITST",$J,""),-1)
. W NUMBER," error" W:NUMBER>1 "s"
. W " with this bill."
. W !?5,"Press RETURN to view the error" W:NUMBER>1 "s" W "."
. D EOP Q:($D(DTOUT)!$D(DUOUT))
. ;
. ; Invoke the utility to display the ClaimsManager errors
. ;
. D EN^IBCIWK(0)
. Q
;
; At this point, we know that IBCISTAT=6 so there was a communication
; problem of some kind. A more descriptive error message should have
; been displayed by IBCIST and a mail message should have been sent.
;
W !!?5,"There was a communications failure:"
W !?8,$P(IBCIERR,U,2)
I $P(IBCIERR,U,3)'="" D
. W !?8,$P($P(IBCIERR,U,3)," - ",1)
. W !?8,$P($P(IBCIERR,U,3,99)," - ",2,99)
. Q
W !!?5,"Please report these errors to your system manager."
W !?5,"This bill was NOT successfully analyzed by ClaimsManager."
;
D EOP
;
TSTSNDX ;
Q
;
DISPERR ; Display the errors that were received during the last transaction
; with Ingenix ClaimsManager. These are the errors that are stored
; in the error fields in the CLAIMSMANAGER FILE (#351.9). These
; fields are the ERROR CODE, ERROR DATA, and ERROR TEXT. They are all
; stored at or under the 1 node.
;
I '$P($G(^IBA(351.9,IBIFN,1,0)),U,4) D G DISPERX
. W !!?5,"There are no errors recorded in the file."
. D EOP
. Q
;
; At this point we know that some errors exist. Process and display
; the errors stored on the 1 node file 351.9.
;
; Invoke the utility to display the ClaimsManager errors
; '0' indicates 'browse' mode of the ListMan display
;
D EN^IBCIWK(0)
DISPERX ;
Q
;
STATS ; Display the data elements on the 0 node of file 351.9.
NEW J,IBA0
S J=30
S IBA0=$G(^IBA(351.9,IBIFN,0))
W !!,$J("Current Status: ",J)
W $$EXTERNAL^DILFD(351.9,.02,"",$P(IBA0,U,2))
W !!,$J("Times sent to ClaimsManager: ",J)
W $$EXTERNAL^DILFD(351.9,.04,"",$P(IBA0,U,4))
W !,$J("Last sent date/time: ",J)
W $$EXTERNAL^DILFD(351.9,.03,"",$P(IBA0,U,3))
W !,$J("Last sent by: ",J)
W $$EXTERNAL^DILFD(351.9,.05,"",$P(IBA0,U,5))
W !!,$J("Date/time Entered: ",J)
W $$EXTERNAL^DILFD(351.9,.06,"",$P(IBA0,U,6))
W !,$J("Entered by: ",J)
W $$EXTERNAL^DILFD(351.9,.07,"",$P(IBA0,U,7))
W !,$J("Date/time Last Edited: ",J)
W $$EXTERNAL^DILFD(351.9,.08,"",$P(IBA0,U,8))
W !,$J("Last Edited by: ",J)
W $$EXTERNAL^DILFD(351.9,.09,"",$P(IBA0,U,9))
W !!,$J("Assigned to: ",J)
W $$EXTERNAL^DILFD(351.9,.12,"",$P(IBA0,U,12))
W !,$J("Coder: ",J)
W $P($$CODER^IBCIUT5(IBIFN),U,3)
W !,$J("Biller: ",J)
W $P($$BILLER^IBCIUT5(IBIFN),U,2)
D EOP
STATSX ;
Q
;
EOP ; End of page
W !! S DIR("A")="Press RETURN to continue",DIR(0)="E" D ^DIR K DIR
EOPX ;
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBCISC 5456 printed Dec 13, 2024@02:13:24 Page 2
IBCISC ;DSI/ESG - IB EDIT SCREENS ?CLA FUNCTIONALITY ;23-FEB-2001
+1 ;;2.0;INTEGRATED BILLING;**161,348**;21-MAR-94;Build 5
+2 ;;Per VHA Directive 10-93-142, this routine should not be modified.
+3 ;
+4 ; Cannot be called from the top
+5 QUIT
+6 ;
CLA(IBIFN) ; Entry point for ?CLA processing
+1 ; This is called by routine IBCSCH.
+2 NEW DIR,X,Y,DTOUT,DUOUT,DIRUT,DIROUT
+3 ;
0 ; Clear screen and display header information
+1 WRITE @IOF
+2 WRITE !!?21,"VistA-ClaimsManager Interface Options"
+3 ;
+4 ; Check the bill form type to make sure it's a 1500.
+5 IF $$CK1^IBCIUT1(IBIFN)
Begin DoDot:1
+6 WRITE !!?5,"ClaimsManager is only available for CMS-1500 claims."
+7 WRITE !!?5,"The form type of the bill you're editing"
+8 WRITE " (",$GET(IBBNO),") is "
+9 WRITE $$EXTERNAL^DILFD(399,.19,"",$PIECE(^DGCR(399,IBIFN,0),U,19)),"."
+10 IF $PIECE(^DGCR(399,IBIFN,0),U,27)
Begin DoDot:2
+11 WRITE !?5,"The charge type of this bill is "
+12 WRITE $$EXTERNAL^DILFD(399,.27,"",$PIECE(^DGCR(399,IBIFN,0),U,27)),"."
+13 QUIT
End DoDot:2
+14 DO EOP
+15 QUIT
End DoDot:1
GOTO CLAX
+16 ;
+17 ; Check for a form type change
+18 DO CKFT^IBCIUT1(IBIFN)
+19 ;
+20 ; Display the options available and let the user choose
+21 SET DIR("A")="Select option or press RETURN to continue"
+22 SET DIR(0)="SO^1:Test Send to ClaimsManager;2:Display ClaimsManager Errors;3:Show ClaimsManager Information"
+23 DO ^DIR
KILL DIR
+24 IF 'Y
GOTO CLAX
+25 IF Y=1
DO TESTSEND
GOTO CLAX
+26 IF Y=2
DO DISPERR
GOTO CLAX
+27 IF Y=3
DO STATS
GOTO CLAX
CLAX ;
+1 QUIT
+2 ;
+3 ;
TESTSEND ;
+1 ; Send the data to ClaimsManager as it currently exists
+2 ; and display any errors that ClaimsManager finds.
+3 ;
+4 NEW NUMBER,IBCISNT,IBCISTAT,IBCIREDT,IBCIERR
+5 ;
+6 ; Check for the ClaimsManager working OK flag
+7 IF '$$CK2^IBCIUT1()
Begin DoDot:1
+8 WRITE !!?5,"The VistA-ClaimsManager Interface is not currently working."
+9 WRITE !!?5,"Please try again later."
+10 DO EOP
+11 QUIT
End DoDot:1
GOTO TSTSNDX
+12 ;
+13 ; Check to see if the bill is no longer editable. We only want to
+14 ; do test sends if the bill is still editable.
+15 ;DSI/DJW 3/21/02
IF '$FIND(".1.","."_$PIECE($GET(^DGCR(399,IBIFN,0)),U,13)_".")
Begin DoDot:1
+16 WRITE !!?5,"This bill is no longer editable. The ClaimsManager interface"
+17 WRITE !?5,"Test Send functionality is not available for this bill."
+18 DO EOP
+19 QUIT
End DoDot:1
GOTO TSTSNDX
+20 ;
+21 ; Refresh the data in file 351.9 if either of these functions
+22 ; report that there are no line items. We've got to know what's
+23 ; going on in this case. (esg - 3/20/02)
+24 IF '$$LITMS^IBCIUT1(IBIFN)!'$$CKLI^IBCIUT1(IBIFN)
DO UPDT^IBCIADD1
+25 ;
+26 ; Check for the existence of line items
+27 IF '$$CKLI^IBCIUT1(IBIFN)
DO MSG4^IBCIST
DO EOP
GOTO TSTSNDX
+28 ;
+29 ; Send to ClaimsManager after setting IBCISNT=3 to indicate test send
+30 SET IBCISNT=3
+31 DO ST2^IBCIST
+32 ;
+33 ; No errors found by ClaimsManager
+34 IF IBCISTAT=3
DO EOP
GOTO TSTSNDX
+35 ;
+36 ; Errors were found by ClaimsManager
+37 IF IBCISTAT=4
Begin DoDot:1
+38 WRITE !!?5,"ClaimsManager found "
+39 SET NUMBER=$ORDER(^TMP("IBCITST",$JOB,""),-1)
+40 WRITE NUMBER," error"
if NUMBER>1
WRITE "s"
+41 WRITE " with this bill."
+42 WRITE !?5,"Press RETURN to view the error"
if NUMBER>1
WRITE "s"
WRITE "."
+43 DO EOP
if ($DATA(DTOUT)!$DATA(DUOUT))
QUIT
+44 ;
+45 ; Invoke the utility to display the ClaimsManager errors
+46 ;
+47 DO EN^IBCIWK(0)
+48 QUIT
End DoDot:1
GOTO TSTSNDX
+49 ;
+50 ; At this point, we know that IBCISTAT=6 so there was a communication
+51 ; problem of some kind. A more descriptive error message should have
+52 ; been displayed by IBCIST and a mail message should have been sent.
+53 ;
+54 WRITE !!?5,"There was a communications failure:"
+55 WRITE !?8,$PIECE(IBCIERR,U,2)
+56 IF $PIECE(IBCIERR,U,3)'=""
Begin DoDot:1
+57 WRITE !?8,$PIECE($PIECE(IBCIERR,U,3)," - ",1)
+58 WRITE !?8,$PIECE($PIECE(IBCIERR,U,3,99)," - ",2,99)
+59 QUIT
End DoDot:1
+60 WRITE !!?5,"Please report these errors to your system manager."
+61 WRITE !?5,"This bill was NOT successfully analyzed by ClaimsManager."
+62 ;
+63 DO EOP
+64 ;
TSTSNDX ;
+1 QUIT
+2 ;
DISPERR ; Display the errors that were received during the last transaction
+1 ; with Ingenix ClaimsManager. These are the errors that are stored
+2 ; in the error fields in the CLAIMSMANAGER FILE (#351.9). These
+3 ; fields are the ERROR CODE, ERROR DATA, and ERROR TEXT. They are all
+4 ; stored at or under the 1 node.
+5 ;
+6 IF '$PIECE($GET(^IBA(351.9,IBIFN,1,0)),U,4)
Begin DoDot:1
+7 WRITE !!?5,"There are no errors recorded in the file."
+8 DO EOP
+9 QUIT
End DoDot:1
GOTO DISPERX
+10 ;
+11 ; At this point we know that some errors exist. Process and display
+12 ; the errors stored on the 1 node file 351.9.
+13 ;
+14 ; Invoke the utility to display the ClaimsManager errors
+15 ; '0' indicates 'browse' mode of the ListMan display
+16 ;
+17 DO EN^IBCIWK(0)
DISPERX ;
+1 QUIT
+2 ;
STATS ; Display the data elements on the 0 node of file 351.9.
+1 NEW J,IBA0
+2 SET J=30
+3 SET IBA0=$GET(^IBA(351.9,IBIFN,0))
+4 WRITE !!,$JUSTIFY("Current Status: ",J)
+5 WRITE $$EXTERNAL^DILFD(351.9,.02,"",$PIECE(IBA0,U,2))
+6 WRITE !!,$JUSTIFY("Times sent to ClaimsManager: ",J)
+7 WRITE $$EXTERNAL^DILFD(351.9,.04,"",$PIECE(IBA0,U,4))
+8 WRITE !,$JUSTIFY("Last sent date/time: ",J)
+9 WRITE $$EXTERNAL^DILFD(351.9,.03,"",$PIECE(IBA0,U,3))
+10 WRITE !,$JUSTIFY("Last sent by: ",J)
+11 WRITE $$EXTERNAL^DILFD(351.9,.05,"",$PIECE(IBA0,U,5))
+12 WRITE !!,$JUSTIFY("Date/time Entered: ",J)
+13 WRITE $$EXTERNAL^DILFD(351.9,.06,"",$PIECE(IBA0,U,6))
+14 WRITE !,$JUSTIFY("Entered by: ",J)
+15 WRITE $$EXTERNAL^DILFD(351.9,.07,"",$PIECE(IBA0,U,7))
+16 WRITE !,$JUSTIFY("Date/time Last Edited: ",J)
+17 WRITE $$EXTERNAL^DILFD(351.9,.08,"",$PIECE(IBA0,U,8))
+18 WRITE !,$JUSTIFY("Last Edited by: ",J)
+19 WRITE $$EXTERNAL^DILFD(351.9,.09,"",$PIECE(IBA0,U,9))
+20 WRITE !!,$JUSTIFY("Assigned to: ",J)
+21 WRITE $$EXTERNAL^DILFD(351.9,.12,"",$PIECE(IBA0,U,12))
+22 WRITE !,$JUSTIFY("Coder: ",J)
+23 WRITE $PIECE($$CODER^IBCIUT5(IBIFN),U,3)
+24 WRITE !,$JUSTIFY("Biller: ",J)
+25 WRITE $PIECE($$BILLER^IBCIUT5(IBIFN),U,2)
+26 DO EOP
STATSX ;
+1 QUIT
+2 ;
EOP ; End of page
+1 WRITE !!
SET DIR("A")="Press RETURN to continue"
SET DIR(0)="E"
DO ^DIR
KILL DIR
EOPX ;
+1 QUIT
+2 ;