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

IB20P538.m

Go to the documentation of this file.
  1. IB20P538 ;ALB/CXW - IB*2.0*538 Post Init: Administrative Charge Update; 10-15-2014
  1. ;;2.0;INTEGRATED BILLING;**538**;21-MAR-94;Build 29
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. Q
  1. ;
  1. POST ; post-install of patch installation
  1. ; use default rate types for rx 3rd party bill to update RS in #363
  1. ; ibraty=rate type name from file #399.3
  1. ; ibeffdt=effective fileman date
  1. ; ibadfe=administrative fee (dollar.cent)
  1. ; ibdisp=dispensing fee (dollar.cent)
  1. ; ibadjust=adjustment mumps code
  1. ;
  1. N U,IBCT,IBI,IBJ,IBMG,IBT,IBX,IBY,IBRS,IBRSIN,IBRATY,IBEFFDT,IBADFE,IBDISP,IBADJUST,Y
  1. D MES^XPDUTL("Patch IB*2.0*538 Post-Install starts...")
  1. D MES^XPDUTL("")
  1. S IBADFE="",IBCT=0,IBMG="rate schedule adjustment",U="^"
  1. F IBX=1:1 S IBT=$P($T(RSF+IBX),";",3) Q:'$L(IBT) D
  1. . S IBRS=""
  1. . S IBRATY=$P(IBT,U),IBRATY=$TR(IBRATY,"/",U)
  1. . S IBDISP=$P(IBT,U,2)
  1. . S IBADJUST=$P(IBT,U,3)
  1. . S (Y,IBEFFDT)=$P(IBT,U,4)
  1. . D DD^%DT S IBY=Y
  1. . F IBI=1:1 S IBJ=$P(IBRATY,U,IBI) Q:IBJ="" D
  1. .. S IBRSIN=$O(^DGCR(399.3,"B",IBJ,0))
  1. .. I 'IBRSIN D MES^XPDUTL(" >>>"_IBJ_" not defined in the Rate Type file (#399.3), no "_IBMG_" added for "_IBY) Q
  1. .. ; find the latest ien if multiple
  1. .. I $P($G(^DGCR(399.3,+IBRSIN,0)),U,3) S IBRSIN=$O(^DGCR(399.3,"B",IBJ,999999),-1)
  1. .. I $P($G(^DGCR(399.3,+IBRSIN,0)),U,3) D MES^XPDUTL(" >>>"_IBJ_" not active in the Rate Type file (#399.3), no "_IBMG_" added for "_IBY) Q
  1. .. I $$RSEXIST(IBEFFDT,IBRSIN) D MES^XPDUTL(" >>>Effective date of "_IBY_" for "_IBJ_" "_IBMG_" already exists") Q
  1. .. S IBRS=IBRS_U_IBJ
  1. . S IBRATY=$E(IBRS,2,$L(IBRS)) Q:IBRS=""
  1. . D ENT^IB3PSOU(IBRATY,IBEFFDT,IBADFE,IBDISP,IBADJUST)
  1. . F IBI=1:1 S IBJ=$P(IBRATY,U,IBI) Q:IBJ="" D
  1. .. S IBRSIN=$O(^DGCR(399.3,"B",IBJ,0))
  1. .. I $$RSEXIST(IBEFFDT,IBRSIN) S IBCT=IBCT+1 D MES^XPDUTL(" >>>Effective date of "_IBY_" for "_IBJ_" "_IBMG_" added")
  1. D MES^XPDUTL(" Total "_IBCT_$S(IBCT=1:" entry",1:" entries")_" added to the Rate Schedule file (#363)")
  1. D MES^XPDUTL("")
  1. D MES^XPDUTL("Patch IB*2.0*538 Post-Install is complete.")
  1. Q
  1. ;
  1. RSEXIST(IBEFFDT,IBRSIN) ; return RS IFN if Rate Schedule exists for Effective Date
  1. N IBX,IBRSFN,IBRS0 S IBX=0
  1. S IBRSFN=0 F S IBRSFN=$O(^IBE(363,IBRSFN)) Q:'IBRSFN D I IBX Q
  1. . S IBRS0=$G(^IBE(363,IBRSFN,0))
  1. . I $P(IBRS0,U,2)=IBRSIN,$P(IBRS0,U,5)=IBEFFDT S IBX=IBRSFN
  1. Q IBX
  1. ;
  1. RSF ; rate type separated by '/'^dispensing fee^adjustment^effective date
  1. ;;INTERAGENCY^13.07^S X=X+13.07^3140101
  1. ;;REIMBURSABLE INS./NO FAULT INS./WORKERS' COMP./TORT FEASOR/INELIGIBLE/HUMANITARIAN/INTERAGENCY^13.10^S X=X+13.10^3150101
  1. ;