IBINI09W ; ; 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,.04,21,0)
;;=^^1^1^2931221^^^^
;;^DD(399,.04,21,1,0)
;;=This identifies the type of facility at which care was administered.
;;^DD(399,.04,"DT")
;;=2931221
;;^DD(399,.05,0)
;;=BILL CLASSIFICATION^RSX^1:INPATIENT (MEDICARE PART A);2:HUMANITARIAN EMERGENCY (INPT./MEDICARE PART B);3:OUTPATIENT;4:HUMANITARIAN EMERGENCY (OPT./ESRD);^0;5^Q
;;^DD(399,.05,.1)
;;=TYPE OF BILL (2ND DIGIT)
;;^DD(399,.05,1,0)
;;=^.1
;;^DD(399,.05,1,1,0)
;;=399^ABT
;;^DD(399,.05,1,1,1)
;;=S ^DGCR(399,"ABT",$E(X,1,30),DA)=""
;;^DD(399,.05,1,1,2)
;;=K ^DGCR(399,"ABT",$E(X,1,30),DA)
;;^DD(399,.05,3)
;;=Enter the code which designates inpatient or outpatient care.
;;^DD(399,.05,21,0)
;;=^^1^1^2931220^^^^
;;^DD(399,.05,21,1,0)
;;=This code identifies the care being billed for as inpatient or outpatient.
;;^DD(399,.05,"DT")
;;=2900508
;;^DD(399,.06,0)
;;~TIMEFRAME OF BILL^RS^1:ADMIT THRU DISCHARGE CLAIM;2:INTERIM - FIRST CLAIM;3:INTERIM - CONTINUING CLAIM;4:INTERIM - LAST CLAIM;5:LATE CHARGE(S) ONLY CLAIM;6:ADJU
;;=STMENT OF PRIOR CLAIM;7:REPLACEMENT OF PRIOR CLAIM;0:NON-PAYMENT/ZERO CLAIM;^0;6^Q
;;^DD(399,.06,.1)
;;=TYPE OF BILL (3RD DIGIT)
;;^DD(399,.06,3)
;;=Enter the code which defines the frequency of this bill.
;;^DD(399,.06,21,0)
;;=^^1^1^2931220^^^
;;^DD(399,.06,21,1,0)
;;=This code defines the frequency of this bill.
;;^DD(399,.06,"DT")
;;=2891221
;;^DD(399,.07,0)
;;=RATE TYPE^R*P399.3'^DGCR(399.3,^0;7^S DIC("S")="I '$P(^(0),U,3)" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
;;^DD(399,.07,1,0)
;;=^.1
;;^DD(399,.07,1,1,0)
;;=^^TRIGGER^399^156
;;^DD(399,.07,1,1,1)
;;=X ^DD(399,.07,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,6),X=X S DIU=X K Y S X=DIV S X="Y" X ^DD(399,.07,1,1,1.4)
;;^DD(399,.07,1,1,1.3)
;;=K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X X ^DD(399,.07,1,1,69.2) S X=$P($P(Y(102),$C(59)_$P(Y(101),U,5)_":",2),$C(59),1)="YES" S D0=I(0,0)
;;^DD(399,.07,1,1,1.4)
;;=S DIH=$S($D(^DGCR(399,DIV(0),"U")):^("U"),1:""),DIV=X S $P(^("U"),U,6)=DIV,DIH=399,DIG=156 D ^DICR:$N(^DD(DIH,DIG,1,0))>0
;;^DD(399,.07,1,1,2)
;;=X ^DD(399,.07,1,1,2.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,6),X=X S DIU=X K Y S X=DIV S X="N" X ^DD(399,.07,1,1,2.4)
;;^DD(399,.07,1,1,2.3)
;;=K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X X ^DD(399,.07,1,1,79.2) S Y(101)=$S($D(^DGCR(399.3,D0,0)):^(0),1:"") S X=$P($P(Y(102),$C(59)_$P(Y(101),U,5)_":",2),$C(59),1)'="YES" S D0=I(0,0)
;;^DD(399,.07,1,1,2.4)
;;=S DIH=$S($D(^DGCR(399,DIV(0),"U")):^("U"),1:""),DIV=X S $P(^("U"),U,6)=DIV,DIH=399,DIG=156 D ^DICR:$N(^DD(DIH,DIG,1,0))>0
;;^DD(399,.07,1,1,69.2)
;;=S I(0,0)=$S($D(D0):D0,1:""),D0=Y(0) S:'$D(^DGCR(399.3,+D0,0)) D0=-1 S Y(102)=$C(59)_$S($D(^DD(399.3,.05,0)):$P(^(0),U,3),1:""),Y(101)=$S($D(^DGCR(399.3,D0,0)):^(0),1:"")
;;^DD(399,.07,1,1,79.2)
;;=S I(0,0)=$S($D(D0):D0,1:""),Y(1)=$S($D(^DGCR(399,D0,0)):^(0),1:""),D0=$P(Y(1),U,7) S:'$D(^DGCR(399.3,+D0,0)) D0=-1 S Y(102)=$C(59)_$S($D(^DD(399.3,.05,0)):$P(^(0),U,3),1:"")
;;^DD(399,.07,1,1,"CREATE CONDITION")
;;=RATE TYPE:IS THIS A THIRD PARTY BILL?="YES"
;;^DD(399,.07,1,1,"CREATE VALUE")
;;=S X="Y"
;;^DD(399,.07,1,1,"DELETE CONDITION")
;;=RATE TYPE:IS THIS A THIRD PARTY BILL?'="YES"
;;^DD(399,.07,1,1,"DELETE VALUE")
;;=S X="N"
;;^DD(399,.07,1,1,"FIELD")
;;=#156
;;^DD(399,.07,1,2,0)
;;=^^TRIGGER^399^.11
;;^DD(399,.07,1,2,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,11),X=X S DIU=X K Y X ^DD(399,.07,1,2,1.1) X ^DD(399,.07,1,2,1.4)
IBINI09W ; ; 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,.04,21,0)
+2 ;;=^^1^1^2931221^^^^
+3 ;;^DD(399,.04,21,1,0)
+4 ;;=This identifies the type of facility at which care was administered.
+5 ;;^DD(399,.04,"DT")
+6 ;;=2931221
+7 ;;^DD(399,.05,0)
+8 ;;=BILL CLASSIFICATION^RSX^1:INPATIENT (MEDICARE PART A);2:HUMANITARIAN EMERGENCY (INPT./MEDICARE PART B);3:OUTPATIENT;4:HUMANITARIAN EMERGENCY (OPT./ESRD);^0;5^Q
+9 ;;^DD(399,.05,.1)
+10 ;;=TYPE OF BILL (2ND DIGIT)
+11 ;;^DD(399,.05,1,0)
+12 ;;=^.1
+13 ;;^DD(399,.05,1,1,0)
+14 ;;=399^ABT
+15 ;;^DD(399,.05,1,1,1)
+16 ;;=S ^DGCR(399,"ABT",$E(X,1,30),DA)=""
+17 ;;^DD(399,.05,1,1,2)
+18 ;;=K ^DGCR(399,"ABT",$E(X,1,30),DA)
+19 ;;^DD(399,.05,3)
+20 ;;=Enter the code which designates inpatient or outpatient care.
+21 ;;^DD(399,.05,21,0)
+22 ;;=^^1^1^2931220^^^^
+23 ;;^DD(399,.05,21,1,0)
+24 ;;=This code identifies the care being billed for as inpatient or outpatient.
+25 ;;^DD(399,.05,"DT")
+26 ;;=2900508
+27 ;;^DD(399,.06,0)
+28 ;;~TIMEFRAME OF BILL^RS^1:ADMIT THRU DISCHARGE CLAIM;2:INTERIM - FIRST CLAIM;3:INTERIM - CONTINUING CLAIM;4:INTERIM - LAST CLAIM;5:LATE CHARGE(S) ONLY CLAIM;6:ADJU
+29 ;;=STMENT OF PRIOR CLAIM;7:REPLACEMENT OF PRIOR CLAIM;0:NON-PAYMENT/ZERO CLAIM;^0;6^Q
+30 ;;^DD(399,.06,.1)
+31 ;;=TYPE OF BILL (3RD DIGIT)
+32 ;;^DD(399,.06,3)
+33 ;;=Enter the code which defines the frequency of this bill.
+34 ;;^DD(399,.06,21,0)
+35 ;;=^^1^1^2931220^^^
+36 ;;^DD(399,.06,21,1,0)
+37 ;;=This code defines the frequency of this bill.
+38 ;;^DD(399,.06,"DT")
+39 ;;=2891221
+40 ;;^DD(399,.07,0)
+41 ;;=RATE TYPE^R*P399.3'^DGCR(399.3,^0;7^S DIC("S")="I '$P(^(0),U,3)" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
+42 ;;^DD(399,.07,1,0)
+43 ;;=^.1
+44 ;;^DD(399,.07,1,1,0)
+45 ;;=^^TRIGGER^399^156
+46 ;;^DD(399,.07,1,1,1)
+47 ;;=X ^DD(399,.07,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,6),X=X S DIU=X K Y S X=DIV S X="Y" X ^DD(399,.07,1,1,1.4)
+48 ;;^DD(399,.07,1,1,1.3)
+49 ;;=K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X X ^DD(399,.07,1,1,69.2) S X=$P($P(Y(102),$C(59)_$P(Y(101),U,5)_":",2),$C(59),1)="YES" S D0=I(0,0)
+50 ;;^DD(399,.07,1,1,1.4)
+51 ;;=S DIH=$S($D(^DGCR(399,DIV(0),"U")):^("U"),1:""),DIV=X S $P(^("U"),U,6)=DIV,DIH=399,DIG=156 D ^DICR:$N(^DD(DIH,DIG,1,0))>0
+52 ;;^DD(399,.07,1,1,2)
+53 ;;=X ^DD(399,.07,1,1,2.3) I X S X=DIV S Y(1)=$S($D(^DGCR(399,D0,"U")):^("U"),1:"") S X=$P(Y(1),U,6),X=X S DIU=X K Y S X=DIV S X="N" X ^DD(399,.07,1,1,2.4)
+54 ;;^DD(399,.07,1,1,2.3)
+55 ;;=K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X X ^DD(399,.07,1,1,79.2) S Y(101)=$S($D(^DGCR(399.3,D0,0)):^(0),1:"") S X=$P($P(Y(102),$C(59)_$P(Y(101),U,5)_":",2),$C(59),1)'="YES" S D0=I(0,0)
+56 ;;^DD(399,.07,1,1,2.4)
+57 ;;=S DIH=$S($D(^DGCR(399,DIV(0),"U")):^("U"),1:""),DIV=X S $P(^("U"),U,6)=DIV,DIH=399,DIG=156 D ^DICR:$N(^DD(DIH,DIG,1,0))>0
+58 ;;^DD(399,.07,1,1,69.2)
+59 ;;=S I(0,0)=$S($D(D0):D0,1:""),D0=Y(0) S:'$D(^DGCR(399.3,+D0,0)) D0=-1 S Y(102)=$C(59)_$S($D(^DD(399.3,.05,0)):$P(^(0),U,3),1:""),Y(101)=$S($D(^DGCR(399.3,D0,0)):^(0),1:"")
+60 ;;^DD(399,.07,1,1,79.2)
+61 ;;=S I(0,0)=$S($D(D0):D0,1:""),Y(1)=$S($D(^DGCR(399,D0,0)):^(0),1:""),D0=$P(Y(1),U,7) S:'$D(^DGCR(399.3,+D0,0)) D0=-1 S Y(102)=$C(59)_$S($D(^DD(399.3,.05,0)):$P(^(0),U,3),1:"")
+62 ;;^DD(399,.07,1,1,"CREATE CONDITION")
+63 ;;=RATE TYPE:IS THIS A THIRD PARTY BILL?="YES"
+64 ;;^DD(399,.07,1,1,"CREATE VALUE")
+65 ;;=S X="Y"
+66 ;;^DD(399,.07,1,1,"DELETE CONDITION")
+67 ;;=RATE TYPE:IS THIS A THIRD PARTY BILL?'="YES"
+68 ;;^DD(399,.07,1,1,"DELETE VALUE")
+69 ;;=S X="N"
+70 ;;^DD(399,.07,1,1,"FIELD")
+71 ;;=#156
+72 ;;^DD(399,.07,1,2,0)
+73 ;;=^^TRIGGER^399^.11
+74 ;;^DD(399,.07,1,2,1)
+75 ;;=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,11),X=X S DIU=X K Y X ^DD(399,.07,1,2,1.1) X ^DD(399,.07,1,2,1.4)