IBTOBI2 ;ALB/AAS - CLAIMS TRACKING BILLING INFORMATION PRINT ; 27-OCT-93
;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
;
IR ; -- print insurance review information
Q:'$O(^IBT(356.2,"C",+IBTRN,0)) ; -no reivews
I ($Y+11)>IOSL D HDR^IBTOBI Q:IBQUIT
W !," Insurance Review Information "
N I,J,IBII,IBTRC,IBTRCD,IBACTION,TCODE
S IBII="" F S IBII=$O(^IBT(356.2,"ATIDT",IBTRN,IBII)) Q:'IBII!(IBQUIT) S IBTRC=0 F S IBTRC=$O(^IBT(356.2,"ATIDT",IBTRN,IBII,IBTRC)) Q:'IBTRC!(IBQUIT) D
.N IBJ,IBD
.D IR1
.D IR2
.S IBJ=0 F S IBJ=$O(IBD(IBJ)) Q:'IBJ W !,$E($G(IBD(IBJ,1)),1,39),?40,$E($G(IBD(IBJ,2)),1,39)
.D COMM2(IBTRC) Q:IBQUIT
.W !?30,"-----------------------------------"
.I ($Y+11)>IOSL D HDR^IBTOBI Q:IBQUIT
W:'IBQUIT !?4,$TR($J(" ",IOM-8)," ","-"),!
Q
;
IR1 ; -- print one review
S IBTRCD=$G(^IBT(356.2,+IBTRC,0)),IBTRCD1=$G(^(1))
S IBD(1,1)=" Type Review: "_$$EXPAND^IBTRE(356.2,.04,$P(IBTRCD,"^",4))
S TCODE=$$TCODE^IBTRC(IBTRC) I TCODE D @TCODE
Q
10 ; -- pre-cert contact
15 ; -- admission review
20 ; -- urgent/emergent ins. contact
30 ; -- continued stay contact
S IBD(2,1)=" Action: "_$$EXPAND^IBTRE(356.2,.11,$P(IBTRCD,"^",11))
S IBACTION=$P($G(^IBE(356.7,+$P(IBTRCD,"^",11),0)),"^",3)
S IBACTION=IBACTION+100 D @IBACTION
Q
;
40 ; -- Discharge contact
100 ; -- No type of action
Q
50 ; -- outpatient treatment
S IBD(2,1)=" Opt Treatment: "_$$EXPAND^IBTRE(356.2,.26,$P(IBTRCD,"^",26))
S IBD(3,1)=" Action: "_$$EXPAND^IBTRE(356.2,.11,$P(IBTRCD,"^",11))
S IBD(4,1)=" Auth. Number: "_$P(IBTRCD,"^",28)
Q
60 ; -- Appeal
65 ; -- Nth appeal
S IBD(2,1)=" Appeal Type: "_$$EXPAND^IBTRE(356.2,.23,$P(IBTRCD,"^",23))
S IBD(3,1)=" Case Status: "_$$EXPAND^IBTRE(356.2,.1,$P(IBTRCD,"^",10))
S IBD(4,1)="No Days Pending: "_$$EXPAND^IBTRE(356.2,.25,$P(IBTRCD,"^",25))
S IBD(5,1)=" Final Outcome: "_$$EXPAND^IBTRE(356.2,.29,$P(IBTRCD,"^",29))
Q
70 ; -- Patient
80 ; -- Other
85 ; -- Insurance verification
90 ;
Q
;
110 ; -- approval actions
S IBD(3,1)="Authorized From: "_$S($P(IBTRCD1,"^",8):"ENTIRE VISIT",1:$$DAT1^IBOUTL($P(IBTRCD,"^",12)))
S IBD(4,1)=" Authorized To: "_$S($P(IBTRCD1,"^",8):"ENTIRE VISIT",1:$$DAT1^IBOUTL($P(IBTRCD,"^",13)))
S IBD(5,1)="Authorized Diag: "_$$DIAG^IBTRE6($P(IBTRCD,"^",14),1)
S IBD(6,1)=" Auth. Number: "_$P(IBTRCD,"^",28)
Q
120 ; -- denial actions
S IBD(3,1)=" Denied From: "_$S($P(IBTRCD1,"^",7):"ENTIRE VISIT",1:$$DAT1^IBOUTL($P(IBTRCD,"^",15)))
S IBD(4,1)=" Denied To: "_$S($P(IBTRCD1,"^",7):"ENTIRE VISIT",1:$$DAT1^IBOUTL($P(IBTRCD,"^",16)))
S IBI=0,IBD=4 F S IBI=$O(^IBT(356.2,IBTRC,12,IBI)) Q:'IBI D
.S IBD=IBD+1
.S IBD(IBD,1)=" Denial Reasons: "_$$EXPAND^IBTRE(356.212,.01,+$G(^IBT(356.2,IBTRC,12,IBI,0)))
Q
130 ; -- penalty
S IBI=0,IBD=2 F S IBI=$O(^IBT(356.2,IBTRC,13,IBI)) Q:'IBI D
.S IBD=IBD+1
.S IBD(IBD,1)=" Penalty: "_$$EXPAND^IBTRE(356.213,.01,+$G(^IBT(356.2,IBTRC,13,IBI,0)))
Q
140 ; -- case pending
S IBD(3,1)=" Case Pending: "_$$EXPAND^IBTRE(356.2,.2,$P(IBTRCD,"^",20))
Q
150 ; -- no coverage
S IBD(3,1)=" No Coverage: "_$$EXPAND^IBTRE(356.2,.21,$P(IBTRCD,"^",21))
Q
;
IR2 ; -- contact information
;N IBCDFN,IBCPOL
;S IBCDFN=$P(IBTRCD1,"^",5),IBCPOL=$P(^DPT(DFN,.312,IBCDFN,0),"^",18)
S IBD(1,2)=" Review Date: "_$E($$DAT1^IBOUTL(+IBTRCD,"2P"),1,20)
S IBD(2,2)=" Insurance Co.: "_$E($P($G(^DIC(36,+$G(^DPT(DFN,.312,+$P(IBTRCD1,"^",5),0)),0)),"^"),1,20)
S IBD(3,2)="Person Contacted: "_$E($P(IBTRCD,"^",6),1,20)
S IBD(4,2)=" Contact Method: "_$E($$EXPAND^IBTRE(356.2,.17,$P(IBTRCD,"^",17)),1,20)
S IBD(5,2)="Call Ref. Number: "_$E($P(IBTRCD,"^",9),1,20)
S IBD(6,2)=" Status: "_$E($$EXPAND^IBTRE(356.2,.19,$P(IBTRCD,"^",19)),1,20)
S IBD(7,2)=" Last Edited By: "_$E($$EXPAND^IBTRE(356.2,1.04,$P($G(^IBT(356.2,+$G(IBTRC),1)),"^",4)),1,20)
I '$P(IBTRCD,"^",2) S IBD(2,2)="Patient Contacted: "_$E($P($G(^DPT(+$P(IBTRCD,"^",5),0)),"^"),1,20)
Q
;
COMM2(DA) ; -- print comments from ins. reviews.
W !,"Comment: "
Q:'$D(^IBT(356.2,DA,11))
K ^UTILITY($J,"W")
S DIWL=10,DIWR=IOM-12,DIWF="W"
S IBJ=0 F S IBJ=$O(^IBT(356.2,DA,11,IBJ)) Q:'IBJ S X=^(IBJ,0) D ^DIWP I IOSL<($Y+4) Q:IBQUIT D HDR^IBTOBI
Q:IBQUIT
D ^DIWW
K ^UTILITY($J,"W")
Q
IBTOBI2 ;ALB/AAS - CLAIMS TRACKING BILLING INFORMATION PRINT ; 27-OCT-93
+1 ;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
+2 ;
IR ; -- print insurance review information
+1 ; -no reivews
IF '$ORDER(^IBT(356.2,"C",+IBTRN,0))
QUIT
+2 IF ($Y+11)>IOSL
DO HDR^IBTOBI
IF IBQUIT
QUIT
+3 WRITE !," Insurance Review Information "
+4 NEW I,J,IBII,IBTRC,IBTRCD,IBACTION,TCODE
+5 SET IBII=""
FOR
SET IBII=$ORDER(^IBT(356.2,"ATIDT",IBTRN,IBII))
IF 'IBII!(IBQUIT)
QUIT
SET IBTRC=0
FOR
SET IBTRC=$ORDER(^IBT(356.2,"ATIDT",IBTRN,IBII,IBTRC))
IF 'IBTRC!(IBQUIT)
QUIT
Begin DoDot:1
+6 NEW IBJ,IBD
+7 DO IR1
+8 DO IR2
+9 SET IBJ=0
FOR
SET IBJ=$ORDER(IBD(IBJ))
IF 'IBJ
QUIT
WRITE !,$EXTRACT($GET(IBD(IBJ,1)),1,39),?40,$EXTRACT($GET(IBD(IBJ,2)),1,39)
+10 DO COMM2(IBTRC)
IF IBQUIT
QUIT
+11 WRITE !?30,"-----------------------------------"
+12 IF ($Y+11)>IOSL
DO HDR^IBTOBI
IF IBQUIT
QUIT
End DoDot:1
+13 IF 'IBQUIT
WRITE !?4,$TRANSLATE($JUSTIFY(" ",IOM-8)," ","-"),!
+14 QUIT
+15 ;
IR1 ; -- print one review
+1 SET IBTRCD=$GET(^IBT(356.2,+IBTRC,0))
SET IBTRCD1=$GET(^(1))
+2 SET IBD(1,1)=" Type Review: "_$$EXPAND^IBTRE(356.2,.04,$PIECE(IBTRCD,"^",4))
+3 SET TCODE=$$TCODE^IBTRC(IBTRC)
IF TCODE
DO @TCODE
+4 QUIT
10 ; -- pre-cert contact
15 ; -- admission review
20 ; -- urgent/emergent ins. contact
30 ; -- continued stay contact
+1 SET IBD(2,1)=" Action: "_$$EXPAND^IBTRE(356.2,.11,$PIECE(IBTRCD,"^",11))
+2 SET IBACTION=$PIECE($GET(^IBE(356.7,+$PIECE(IBTRCD,"^",11),0)),"^",3)
+3 SET IBACTION=IBACTION+100
DO @IBACTION
+4 QUIT
+5 ;
40 ; -- Discharge contact
100 ; -- No type of action
+1 QUIT
50 ; -- outpatient treatment
+1 SET IBD(2,1)=" Opt Treatment: "_$$EXPAND^IBTRE(356.2,.26,$PIECE(IBTRCD,"^",26))
+2 SET IBD(3,1)=" Action: "_$$EXPAND^IBTRE(356.2,.11,$PIECE(IBTRCD,"^",11))
+3 SET IBD(4,1)=" Auth. Number: "_$PIECE(IBTRCD,"^",28)
+4 QUIT
60 ; -- Appeal
65 ; -- Nth appeal
+1 SET IBD(2,1)=" Appeal Type: "_$$EXPAND^IBTRE(356.2,.23,$PIECE(IBTRCD,"^",23))
+2 SET IBD(3,1)=" Case Status: "_$$EXPAND^IBTRE(356.2,.1,$PIECE(IBTRCD,"^",10))
+3 SET IBD(4,1)="No Days Pending: "_$$EXPAND^IBTRE(356.2,.25,$PIECE(IBTRCD,"^",25))
+4 SET IBD(5,1)=" Final Outcome: "_$$EXPAND^IBTRE(356.2,.29,$PIECE(IBTRCD,"^",29))
+5 QUIT
70 ; -- Patient
80 ; -- Other
85 ; -- Insurance verification
90 ;
+1 QUIT
+2 ;
110 ; -- approval actions
+1 SET IBD(3,1)="Authorized From: "_$SELECT($PIECE(IBTRCD1,"^",8):"ENTIRE VISIT",1:$$DAT1^IBOUTL($PIECE(IBTRCD,"^",12)))
+2 SET IBD(4,1)=" Authorized To: "_$SELECT($PIECE(IBTRCD1,"^",8):"ENTIRE VISIT",1:$$DAT1^IBOUTL($PIECE(IBTRCD,"^",13)))
+3 SET IBD(5,1)="Authorized Diag: "_$$DIAG^IBTRE6($PIECE(IBTRCD,"^",14),1)
+4 SET IBD(6,1)=" Auth. Number: "_$PIECE(IBTRCD,"^",28)
+5 QUIT
120 ; -- denial actions
+1 SET IBD(3,1)=" Denied From: "_$SELECT($PIECE(IBTRCD1,"^",7):"ENTIRE VISIT",1:$$DAT1^IBOUTL($PIECE(IBTRCD,"^",15)))
+2 SET IBD(4,1)=" Denied To: "_$SELECT($PIECE(IBTRCD1,"^",7):"ENTIRE VISIT",1:$$DAT1^IBOUTL($PIECE(IBTRCD,"^",16)))
+3 SET IBI=0
SET IBD=4
FOR
SET IBI=$ORDER(^IBT(356.2,IBTRC,12,IBI))
IF 'IBI
QUIT
Begin DoDot:1
+4 SET IBD=IBD+1
+5 SET IBD(IBD,1)=" Denial Reasons: "_$$EXPAND^IBTRE(356.212,.01,+$GET(^IBT(356.2,IBTRC,12,IBI,0)))
End DoDot:1
+6 QUIT
130 ; -- penalty
+1 SET IBI=0
SET IBD=2
FOR
SET IBI=$ORDER(^IBT(356.2,IBTRC,13,IBI))
IF 'IBI
QUIT
Begin DoDot:1
+2 SET IBD=IBD+1
+3 SET IBD(IBD,1)=" Penalty: "_$$EXPAND^IBTRE(356.213,.01,+$GET(^IBT(356.2,IBTRC,13,IBI,0)))
End DoDot:1
+4 QUIT
140 ; -- case pending
+1 SET IBD(3,1)=" Case Pending: "_$$EXPAND^IBTRE(356.2,.2,$PIECE(IBTRCD,"^",20))
+2 QUIT
150 ; -- no coverage
+1 SET IBD(3,1)=" No Coverage: "_$$EXPAND^IBTRE(356.2,.21,$PIECE(IBTRCD,"^",21))
+2 QUIT
+3 ;
IR2 ; -- contact information
+1 ;N IBCDFN,IBCPOL
+2 ;S IBCDFN=$P(IBTRCD1,"^",5),IBCPOL=$P(^DPT(DFN,.312,IBCDFN,0),"^",18)
+3 SET IBD(1,2)=" Review Date: "_$EXTRACT($$DAT1^IBOUTL(+IBTRCD,"2P"),1,20)
+4 SET IBD(2,2)=" Insurance Co.: "_$EXTRACT($PIECE($GET(^DIC(36,+$GET(^DPT(DFN,.312,+$PIECE(IBTRCD1,"^",5),0)),0)),"^"),1,20)
+5 SET IBD(3,2)="Person Contacted: "_$EXTRACT($PIECE(IBTRCD,"^",6),1,20)
+6 SET IBD(4,2)=" Contact Method: "_$EXTRACT($$EXPAND^IBTRE(356.2,.17,$PIECE(IBTRCD,"^",17)),1,20)
+7 SET IBD(5,2)="Call Ref. Number: "_$EXTRACT($PIECE(IBTRCD,"^",9),1,20)
+8 SET IBD(6,2)=" Status: "_$EXTRACT($$EXPAND^IBTRE(356.2,.19,$PIECE(IBTRCD,"^",19)),1,20)
+9 SET IBD(7,2)=" Last Edited By: "_$EXTRACT($$EXPAND^IBTRE(356.2,1.04,$PIECE($GET(^IBT(356.2,+$GET(IBTRC),1)),"^",4)),1,20)
+10 IF '$PIECE(IBTRCD,"^",2)
SET IBD(2,2)="Patient Contacted: "_$EXTRACT($PIECE($GET(^DPT(+$PIECE(IBTRCD,"^",5),0)),"^"),1,20)
+11 QUIT
+12 ;
COMM2(DA) ; -- print comments from ins. reviews.
+1 WRITE !,"Comment: "
+2 IF '$DATA(^IBT(356.2,DA,11))
QUIT
+3 KILL ^UTILITY($JOB,"W")
+4 SET DIWL=10
SET DIWR=IOM-12
SET DIWF="W"
+5 SET IBJ=0
FOR
SET IBJ=$ORDER(^IBT(356.2,DA,11,IBJ))
IF 'IBJ
QUIT
SET X=^(IBJ,0)
DO ^DIWP
IF IOSL<($Y+4)
IF IBQUIT
QUIT
DO HDR^IBTOBI
+6 IF IBQUIT
QUIT
+7 DO ^DIWW
+8 KILL ^UTILITY($JOB,"W")
+9 QUIT