- IBINI05I ; ; 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,.18,1,2,"DT")
- ;;=2930709
- ;;^DD(356,.18,1,3,0)
- ;;=^^TRIGGER^356^.17
- ;;^DD(356,.18,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 X ^DD(356,.18,1,3,1.1) X ^DD(356,.18,1,3,1.4)
- ;;^DD(356,.18,1,3,1.1)
- ;;=S X=DIV S X=$$EABD^IBTUTL($P($G(^IBT(356,+DA,0)),U,18),+$G(^IBT(356,+DA,1)))
- ;;^DD(356,.18,1,3,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,.18,1,3,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="" 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,.18,1,3,"%D",0)
- ;;=^^2^2^2930824^^
- ;;^DD(356,.18,1,3,"%D",1,0)
- ;;=Sets the Earliest Auto Bill Date whenever Event Type is set. Does not
- ;;^DD(356,.18,1,3,"%D",2,0)
- ;;=check if event is billable.
- ;;^DD(356,.18,1,3,"CREATE VALUE")
- ;;=S X=$$EABD^IBTUTL($P($G(^IBT(356,+DA,0)),U,18),+$G(^IBT(356,+DA,1)))
- ;;^DD(356,.18,1,3,"DELETE VALUE")
- ;;=@
- ;;^DD(356,.18,1,3,"DT")
- ;;=2930824
- ;;^DD(356,.18,1,3,"FIELD")
- ;;=EARLIEST AUTO BILL DATE
- ;;^DD(356,.18,1,4,0)
- ;;=356^APTY2^MUMPS
- ;;^DD(356,.18,1,4,1)
- ;;=S:$P(^IBT(356,DA,0),U,2)&($P(^(0),U,6)) ^IBT(356,"APTY",+$P(^(0),U,2),X,+$P(^(0),U,6),DA)=""
- ;;^DD(356,.18,1,4,2)
- ;;=K ^IBT(356,"APTY",+$P(^IBT(356,DA,0),U,2),X,+$P(^(0),U,6),DA)
- ;;^DD(356,.18,1,4,"%D",0)
- ;;=^^1^1^2930809^
- ;;^DD(356,.18,1,4,"%D",1,0)
- ;;=Cross-reference of all entries by patient by event type, by episode date.
- ;;^DD(356,.18,1,4,"DT")
- ;;=2930809
- ;;^DD(356,.18,1,5,0)
- ;;=^^TRIGGER^356^.07
- ;;^DD(356,.18,1,5,1)
- ;;=X ^DD(356,.18,1,5,1.3) I X S X=DIV S Y(1)=$S($D(^IBT(356,D0,0)):^(0),1:"") S X=$P(Y(1),U,7),X=X S DIU=X K Y S X=DIV S X=$$ADT^IBTRE0(DA) X ^DD(356,.18,1,5,1.4)
- ;;^DD(356,.18,1,5,1.3)
- ;;=K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S Y(2)=$C(59)_$S($D(^DD(356,.07,0)):$P(^(0),U,3),1:""),Y(1)=$S($D(^IBT(356,D0,0)):^(0),1:"") S X=$P($P(Y(2),$C(59)_$P(Y(1),U,7)_":",2),$C(59),1)=""
- ;;^DD(356,.18,1,5,1.4)
- ;;=S DIH=$S($D(^IBT(356,DIV(0),0)):^(0),1:""),DIV=X S $P(^(0),U,7)=DIV,DIH=356,DIG=.07 D ^DICR:$N(^DD(DIH,DIG,1,0))>0
- ;;^DD(356,.18,1,5,2)
- ;;=Q
- ;;^DD(356,.18,1,5,"%D",0)
- ;;=^^1^1^2931008^
- ;;^DD(356,.18,1,5,"%D",1,0)
- ;;=
- ;;^DD(356,.18,1,5,"CREATE CONDITION")
- ;;=#.07=""
- ;;^DD(356,.18,1,5,"CREATE VALUE")
- ;;=S X=$$ADT^IBTRE0(DA)
- ;;^DD(356,.18,1,5,"DELETE VALUE")
- ;;=NO EFFECT
- ;;^DD(356,.18,1,5,"DT")
- ;;=2931008
- ;;^DD(356,.18,1,5,"FIELD")
- ;;=#.07
- ;;^DD(356,.18,21,0)
- ;;=^^15^15^2940118^^^^
- ;;^DD(356,.18,21,1,0)
- ;;=This is the type of event that is being tracked. This field
- ;;^DD(356,.18,21,2,0)
- ;;=is automatically stored when an entry is created. Scheduled admissions
- ;;^DD(356,.18,21,3,0)
- ;;=are tracked to allow for precertification reviews. When an admission
- ;;^DD(356,.18,21,4,0)
- ;;=occurs within 7 days of a scheduled admission the scheduled admission will
- ;;^DD(356,.18,21,5,0)
- ;;=be updated to an inpatient care event type automatically.
- ;;^DD(356,.18,21,6,0)
- ;;=
- ;;^DD(356,.18,21,7,0)
- ;;=Choose an event type of Scheduled Admission only for future scheduled
- ;;^DD(356,.18,21,8,0)
- ;;=admissions and choose an event type of admission for past admissions.
- ;;^DD(356,.18,21,9,0)
- ;;=If you are using the scheduled admissions portion of the MAS package
- ;;^DD(356,.18,21,10,0)
- ;;=then scheduled admissions will automatically be added to claims tracking
- ;;^DD(356,.18,21,11,0)
- ;;=7 days before the scheduled admission and automatically converted to
- IBINI05I ; ; 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,.18,1,2,"DT")
- +2 ;;=2930709
- +3 ;;^DD(356,.18,1,3,0)
- +4 ;;=^^TRIGGER^356^.17
- +5 ;;^DD(356,.18,1,3,1)
- +6 ;;=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 X ^DD(356,.18,1,3,1.1) X ^DD(356,.18,1,3,1.4)
- +7 ;;^DD(356,.18,1,3,1.1)
- +8 ;;=S X=DIV S X=$$EABD^IBTUTL($P($G(^IBT(356,+DA,0)),U,18),+$G(^IBT(356,+DA,1)))
- +9 ;;^DD(356,.18,1,3,1.4)
- +10 ;;=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
- +11 ;;^DD(356,.18,1,3,2)
- +12 ;;=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
- +13 ;;^DD(356,.18,1,3,"%D",0)
- +14 ;;=^^2^2^2930824^^
- +15 ;;^DD(356,.18,1,3,"%D",1,0)
- +16 ;;=Sets the Earliest Auto Bill Date whenever Event Type is set. Does not
- +17 ;;^DD(356,.18,1,3,"%D",2,0)
- +18 ;;=check if event is billable.
- +19 ;;^DD(356,.18,1,3,"CREATE VALUE")
- +20 ;;=S X=$$EABD^IBTUTL($P($G(^IBT(356,+DA,0)),U,18),+$G(^IBT(356,+DA,1)))
- +21 ;;^DD(356,.18,1,3,"DELETE VALUE")
- +22 ;;=@
- +23 ;;^DD(356,.18,1,3,"DT")
- +24 ;;=2930824
- +25 ;;^DD(356,.18,1,3,"FIELD")
- +26 ;;=EARLIEST AUTO BILL DATE
- +27 ;;^DD(356,.18,1,4,0)
- +28 ;;=356^APTY2^MUMPS
- +29 ;;^DD(356,.18,1,4,1)
- +30 ;;=S:$P(^IBT(356,DA,0),U,2)&($P(^(0),U,6)) ^IBT(356,"APTY",+$P(^(0),U,2),X,+$P(^(0),U,6),DA)=""
- +31 ;;^DD(356,.18,1,4,2)
- +32 ;;=K ^IBT(356,"APTY",+$P(^IBT(356,DA,0),U,2),X,+$P(^(0),U,6),DA)
- +33 ;;^DD(356,.18,1,4,"%D",0)
- +34 ;;=^^1^1^2930809^
- +35 ;;^DD(356,.18,1,4,"%D",1,0)
- +36 ;;=Cross-reference of all entries by patient by event type, by episode date.
- +37 ;;^DD(356,.18,1,4,"DT")
- +38 ;;=2930809
- +39 ;;^DD(356,.18,1,5,0)
- +40 ;;=^^TRIGGER^356^.07
- +41 ;;^DD(356,.18,1,5,1)
- +42 ;;=X ^DD(356,.18,1,5,1.3) I X S X=DIV S Y(1)=$S($D(^IBT(356,D0,0)):^(0),1:"") S X=$P(Y(1),U,7),X=X S DIU=X K Y S X=DIV S X=$$ADT^IBTRE0(DA) X ^DD(356,.18,1,5,1.4)
- +43 ;;^DD(356,.18,1,5,1.3)
- +44 ;;=K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S Y(2)=$C(59)_$S($D(^DD(356,.07,0)):$P(^(0),U,3),1:""),Y(1)=$S($D(^IBT(356,D0,0)):^(0),1:"") S X=$P($P(Y(2),$C(59)_$P(Y(1),U,7)_":",2),$C(59),1)=""
- +45 ;;^DD(356,.18,1,5,1.4)
- +46 ;;=S DIH=$S($D(^IBT(356,DIV(0),0)):^(0),1:""),DIV=X S $P(^(0),U,7)=DIV,DIH=356,DIG=.07 D ^DICR:$N(^DD(DIH,DIG,1,0))>0
- +47 ;;^DD(356,.18,1,5,2)
- +48 ;;=Q
- +49 ;;^DD(356,.18,1,5,"%D",0)
- +50 ;;=^^1^1^2931008^
- +51 ;;^DD(356,.18,1,5,"%D",1,0)
- +52 ;;=
- +53 ;;^DD(356,.18,1,5,"CREATE CONDITION")
- +54 ;;=#.07=""
- +55 ;;^DD(356,.18,1,5,"CREATE VALUE")
- +56 ;;=S X=$$ADT^IBTRE0(DA)
- +57 ;;^DD(356,.18,1,5,"DELETE VALUE")
- +58 ;;=NO EFFECT
- +59 ;;^DD(356,.18,1,5,"DT")
- +60 ;;=2931008
- +61 ;;^DD(356,.18,1,5,"FIELD")
- +62 ;;=#.07
- +63 ;;^DD(356,.18,21,0)
- +64 ;;=^^15^15^2940118^^^^
- +65 ;;^DD(356,.18,21,1,0)
- +66 ;;=This is the type of event that is being tracked. This field
- +67 ;;^DD(356,.18,21,2,0)
- +68 ;;=is automatically stored when an entry is created. Scheduled admissions
- +69 ;;^DD(356,.18,21,3,0)
- +70 ;;=are tracked to allow for precertification reviews. When an admission
- +71 ;;^DD(356,.18,21,4,0)
- +72 ;;=occurs within 7 days of a scheduled admission the scheduled admission will
- +73 ;;^DD(356,.18,21,5,0)
- +74 ;;=be updated to an inpatient care event type automatically.
- +75 ;;^DD(356,.18,21,6,0)
- +76 ;;=
- +77 ;;^DD(356,.18,21,7,0)
- +78 ;;=Choose an event type of Scheduled Admission only for future scheduled
- +79 ;;^DD(356,.18,21,8,0)
- +80 ;;=admissions and choose an event type of admission for past admissions.
- +81 ;;^DD(356,.18,21,9,0)
- +82 ;;=If you are using the scheduled admissions portion of the MAS package
- +83 ;;^DD(356,.18,21,10,0)
- +84 ;;=then scheduled admissions will automatically be added to claims tracking
- +85 ;;^DD(356,.18,21,11,0)
- +86 ;;=7 days before the scheduled admission and automatically converted to