Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: IB20P773

IB20P773.m

Go to the documentation of this file.
IB20P773 ;MNTVBB/DMR - IB*2.0*773 COST BASED & INTER AGENCY RATE UPDATE ; 07/27/2022@13:38
 ;;2.0;INTEGRATED BILLING;**773**;21-MAR-94;Build 1
 ;;Per VA Directive 6402, this routine should not be modified.
 ; 
 ;
 ; Add FY24 Cost Based/Interagency Charges to Charge Master 363.2
 Q
POST ;
 N IBEFFDT,IBA,U S U="^"
 D MSG("    IB*2.0*773 Post-Install .....")
 S IBEFFDT=3231001 ; effective date of 10/01/2023
 D ADDCI(IBEFFDT)  ; add Charge Items (363.2) with new rates
 D MSG("    IB*2.0*773 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
 ;
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)^^^3749
 ;;BLIND REHABILITATION^TL-INPT (INCLUSIVE)^^^4226
 ;;GENERAL MEDICAL CARE^TL-INPT (INCLUSIVE)^^^6007
 ;;INTERMEDIATE CARE^TL-INPT (INCLUSIVE)^^^4116
 ;;NEUROLOGY^TL-INPT (INCLUSIVE)^^^5508
 ;;NURSING HOME CARE^TL-INPT (INCLUSIVE)^^^2537
 ;;POLYTRAUMA INPATIENT^TL-INPT (INCLUSIVE)^^^5270
 ;;PRRTP^TL-INPT (INCLUSIVE)^^^459
 ;;PSYCHIATRIC CARE^TL-INPT (INCLUSIVE)^^^4010
 ;;REHABILITATION MEDICINE^TL-INPT (INCLUSIVE)^^^4936
 ;;SPINAL CORD INJURY CARE^TL-INPT (INCLUSIVE)^^^4736
 ;;SURGICAL CARE^TL-INPT (INCLUSIVE)^^^10680
 ;;     
 ;; Non-Professional: Nursing/Room/Board 101 & Ancillary 240
 ;;ALCOHOL AND DRUG TREATMENT^TL-INPT (NPF)^^101^2523
 ;;ALCOHOL AND DRUG TREATMENT^TL-INPT (NPF)^^240^868
 ;;BLIND REHABILITATION^TL-INPT (NPF)^^101^1787
 ;;BLIND REHABILITATION^TL-INPT (NPF)^^240^2099
 ;;GENERAL MEDICAL CARE^TL-INPT (NPF)^^101^3723
 ;;GENERAL MEDICAL CARE^TL-INPT (NPF)^^240^1565
 ;;INTERMEDIATE CARE^TL-INPT (NPF)^^101^3309
 ;;INTERMEDIATE CARE^TL-INPT (NPF)^^240^604
 ;;NEUROLOGY^TL-INPT (NPF)^^101^3248
 ;;NEUROLOGY^TL-INPT (NPF)^^240^1454
 ;;NURSING HOME CARE^TL-INPT (NPF)^^101^2115
 ;;NURSING HOME CARE^TL-INPT (NPF)^^240^343
 ;;POLYTRAUMA INPATIENT^TL-INPT (NPF)^^101^3061
 ;;POLYTRAUMA INPATIENT^TL-INPT (NPF)^^240^1610
 ;;PRRTP^TL-INPT (NPF)^^101^382
 ;;PRRTP^TL-INPT (NPF)^^240^48
 ;;PSYCHIATRIC CARE^TL-INPT (NPF)^^101^3000
 ;;PSYCHIATRIC CARE^TL-INPT (NPF)^^240^631
 ;;REHABILITATION MEDICINE^TL-INPT (NPF)^^101^2867
 ;;REHABILITATION MEDICINE^TL-INPT (NPF)^^240^1508
 ;;SPINAL CORD INJURY CARE^TL-INPT (NPF)^^101^2957
 ;;SPINAL CORD INJURY CARE^TL-INPT (NPF)^^240^1192
 ;;SURGICAL CARE^TL-INPT (NPF)^^101^6264
 ;;SURGICAL CARE^TL-INPT (NPF)^^240^3239
 ;;     
 ;; Professional Physician
 ;;ALCOHOL AND DRUG TREATMENT^TL-INPT (PF)^^^358
 ;;BLIND REHABILITATION^TL-INPT (PF)^^^340
 ;;GENERAL MEDICAL CARE^TL-INPT (PF)^^^719
 ;;INTERMEDIATE CARE^TL-INPT (PF)^^^203
 ;;NEUROLOGY^TL-INPT (PF)^^^806
 ;;NURSING HOME CARE^TL-INPT (PF)^^^79
 ;;POLYTRAUMA INPATIENT^TL-INPT (PF)^^^599
 ;;PRRTP^TL-INPT (PF)^^^29
 ;;PSYCHIATRIC CARE^TL-INPT (PF)^^^379
 ;;REHABILITATION MEDICINE^TL-INPT (PF)^^^561
 ;;SPINAL CORD INJURY CARE^TL-INPT (PF)^^^587
 ;;SURGICAL CARE^TL-INPT (PF)^^^1177
 ;;                    
 ;; Outpatient Care Other
 ;;OUTPATIENT DENTAL^TL-OPT DENTAL^^^532
 ;;OUTPATIENT VISIT^TL-OPT VST^^^532
 ;;POLYTRAUMA OUTPATIENT VISIT^TL-OPT VST POLYTRAUMA^^^797
 ;;PM&RS OUTPATIENT VISIT^TL-OPT VST PM&RS^^^382
 ;;          
IA ;; Interagency
 ;;            
 ;;ALCOHOL AND DRUG TREATMENT^IA-INPT^^^3509
 ;;BLIND REHABILITATION^IA-INPT^^^3956
 ;;GENERAL MEDICAL CARE^IA-INPT^^^5658
 ;;INTERMEDIATE CARE^IA-INPT^^^3874
 ;;NEUROLOGY^IA-INPT^^^5175
 ;;NURSING HOME CARE^IA-INPT^^^2379
 ;;POLYTRAUMA INPATIENT^IA-INPT^^^4925
 ;;PRRTP^IA-INPT^^^432
 ;;PSYCHIATRIC CARE^IA-INPT^^^3752
 ;;REHABILITATION MEDICINE^IA-INPT^^^4630
 ;;SPINAL CORD INJURY CARE^IA-INPT^^^4439
 ;;SURGICAL CARE^IA-INPT^^^10066
 ;;     
 ;; Outpatient Care Other
 ;;OUTPATIENT DENTAL^IA-OPT DENTAL^^^501
 ;;OUTPATIENT VISIT^IA-OPT VST^^^501
 ;;POLYTRAUMA OUTPATIENT VISIT^IA-OPT VST POLYTRAUMA^^^746
 ;;PM&RS OUTPATIENT VISIT^IA-OPT VST PM&RS^^^356
 ;;
 Q