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

IBYPPM.m

Go to the documentation of this file.
IBYPPM ;ALB/CXW,TJH - IB*2*333 POST INIT: ADD TORT/INTERAGENCY RATES NOV 2005 ; 11/23/05
 ;;2.0;INTEGRATED BILLING;**333**;21-MAR-94
 ;;Per VHA Directive 10-93-142, this routine should not be modified.
 ; 
 ;
 ; Add OCT 2005 Tort and Interagency Charges to the Charge Master, 61 Charge Items
 Q
POST ;
 N IBA,IBEFFDT
 S IBA(1)="",IBA(2)="    IB*2*333 Post-Install .....",IBA(3)="" D MES^XPDUTL(.IBA) K IBA
 S IBEFFDT=3051103 ;            effective date of Tort Nov 03, 2005
 D ADDCI(IBEFFDT) ;     add new Tort Liable and Interagency charges or and Reasonable Charges
 ;
 S IBA(1)="",IBA(2)="    IB*2*333 Post-Install Complete",IBA(3)="" D MES^XPDUTL(.IBA) K IBA
 Q
 ;
ADDCI(EFFDAT) ; Add Charge Items (363.2) needs Charge Sets, pass in the effective date of the new charges
 N IBA,IBCNT,IBCNT1,IBI,IBLN,IBFN,IBCS,IBXRF,IBCI,IBRVCD,IBCHG,DD,DO,DLAYGO,DIC,DIE,DA,DR,X,Y,IBX,IBZ,IBDFLTDT,IBDT S (IBCNT,IBCNT1)=0
 ;
 S IBDFLTDT=+$G(EFFDAT) I 'IBDFLTDT D MSG("** Error: No 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 S IBA(1)="      >> "_IBCNT_" Tort/Interagency Charge Items added (363.2)" D MES^XPDUTL(.IBA) K IBA
 Q
 ;
SETCI ; set Charge Item (duplicates based on item, CS, eff dt, rev cd)
 ;
 S IBCS=$P(IBLN,U,2),IBCS=+$O(^IBE(363.1,"B",IBCS,0)) I 'IBCS D MSG("** Error: CS "_$P(IBLN,U,2)_" undefined") Q
 S IBCI=+$$MCCRUTL($P(IBLN,U,1),5) I 'IBCI D MSG("** Error: BS "_$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
 ;
 K DD,DO S DLAYGO=363.2,DIC="^IBA(363.2,",DIC(0)="L",X=IBCI_";DGCR(399.1," D FILE^DICN K DIC I Y<1 K X,Y 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 K DIE,DA,DR,X,Y
 Q
 ;
 ;
MCCRUTL(X,P) ; returns IFN of item in 399.1 if Name is found and piece P is true
 N IBX,IBY S IBY=""
 I $G(X)'="" S IBX=0 F  S IBX=$O(^DGCR(399.1,"B",X,IBX)) Q:'IBX  I $P($G(^DGCR(399.1,IBX,0)),U,+$G(P)) 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(X) ;
 N IBX S IBX=$O(IBA(999999),-1) S:'IBX IBX=1 S IBX=IBX+1
 S IBA(IBX)="         "_$G(X)
 Q
 ;
 ;
CIF ; Charge Items (363.2):  Bedsection ^ Charge Set ^Effective Date ^ Revenue Code ^ Charge
 ;;     
