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

IBJTRA1.m

Go to the documentation of this file.
  1. IBJTRA1 ;ALB/AAS,ARH - TPI CT INSURANCE COMMUNICATIONS BUILD ; 4/1/95
  1. ;;2.0;INTEGRATED BILLING;**39,91,347,389,458**;21-MAR-94;Build 4
  1. ;;Per VHA Directive 2004-038, this routine should not be modified.
  1. ;
  1. ; copyed from IBTRC with modifications to show reviews for multiple events
  1. ;
  1. ;
  1. BLD ; -- Build list of Insurance contacts, including reviews, appeals, and denials
  1. K ^TMP("IBJTRA",$J),^TMP("IBJTRADX",$J),IBJTA1,IBJTA2
  1. N X,IBI,IBJ,J,IBTRC,IBTRCD,IBTRCD1,IBJTEVNT,IBCNT,IBTRN,IBTRND,IBETYP,IBBEG
  1. S VALMSG=$$MSG^IBTUTL3(DFN)
  1. S (IBTRC,IBCNT,VALMCNT)=0,IBI=""
  1. D IFNTRN^IBJTU5(IBIFN,.IBJTA1,.IBJTA2)
  1. I 'IBJTA1 S IBCNT=1 D SET1(" ") S IBCNT=2 D SET1("No Claims Tracking Entries.") G BLDQ
  1. S IBJ=0 F S IBJ=$O(IBJTA2(IBJ)) Q:'IBJ S IBTRN=IBJTA2(IBJ) D
  1. .S IBTRND=$G(^IBT(356,IBTRN,0))
  1. .S IBJTEVNT=" "_$$EVNT(IBTRND)
  1. .F S IBI=$O(^IBT(356.2,"ATIDT",IBTRN,IBI)) Q:'IBI S IBTRC=0 F S IBTRC=$O(^IBT(356.2,"ATIDT",IBTRN,IBI,IBTRC)) Q:'IBTRC D
  1. ..S IBTRCD=$G(^IBT(356.2,+IBTRC,0))
  1. ..S IBTRCD1=$G(^IBT(356.2,+IBTRC,1))
  1. ..Q:'+$P(IBTRCD,"^",19) ;quit if inactive
  1. ..S IBCNT=IBCNT+1
  1. ..I IBJTEVNT'="" D SET(" ",0),SET(IBJTEVNT,0) S IBJTEVNT=""
  1. ..S IBETYP=$G(^IBE(356.11,+$P(IBTRCD,"^",4),0))
  1. ..W "."
  1. ..S X=""
  1. ..S X=$$SETFLD^VALM1(IBCNT,X,"NUMBER")
  1. ..S X=$$SETFLD^VALM1($P($$DAT1^IBOUTL(+IBTRCD,"2P")," "),X,"DATE")
  1. ..S X=$$SETFLD^VALM1($P($G(^DIC(36,+$P(IBTRCD,"^",8),0)),"^"),X,"INS CO")
  1. ..S X=$$SETFLD^VALM1($$EXPAND^IBTRE(356.2,.11,$P(IBTRCD,"^",11)),X,"ACTION")
  1. ..;
  1. ..S X=$$SETFLD^VALM1($P(IBETYP,"^",3),X,"TYPE")
  1. ..S X=$$SETFLD^VALM1($$AUTHN^IBTRC(IBTRC,10),X,"PRE-CERT")
  1. ..I $P(IBTRCD,"^",13) S X=$$SETFLD^VALM1($J($$DAY^IBTUTL3($P(IBTRCD,"^",12),$P(IBTRCD,"^",13),IBTRN),3),X,"DAYS")
  1. ..I $P($G(^IBE(356.7,+$P(IBTRCD,"^",11),0)),"^",3)=20 S X=$$SETFLD^VALM1($J($$DAY^IBTUTL3($P(IBTRCD,"^",15),$P(IBTRCD,"^",16),IBTRN),3),X,"DAYS")
  1. ..I $P(IBTRCD1,"^",7)!($P(IBTRCD1,"^",8)) S X=$$SETFLD^VALM1("ALL",X,"DAYS")
  1. ..S X=$$SETFLD^VALM1($P(IBTRCD,"^",6),X,"CONTACT")
  1. ..S X=$$SETFLD^VALM1($P(IBTRCD,"^",7),X,"PHONE")
  1. ..S X=$$SETFLD^VALM1($$CREFN^IBTRC(IBTRC,12),X,"REF NO")
  1. ..I $P(IBETYP,"^",2)=60!($P(IBETYP,"^",2)=65) D APPEAL^IBTRC3
  1. ..D SET(X,1)
  1. I 'IBCNT S IBCNT=1 D SET1(" ") S IBCNT=2 D SET1("No Insurance Reviews for Episodes on this Bill.") G BLDQ
  1. BLDQ K IBJTA1,IBJTA2
  1. Q
  1. ;
  1. SET1(X) ; set array (no selection)
  1. S VALMCNT=VALMCNT+1
  1. S ^TMP("IBJTRA",$J,VALMCNT,0)=X
  1. Q
  1. ;
  1. SET(X,Y) ; -- set arrays
  1. S VALMCNT=VALMCNT+1
  1. S ^TMP("IBJTRA",$J,VALMCNT,0)=X
  1. S ^TMP("IBJTRA",$J,"IDX",VALMCNT,IBCNT)=""
  1. I +$G(Y) S ^TMP("IBJTRADX",$J,IBCNT)=VALMCNT_"^"_IBTRC
  1. Q
  1. ;
  1. EVNT(IBTRND) ; return line for display on event
  1. N X,Y,IBTYP S X="" I $G(IBTRND)="" G EVNTQ
  1. S IBTYP=+$P(IBTRND,U,18)
  1. S X=$$EXSET^IBJU1(IBTYP,356,.18)
  1. I IBTYP=2 S X=X_" of "_$P($G(^DIC(40.7,+$$SCE^IBSDU(+$P(IBTRND,U,4),3),0)),U,1)
  1. I IBTYP=3 S X=X_" of "_$P($$PIN^IBCSC5B(+$P(IBTRND,U,9)),U,2)
  1. I IBTYP=4 S X=X_" of "_$$FILE^IBRXUTL(+$P(IBTRND,U,8),.01)
  1. S X=X_" on "_$$DAT1^IBOUTL($P(IBTRND,U,6),"2P")
  1. EVNTQ Q X