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

IBJTA1.m

Go to the documentation of this file.
  1. IBJTA1 ;ALB/ARH - TPI ACTIONS ;2/14/95
  1. ;;2.0;INTEGRATED BILLING;**39,137,377**;21-MAR-94;Build 23
  1. ;;Per VHA Directive 2004-038, this routine should not be modified.
  1. ;
  1. CP ; -- IBJT CHANGE PATIENT action: change patient, only available on AL screen
  1. ; user selects new patient, then Active Bills screen rebuilt with that patients active bills
  1. N VALMQUIT,IBDFN
  1. D FULL^VALM1
  1. S IBDFN=DFN S DFN=+$$PAT^IBJTU2 I 'DFN S DFN=IBDFN
  1. K ^TMP("IBJTLA",$J),^TMP("IBJTLAX",$J)
  1. D BLDA^IBJTLA1,HDR^IBJTLA
  1. S VALMBCK="R",VALMBG=1
  1. CPQ Q
  1. ;
  1. CB ; -- IBJT CHANGE BILL action: change bill, only available on CI screen
  1. ; user enters new bill number then Claim Info screen rebuilt/redisplayed for that bill
  1. ; if option entered through Active List screen then only allows bills for current patient
  1. N VALMQUIT,IBIFN1,IBDFN1
  1. D FULL^VALM1
  1. S IBDFN1=DFN,IBIFN1=IBIFN
  1. I $D(^TMP("IBJTLA",$J)) S DIC("S")="I $P(^(0),U,2)="_DFN
  1. S IBIFN=+$$BILL^IBJTU2 I 'IBIFN S IBIFN=IBIFN1
  1. S DFN=$P(^DGCR(399,+IBIFN,0),U,2)
  1. D CLEAN^VALM10 K IBXSAVE,IBXDATA D BLD^IBJTCA1,HDR^IBJTCA
  1. S VALMBCK="R",VALMBG=1
  1. CBQ Q
  1. ;
  1. CDI ; -- IBJT CHANGE DATES INACTIVE action: Change Date range for Inactive screen
  1. ; user enters end date for search for inactive bills for a patient, Inactive Bills screen then rebuilt with
  1. ; inactive bills for the patient and new date range, IBEND passed to screen build
  1. ; if IBBEG is defined the day before is used as the default end date, otherwise, today
  1. ; this way the defaults will work backwards until end of bills, then restarts with today
  1. D FULL^VALM1
  1. S DIR("?",1)="Enter most recent date to include in list."
  1. S DIR("?")="A search for inactive bills for this patient will begin on the date entered and go back at least 6 months into the past. If the patient has few bills then the search may span more than six months."
  1. S DIR("B")=$S(+$G(IBBEG):$$DATE^IBJU1($$FMADD^XLFDT(IBBEG,-1)),1:"TODAY")
  1. S DIR(0)="DO^::EX",DIR("A")="End Date"
  1. D ^DIR K DIR I 'Y!($D(DIRUT))!(Y=$G(IBEND)) S VALMSG="Date range was not changed." G CDIQ
  1. K ^TMP("IBJTLB",$J),^TMP("IBJTLBX",$J)
  1. S IBEND=Y D BLDA^IBJTLB1,HDR^IBJTLB
  1. CDIQ S VALMBCK="R",VALMBG=1
  1. K VALMB,VALMBEG,VALMEND,DIRUT
  1. Q
  1. ;
  1. ARCA ; -- IBJT AR COMMENT ADD action: add a comment transaction to the AR account, IBIFN required
  1. ; IBARCOMM set to indicate AR Profile screen needs to be rebuilt when it is reentered
  1. ; will cause the AR screen to be rebuilt including the new information if the AR screen is already open
  1. N AUTHDT,MRADT,STATUS,VALMQUIT,DIR
  1. D FULL^VALM1
  1. S STATUS=$P($G(^DGCR(399,IBIFN,0)),U,13)
  1. S AUTHDT=$P($G(^DGCR(399,IBIFN,"S")),U,10)
  1. S MRADT=$P($G(^DGCR(399,IBIFN,"S")),U,7)
  1. ; if claim status is "NOT REVIEWED" or claim status is "CANCELLED" with neither MRA request date
  1. ; nor Authorization date present, display an error and bail out.
  1. I STATUS=1!(STATUS=7&(MRADT="")&(AUTHDT="")) D G ARCAQ
  1. .S DIR(0)="EA",DIR("A",1)="A comment can not be added for an incomplete or cancelled while incomplete claim.",DIR("A")="Press RETURN to continue: " D ^DIR K DIR
  1. ; if claim status is "REQUEST MRA" or claim status is "CANCELLED" with MRA request date present,
  1. ; but no Authorization date, enter MRA comments.
  1. I STATUS=2!(STATUS=7&(MRADT'="")&(AUTHDT="")) D:$G(IBIFN) CMNT^IBCECOB6 G ARCAR
  1. ; otherwise, enter AR comments.
  1. D ADJUST^RCJIBFN3(IBIFN)
  1. I $D(^TMP("IBJTTA",$J)) S IBARCOMM=1
  1. K ^TMP("IBJTTC",$J)
  1. ARCAR ; rebuild comments screen
  1. D BLD^IBJTTC,HDR^IBJTTC
  1. ARCAQ S VALMBCK="R",VALMBG=1
  1. Q
  1. ;
  1. HS ; -- IBJT HS HEALTH SUMMARY action: health summary (inpt (350.9,2.08), outpt (350.9,2.09))
  1. ; if a Health Summary has been defined for the type of care (Inpt/Outpt) it is printed to the screen
  1. ; type of care is taken from the current bill if there is one otherwise the user is asked
  1. ; requires HS 2.5 or greater, if 2.7 is available then a date range can be used
  1. ; if date range used it is taken from the current bill if available otherwise askes user
  1. N X,Y,IBX,IBHS,DIR,DIRUT,IBIOPT,IBDT1,IBDT2,IBHSVER
  1. S (IBIOPT,IBHS)=0,IBHSVER=$$VERSION^XPDUTL("HEALTH SUMMARY")
  1. I IBHSVER<2.5 S VALMSG="Health Summary package not available." G HSQ
  1. D FULL^VALM1
  1. I +$G(IBIFN) D I 'IBIOPT G HSQ
  1. . S IBX=$G(^DGCR(399,+IBIFN,0)) I '$G(DFN) S DFN=$P(IBX,U,2) I 'DFN Q
  1. . S IBIOPT=$S($P(IBX,U,5)<1:0,$P(IBX,U,5)<3:1,1:2)
  1. . S IBDT1=$G(^DGCR(399,+IBIFN,"U")),IBDT2=$P(IBDT1,U,2),IBDT1=+IBDT1
  1. ;
  1. I '$G(IBIFN) D I 'IBIOPT G HSQ
  1. . S DIR(0)="SOB^I:Inpatient;O:Outpatient",DIR("A")="Inpatient or Outpatient Health Summary?" D ^DIR K DIR
  1. . S IBIOPT=$S(Y="I":1,Y="O":2,1:0) Q:'IBIOPT
  1. . ;
  1. . Q:IBHSVER<2.7
  1. . W !!,"Enter the date range the Health Summary should cover."
  1. . S IBDT1=$$DR^IBJTU2($$FMADD^XLFDT(DT,-365),DT),IBDT2=$P(IBDT1,U,2),IBDT1=+IBDT1
  1. ;
  1. S IBX=$G(^IBE(350.9,1,2)),IBHS=$S(IBIOPT=1:$P(IBX,U,8),1:$P(IBX,U,9))
  1. ;
  1. I 'IBHS S VALMSG="No Health Summary Type chosen for "_$S(IBIOPT=1:"In",1:"Out")_"patient." G HSQ
  1. I IBHSVER<2.7 D ENX^GMTSDVR(DFN,IBHS) G HSQ
  1. D ENX^GMTSDVR(DFN,IBHS,IBDT1,IBDT2)
  1. HSQ S VALMBCK="R"
  1. Q