TORT ;; 2005 Tortiously Liable All Inclusive
 ;;        
 ;;ALCOHOL AND DRUG TREATMENT^TL-INPT (INCLUSIVE)^^^1952
 ;;BLIND REHABILITATION^TL-INPT (INCLUSIVE)^^^1178
 ;;GENERAL MEDICAL CARE^TL-INPT (INCLUSIVE)^^^2037
 ;;INTERMEDIATE CARE^TL-INPT (INCLUSIVE)^^^1324
 ;;NEUROLOGY^TL-INPT (INCLUSIVE)^^^2633
 ;;NURSING HOME CARE^TL-INPT (INCLUSIVE)^^^504
 ;;PRRTP^TL-INPT (INCLUSIVE)^^^293
 ;;PSYCHIATRIC CARE^TL-INPT (INCLUSIVE)^^^1211
 ;;REHABILITATION MEDICINE^TL-INPT (INCLUSIVE)^^^1670
 ;;SPINAL CORD INJURY CARE^TL-INPT (INCLUSIVE)^^^1383
 ;;SURGICAL CARE^TL-INPT (INCLUSIVE)^^^4117
 ;;             
 ;; Tortiously Liable Non-Professional
 ;;ALCOHOL AND DRUG TREATMENT^TL-INPT (NPF)^^101^1314
 ;;ALCOHOL AND DRUG TREATMENT^TL-INPT (NPF)^^240^452
 ;;BLIND REHABILITATION^TL-INPT (NPF)^^101^498
 ;;BLIND REHABILITATION^TL-INPT (NPF)^^240^585
 ;;GENERAL MEDICAL CARE^TL-INPT (NPF)^^101^1262
 ;;GENERAL MEDICAL CARE^TL-INPT (NPF)^^240^531
 ;;INTERMEDIATE CARE^TL-INPT (NPF)^^101^1065
 ;;INTERMEDIATE CARE^TL-INPT (NPF)^^240^194
 ;;NEUROLOGY^TL-INPT (NPF)^^101^1553
 ;;NEUROLOGY^TL-INPT (NPF)^^240^695
 ;;NURSING HOME CARE^TL-INPT (NPF)^^101^420
 ;;NURSING HOME CARE^TL-INPT (NPF)^^240^68
 ;;PRRTP^TL-INPT (NPF)^^101^244
 ;;PRRTP^TL-INPT (NPF)^^240^31
 ;;PSYCHIATRIC CARE^TL-INPT (NPF)^^101^906
 ;;PSYCHIATRIC CARE^TL-INPT (NPF)^^240^191
 ;;REHABILITATION MEDICINE^TL-INPT (NPF)^^101^970
 ;;REHABILITATION MEDICINE^TL-INPT (NPF)^^240^510
 ;;SPINAL CORD INJURY CARE^TL-INPT (NPF)^^101^864
 ;;SPINAL CORD INJURY CARE^TL-INPT (NPF)^^240^348
 ;;SURGICAL CARE^TL-INPT (NPF)^^101^2414
 ;;SURGICAL CARE^TL-INPT (NPF)^^240^1249
 ;;              
 ;; Tortiously Liable Professional
 ;;ALCOHOL AND DRUG TREATMENT^TL-INPT (PF)^^^186
 ;;BLIND REHABILITATION^TL-INPT (PF)^^^95
 ;;GENERAL MEDICAL CARE^TL-INPT (PF)^^^244
 ;;INTERMEDIATE CARE^TL-INPT (PF)^^^65
 ;;NEUROLOGY^TL-INPT (PF)^^^385
 ;;NURSING HOME CARE^TL-INPT (PF)^^^16
 ;;PRRTP^TL-INPT (PF)^^^18
 ;;PSYCHIATRIC CARE^TL-INPT (PF)^^^114
 ;;REHABILITATION MEDICINE^TL-INPT (PF)^^^190
 ;;SPINAL CORD INJURY CARE^TL-INPT (PF)^^^171
 ;;SURGICAL CARE^TL-INPT (PF)^^^454
 ;;                    
 ;; Tortiously Liable Other
 ;;OUTPATIENT VISIT^TL-OPT VST^^^298
 ;;PRESCRIPTION^TL-RX FILL^^^51
 ;;OUTPATIENT DENTAL^TL-OPT DENTAL^^^202
 ;;          
 ;;         
IA ;; 2005 Interagency
 ;;            
 ;;ALCOHOL AND DRUG TREATMENT^IA-INPT^^^1832
 ;;BLIND REHABILITATION^IA-INPT^^^1112
 ;;GENERAL MEDICAL CARE^IA-INPT^^^1914
 ;;INTERMEDIATE CARE^IA-INPT^^^1241
 ;;NEUROLOGY^IA-INPT^^^2465
 ;;NURSING HOME CARE^IA-INPT^^^470
 ;;PRRTP^IA-INPT^^^273
 ;;PSYCHIATRIC CARE^IA-INPT^^^1132
 ;;REHABILITATION MEDICINE^IA-INPT^^^1564
 ;;SPINAL CORD INJURY CARE^IA-INPT^^^1292
 ;;SURGICAL CARE^IA-INPT^^^3894
 ;;            
 ;;OUTPATIENT VISIT^IA-OPT VST^^^284
 ;;PRESCRIPTION^IA-RX FILL^^^51
 ;;OUTPATIENT DENTAL^IA-OPT DENTAL^^^188
 ;;
 Q