- IBINI0AB ; ; 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,1,2,1)
- ;;=S DGRVRCAL=1
- ;;^DD(399,101,1,2,2)
- ;;=S DGRVRCAL=2
- ;;^DD(399,101,1,2,"%D",0)
- ;;=^^3^3^2940214^^
- ;;^DD(399,101,1,2,"%D",1,0)
- ;;=This variable DGRVRCAL being defined causes the revenue codes to be
- ;;^DD(399,101,1,2,"%D",2,0)
- ;;=recalculated (results in ^IBCU6 being called). Checked at various places
- ;;^DD(399,101,1,2,"%D",3,0)
- ;;=within the billing screens (ex. EN+2^IBCSC4).
- ;;^DD(399,101,1,3,0)
- ;;=399^AE^MUMPS
- ;;^DD(399,101,1,3,1)
- ;;=S:$P(^DGCR(399,DA,0),"^",2) ^DGCR(399,"AE",$P(^(0),U,2),X,DA)=""
- ;;^DD(399,101,1,3,2)
- ;;=K:$P(^DGCR(399,DA,0),"^",2) ^DGCR(399,"AE",$P(^(0),U,2),X,DA)
- ;;^DD(399,101,1,3,"%D",0)
- ;;=^^3^3^2930802^^
- ;;^DD(399,101,1,3,"%D",1,0)
- ;;=Cross reference of patients and bills to primary insurers. This will
- ;;^DD(399,101,1,3,"%D",2,0)
- ;;=be used to prevent deletion of insurance policy entries from the
- ;;^DD(399,101,1,3,"%D",3,0)
- ;;=patient file if a bill has been created to this insurance company.
- ;;^DD(399,101,1,3,"DT")
- ;;=2930802
- ;;^DD(399,101,1,4,0)
- ;;=^^TRIGGER^399^.19
- ;;^DD(399,101,1,4,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,19),X=X S DIU=X K Y S X=DIV S X=$$FT^IBCU3(DA) X ^DD(399,101,1,4,1.4)
- ;;^DD(399,101,1,4,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:$O(^DD(DIH,DIG,1,0))>0
- ;;^DD(399,101,1,4,2)
- ;;=Q
- ;;^DD(399,101,1,4,"%D",0)
- ;;=^^1^1^2940214^^
- ;;^DD(399,101,1,4,"%D",1,0)
- ;;=Sets form type depending on ins co. parameter and site default.
- ;;^DD(399,101,1,4,"CREATE VALUE")
- ;;=S X=$$FT^IBCU3(DA)
- ;;^DD(399,101,1,4,"DELETE VALUE")
- ;;=NO EFFECT
- ;;^DD(399,101,1,4,"DT")
- ;;=2931110
- ;;^DD(399,101,1,4,"FIELD")
- ;;=FORM TYPE
- ;;^DD(399,101,1,5,0)
- ;;=^^TRIGGER^399^122
- ;;^DD(399,101,1,5,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,2),X=X S DIU=X K Y X ^DD(399,101,1,5,1.1) X ^DD(399,101,1,5,1.4)
- ;;^DD(399,101,1,5,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,101,1,5,1.4)
- ;;=S DIH=$S($D(^DGCR(399,DIV(0),"M1")):^("M1"),1:""),DIV=X S $P(^("M1"),U,2)=DIV,DIH=399,DIG=122 D ^DICR:$O(^DD(DIH,DIG,1,0))>0
- ;;^DD(399,101,1,5,2)
- ;;=Q
- ;;^DD(399,101,1,5,"%D",0)
- ;;=^^2^2^2940201^
- ;;^DD(399,101,1,5,"%D",1,0)
- ;;=Loads the Primary Provider # with the Hospital Provider Number of the
- ;;^DD(399,101,1,5,"%D",2,0)
- ;;=Primary Insurance Carrier.
- ;;^DD(399,101,1,5,"CREATE VALUE")
- ;;=PRIMARY INSURANCE CARRIER:HOSPITAL PROVIDER NUMBER
- ;;^DD(399,101,1,5,"DELETE VALUE")
- ;;=NO EFFECT
- ;;^DD(399,101,1,5,"DT")
- ;;=2940201
- ;;^DD(399,101,1,5,"FIELD")
- ;;=PRIMARY PROVIDER #
- ;;^DD(399,101,3)
- ;;=Enter name of insurance carrier to which this bill is to be sent.
- ;;^DD(399,101,5,1,0)
- ;;=399^112^1
- ;;^DD(399,101,12)
- ;;=Only valid insurance companies for this date of care.
- ;;^DD(399,101,12.1)
- ;;=S DIC("S")="I $D(IBDD(+Y)),'$D(^DGCR(399,DA,""AIC"",+Y))"
- ;;^DD(399,101,21,0)
- ;;=^^2^2^2940214^^^^
- ;;^DD(399,101,21,1,0)
- ;;=This is the name of the insurance carrier to which this bill is to be sent.
- ;;^DD(399,101,21,2,0)
- ;;=This is from the entries in this patients file of insurance companies.
- ;;^DD(399,101,23,0)
- ;;=^^3^3^2940214^^
- ;;^DD(399,101,23,1,0)
- ;;=Only valid/active insurance companies for this patient can be choosen,
- ;;^DD(399,101,23,2,0)
- ;;=as defined by DD^IBCNS. Company must not already be defined as a carrier
- ;;^DD(399,101,23,3,0)
- ;;=(399,102-103) for this bill.
- IBINI0AB ; ; 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,1,2,1)
- +2 ;;=S DGRVRCAL=1
- +3 ;;^DD(399,101,1,2,2)
- +4 ;;=S DGRVRCAL=2
- +5 ;;^DD(399,101,1,2,"%D",0)
- +6 ;;=^^3^3^2940214^^
- +7 ;;^DD(399,101,1,2,"%D",1,0)
- +8 ;;=This variable DGRVRCAL being defined causes the revenue codes to be
- +9 ;;^DD(399,101,1,2,"%D",2,0)
- +10 ;;=recalculated (results in ^IBCU6 being called). Checked at various places
- +11 ;;^DD(399,101,1,2,"%D",3,0)
- +12 ;;=within the billing screens (ex. EN+2^IBCSC4).
- +13 ;;^DD(399,101,1,3,0)
- +14 ;;=399^AE^MUMPS
- +15 ;;^DD(399,101,1,3,1)
- +16 ;;=S:$P(^DGCR(399,DA,0),"^",2) ^DGCR(399,"AE",$P(^(0),U,2),X,DA)=""
- +17 ;;^DD(399,101,1,3,2)
- +18 ;;=K:$P(^DGCR(399,DA,0),"^",2) ^DGCR(399,"AE",$P(^(0),U,2),X,DA)
- +19 ;;^DD(399,101,1,3,"%D",0)
- +20 ;;=^^3^3^2930802^^
- +21 ;;^DD(399,101,1,3,"%D",1,0)
- +22 ;;=Cross reference of patients and bills to primary insurers. This will
- +23 ;;^DD(399,101,1,3,"%D",2,0)
- +24 ;;=be used to prevent deletion of insurance policy entries from the
- +25 ;;^DD(399,101,1,3,"%D",3,0)
- +26 ;;=patient file if a bill has been created to this insurance company.
- +27 ;;^DD(399,101,1,3,"DT")
- +28 ;;=2930802
- +29 ;;^DD(399,101,1,4,0)
- +30 ;;=^^TRIGGER^399^.19
- +31 ;;^DD(399,101,1,4,1)
- +32 ;;=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,19),X=X S DIU=X K Y S X=DIV S X=$$FT^IBCU3(DA) X ^DD(399,101,1,4,1.4)
- +33 ;;^DD(399,101,1,4,1.4)
- +34 ;;=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:$O(^DD(DIH,DIG,1,0))>0
- +35 ;;^DD(399,101,1,4,2)
- +36 ;;=Q
- +37 ;;^DD(399,101,1,4,"%D",0)
- +38 ;;=^^1^1^2940214^^
- +39 ;;^DD(399,101,1,4,"%D",1,0)
- +40 ;;=Sets form type depending on ins co. parameter and site default.
- +41 ;;^DD(399,101,1,4,"CREATE VALUE")
- +42 ;;=S X=$$FT^IBCU3(DA)
- +43 ;;^DD(399,101,1,4,"DELETE VALUE")
- +44 ;;=NO EFFECT
- +45 ;;^DD(399,101,1,4,"DT")
- +46 ;;=2931110
- +47 ;;^DD(399,101,1,4,"FIELD")
- +48 ;;=FORM TYPE
- +49 ;;^DD(399,101,1,5,0)
- +50 ;;=^^TRIGGER^399^122
- +51 ;;^DD(399,101,1,5,1)
- +52 ;;=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,2),X=X S DIU=X K Y X ^DD(399,101,1,5,1.1) X ^DD(399,101,1,5,1.4)
- +53 ;;^DD(399,101,1,5,1.1)
- +54 ;;=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)
- +55 ;;^DD(399,101,1,5,1.4)
- +56 ;;=S DIH=$S($D(^DGCR(399,DIV(0),"M1")):^("M1"),1:""),DIV=X S $P(^("M1"),U,2)=DIV,DIH=399,DIG=122 D ^DICR:$O(^DD(DIH,DIG,1,0))>0
- +57 ;;^DD(399,101,1,5,2)
- +58 ;;=Q
- +59 ;;^DD(399,101,1,5,"%D",0)
- +60 ;;=^^2^2^2940201^
- +61 ;;^DD(399,101,1,5,"%D",1,0)
- +62 ;;=Loads the Primary Provider # with the Hospital Provider Number of the
- +63 ;;^DD(399,101,1,5,"%D",2,0)
- +64 ;;=Primary Insurance Carrier.
- +65 ;;^DD(399,101,1,5,"CREATE VALUE")
- +66 ;;=PRIMARY INSURANCE CARRIER:HOSPITAL PROVIDER NUMBER
- +67 ;;^DD(399,101,1,5,"DELETE VALUE")
- +68 ;;=NO EFFECT
- +69 ;;^DD(399,101,1,5,"DT")
- +70 ;;=2940201
- +71 ;;^DD(399,101,1,5,"FIELD")
- +72 ;;=PRIMARY PROVIDER #
- +73 ;;^DD(399,101,3)
- +74 ;;=Enter name of insurance carrier to which this bill is to be sent.
- +75 ;;^DD(399,101,5,1,0)
- +76 ;;=399^112^1
- +77 ;;^DD(399,101,12)
- +78 ;;=Only valid insurance companies for this date of care.
- +79 ;;^DD(399,101,12.1)
- +80 ;;=S DIC("S")="I $D(IBDD(+Y)),'$D(^DGCR(399,DA,""AIC"",+Y))"
- +81 ;;^DD(399,101,21,0)
- +82 ;;=^^2^2^2940214^^^^
- +83 ;;^DD(399,101,21,1,0)
- +84 ;;=This is the name of the insurance carrier to which this bill is to be sent.
- +85 ;;^DD(399,101,21,2,0)
- +86 ;;=This is from the entries in this patients file of insurance companies.
- +87 ;;^DD(399,101,23,0)
- +88 ;;=^^3^3^2940214^^
- +89 ;;^DD(399,101,23,1,0)
- +90 ;;=Only valid/active insurance companies for this patient can be choosen,
- +91 ;;^DD(399,101,23,2,0)
- +92 ;;=as defined by DD^IBCNS. Company must not already be defined as a carrier
- +93 ;;^DD(399,101,23,3,0)
- +94 ;;=(399,102-103) for this bill.