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

IBCISC.m

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