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

IB20P561.m

Go to the documentation of this file.
  1. IB20P561 ;ALB/CXW - IB*2.0*561 POST INIT: REVENUE CODE FOR MS-DRGS; 03-03-2016
  1. ;;2.0;INTEGRATED BILLING;**561**;21-MAR-94;Build 36
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. Q
  1. ;
  1. POST ;
  1. N IBA,IBDT317,IBDT318 S U="^"
  1. D MSG(" Revenue Code 124 for Mental Health Diagnosis Post-Install .....")
  1. ; effective date of RC v3.17 or RC v3.18
  1. S IBDT317=3151001,IBDT318=3160101
  1. D RVDRG(IBDT317,IBDT318)
  1. D MSG(" Revenue Code 124 for Mental Health Diagnosis Post-Install Complete")
  1. Q
  1. ;
  1. ;
  1. RVDRG(IBDT317,IBDT318) ; default rvc to 124 for DRGs in Reasonable Charges (#363.2)
  1. ;
  1. N IB561,IBCNT,IBCNO,IBRVC,IBCS,IBCS0,IBBR0,IBDRGC,IBDRGF,IBXRF,IBITM,IBNEF,IBCI,IBCI0,IBCIA
  1. N DA,DIE,DR,DT,X,X1,X2,Y
  1. S (IBCNO,IBCNT)=0,IB561="IB20P561"
  1. ;
  1. ; charge items for drgs store in xtmp for 30 days for tracking purpose
  1. ; xtmp(name,0)=purge dt_U_today dt_U_patch#_U_total update_U_total rec.
  1. ; xtmp(name,charge set ien,charge item ien)=charge item before update
  1. K ^XTMP(IB561)
  1. S DT=$$DT^XLFDT,X1=DT,X2=30 D C^%DTC
  1. S ^XTMP(IB561,0)=X_U_DT_U_"IB*2.0*561 POST-INIT"
  1. ;
  1. D MSG("")
  1. D MSG(" >> Adding 124 for MH DRGs on 1-OCT-15 or 1-JAN-16: 881, 882, 883, 885 & 886...")
  1. S IBRVC=$O(^DGCR(399.2,"B",124,0))
  1. I 'IBRVC D MSG(" ** Error: Revenue Code 124 undefined, not added") G RVDRGQ
  1. ;
  1. S IBCS=0 F S IBCS=$O(^IBE(363.1,IBCS)) Q:'IBCS D
  1. . S IBCS0=$G(^IBE(363.1,IBCS,0)) Q:IBCS0=""
  1. . S IBBR0=$G(^IBE(363.3,+$P(IBCS0,U,2),0)) I IBBR0'["RC INPATIENT" Q
  1. . ;
  1. . S IBXRF="AIVDTS"_IBCS
  1. . S IBITM=0 F S IBITM=$O(^IBA(363.2,IBXRF,IBITM)) Q:'IBITM D
  1. .. S IBNEF="" F S IBNEF=$O(^IBA(363.2,IBXRF,IBITM,IBNEF)) Q:IBNEF="" I (IBNEF=-IBDT317)!(IBNEF=-IBDT318) D
  1. ... S IBCI=0 F S IBCI=$O(^IBA(363.2,IBXRF,IBITM,IBNEF,IBCI)) Q:'IBCI D
  1. .... S IBCIA=$G(^IBA(363.2,IBCI,0)) Q:IBCIA=""
  1. .... S IBCI0=$P(IBCIA,U,1)
  1. .... S IBDRGC=$P(IBCI0,";",1)
  1. .... S IBDRGF=$P(IBCI0,";",2) Q:IBDRGF'="ICD("
  1. .... I '$F("^881^882^883^885^886^",(U_IBDRGC_U)) Q
  1. .... S ^XTMP(IB561,IBCS,+IBCI)=IBCIA
  1. .... S IBCNO=IBCNO+1
  1. .... I $P(IBCIA,U,6)=IBRVC Q
  1. .... ;
  1. .... S DIE="^IBA(363.2,",DA=+IBCI
  1. .... S DR=".06///"_IBRVC D ^DIE K DIE,DA,DR,X,Y
  1. .... S IBCNT=IBCNT+1
  1. ;
  1. RVDRGQ S $P(^XTMP(IB561,0),U,4)=IBCNT_U_IBCNO
  1. D MSG(" Done. "_IBCNT_" existing inpatient charge items updated (#363.2)")
  1. D MSG("")
  1. Q
  1. ;
  1. ;
  1. MSG(IBA) ;
  1. D MES^XPDUTL(IBA)
  1. Q