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

IBCTUP.m

Go to the documentation of this file.
  1. IBCTUP ;ALB/RTW - CT ENTRY INACTIVATION IN FILE #356;09/26/2022
  1. ;;2.0;INTEGRATED BILLING;**740**;21-MAR-94;Build 9
  1. ;inactivate CT entries from the first episode date to 12/31/1999
  1. ;CT entries will be dropped from auto biller list in IB MT NIGHT COMP
  1. ;ITSM Incident ticket ,INC24030981
  1. ;
  1. Q
  1. EN ;begin process of finding and inactivating CT entry by episode date
  1. ;
  1. N IBCNT,IBCM,IBTOL,IBTYP,IBEABS,IBEABN,IBTRN,IBTRND,IBZ,U,DA,DR,DIE,X,Y
  1. S U="^",(IBCNT,IBTOL)=0
  1. S IBEABS=$O(^IBT(356,"D","")),IBEABS=$$FMTE^XLFDT($P(IBEABS,".",1))
  1. S IBCM="Inactivated to correct errors in the IB MT Night Comp job."
  1. D MSG(" Inactivating CT entry with episode date, "_IBEABS_" through Dec 31,1999...")
  1. D MSG("")
  1. S IBTYP=$O(^IBE(356.6,"B","OUTPATIENT VISIT",0))
  1. I 'IBTYP D MSG(" >>>>> No outpatient visit type defined, no inactivation!") G END
  1. S IBEABS="",IBEABN=2991231.999999
  1. F S IBEABS=$O(^IBT(356,"D",IBEABS)) Q:(IBEABS="")!(IBEABS>IBEABN) D
  1. . S IBTRN=0 F S IBTRN=$O(^IBT(356,"D",IBEABS,IBTRN)) Q:'IBTRN D
  1. .. S IBTRND=$G(^IBT(356,IBTRN,0)) Q:IBTRND=""
  1. .. S IBTOL=IBTOL+1
  1. .. ;outpatient visit only
  1. .. I $P(IBTRND,U,18)'=IBTYP Q
  1. .. ;early auto bill date only
  1. .. I $P(IBTRND,U,17)="" Q
  1. .. ;inactive status, delete eabd date, add comment
  1. .. S DIE="^IBT(356,",DA=IBTRN,DR=".2///0"_";.17///@"_";1.08///"_IBCM D ^DIE
  1. .. S IBCNT=IBCNT+1
  1. END D MSG(" Total "_IBCNT_" out of "_IBTOL_" CT entries inactivated in the CLAIMS TRACKING file (#356)")
  1. D MSG("")
  1. D MSG(" Inactivating CT entry is complete.")
  1. Q
  1. MSG(IBZ) ;
  1. D MES^XPDUTL(IBZ)
  1. Q