IBINI0AC ; ; 21-MAR-1994
;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
Q:'DIFQ(399) F I=1:2 S X=$T(Q+I) Q:X="" S Y=$E($T(Q+I+1),4,999),X=$E(X,4,999) S:$A(Y)=126 I=I+1,Y=$E(Y,2,999)_$E($T(Q+I+1),5,99) S:$A(Y)=61 Y=$E(Y,2,999) X NO E S @X=Y
Q Q
;;^DD(399,101,"DT")
;;=2940201
;;^DD(399,102,0)
;;=SECONDARY INSURANCE CARRIER^*P36'X^DIC(36,^M;2^D ^DIC K DIC,IBDD S DIC=DIE,X=+Y K:Y<0 X
;;^DD(399,102,1,0)
;;=^.1
;;^DD(399,102,1,1,0)
;;=399^AI2^MUMPS
;;^DD(399,102,1,1,1)
;;=Q
;;^DD(399,102,1,1,2)
;;=Q
;;^DD(399,102,1,1,"DT")
;;=2931220
;;^DD(399,102,1,2,0)
;;=^^TRIGGER^399^123
;;^DD(399,102,1,2,1)
;;=K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"M1")):^("M1"),1:"") S X=$P(Y(1),U,3),X=X S DIU=X K Y X ^DD(399,102,1,2,1.1) X ^DD(399,102,1,2,1.4)
;;^DD(399,102,1,2,1.1)
;;=S X=DIV S I(0,0)=$S($D(D0):D0,1:""),D0=DIV S:'$D(^DIC(36,+D0,0)) D0=-1 S Y(101)=$S($D(^DIC(36,D0,0)):^(0),1:"") S X=$P(Y(101),U,11) S D0=I(0,0)
;;^DD(399,102,1,2,1.4)
;;=S DIH=$S($D(^DGCR(399,DIV(0),"M1")):^("M1"),1:""),DIV=X S $P(^("M1"),U,3)=DIV,DIH=399,DIG=123 D ^DICR:$O(^DD(DIH,DIG,1,0))>0
;;^DD(399,102,1,2,2)
;;=Q
;;^DD(399,102,1,2,"%D",0)
;;=^^2^2^2940201^
;;^DD(399,102,1,2,"%D",1,0)
;;=Loads the Secondary Provider # with the Hospital Provider Number of the
;;^DD(399,102,1,2,"%D",2,0)
;;=Secondary Insurance Carrier.
;;^DD(399,102,1,2,"CREATE VALUE")
;;=SECONDARY INSURANCE CARRIER:HOSPITAL PROVIDER NUMBER
;;^DD(399,102,1,2,"DELETE VALUE")
;;=NO EFFECT
;;^DD(399,102,1,2,"DT")
;;=2940201
;;^DD(399,102,1,2,"FIELD")
;;=SECONDARY PROVIDER #
;;^DD(399,102,3)
;;=Enter name of secondary insurance carrier from which the provider might expect some payment for this bill.
;;^DD(399,102,5,1,0)
;;=399^113^1
;;^DD(399,102,12)
;;=Only valid insurance companies for this date of care.
;;^DD(399,102,12.1)
;;=S DIC("S")="I $D(IBDD(+Y)),'$D(^DGCR(399,DA,""AIC"",+Y))"
;;^DD(399,102,21,0)
;;=^^2^2^2880831^
;;^DD(399,102,21,1,0)
;;=This is the name of the secondary insurance carrier from which the provider
;;^DD(399,102,21,2,0)
;;=might expect some payment for this bill.
;;^DD(399,102,"DT")
;;=2940201
;;^DD(399,103,0)
;;=TERTIARY INSURANCE CARRIER^*P36'X^DIC(36,^M;3^D ^DIC K DIC,IBDD S DIC=DIE,X=+Y K:Y<0 X
;;^DD(399,103,1,0)
;;=^.1
;;^DD(399,103,1,1,0)
;;=399^AI3^MUMPS
;;^DD(399,103,1,1,1)
;;=Q
;;^DD(399,103,1,1,2)
;;=Q
;;^DD(399,103,1,1,"DT")
;;=2931220
;;^DD(399,103,1,2,0)
;;=^^TRIGGER^399^124
;;^DD(399,103,1,2,1)
;;=K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"M1")):^("M1"),1:"") S X=$P(Y(1),U,4),X=X S DIU=X K Y X ^DD(399,103,1,2,1.1) X ^DD(399,103,1,2,1.4)
;;^DD(399,103,1,2,1.1)
;;=S X=DIV S I(0,0)=$S($D(D0):D0,1:""),D0=DIV S:'$D(^DIC(36,+D0,0)) D0=-1 S Y(101)=$S($D(^DIC(36,D0,0)):^(0),1:"") S X=$P(Y(101),U,11) S D0=I(0,0)
;;^DD(399,103,1,2,1.4)
;;=S DIH=$S($D(^DGCR(399,DIV(0),"M1")):^("M1"),1:""),DIV=X S $P(^("M1"),U,4)=DIV,DIH=399,DIG=124 D ^DICR:$O(^DD(DIH,DIG,1,0))>0
;;^DD(399,103,1,2,2)
;;=Q
;;^DD(399,103,1,2,"%D",0)
;;=^^2^2^2940201^
;;^DD(399,103,1,2,"%D",1,0)
;;=Loads the Tertiary Provider # with the Hospital Provider Number of the
;;^DD(399,103,1,2,"%D",2,0)
;;=Tertiary Insurance Carrier.
;;^DD(399,103,1,2,"CREATE VALUE")
;;=TERTIARY INSURANCE CARRIER:HOSPITAL PROVIDER NUMBER
;;^DD(399,103,1,2,"DELETE VALUE")
;;=NO EFFECT
;;^DD(399,103,1,2,"DT")
;;=2940201
;;^DD(399,103,1,2,"FIELD")
;;=TERTIARY PROVIDER #
;;^DD(399,103,3)
;;=Enter name of tertiary insurance carrier from which the provider might expect some payment for this bill.
;;^DD(399,103,5,1,0)
;;=399^114^1
;;^DD(399,103,12)
;;=Only valid insurance companies for this date of care.
;;^DD(399,103,12.1)
;;=S DIC("S")="I $D(IBDD(+Y)),'$D(^DGCR(399,DA,""AIC"",+Y))"
;;^DD(399,103,21,0)
;;=^^2^2^2880831^
IBINI0AC ; ; 21-MAR-1994
+1 ;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
+2 IF 'DIFQ(399)
QUIT
FOR I=1:2
SET X=$TEXT(Q+I)
IF X=""
QUIT
SET Y=$EXTRACT($TEXT(Q+I+1),4,999)
SET X=$EXTRACT(X,4,999)
IF $ASCII(Y)=126
SET I=I+1
SET Y=$EXTRACT(Y,2,999)_$EXTRACT($TEXT(Q+I+1),5,99)
IF $ASCII(Y)=61
SET Y=$EXTRACT(Y,2,999)
XECUTE NO
IF '$TEST
SET @X=Y
Q QUIT
+1 ;;^DD(399,101,"DT")
+2 ;;=2940201
+3 ;;^DD(399,102,0)
+4 ;;=SECONDARY INSURANCE CARRIER^*P36'X^DIC(36,^M;2^D ^DIC K DIC,IBDD S DIC=DIE,X=+Y K:Y<0 X
+5 ;;^DD(399,102,1,0)
+6 ;;=^.1
+7 ;;^DD(399,102,1,1,0)
+8 ;;=399^AI2^MUMPS
+9 ;;^DD(399,102,1,1,1)
+10 ;;=Q
+11 ;;^DD(399,102,1,1,2)
+12 ;;=Q
+13 ;;^DD(399,102,1,1,"DT")
+14 ;;=2931220
+15 ;;^DD(399,102,1,2,0)
+16 ;;=^^TRIGGER^399^123
+17 ;;^DD(399,102,1,2,1)
+18 ;;=K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"M1")):^("M1"),1:"") S X=$P(Y(1),U,3),X=X S DIU=X K Y X ^DD(399,102,1,2,1.1) X ^DD(399,102,1,2,1.4)
+19 ;;^DD(399,102,1,2,1.1)
+20 ;;=S X=DIV S I(0,0)=$S($D(D0):D0,1:""),D0=DIV S:'$D(^DIC(36,+D0,0)) D0=-1 S Y(101)=$S($D(^DIC(36,D0,0)):^(0),1:"") S X=$P(Y(101),U,11) S D0=I(0,0)
+21 ;;^DD(399,102,1,2,1.4)
+22 ;;=S DIH=$S($D(^DGCR(399,DIV(0),"M1")):^("M1"),1:""),DIV=X S $P(^("M1"),U,3)=DIV,DIH=399,DIG=123 D ^DICR:$O(^DD(DIH,DIG,1,0))>0
+23 ;;^DD(399,102,1,2,2)
+24 ;;=Q
+25 ;;^DD(399,102,1,2,"%D",0)
+26 ;;=^^2^2^2940201^
+27 ;;^DD(399,102,1,2,"%D",1,0)
+28 ;;=Loads the Secondary Provider # with the Hospital Provider Number of the
+29 ;;^DD(399,102,1,2,"%D",2,0)
+30 ;;=Secondary Insurance Carrier.
+31 ;;^DD(399,102,1,2,"CREATE VALUE")
+32 ;;=SECONDARY INSURANCE CARRIER:HOSPITAL PROVIDER NUMBER
+33 ;;^DD(399,102,1,2,"DELETE VALUE")
+34 ;;=NO EFFECT
+35 ;;^DD(399,102,1,2,"DT")
+36 ;;=2940201
+37 ;;^DD(399,102,1,2,"FIELD")
+38 ;;=SECONDARY PROVIDER #
+39 ;;^DD(399,102,3)
+40 ;;=Enter name of secondary insurance carrier from which the provider might expect some payment for this bill.
+41 ;;^DD(399,102,5,1,0)
+42 ;;=399^113^1
+43 ;;^DD(399,102,12)
+44 ;;=Only valid insurance companies for this date of care.
+45 ;;^DD(399,102,12.1)
+46 ;;=S DIC("S")="I $D(IBDD(+Y)),'$D(^DGCR(399,DA,""AIC"",+Y))"
+47 ;;^DD(399,102,21,0)
+48 ;;=^^2^2^2880831^
+49 ;;^DD(399,102,21,1,0)
+50 ;;=This is the name of the secondary insurance carrier from which the provider
+51 ;;^DD(399,102,21,2,0)
+52 ;;=might expect some payment for this bill.
+53 ;;^DD(399,102,"DT")
+54 ;;=2940201
+55 ;;^DD(399,103,0)
+56 ;;=TERTIARY INSURANCE CARRIER^*P36'X^DIC(36,^M;3^D ^DIC K DIC,IBDD S DIC=DIE,X=+Y K:Y<0 X
+57 ;;^DD(399,103,1,0)
+58 ;;=^.1
+59 ;;^DD(399,103,1,1,0)
+60 ;;=399^AI3^MUMPS
+61 ;;^DD(399,103,1,1,1)
+62 ;;=Q
+63 ;;^DD(399,103,1,1,2)
+64 ;;=Q
+65 ;;^DD(399,103,1,1,"DT")
+66 ;;=2931220
+67 ;;^DD(399,103,1,2,0)
+68 ;;=^^TRIGGER^399^124
+69 ;;^DD(399,103,1,2,1)
+70 ;;=K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"M1")):^("M1"),1:"") S X=$P(Y(1),U,4),X=X S DIU=X K Y X ^DD(399,103,1,2,1.1) X ^DD(399,103,1,2,1.4)
+71 ;;^DD(399,103,1,2,1.1)
+72 ;;=S X=DIV S I(0,0)=$S($D(D0):D0,1:""),D0=DIV S:'$D(^DIC(36,+D0,0)) D0=-1 S Y(101)=$S($D(^DIC(36,D0,0)):^(0),1:"") S X=$P(Y(101),U,11) S D0=I(0,0)
+73 ;;^DD(399,103,1,2,1.4)
+74 ;;=S DIH=$S($D(^DGCR(399,DIV(0),"M1")):^("M1"),1:""),DIV=X S $P(^("M1"),U,4)=DIV,DIH=399,DIG=124 D ^DICR:$O(^DD(DIH,DIG,1,0))>0
+75 ;;^DD(399,103,1,2,2)
+76 ;;=Q
+77 ;;^DD(399,103,1,2,"%D",0)
+78 ;;=^^2^2^2940201^
+79 ;;^DD(399,103,1,2,"%D",1,0)
+80 ;;=Loads the Tertiary Provider # with the Hospital Provider Number of the
+81 ;;^DD(399,103,1,2,"%D",2,0)
+82 ;;=Tertiary Insurance Carrier.
+83 ;;^DD(399,103,1,2,"CREATE VALUE")
+84 ;;=TERTIARY INSURANCE CARRIER:HOSPITAL PROVIDER NUMBER
+85 ;;^DD(399,103,1,2,"DELETE VALUE")
+86 ;;=NO EFFECT
+87 ;;^DD(399,103,1,2,"DT")
+88 ;;=2940201
+89 ;;^DD(399,103,1,2,"FIELD")
+90 ;;=TERTIARY PROVIDER #
+91 ;;^DD(399,103,3)
+92 ;;=Enter name of tertiary insurance carrier from which the provider might expect some payment for this bill.
+93 ;;^DD(399,103,5,1,0)
+94 ;;=399^114^1
+95 ;;^DD(399,103,12)
+96 ;;=Only valid insurance companies for this date of care.
+97 ;;^DD(399,103,12.1)
+98 ;;=S DIC("S")="I $D(IBDD(+Y)),'$D(^DGCR(399,DA,""AIC"",+Y))"
+99 ;;^DD(399,103,21,0)
+100 ;;=^^2^2^2880831^