IBCEOB3 ;ALB/TMP - 835 EDI EOB BULLETINS ;18-FEB-99
;;2.0;INTEGRATED BILLING;**137**;21-MAR-94
Q
;
CHGBULL(IBEOB,IBBULL) ; Send bulletin that name and/or id number for insured
; has been reported changed via EDI
; IBEOB = the internal entry # of the entry in file 361.1
; IBBULL = the flag that has 2 '^' pieces that indicate whether there
; was a name change ('^' piece 1 = 1) or an ID # change ('^'
; piece 2 = 1)
;
N XMBODY,XMSUBJ,XMTO,XMDUZ,IB0,IBT
Q:'$TR($P($G(IBBULL),U,1,2),U)
S IB0=$G(^IBM(361.1,+IBEOB,0))
S XMTO("I:G.IB EDI")="",XMBODY="IBT"
S IBT(1)="An EOB for Bill # "_$$EXTERNAL^DILFD(399,.01,,+IB0)_" (COB sequence: "_$$EXTERNAL^DILFD(361.1,.15,,$P(IB0,U,15))_") has indicated the following changes:"
S IBT(2)=" "
S Z=2
I $P(IBBULL,U) S Z=Z+1,IBT=" INSURED'S NAME CHANGED FROM: "_$P(IBBULL,U,3)_" to "_$P(IBBULL,U,4),Z=Z+1,IBT(Z)=$J("",10)_"(Only the claim has been updated with the new name)"
I $P(IBBULL,U,2) S Z=Z+1,IBT=" INSURED'S ID # CHANGED FROM: "_$P(IBBULL,U,5)_" to "_$P(IBBULL,U,6),Z=Z+1,IBT(Z)=$J("",10)_"(Both claim and policy have been updated with the new id)"
S XMSUBJ="INSURED'S "_$S(IBBULL:"NAME ",1:"")_$S($P(IBBULL,U,2):$S(IBBULL:"AND ",1:"")_"ID ",1:"")_"CHANGE INDICATED ON EOB"
S XMDUZ=""
D SENDMSG^XMXAPI(XMDUZ,XMSUBJ,XMBODY,.XMTO,,.XMZ)
Q
;
COBBULL(IBEOB) ; Send bulletin that COB may be pending on processing an EOB
; IBEOB = the internal entry # of the entry in file 361.1
;
N IBBILL,IB0,IBT,XMBODY,XMSUBJ,XMTO,XMDUZ
S XMTO("I:G.IB EDI")="",XMBODY="IBT"
S IB0=$G(^IBM(361.1,+IBEOB,0))
S IBBILL=$$BN^PRCAFN(+IB0)
Q:IB0=""
S IBT(1)=" BILL NUMBER: "_IBBILL
S IBT(2)="CURRENT COB SEQUENCE: "_$$EXTERNAL^DILFD(361.1,.15,,$P(IB0,U,15))
S IBT(3)=" EOB DATE: "_$$FMTE^XLFDT($P(IB0,U,5),2)
S IBT(4)=" "
S IBT(5)="There is subsequent insurance and the balance on the bill is > 0."
S IBT(6)="COB processing is needed to collect from this bill's next payer."
S XMSUBJ="FINAL EOB RECEIVED-"_IBBILL
S XMDUZ=""
D SENDMSG^XMXAPI(XMDUZ,XMSUBJ,XMBODY,.XMTO,,.XMZ)
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBCEOB3 2117 printed Dec 13, 2024@02:11:24 Page 2
IBCEOB3 ;ALB/TMP - 835 EDI EOB BULLETINS ;18-FEB-99
+1 ;;2.0;INTEGRATED BILLING;**137**;21-MAR-94
+2 QUIT
+3 ;
CHGBULL(IBEOB,IBBULL) ; Send bulletin that name and/or id number for insured
+1 ; has been reported changed via EDI
+2 ; IBEOB = the internal entry # of the entry in file 361.1
+3 ; IBBULL = the flag that has 2 '^' pieces that indicate whether there
+4 ; was a name change ('^' piece 1 = 1) or an ID # change ('^'
+5 ; piece 2 = 1)
+6 ;
+7 NEW XMBODY,XMSUBJ,XMTO,XMDUZ,IB0,IBT
+8 if '$TRANSLATE($PIECE($GET(IBBULL),U,1,2),U)
QUIT
+9 SET IB0=$GET(^IBM(361.1,+IBEOB,0))
+10 SET XMTO("I:G.IB EDI")=""
SET XMBODY="IBT"
+11 SET IBT(1)="An EOB for Bill # "_$$EXTERNAL^DILFD(399,.01,,+IB0)_" (COB sequence: "_$$EXTERNAL^DILFD(361.1,.15,,$PIECE(IB0,U,15))_") has indicated the following changes:"
+12 SET IBT(2)=" "
+13 SET Z=2
+14 IF $PIECE(IBBULL,U)
SET Z=Z+1
SET IBT=" INSURED'S NAME CHANGED FROM: "_$PIECE(IBBULL,U,3)_" to "_$PIECE(IBBULL,U,4)
SET Z=Z+1
SET IBT(Z)=$JUSTIFY("",10)_"(Only the claim has been updated with the new name)"
+15 IF $PIECE(IBBULL,U,2)
SET Z=Z+1
SET IBT=" INSURED'S ID # CHANGED FROM: "_$PIECE(IBBULL,U,5)_" to "_$PIECE(IBBULL,U,6)
SET Z=Z+1
SET IBT(Z)=$JUSTIFY("",10)_"(Both claim and policy have been updated with the new id)"
+16 SET XMSUBJ="INSURED'S "_$SELECT(IBBULL:"NAME ",1:"")_$SELECT($PIECE(IBBULL,U,2):$SELECT(IBBULL:"AND ",1:"")_"ID ",1:"")_"CHANGE INDICATED ON EOB"
+17 SET XMDUZ=""
+18 DO SENDMSG^XMXAPI(XMDUZ,XMSUBJ,XMBODY,.XMTO,,.XMZ)
+19 QUIT
+20 ;
COBBULL(IBEOB) ; Send bulletin that COB may be pending on processing an EOB
+1 ; IBEOB = the internal entry # of the entry in file 361.1
+2 ;
+3 NEW IBBILL,IB0,IBT,XMBODY,XMSUBJ,XMTO,XMDUZ
+4 SET XMTO("I:G.IB EDI")=""
SET XMBODY="IBT"
+5 SET IB0=$GET(^IBM(361.1,+IBEOB,0))
+6 SET IBBILL=$$BN^PRCAFN(+IB0)
+7 if IB0=""
QUIT
+8 SET IBT(1)=" BILL NUMBER: "_IBBILL
+9 SET IBT(2)="CURRENT COB SEQUENCE: "_$$EXTERNAL^DILFD(361.1,.15,,$PIECE(IB0,U,15))
+10 SET IBT(3)=" EOB DATE: "_$$FMTE^XLFDT($PIECE(IB0,U,5),2)
+11 SET IBT(4)=" "
+12 SET IBT(5)="There is subsequent insurance and the balance on the bill is > 0."
+13 SET IBT(6)="COB processing is needed to collect from this bill's next payer."
+14 SET XMSUBJ="FINAL EOB RECEIVED-"_IBBILL
+15 SET XMDUZ=""
+16 DO SENDMSG^XMXAPI(XMDUZ,XMSUBJ,XMBODY,.XMTO,,.XMZ)
+17 QUIT
+18 ;