IB20P800 ;MNTVBB/DMR - IB*2.0*800 COST BASED & INTER AGENCY RATE UPDATE ; 08/29/2024@13:38
;;2.0;INTEGRATED BILLING;**800**;21-MAR-94;Build 3
;;Per VA Directive 6402, this routine should not be modified.
;
;
; Add FY25 Cost Based/Interagency Charges to Charge Master 363.2
Q
POST ;
; Backup 363.2 Charge Item File
N IB800FILES
S IB800FILE=""
S IB800FILES="363.2"
S IBCNT=0
F IBCNT=1:1:$L(IB800FILES,"^") D
. S IB800FILE=$P(IB800FILES,"^",IBCNT)
. D GLBBKUP
. Q
; Begin Update
N IBEFFDT,IBA,U S U="^"
D MSG(" IB*2.0*800 Post-Install .....")
S IBEFFDT=3241001 ; effective date of 10/01/2024
D ADDCI(IBEFFDT) ; add Charge Items (363.2) with new rates
D MSG(" IB*2.0*800 Post-Install Complete")
Q
;
ADDCI(IBEFFDT) ; pass in the effective date to add charge items with new charges
N IBCNT,IBCNT1,IBDFLTDT,IBI,IBLN
D MSG("")
S (IBCNT,IBCNT1)=0,IBDFLTDT=+$G(IBEFFDT)
I 'IBDFLTDT D MSG("** Error: No Effective Date, No Charges Added") G CIQ
;
F IBI=1:1 S IBLN=$P($T(CIF+IBI),";;",2) Q:+IBLN!(IBLN="") I $E(IBLN)?1A D SETCI
;
I +IBCNT1 D MSG(" >> "_IBCNT1_" Duplicate Charge Items already exist, not re-added")
;
CIQ D MSG(" >> "_IBCNT_" Cost Based/Interagency Charge Items added to CHARGE ITEM file (#363.2)")
D MSG("")
Q
;
SETCI ; set Charge Item (duplicates based on item, CS, eff dt, rev cd)
;
N IBCHG,IBCI,IBCS,IBDT,IBFN,IBPE,IBRVCD,IBX,IBXRF,IBZ,DA,DD,DO,DLAYGO,DIC,DIE,DR,X,Y
S IBCS=$P(IBLN,U,2),IBCS=+$O(^IBE(363.1,"B",IBCS,0)) I 'IBCS D MSG("** Error: Charge Set "_$P(IBLN,U,2)_" undefined") Q
S IBCI=+$$MCCRUTL($P(IBLN,U,1),5) I 'IBCI D MSG("** Error: Bed Section "_$P(IBLN,U,1)_" undefined") Q
S IBDT=IBDFLTDT I +$P(IBLN,U,3) S IBDT=+$P(IBLN,U,3)
S IBRVCD=$$RVCD($P(IBLN,U,4))
S IBCHG=+$P(IBLN,U,5)
S IBXRF="AIVDTS"_IBCS
;
S IBX=0 F S IBX=$O(^IBA(363.2,IBXRF,IBCI,-IBDT,IBX)) Q:'IBX S IBZ=$G(^IBA(363.2,IBX,0)) I $P(IBZ,U,6)=IBRVCD D
. S IBCI=0,IBCNT1=IBCNT1+1 I +$P(IBZ,U,5)'=IBCHG D MSG("** Error: Item exists, wrong charge: "_IBLN)
Q:'IBCI
;
S DLAYGO=363.2,DIC="^IBA(363.2,",DIC(0)="L",X=IBCI_";DGCR(399.1," D FILE^DICN
I Y<1 D MSG("** Error: when adding the charge item "_$P(IBLN,U,2)_" with rate "_IBCHG_" to the file, Log a ticket!") Q
S IBFN=+Y,IBCNT=IBCNT+1
;
S DR=".02///"_IBCS_";.03///"_IBDT_";.05///"_IBCHG I +IBRVCD S DR=DR_";.06///"_IBRVCD
S DIE="^IBA(363.2,",DA=+IBFN D ^DIE
Q
;
;
MCCRUTL(IBC,IBPE) ; returns IEN in 399.1 if Name is found and piece P is true
N IBX,IBY S IBY=""
I $G(IBC)'="" S IBX=0 F S IBX=$O(^DGCR(399.1,"B",IBC,IBX)) Q:'IBX I $P($G(^DGCR(399.1,IBX,0)),U,+$G(IBPE)) S IBY=IBX
Q IBY
;
RVCD(RVCD) ; returns IFN if revenue code is valid and active
N IBX,IBY S IBY=""
I +$G(RVCD) S IBX=$G(^DGCR(399.2,+RVCD,0)) I +$P(IBX,U,3) S IBY=+RVCD
Q IBY
;
MSG(IBA) ;
D MES^XPDUTL(IBA)
Q
GLBBKUP ; XTMP Backup of file(s)
S IBBKUPNDE="IB*2*800-FY25 CBIAR Update (#363.2)"
S ^XTMP("IB20P800",0)=$$FMADD^XLFDT(DT,120)_"^"_DT_"^"_IBBKUPNDE
M ^XTMP("IB20P800",IB800FILE,$H)=^IBA(IB800FILE)
Q
;
CIF ; 68 Charge Items (363.2): Bedsection ^ Charge Set ^Effective Date ^ Revenue Code ^ Charge
;;
TORT ;; Cost Based (Tortiously Liable) - All Inclusive
;;
;;ALCOHOL AND DRUG TREATMENT^TL-INPT (INCLUSIVE)^^^4369
;;BLIND REHABILITATION^TL-INPT (INCLUSIVE)^^^4337
;;GENERAL MEDICAL CARE^TL-INPT (INCLUSIVE)^^^6844
;;INTERMEDIATE CARE^TL-INPT (INCLUSIVE)^^^4908
;;NEUROLOGY^TL-INPT (INCLUSIVE)^^^6556
;;NURSING HOME CARE^TL-INPT (INCLUSIVE)^^^2931
;;POLYTRAUMA INPATIENT^TL-INPT (INCLUSIVE)^^^5858
;;PRRTP^TL-INPT (INCLUSIVE)^^^525
;;PSYCHIATRIC CARE^TL-INPT (INCLUSIVE)^^^4797
;;REHABILITATION MEDICINE^TL-INPT (INCLUSIVE)^^^5068
;;SPINAL CORD INJURY CARE^TL-INPT (INCLUSIVE)^^^5672
;;SURGICAL CARE^TL-INPT (INCLUSIVE)^^^11789
;;
;; Non-Professional: Nursing/Room/Board 101 & Ancillary 240
;;ALCOHOL AND DRUG TREATMENT^TL-INPT (NPF)^^101^2941
;;ALCOHOL AND DRUG TREATMENT^TL-INPT (NPF)^^240^1011
;;BLIND REHABILITATION^TL-INPT (NPF)^^101^1833
;;BLIND REHABILITATION^TL-INPT (NPF)^^240^2155
;;GENERAL MEDICAL CARE^TL-INPT (NPF)^^101^4241
;;GENERAL MEDICAL CARE^TL-INPT (NPF)^^240^1784
;;INTERMEDIATE CARE^TL-INPT (NPF)^^101^3947
;;INTERMEDIATE CARE^TL-INPT (NPF)^^240^720
;;NEUROLOGY^TL-INPT (NPF)^^101^3865
;;NEUROLOGY^TL-INPT (NPF)^^240^1731
;;NURSING HOME CARE^TL-INPT (NPF)^^101^2443
;;NURSING HOME CARE^TL-INPT (NPF)^^240^397
;;POLYTRAUMA INPATIENT^TL-INPT (NPF)^^101^3403
;;POLYTRAUMA INPATIENT^TL-INPT (NPF)^^240^1790
;;PRRTP^TL-INPT (NPF)^^101^437
;;PRRTP^TL-INPT (NPF)^^240^55
;;PSYCHIATRIC CARE^TL-INPT (NPF)^^101^3589
;;PSYCHIATRIC CARE^TL-INPT (NPF)^^240^755
;;REHABILITATION MEDICINE^TL-INPT (NPF)^^101^2944
;;REHABILITATION MEDICINE^TL-INPT (NPF)^^240^1548
;;SPINAL CORD INJURY CARE^TL-INPT (NPF)^^101^3541
;;SPINAL CORD INJURY CARE^TL-INPT (NPF)^^240^1428
;;SURGICAL CARE^TL-INPT (NPF)^^101^6914
;;SURGICAL CARE^TL-INPT (NPF)^^240^3576
;;
;; Professional Physician
;;ALCOHOL AND DRUG TREATMENT^TL-INPT (PF)^^^417
;;BLIND REHABILITATION^TL-INPT (PF)^^^349
;;GENERAL MEDICAL CARE^TL-INPT (PF)^^^819
;;INTERMEDIATE CARE^TL-INPT (PF)^^^241
;;NEUROLOGY^TL-INPT (PF)^^^960
;;NURSING HOME CARE^TL-INPT (PF)^^^91
;;POLYTRAUMA INPATIENT^TL-INPT (PF)^^^665
;;PRRTP^TL-INPT (PF)^^^33
;;PSYCHIATRIC CARE^TL-INPT (PF)^^^453
;;REHABILITATION MEDICINE^TL-INPT (PF)^^^576
;;SPINAL CORD INJURY CARE^TL-INPT (PF)^^^703
;;SURGICAL CARE^TL-INPT (PF)^^^1299
;;
;; Outpatient Care Other
;;OUTPATIENT DENTAL^TL-OPT DENTAL^^^630
;;OUTPATIENT VISIT^TL-OPT VST^^^630
;;POLYTRAUMA OUTPATIENT VISIT^TL-OPT VST POLYTRAUMA^^^924
;;PM&RS OUTPATIENT VISIT^TL-OPT VST PM&RS^^^423
;;
IA ;; Interagency
;;
;;ALCOHOL AND DRUG TREATMENT^IA-INPT^^^4076
;;BLIND REHABILITATION^IA-INPT^^^4057
;;GENERAL MEDICAL CARE^IA-INPT^^^6434
;;INTERMEDIATE CARE^IA-INPT^^^4615
;;NEUROLOGY^IA-INPT^^^6157
;;NURSING HOME CARE^IA-INPT^^^2745
;;POLYTRAUMA INPATIENT^IA-INPT^^^5497
;;PRRTP^IA-INPT^^^494
;;PSYCHIATRIC CARE^IA-INPT^^^4483
;;REHABILITATION MEDICINE^IA-INPT^^^4747
;;SPINAL CORD INJURY CARE^IA-INPT^^^5309
;;SURGICAL CARE^IA-INPT^^^11092
;;
;; Outpatient Care Other
;;OUTPATIENT DENTAL^IA-OPT DENTAL^^^593
;;OUTPATIENT VISIT^IA-OPT VST^^^593
;;POLYTRAUMA OUTPATIENT VISIT^IA-OPT VST POLYTRAUMA^^^864
;;PM&RS OUTPATIENT VISIT^IA-OPT VST PM&RS^^^393
;;
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIB20P800 6539 printed Dec 13, 2024@02:05:02 Page 2
IB20P800 ;MNTVBB/DMR - IB*2.0*800 COST BASED & INTER AGENCY RATE UPDATE ; 08/29/2024@13:38
+1 ;;2.0;INTEGRATED BILLING;**800**;21-MAR-94;Build 3
+2 ;;Per VA Directive 6402, this routine should not be modified.
+3 ;
+4 ;
+5 ; Add FY25 Cost Based/Interagency Charges to Charge Master 363.2
+6 QUIT
POST ;
+1 ; Backup 363.2 Charge Item File
+2 NEW IB800FILES
+3 SET IB800FILE=""
+4 SET IB800FILES="363.2"
+5 SET IBCNT=0
+6 FOR IBCNT=1:1:$LENGTH(IB800FILES,"^")
Begin DoDot:1
+7 SET IB800FILE=$PIECE(IB800FILES,"^",IBCNT)
+8 DO GLBBKUP
+9 QUIT
End DoDot:1
+10 ; Begin Update
+11 NEW IBEFFDT,IBA,U
SET U="^"
+12 DO MSG(" IB*2.0*800 Post-Install .....")
+13 ; effective date of 10/01/2024
SET IBEFFDT=3241001
+14 ; add Charge Items (363.2) with new rates
DO ADDCI(IBEFFDT)
+15 DO MSG(" IB*2.0*800 Post-Install Complete")
+16 QUIT
+17 ;
ADDCI(IBEFFDT) ; pass in the effective date to add charge items with new charges
+1 NEW IBCNT,IBCNT1,IBDFLTDT,IBI,IBLN
+2 DO MSG("")
+3 SET (IBCNT,IBCNT1)=0
SET IBDFLTDT=+$GET(IBEFFDT)
+4 IF 'IBDFLTDT
DO MSG("** Error: No Effective Date, No Charges Added")
GOTO CIQ
+5 ;
+6 FOR IBI=1:1
SET IBLN=$PIECE($TEXT(CIF+IBI),";;",2)
if +IBLN!(IBLN="")
QUIT
IF $EXTRACT(IBLN)?1A
DO SETCI
+7 ;
+8 IF +IBCNT1
DO MSG(" >> "_IBCNT1_" Duplicate Charge Items already exist, not re-added")
+9 ;
CIQ DO MSG(" >> "_IBCNT_" Cost Based/Interagency Charge Items added to CHARGE ITEM file (#363.2)")
+1 DO MSG("")
+2 QUIT
+3 ;
SETCI ; set Charge Item (duplicates based on item, CS, eff dt, rev cd)
+1 ;
+2 NEW IBCHG,IBCI,IBCS,IBDT,IBFN,IBPE,IBRVCD,IBX,IBXRF,IBZ,DA,DD,DO,DLAYGO,DIC,DIE,DR,X,Y
+3 SET IBCS=$PIECE(IBLN,U,2)
SET IBCS=+$ORDER(^IBE(363.1,"B",IBCS,0))
IF 'IBCS
DO MSG("** Error: Charge Set "_$PIECE(IBLN,U,2)_" undefined")
QUIT
+4 SET IBCI=+$$MCCRUTL($PIECE(IBLN,U,1),5)
IF 'IBCI
DO MSG("** Error: Bed Section "_$PIECE(IBLN,U,1)_" undefined")
QUIT
+5 SET IBDT=IBDFLTDT
IF +$PIECE(IBLN,U,3)
SET IBDT=+$PIECE(IBLN,U,3)
+6 SET IBRVCD=$$RVCD($PIECE(IBLN,U,4))
+7 SET IBCHG=+$PIECE(IBLN,U,5)
+8 SET IBXRF="AIVDTS"_IBCS
+9 ;
+10 SET IBX=0
FOR
SET IBX=$ORDER(^IBA(363.2,IBXRF,IBCI,-IBDT,IBX))
if 'IBX
QUIT
SET IBZ=$GET(^IBA(363.2,IBX,0))
IF $PIECE(IBZ,U,6)=IBRVCD
Begin DoDot:1
+11 SET IBCI=0
SET IBCNT1=IBCNT1+1
IF +$PIECE(IBZ,U,5)'=IBCHG
DO MSG("** Error: Item exists, wrong charge: "_IBLN)
End DoDot:1
+12 if 'IBCI
QUIT
+13 ;
+14 SET DLAYGO=363.2
SET DIC="^IBA(363.2,"
SET DIC(0)="L"
SET X=IBCI_";DGCR(399.1,"
DO FILE^DICN
+15 IF Y<1
DO MSG("** Error: when adding the charge item "_$PIECE(IBLN,U,2)_" with rate "_IBCHG_" to the file, Log a ticket!")
QUIT
+16 SET IBFN=+Y
SET IBCNT=IBCNT+1
+17 ;
+18 SET DR=".02///"_IBCS_";.03///"_IBDT_";.05///"_IBCHG
IF +IBRVCD
SET DR=DR_";.06///"_IBRVCD
+19 SET DIE="^IBA(363.2,"
SET DA=+IBFN
DO ^DIE
+20 QUIT
+21 ;
+22 ;
MCCRUTL(IBC,IBPE) ; returns IEN in 399.1 if Name is found and piece P is true
+1 NEW IBX,IBY
SET IBY=""
+2 IF $GET(IBC)'=""
SET IBX=0
FOR
SET IBX=$ORDER(^DGCR(399.1,"B",IBC,IBX))
if 'IBX
QUIT
IF $PIECE($GET(^DGCR(399.1,IBX,0)),U,+$GET(IBPE))
SET IBY=IBX
+3 QUIT IBY
+4 ;
RVCD(RVCD) ; returns IFN if revenue code is valid and active
+1 NEW IBX,IBY
SET IBY=""
+2 IF +$GET(RVCD)
SET IBX=$GET(^DGCR(399.2,+RVCD,0))
IF +$PIECE(IBX,U,3)
SET IBY=+RVCD
+3 QUIT IBY
+4 ;
MSG(IBA) ;
+1 DO MES^XPDUTL(IBA)
+2 QUIT
GLBBKUP ; XTMP Backup of file(s)
+1 SET IBBKUPNDE="IB*2*800-FY25 CBIAR Update (#363.2)"
+2 SET ^XTMP("IB20P800",0)=$$FMADD^XLFDT(DT,120)_"^"_DT_"^"_IBBKUPNDE
+3 MERGE ^XTMP("IB20P800",IB800FILE,$HOROLOG)=^IBA(IB800FILE)
+4 QUIT
+5 ;
CIF ; 68 Charge Items (363.2): Bedsection ^ Charge Set ^Effective Date ^ Revenue Code ^ Charge
+1 ;;
TORT ;; Cost Based (Tortiously Liable) - All Inclusive
+1 ;;
+2 ;;ALCOHOL AND DRUG TREATMENT^TL-INPT (INCLUSIVE)^^^4369
+3 ;;BLIND REHABILITATION^TL-INPT (INCLUSIVE)^^^4337
+4 ;;GENERAL MEDICAL CARE^TL-INPT (INCLUSIVE)^^^6844
+5 ;;INTERMEDIATE CARE^TL-INPT (INCLUSIVE)^^^4908
+6 ;;NEUROLOGY^TL-INPT (INCLUSIVE)^^^6556
+7 ;;NURSING HOME CARE^TL-INPT (INCLUSIVE)^^^2931
+8 ;;POLYTRAUMA INPATIENT^TL-INPT (INCLUSIVE)^^^5858
+9 ;;PRRTP^TL-INPT (INCLUSIVE)^^^525
+10 ;;PSYCHIATRIC CARE^TL-INPT (INCLUSIVE)^^^4797
+11 ;;REHABILITATION MEDICINE^TL-INPT (INCLUSIVE)^^^5068
+12 ;;SPINAL CORD INJURY CARE^TL-INPT (INCLUSIVE)^^^5672
+13 ;;SURGICAL CARE^TL-INPT (INCLUSIVE)^^^11789
+14 ;;
+15 ;; Non-Professional: Nursing/Room/Board 101 & Ancillary 240
+16 ;;ALCOHOL AND DRUG TREATMENT^TL-INPT (NPF)^^101^2941
+17 ;;ALCOHOL AND DRUG TREATMENT^TL-INPT (NPF)^^240^1011
+18 ;;BLIND REHABILITATION^TL-INPT (NPF)^^101^1833
+19 ;;BLIND REHABILITATION^TL-INPT (NPF)^^240^2155
+20 ;;GENERAL MEDICAL CARE^TL-INPT (NPF)^^101^4241
+21 ;;GENERAL MEDICAL CARE^TL-INPT (NPF)^^240^1784
+22 ;;INTERMEDIATE CARE^TL-INPT (NPF)^^101^3947
+23 ;;INTERMEDIATE CARE^TL-INPT (NPF)^^240^720
+24 ;;NEUROLOGY^TL-INPT (NPF)^^101^3865
+25 ;;NEUROLOGY^TL-INPT (NPF)^^240^1731
+26 ;;NURSING HOME CARE^TL-INPT (NPF)^^101^2443
+27 ;;NURSING HOME CARE^TL-INPT (NPF)^^240^397
+28 ;;POLYTRAUMA INPATIENT^TL-INPT (NPF)^^101^3403
+29 ;;POLYTRAUMA INPATIENT^TL-INPT (NPF)^^240^1790
+30 ;;PRRTP^TL-INPT (NPF)^^101^437
+31 ;;PRRTP^TL-INPT (NPF)^^240^55
+32 ;;PSYCHIATRIC CARE^TL-INPT (NPF)^^101^3589
+33 ;;PSYCHIATRIC CARE^TL-INPT (NPF)^^240^755
+34 ;;REHABILITATION MEDICINE^TL-INPT (NPF)^^101^2944
+35 ;;REHABILITATION MEDICINE^TL-INPT (NPF)^^240^1548
+36 ;;SPINAL CORD INJURY CARE^TL-INPT (NPF)^^101^3541
+37 ;;SPINAL CORD INJURY CARE^TL-INPT (NPF)^^240^1428
+38 ;;SURGICAL CARE^TL-INPT (NPF)^^101^6914
+39 ;;SURGICAL CARE^TL-INPT (NPF)^^240^3576
+40 ;;
+41 ;; Professional Physician
+42 ;;ALCOHOL AND DRUG TREATMENT^TL-INPT (PF)^^^417
+43 ;;BLIND REHABILITATION^TL-INPT (PF)^^^349
+44 ;;GENERAL MEDICAL CARE^TL-INPT (PF)^^^819
+45 ;;INTERMEDIATE CARE^TL-INPT (PF)^^^241
+46 ;;NEUROLOGY^TL-INPT (PF)^^^960
+47 ;;NURSING HOME CARE^TL-INPT (PF)^^^91
+48 ;;POLYTRAUMA INPATIENT^TL-INPT (PF)^^^665
+49 ;;PRRTP^TL-INPT (PF)^^^33
+50 ;;PSYCHIATRIC CARE^TL-INPT (PF)^^^453
+51 ;;REHABILITATION MEDICINE^TL-INPT (PF)^^^576
+52 ;;SPINAL CORD INJURY CARE^TL-INPT (PF)^^^703
+53 ;;SURGICAL CARE^TL-INPT (PF)^^^1299
+54 ;;
+55 ;; Outpatient Care Other
+56 ;;OUTPATIENT DENTAL^TL-OPT DENTAL^^^630
+57 ;;OUTPATIENT VISIT^TL-OPT VST^^^630
+58 ;;POLYTRAUMA OUTPATIENT VISIT^TL-OPT VST POLYTRAUMA^^^924
+59 ;;PM&RS OUTPATIENT VISIT^TL-OPT VST PM&RS^^^423
+60 ;;
IA ;; Interagency
+1 ;;
+2 ;;ALCOHOL AND DRUG TREATMENT^IA-INPT^^^4076
+3 ;;BLIND REHABILITATION^IA-INPT^^^4057
+4 ;;GENERAL MEDICAL CARE^IA-INPT^^^6434
+5 ;;INTERMEDIATE CARE^IA-INPT^^^4615
+6 ;;NEUROLOGY^IA-INPT^^^6157
+7 ;;NURSING HOME CARE^IA-INPT^^^2745
+8 ;;POLYTRAUMA INPATIENT^IA-INPT^^^5497
+9 ;;PRRTP^IA-INPT^^^494
+10 ;;PSYCHIATRIC CARE^IA-INPT^^^4483
+11 ;;REHABILITATION MEDICINE^IA-INPT^^^4747
+12 ;;SPINAL CORD INJURY CARE^IA-INPT^^^5309
+13 ;;SURGICAL CARE^IA-INPT^^^11092
+14 ;;
+15 ;; Outpatient Care Other
+16 ;;OUTPATIENT DENTAL^IA-OPT DENTAL^^^593
+17 ;;OUTPATIENT VISIT^IA-OPT VST^^^593
+18 ;;POLYTRAUMA OUTPATIENT VISIT^IA-OPT VST POLYTRAUMA^^^864
+19 ;;PM&RS OUTPATIENT VISIT^IA-OPT VST PM&RS^^^393
+20 ;;
+21 QUIT