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

IB20P526.m

Go to the documentation of this file.
  1. IB20P526 ;ALB/CXW - UPDATE MCCR UTILITY ; 07/01/2014
  1. ;;2.0;INTEGRATED BILLING;**526**;21-MAR-94;Build 17
  1. ;;Per VHA Directive 6402, this routine should not be modified.
  1. Q
  1. POST ;
  1. ; Update mccr utility file 399.1
  1. N U S U="^"
  1. D MES^XPDUTL("Patch Post-Install starts")
  1. D MCR
  1. D MES^XPDUTL("Patch Post-Install is complete.")
  1. Q
  1. ;
  1. MCR ; 1 type of code
  1. N IBCNT,IBCOD,IBPE,IBFD,IBFN,IBI,IBX,DA,DIE,DR,X,Y
  1. ;
  1. ; Occurrence code flag in field #.11/piece 4
  1. ; Occurrence span flag in field #.17/piece 10
  1. S IBCNT=0,IBPE=10,IBFD=.17
  1. D MES^XPDUTL(""),MES^XPDUTL(">>>Occurrence Span Code")
  1. F IBI=1:1 S IBX=$P($T(OCCPU+IBI),";;",2) Q:IBX="" D
  1. . ; store in mccr utility file
  1. . S IBFN=+$$EXCODE($P(IBX,U),IBPE)
  1. . I 'IBFN D MES^XPDUTL(" #"_$P(IBX,U)_" "_$P(IBX,U,2)_" not defined") Q
  1. . ; no update if new name exists
  1. . I $P($G(^DGCR(399.1,IBFN,0)),U,1)=$P(IBX,U,3) D MES^XPDUTL(" #"_$P(IBX,U)_" "_$P(IBX,U,3)_" already updated") Q
  1. . S DIE="^DGCR(399.1,",DA=IBFN,DR=".01///"_$P(IBX,U,3) D ^DIE
  1. . S IBCNT=IBCNT+1 D MES^XPDUTL(" #"_$P(IBX,U)_" "_$P(IBX,U,3)_" updated")
  1. ;
  1. D MES^XPDUTL("Total "_IBCNT_" code"_$S(IBCNT'=1:"s",1:"")_" updated in the MCCR Utility file (#399.1)")
  1. D MES^XPDUTL("")
  1. Q
  1. ;
  1. EXCODE(IBCOD,IBPE) ; Returns IEN if code found in the IBPE piece
  1. N IBX,IBY S IBY=""
  1. I $G(IBCOD)'="" S IBX=0 F S IBX=$O(^DGCR(399.1,"C",IBCOD,IBX)) Q:'IBX I $P($G(^DGCR(399.1,IBX,0)),U,+$G(IBPE)) S IBY=IBX
  1. Q IBY
  1. ;
  1. OCCPU ; Occurrence span code^old name^new name
  1. ;;72^FIRST/LAST VISIT^ID OF OPT TIME ASSOC WITH AN IP HOSP ADMIT & IP CLM FOR PYMT
  1. ;