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

IB20P367.m

Go to the documentation of this file.
IB20P367 ;DAY/RRA - DSS CLINIC STOP CODES IB*2.0*367 PRE-INIT ; 3/13/07 12:55pm
 ;;2.0;INTEGRATED BILLING;**367**;21-MAR-94;Build 11
 ;;Per VHA Directive 10-93-142, this routine should not be modified.
 ;
EN ;
 N IBEFFDT,U
 S U="^",IBEFFDT=3041001 ;effective date OCT 1st, 2004 
 D START,ADD(IBEFFDT),UPDATE(IBEFFDT),FINISH
 Q
 ;
START D BMES^XPDUTL("DSS Clinic Stop Codes, Post-Install Starting")
 Q
 ;
FINISH D BMES^XPDUTL("DSS Clinic Stop Codes, Post-Install Complete")
 Q
 ;
 ;
ADD(IBEFFDT) ;
 ;add a new code
 N Y,IBC,IBT,IBX,IBY,IBCODE,IBTYPE,IBDES,IBOVER
 D BMES^XPDUTL(" Adding new codes to file 352.5")
 S IBC=0
 F IBX=1:1 S IBT=$P($T(NCODE+IBX),";",3) Q:'$L(IBT)  D
 . S IBCODE=+$P(IBT,U)
 . S IBY=$S(IBCODE=130:3070308,IBCODE=131:3070308,IBCODE=352:3070308,1:IBEFFDT)
 . I $D(^IBE(352.5,"AEFFDT",IBCODE,-IBY)) D  Q
 . . D BMES^XPDUTL(" Duplication of stop code "_IBCODE)
 . S IBTYPE=$P(IBT,U,2)
 . S IBDES=$E($P(IBT,U,3),1,30)
 . S IBOVER=$P(IBT,U,4)
 . S Y=+$$ADD3525(IBCODE,IBY,IBTYPE,IBDES,IBOVER) S:Y>0 IBC=IBC+1
 D BMES^XPDUTL("     "_IBC_$S(IBC<2:" entry",1:" entries")_" added to 352.5")
 Q
 ;
UPDATE(IBEFFDT) ;
 ;update an old code
 N Y,IB1,IBC,IBT,IBX,IBCODE,IBMSG,IBTYPE,IBDES,IBOVER,IBLSTDT
 S (IBC,IBMSG(1),IBMSG(2),IBMSG(3))=0
 F IBX=1:1 S IBT=$P($T(OCODE+IBX),";",3) Q:'$L(IBT)  D
 . S IBCODE=+$P(IBT,U)
 . S IBY=$S(IBCODE=528:3070308,IBCODE=681:3070308,1:IBEFFDT)
 . I $D(^IBE(352.5,"AEFFDT",IBCODE,-IBY)) D  Q 
 . . D BMES^XPDUTL(" Duplication of stop code "_IBCODE)
 . S IBLSTDT=$O(^IBE(352.5,"AEFFDT",IBCODE,-9999999))
 . I +IBLSTDT=0 D  Q
 . . D BMES^XPDUTL(" Code "_IBCODE_" not found in file 352.5")
 . S IB1=$O(^IBE(352.5,"AEFFDT",IBCODE,IBLSTDT,0))
 . S IB1=$G(^IBE(352.5,IB1,0))
 . S IBTYPE=$S($P(IBT,U,2):$P(IBT,U,2),1:$P(IB1,U,3))
 . S IBDES=$S($P(IBT,U,3)'="":$E($P(IBT,U,3),1,30),1:$P(IB1,U,4))
 . S IBOVER=$S($P(IBT,U,4)'="":$P(IBT,U,4),1:$P(IB1,U,5))
 . I $P(IBT,U,2) D
 . . I 'IBMSG(1) D BMES^XPDUTL(" Updating billable type in file 352.5") S IBMSG(1)=1
 . I $P(IBT,U,3)'="" D
 . . I 'IBMSG(2),$P(IBT,U,3)'="" D BMES^XPDUTL(" Updating description in file 352.5") S IBMSG(2)=1
 . I '$P(IBT,U,2),$P(IBT,U,3)="" D
 . . I 'IBMSG(3) D BMES^XPDUTL(" Updating effective date in file 352.5") S IBMSG(3)=1
 . S Y=+$$ADD3525(IBCODE,IBY,IBTYPE,IBDES,IBOVER) S:Y>0 IBC=IBC+1
 D BMES^XPDUTL("     "_IBC_$S(IBC<2:" update",1:" updates")_" added to file 352.5")
 Q
 ;
ADD3525(IBCODE,IBEFFDT,IBTYPE,IBDES,IBOVER) ;
 ;add a new entry
 D BMES^XPDUTL("   "_IBCODE_"  "_IBDES)
 N IBIENS,IBFDA,IBER,IBRET
 S IBRET=""
 S IBIENS="+1,"
 S IBFDA(352.5,IBIENS,.01)=IBCODE
 S IBFDA(352.5,IBIENS,.02)=IBEFFDT
 S IBFDA(352.5,IBIENS,.03)=IBTYPE
 S IBFDA(352.5,IBIENS,.04)=IBDES
 S:IBOVER IBFDA(352.5,IBIENS,.05)=1
 D UPDATE^DIE("","IBFDA","IBRET","IBER")
 I $D(IBER) D BMES^XPDUTL(IBER("DIERR",1,"TEXT",1))
 Q $G(IBRET(1))
 ;
 ;new non-billable type data
NCODE ;;code^billable type^description^override flag
 ;;130^2^EMERGENCY DEPT
 ;;131^1^URGENT CARE UNIT
 ;;222^0^PM&RS CWT/SE FACE TO FACE^1
 ;;223^0^PM&RS CWT/SE NON FACE TO FACE^1
 ;;228^0^PM&RS CWT/TWE NON FACE TO FACE^1
 ;;336^0^MED PRE-PROC EVAL^1
 ;;352^2^GRECC CLINICAL DEMO
 ;;568^0^MH CWT/SE FACE TO FACE^1
 ;;569^0^MH CWT/SE NON FACE TO FACE^1
 ;;570^0^MH CWT/TWE NON FACE TO FACE^1
 ;;643^0^SND-OUT PROC - RADIOLOGY^1
 ;;658^0^STATE HOME ADULT DAY HC^1
 ;
 ; ;codes update
OCODE ;;code^billable type^description^override flag
 ;;528^^TELEPHONE HCMI
 ;;681^^VA-PAID HCBC PROVIDERS
 ;