IBINI05F ; ; 21-MAR-1994
;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
Q:'DIFQ(356) 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(356,.09,"DT")
;;=2940131
;;^DD(356,.1,0)
;;=REFILL DATE^NJ2,0^^0;10^K:+X'=X!(X>99)!(X<1)!(X?.E1"."1N.N) X
;;^DD(356,.1,1,0)
;;=^.1
;;^DD(356,.1,1,1,0)
;;=356^ARXFL^MUMPS
;;^DD(356,.1,1,1,1)
;;=S:$P(^IBT(356,DA,0),U,8) ^IBT(356,"ARXFL",$P(^(0),U,8),X,DA)=""
;;^DD(356,.1,1,1,2)
;;=K ^IBT(356,"ARXFL",+$P(^IBT(356,DA,0),U,8),X,DA)
;;^DD(356,.1,1,1,"%D",0)
;;=^^2^2^2940213^^
;;^DD(356,.1,1,1,"%D",1,0)
;;=This is a cross reference of all prescriptions and refills. It is used
;;^DD(356,.1,1,1,"%D",2,0)
;;=to ensure that only 1 entry for each refill is created.
;;^DD(356,.1,1,1,"DT")
;;=2930813
;;^DD(356,.1,3)
;;=Type a Number between 1 and 99, 0 Decimal Digits
;;^DD(356,.1,21,0)
;;=^^4^4^2930813^
;;^DD(356,.1,21,1,0)
;;=This is the internal entry number of the refill, it will have an
;;^DD(356,.1,21,2,0)
;;=input and output transform to make it look like its a date. The
;;^DD(356,.1,21,3,0)
;;=system will store the number value.
;;^DD(356,.1,21,4,0)
;;=
;;^DD(356,.1,"DT")
;;=2930813
;;^DD(356,.11,0)
;;=INITIAL BILL NUMBER^P399'^DGCR(399,^0;11^Q
;;^DD(356,.11,1,0)
;;=^.1^^-1
;;^DD(356,.11,1,1,0)
;;=356^E
;;^DD(356,.11,1,1,1)
;;=S ^IBT(356,"E",$E(X,1,30),DA)=""
;;^DD(356,.11,1,1,2)
;;=K ^IBT(356,"E",$E(X,1,30),DA)
;;^DD(356,.11,1,1,"DT")
;;=2930712
;;^DD(356,.11,1,2,0)
;;=^^TRIGGER^356^.17
;;^DD(356,.11,1,2,1)
;;=K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^IBT(356,D0,0)):^(0),1:"") S X=$P(Y(1),U,17),X=X S DIU=X K Y S X=DIV S X=$$BILL^IBTUTL(DA) X ^DD(356,.11,1,2,1.4)
;;^DD(356,.11,1,2,1.4)
;;=S DIH=$S($D(^IBT(356,DIV(0),0)):^(0),1:""),DIV=X S $P(^(0),U,17)=DIV,DIH=356,DIG=.17 D ^DICR:$N(^DD(DIH,DIG,1,0))>0
;;^DD(356,.11,1,2,2)
;;=K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^IBT(356,D0,0)):^(0),1:"") S X=$P(Y(1),U,17),X=X S DIU=X K Y S X=DIV S X=$$BILL^IBTUTL(DA) X ^DD(356,.11,1,2,2.4)
;;^DD(356,.11,1,2,2.4)
;;=S DIH=$S($D(^IBT(356,DIV(0),0)):^(0),1:""),DIV=X S $P(^(0),U,17)=DIV,DIH=356,DIG=.17 D ^DICR:$N(^DD(DIH,DIG,1,0))>0
;;^DD(356,.11,1,2,"%D",0)
;;=^^1^1^2930827^^
;;^DD(356,.11,1,2,"%D",1,0)
;;=Re-sets Earliest Auto Bill Date each time Initial Bill Number is modified.
;;^DD(356,.11,1,2,"CREATE VALUE")
;;=S X=$$BILL^IBTUTL(DA)
;;^DD(356,.11,1,2,"DELETE VALUE")
;;=S X=$$BILL^IBTUTL(DA)
;;^DD(356,.11,1,2,"DT")
;;=2930825
;;^DD(356,.11,1,2,"FIELD")
;;=EARLIEST AUTO BILL DATE
;;^DD(356,.11,5,1,0)
;;=356.399^.02^3
;;^DD(356,.11,9)
;;=^
;;^DD(356,.11,21,0)
;;=^^3^3^2940213^^^^
;;^DD(356,.11,21,1,0)
;;=This is the bill number in the BILL/CLAIMS file for the initial
;;^DD(356,.11,21,2,0)
;;=bill number for this entry. It is the bill to the third
;;^DD(356,.11,21,3,0)
;;=party for this claim.
;;^DD(356,.11,"DT")
;;=2930825
;;^DD(356,.12,0)
;;=OTHER TYPE OF BILL^S^1:TORT FEASOR;2:FEDERAL OWCP;3:WORKMAN'S COMP;4:OTHER;^0;12^Q
;;^DD(356,.12,1,0)
;;=^.1
;;^DD(356,.12,1,1,0)
;;=356^AC
;;^DD(356,.12,1,1,1)
;;=S ^IBT(356,"AC",$E(X,1,30),DA)=""
;;^DD(356,.12,1,1,2)
;;=K ^IBT(356,"AC",$E(X,1,30),DA)
;;^DD(356,.12,1,1,"DT")
;;=2930712
;;^DD(356,.12,1,2,0)
;;=356^ASPC^MUMPS
;;^DD(356,.12,1,2,1)
;;=S:$P(^IBT(356,DA,0),U,2) ^IBT(356,"ASPC",+$P(^(0),U,2),X,DA)=""
;;^DD(356,.12,1,2,2)
;;=K ^IBT(356,"ASPC",+$P(^IBT(356,DA,0),U,2),X,DA)
;;^DD(356,.12,1,2,"%D",0)
;;=^^1^1^2930820^^^
;;^DD(356,.12,1,2,"%D",1,0)
;;=Cross reference of special types of bills by patient.
;;^DD(356,.12,1,2,"DT")
;;=2930712
;;^DD(356,.12,1,3,0)
;;=^^TRIGGER^356^.17
;;^DD(356,.12,1,3,1)
;;=K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^IBT(356,D0,0)):^(0),1:"") S X=$P(Y(1),U,17),X=X S DIU=X K Y S X="" S DIH=$S($D(^IBT(356,DIV(0),0)):^(0),1:""),DIV=X S $P(^(0),U,17)=DIV,DIH=356,DIG=.17 D ^DICR:$N(^DD(DIH,DIG,1,0))>0
IBINI05F ; ; 21-MAR-1994
+1 ;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
+2 IF 'DIFQ(356)
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(356,.09,"DT")
+2 ;;=2940131
+3 ;;^DD(356,.1,0)
+4 ;;=REFILL DATE^NJ2,0^^0;10^K:+X'=X!(X>99)!(X<1)!(X?.E1"."1N.N) X
+5 ;;^DD(356,.1,1,0)
+6 ;;=^.1
+7 ;;^DD(356,.1,1,1,0)
+8 ;;=356^ARXFL^MUMPS
+9 ;;^DD(356,.1,1,1,1)
+10 ;;=S:$P(^IBT(356,DA,0),U,8) ^IBT(356,"ARXFL",$P(^(0),U,8),X,DA)=""
+11 ;;^DD(356,.1,1,1,2)
+12 ;;=K ^IBT(356,"ARXFL",+$P(^IBT(356,DA,0),U,8),X,DA)
+13 ;;^DD(356,.1,1,1,"%D",0)
+14 ;;=^^2^2^2940213^^
+15 ;;^DD(356,.1,1,1,"%D",1,0)
+16 ;;=This is a cross reference of all prescriptions and refills. It is used
+17 ;;^DD(356,.1,1,1,"%D",2,0)
+18 ;;=to ensure that only 1 entry for each refill is created.
+19 ;;^DD(356,.1,1,1,"DT")
+20 ;;=2930813
+21 ;;^DD(356,.1,3)
+22 ;;=Type a Number between 1 and 99, 0 Decimal Digits
+23 ;;^DD(356,.1,21,0)
+24 ;;=^^4^4^2930813^
+25 ;;^DD(356,.1,21,1,0)
+26 ;;=This is the internal entry number of the refill, it will have an
+27 ;;^DD(356,.1,21,2,0)
+28 ;;=input and output transform to make it look like its a date. The
+29 ;;^DD(356,.1,21,3,0)
+30 ;;=system will store the number value.
+31 ;;^DD(356,.1,21,4,0)
+32 ;;=
+33 ;;^DD(356,.1,"DT")
+34 ;;=2930813
+35 ;;^DD(356,.11,0)
+36 ;;=INITIAL BILL NUMBER^P399'^DGCR(399,^0;11^Q
+37 ;;^DD(356,.11,1,0)
+38 ;;=^.1^^-1
+39 ;;^DD(356,.11,1,1,0)
+40 ;;=356^E
+41 ;;^DD(356,.11,1,1,1)
+42 ;;=S ^IBT(356,"E",$E(X,1,30),DA)=""
+43 ;;^DD(356,.11,1,1,2)
+44 ;;=K ^IBT(356,"E",$E(X,1,30),DA)
+45 ;;^DD(356,.11,1,1,"DT")
+46 ;;=2930712
+47 ;;^DD(356,.11,1,2,0)
+48 ;;=^^TRIGGER^356^.17
+49 ;;^DD(356,.11,1,2,1)
+50 ;;=K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^IBT(356,D0,0)):^(0),1:"") S X=$P(Y(1),U,17),X=X S DIU=X K Y S X=DIV S X=$$BILL^IBTUTL(DA) X ^DD(356,.11,1,2,1.4)
+51 ;;^DD(356,.11,1,2,1.4)
+52 ;;=S DIH=$S($D(^IBT(356,DIV(0),0)):^(0),1:""),DIV=X S $P(^(0),U,17)=DIV,DIH=356,DIG=.17 D ^DICR:$N(^DD(DIH,DIG,1,0))>0
+53 ;;^DD(356,.11,1,2,2)
+54 ;;=K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^IBT(356,D0,0)):^(0),1:"") S X=$P(Y(1),U,17),X=X S DIU=X K Y S X=DIV S X=$$BILL^IBTUTL(DA) X ^DD(356,.11,1,2,2.4)
+55 ;;^DD(356,.11,1,2,2.4)
+56 ;;=S DIH=$S($D(^IBT(356,DIV(0),0)):^(0),1:""),DIV=X S $P(^(0),U,17)=DIV,DIH=356,DIG=.17 D ^DICR:$N(^DD(DIH,DIG,1,0))>0
+57 ;;^DD(356,.11,1,2,"%D",0)
+58 ;;=^^1^1^2930827^^
+59 ;;^DD(356,.11,1,2,"%D",1,0)
+60 ;;=Re-sets Earliest Auto Bill Date each time Initial Bill Number is modified.
+61 ;;^DD(356,.11,1,2,"CREATE VALUE")
+62 ;;=S X=$$BILL^IBTUTL(DA)
+63 ;;^DD(356,.11,1,2,"DELETE VALUE")
+64 ;;=S X=$$BILL^IBTUTL(DA)
+65 ;;^DD(356,.11,1,2,"DT")
+66 ;;=2930825
+67 ;;^DD(356,.11,1,2,"FIELD")
+68 ;;=EARLIEST AUTO BILL DATE
+69 ;;^DD(356,.11,5,1,0)
+70 ;;=356.399^.02^3
+71 ;;^DD(356,.11,9)
+72 ;;=^
+73 ;;^DD(356,.11,21,0)
+74 ;;=^^3^3^2940213^^^^
+75 ;;^DD(356,.11,21,1,0)
+76 ;;=This is the bill number in the BILL/CLAIMS file for the initial
+77 ;;^DD(356,.11,21,2,0)
+78 ;;=bill number for this entry. It is the bill to the third
+79 ;;^DD(356,.11,21,3,0)
+80 ;;=party for this claim.
+81 ;;^DD(356,.11,"DT")
+82 ;;=2930825
+83 ;;^DD(356,.12,0)
+84 ;;=OTHER TYPE OF BILL^S^1:TORT FEASOR;2:FEDERAL OWCP;3:WORKMAN'S COMP;4:OTHER;^0;12^Q
+85 ;;^DD(356,.12,1,0)
+86 ;;=^.1
+87 ;;^DD(356,.12,1,1,0)
+88 ;;=356^AC
+89 ;;^DD(356,.12,1,1,1)
+90 ;;=S ^IBT(356,"AC",$E(X,1,30),DA)=""
+91 ;;^DD(356,.12,1,1,2)
+92 ;;=K ^IBT(356,"AC",$E(X,1,30),DA)
+93 ;;^DD(356,.12,1,1,"DT")
+94 ;;=2930712
+95 ;;^DD(356,.12,1,2,0)
+96 ;;=356^ASPC^MUMPS
+97 ;;^DD(356,.12,1,2,1)
+98 ;;=S:$P(^IBT(356,DA,0),U,2) ^IBT(356,"ASPC",+$P(^(0),U,2),X,DA)=""
+99 ;;^DD(356,.12,1,2,2)
+100 ;;=K ^IBT(356,"ASPC",+$P(^IBT(356,DA,0),U,2),X,DA)
+101 ;;^DD(356,.12,1,2,"%D",0)
+102 ;;=^^1^1^2930820^^^
+103 ;;^DD(356,.12,1,2,"%D",1,0)
+104 ;;=Cross reference of special types of bills by patient.
+105 ;;^DD(356,.12,1,2,"DT")
+106 ;;=2930712
+107 ;;^DD(356,.12,1,3,0)
+108 ;;=^^TRIGGER^356^.17
+109 ;;^DD(356,.12,1,3,1)
+110 ;;=K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^IBT(356,D0,0)):^(0),1:"") S X=$P(Y(1),U,17),X=X S DIU=X K Y S X="" S DIH=$S($D(^IBT(356,DIV(0),0)):^(0),1:""),DIV=X S $P(^(0),U,17)=DIV,DIH=356,DIG=.17 D ^DICR:$N(^DD(DIH,DIG,1,0))>0