IBINI09U ; ; 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,.01,1,3,1)
;;=K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S Y(1)=$S($D(^DGCR(399,D0,"S")):^("S"),1:"") S X=$P(Y(1),U,1)="" I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"S")):^("S"),1:"") S X=$P(Y(1),U,1),X=X S DIU=X K Y S X=DIV S X=DT X ^DD(399,.01,1,3,1.4)
;;^DD(399,.01,1,3,1.4)
;;=S DIH=$S($D(^DGCR(399,DIV(0),"S")):^("S"),1:""),DIV=X S $P(^("S"),U,1)=DIV,DIH=399,DIG=1 D ^DICR:$N(^DD(DIH,DIG,1,0))>0
;;^DD(399,.01,1,3,2)
;;=Q
;;^DD(399,.01,1,3,"CREATE CONDITION")
;;=DATE ENTERED=""
;;^DD(399,.01,1,3,"CREATE VALUE")
;;=TODAY
;;^DD(399,.01,1,3,"DELETE VALUE")
;;=NO EFFECT
;;^DD(399,.01,1,3,"FIELD")
;;=#1
;;^DD(399,.01,1,4,0)
;;=^^TRIGGER^399^2
;;^DD(399,.01,1,4,1)
;;=K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"S")):^("S"),1:"") S X=$P(Y(1),U,2),X=X S DIU=X K Y S X=DIV S X=$S(($D(DUZ)#2):DUZ,1:"") X ^DD(399,.01,1,4,1.4)
;;^DD(399,.01,1,4,1.4)
;;=S DIH=$S($D(^DGCR(399,DIV(0),"S")):^("S"),1:""),DIV=X S $P(^("S"),U,2)=DIV,DIH=399,DIG=2 D ^DICR:$N(^DD(DIH,DIG,1,0))>0
;;^DD(399,.01,1,4,2)
;;=Q
;;^DD(399,.01,1,4,"CREATE VALUE")
;;=S X=$S(($D(DUZ)#2):DUZ,1:"")
;;^DD(399,.01,1,4,"DELETE VALUE")
;;=NO EFFECT
;;^DD(399,.01,1,4,"FIELD")
;;=#2
;;^DD(399,.01,1,5,0)
;;=^^TRIGGER^399^164
;;^DD(399,.01,1,5,1)
;;~K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,14)="" I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:""
;;=) S X=$P(Y(1),U,14),X=X S DIU=X K Y X ^DD(399,.01,1,5,1.1) X ^DD(399,.01,1,5,1.4)
;;^DD(399,.01,1,5,1.1)
;;=S X=DIV S X=$S($D(^IBE(350.9,1,1)):$P(^(1),U,6),1:"")
;;^DD(399,.01,1,5,1.4)
;;=S DIH=$S($D(^DGCR(399,DIV(0),"U")):^("U"),1:""),DIV=X S $P(^("U"),U,14)=DIV,DIH=399,DIG=164 D ^DICR:$N(^DD(DIH,DIG,1,0))>0
;;^DD(399,.01,1,5,2)
;;=Q
;;^DD(399,.01,1,5,"%D",0)
;;=^^2^2^2920205^
;;^DD(399,.01,1,5,"%D",1,0)
;;=This will automatically store the default BC/BS PROVIDER # from the
;;^DD(399,.01,1,5,"%D",2,0)
;;=IB SITE PARAMETERS file into the BC/BS PROVIDER # field for this bill.
;;^DD(399,.01,1,5,"CREATE CONDITION")
;;=#164=""
;;^DD(399,.01,1,5,"CREATE VALUE")
;;=S X=$S($D(^IBE(350.9,1,1)):$P(^(1),U,6),1:"")
;;^DD(399,.01,1,5,"DELETE VALUE")
;;=NO EFFECT
;;^DD(399,.01,1,5,"DT")
;;=2920205
;;^DD(399,.01,1,5,"FIELD")
;;=#164
;;^DD(399,.01,1,6,0)
;;=^^TRIGGER^399^.13
;;^DD(399,.01,1,6,1)
;;=K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,0)):^(0),1:"") S X=$P(Y(1),U,13),X=X S DIU=X K Y S X=DIV S X=1 X ^DD(399,.01,1,6,1.4)
;;^DD(399,.01,1,6,1.4)
;;=S DIH=$S($D(^DGCR(399,DIV(0),0)):^(0),1:""),DIV=X S $P(^(0),U,13)=DIV,DIH=399,DIG=.13 D ^DICR:$N(^DD(DIH,DIG,1,0))>0
;;^DD(399,.01,1,6,2)
;;=Q
;;^DD(399,.01,1,6,"CREATE VALUE")
;;=S X=1
;;^DD(399,.01,1,6,"DELETE VALUE")
;;=NO EFFECT
;;^DD(399,.01,1,6,"FIELD")
;;=#.13
;;^DD(399,.01,1,7,0)
;;=^^TRIGGER^399^.19
;;^DD(399,.01,1,7,1)
;;=X ^DD(399,.01,1,7,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,0)):^(0),1:"") S X=$P(Y(1),U,19),X=X S DIU=X K Y S X=DIV S X=$P($G(^IBE(350.9,1,1)),U,26) X ^DD(399,.01,1,7,1.4)
;;^DD(399,.01,1,7,1.3)
;;=K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S Y(1)=$S($D(^DGCR(399,D0,0)):^(0),1:"") S X=$S('$D(^IBE(353,+$P(Y(1),U,19),0)):"",1:$P(^(0),U,1))=""
;;^DD(399,.01,1,7,1.4)
;;=S DIH=$S($D(^DGCR(399,DIV(0),0)):^(0),1:""),DIV=X S $P(^(0),U,19)=DIV,DIH=399,DIG=.19 D ^DICR:$N(^DD(DIH,DIG,1,0))>0
;;^DD(399,.01,1,7,2)
;;=Q
;;^DD(399,.01,1,7,3)
;;=DO NOT DELETE
;;^DD(399,.01,1,7,"%D",0)
;;=^^2^2^2930608^
;;^DD(399,.01,1,7,"%D",1,0)
;;=Sets the bill's form type to the site's default form type (350.9,1.26)
IBINI09U ; ; 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,.01,1,3,1)
+2 ;;=K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S Y(1)=$S($D(^DGCR(399,D0,"S")):^("S"),1:"") S X=$P(Y(1),U,1)="" I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"S")):^("S"),1:"") S X=$P(Y(1),U,1),X=X S DIU=X K Y S X=DIV S X=DT X ^DD(399,.01,1,3,1.4)
+3 ;;^DD(399,.01,1,3,1.4)
+4 ;;=S DIH=$S($D(^DGCR(399,DIV(0),"S")):^("S"),1:""),DIV=X S $P(^("S"),U,1)=DIV,DIH=399,DIG=1 D ^DICR:$N(^DD(DIH,DIG,1,0))>0
+5 ;;^DD(399,.01,1,3,2)
+6 ;;=Q
+7 ;;^DD(399,.01,1,3,"CREATE CONDITION")
+8 ;;=DATE ENTERED=""
+9 ;;^DD(399,.01,1,3,"CREATE VALUE")
+10 ;;=TODAY
+11 ;;^DD(399,.01,1,3,"DELETE VALUE")
+12 ;;=NO EFFECT
+13 ;;^DD(399,.01,1,3,"FIELD")
+14 ;;=#1
+15 ;;^DD(399,.01,1,4,0)
+16 ;;=^^TRIGGER^399^2
+17 ;;^DD(399,.01,1,4,1)
+18 ;;=K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"S")):^("S"),1:"") S X=$P(Y(1),U,2),X=X S DIU=X K Y S X=DIV S X=$S(($D(DUZ)#2):DUZ,1:"") X ^DD(399,.01,1,4,1.4)
+19 ;;^DD(399,.01,1,4,1.4)
+20 ;;=S DIH=$S($D(^DGCR(399,DIV(0),"S")):^("S"),1:""),DIV=X S $P(^("S"),U,2)=DIV,DIH=399,DIG=2 D ^DICR:$N(^DD(DIH,DIG,1,0))>0
+21 ;;^DD(399,.01,1,4,2)
+22 ;;=Q
+23 ;;^DD(399,.01,1,4,"CREATE VALUE")
+24 ;;=S X=$S(($D(DUZ)#2):DUZ,1:"")
+25 ;;^DD(399,.01,1,4,"DELETE VALUE")
+26 ;;=NO EFFECT
+27 ;;^DD(399,.01,1,4,"FIELD")
+28 ;;=#2
+29 ;;^DD(399,.01,1,5,0)
+30 ;;=^^TRIGGER^399^164
+31 ;;^DD(399,.01,1,5,1)
+32 ;;~K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,14)="" I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:""
+33 ;;=) S X=$P(Y(1),U,14),X=X S DIU=X K Y X ^DD(399,.01,1,5,1.1) X ^DD(399,.01,1,5,1.4)
+34 ;;^DD(399,.01,1,5,1.1)
+35 ;;=S X=DIV S X=$S($D(^IBE(350.9,1,1)):$P(^(1),U,6),1:"")
+36 ;;^DD(399,.01,1,5,1.4)
+37 ;;=S DIH=$S($D(^DGCR(399,DIV(0),"U")):^("U"),1:""),DIV=X S $P(^("U"),U,14)=DIV,DIH=399,DIG=164 D ^DICR:$N(^DD(DIH,DIG,1,0))>0
+38 ;;^DD(399,.01,1,5,2)
+39 ;;=Q
+40 ;;^DD(399,.01,1,5,"%D",0)
+41 ;;=^^2^2^2920205^
+42 ;;^DD(399,.01,1,5,"%D",1,0)
+43 ;;=This will automatically store the default BC/BS PROVIDER # from the
+44 ;;^DD(399,.01,1,5,"%D",2,0)
+45 ;;=IB SITE PARAMETERS file into the BC/BS PROVIDER # field for this bill.
+46 ;;^DD(399,.01,1,5,"CREATE CONDITION")
+47 ;;=#164=""
+48 ;;^DD(399,.01,1,5,"CREATE VALUE")
+49 ;;=S X=$S($D(^IBE(350.9,1,1)):$P(^(1),U,6),1:"")
+50 ;;^DD(399,.01,1,5,"DELETE VALUE")
+51 ;;=NO EFFECT
+52 ;;^DD(399,.01,1,5,"DT")
+53 ;;=2920205
+54 ;;^DD(399,.01,1,5,"FIELD")
+55 ;;=#164
+56 ;;^DD(399,.01,1,6,0)
+57 ;;=^^TRIGGER^399^.13
+58 ;;^DD(399,.01,1,6,1)
+59 ;;=K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,0)):^(0),1:"") S X=$P(Y(1),U,13),X=X S DIU=X K Y S X=DIV S X=1 X ^DD(399,.01,1,6,1.4)
+60 ;;^DD(399,.01,1,6,1.4)
+61 ;;=S DIH=$S($D(^DGCR(399,DIV(0),0)):^(0),1:""),DIV=X S $P(^(0),U,13)=DIV,DIH=399,DIG=.13 D ^DICR:$N(^DD(DIH,DIG,1,0))>0
+62 ;;^DD(399,.01,1,6,2)
+63 ;;=Q
+64 ;;^DD(399,.01,1,6,"CREATE VALUE")
+65 ;;=S X=1
+66 ;;^DD(399,.01,1,6,"DELETE VALUE")
+67 ;;=NO EFFECT
+68 ;;^DD(399,.01,1,6,"FIELD")
+69 ;;=#.13
+70 ;;^DD(399,.01,1,7,0)
+71 ;;=^^TRIGGER^399^.19
+72 ;;^DD(399,.01,1,7,1)
+73 ;;=X ^DD(399,.01,1,7,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,0)):^(0),1:"") S X=$P(Y(1),U,19),X=X S DIU=X K Y S X=DIV S X=$P($G(^IBE(350.9,1,1)),U,26) X ^DD(399,.01,1,7,1.4)
+74 ;;^DD(399,.01,1,7,1.3)
+75 ;;=K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S Y(1)=$S($D(^DGCR(399,D0,0)):^(0),1:"") S X=$S('$D(^IBE(353,+$P(Y(1),U,19),0)):"",1:$P(^(0),U,1))=""
+76 ;;^DD(399,.01,1,7,1.4)
+77 ;;=S DIH=$S($D(^DGCR(399,DIV(0),0)):^(0),1:""),DIV=X S $P(^(0),U,19)=DIV,DIH=399,DIG=.19 D ^DICR:$N(^DD(DIH,DIG,1,0))>0
+78 ;;^DD(399,.01,1,7,2)
+79 ;;=Q
+80 ;;^DD(399,.01,1,7,3)
+81 ;;=DO NOT DELETE
+82 ;;^DD(399,.01,1,7,"%D",0)
+83 ;;=^^2^2^2930608^
+84 ;;^DD(399,.01,1,7,"%D",1,0)
+85 ;;=Sets the bill's form type to the site's default form type (350.9,1.26)