IB20P306 ;ALB/CXW-FY05 DSS CLINIC STOP CODES IB*2.0*306 POST INIT ;10-MAY-05
;;2.0;INTEGRATED BILLING;**306**;21-MAR-94
;;Per VHA Directive 10-93-142, this routine should not be modified.
;
POST ;
D MES^XPDUTL("Now adding entries of NON-BILLABLE type codes to file 352.5")
I $$PATCH^XPDUTL("IB*2.0*306") D BMES^XPDUTL(" Skipping since the patch was previously installed.") Q
N IBEFFDT,U
S U="^",IBEFFDT=3050502 ;effective date MAY 2, 2005
D START,FNONB(IBEFFDT),FINISH
Q
;
START D MES^XPDUTL("")
D MES^XPDUTL("FY05 DSS Clinic Stop Codes, Post-Install Starting")
Q
;
FINISH ;
D MES^XPDUTL("")
D MES^XPDUTL("FY05 DSS Clinic Stop Codes, Post-Install Complete")
Q
;
FNONB(IBEFFDT) ;
;update billable type (add a new entry with new type if code exists)
;
N Y,IBC,IB1,IBT,IBX,IBCODE,IBDES,IBOVER,IBLSTDT
S IBC=0
F IBX=1:1 S IBT=$P($T(BTYPE+IBX),";",3) Q:'$L(IBT) D
. S IBCODE=+$P(IBT,"^",1)
. I $D(^IBE(352.5,"AEFFDT",IBCODE,-IBEFFDT)) D Q
. . D BMES^XPDUTL(" Duplication of non-billable type code "_IBCODE)
. S IBLSTDT=$O(^IBE(352.5,"AEFFDT",IBCODE,-9999999))
. I +IBLSTDT=0 D Q
. . D BMES^XPDUTL(" Code "_IBCODE_" not found for non-billable update")
. S IB1=$O(^IBE(352.5,"AEFFDT",IBCODE,IBLSTDT,0))
. S IBDES=$P($G(^IBE(352.5,IB1,0)),U,4)
. S IBOVER=+$P($G(^IBE(352.5,IB1,0)),U,5)
. S Y=+$$ADD3525(IBCODE,IBEFFDT,$P(IBT,U,2),IBDES,IBOVER) S:Y>0 IBC=IBC+1
D MES^XPDUTL("")
D MES^XPDUTL(IBC_$S('IBC:" entry has ",1:" entries have ")_"been added to file 352.5.")
Q
;
;add a new entry
ADD3525(IBCODE,IBEFFDT,IBTYPE,IBDES,IBOVER) ;
D BMES^XPDUTL(" Non-billable type code "_IBCODE)
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))
;
;;billable type data
BTYPE ;;code^non-billable type
;;533707^0
;;566707^0
;;707^0
;;
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIB20P306 2111 printed Dec 13, 2024@02:02:08 Page 2
IB20P306 ;ALB/CXW-FY05 DSS CLINIC STOP CODES IB*2.0*306 POST INIT ;10-MAY-05
+1 ;;2.0;INTEGRATED BILLING;**306**;21-MAR-94
+2 ;;Per VHA Directive 10-93-142, this routine should not be modified.
+3 ;
POST ;
+1 DO MES^XPDUTL("Now adding entries of NON-BILLABLE type codes to file 352.5")
+2 IF $$PATCH^XPDUTL("IB*2.0*306")
DO BMES^XPDUTL(" Skipping since the patch was previously installed.")
QUIT
+3 NEW IBEFFDT,U
+4 ;effective date MAY 2, 2005
SET U="^"
SET IBEFFDT=3050502
+5 DO START
DO FNONB(IBEFFDT)
DO FINISH
+6 QUIT
+7 ;
START DO MES^XPDUTL("")
+1 DO MES^XPDUTL("FY05 DSS Clinic Stop Codes, Post-Install Starting")
+2 QUIT
+3 ;
FINISH ;
+1 DO MES^XPDUTL("")
+2 DO MES^XPDUTL("FY05 DSS Clinic Stop Codes, Post-Install Complete")
+3 QUIT
+4 ;
FNONB(IBEFFDT) ;
+1 ;update billable type (add a new entry with new type if code exists)
+2 ;
+3 NEW Y,IBC,IB1,IBT,IBX,IBCODE,IBDES,IBOVER,IBLSTDT
+4 SET IBC=0
+5 FOR IBX=1:1
SET IBT=$PIECE($TEXT(BTYPE+IBX),";",3)
if '$LENGTH(IBT)
QUIT
Begin DoDot:1
+6 SET IBCODE=+$PIECE(IBT,"^",1)
+7 IF $DATA(^IBE(352.5,"AEFFDT",IBCODE,-IBEFFDT))
Begin DoDot:2
+8 DO BMES^XPDUTL(" Duplication of non-billable type code "_IBCODE)
End DoDot:2
QUIT
+9 SET IBLSTDT=$ORDER(^IBE(352.5,"AEFFDT",IBCODE,-9999999))
+10 IF +IBLSTDT=0
Begin DoDot:2
+11 DO BMES^XPDUTL(" Code "_IBCODE_" not found for non-billable update")
End DoDot:2
QUIT
+12 SET IB1=$ORDER(^IBE(352.5,"AEFFDT",IBCODE,IBLSTDT,0))
+13 SET IBDES=$PIECE($GET(^IBE(352.5,IB1,0)),U,4)
+14 SET IBOVER=+$PIECE($GET(^IBE(352.5,IB1,0)),U,5)
+15 SET Y=+$$ADD3525(IBCODE,IBEFFDT,$PIECE(IBT,U,2),IBDES,IBOVER)
if Y>0
SET IBC=IBC+1
End DoDot:1
+16 DO MES^XPDUTL("")
+17 DO MES^XPDUTL(IBC_$SELECT('IBC:" entry has ",1:" entries have ")_"been added to file 352.5.")
+18 QUIT
+19 ;
+20 ;add a new entry
ADD3525(IBCODE,IBEFFDT,IBTYPE,IBDES,IBOVER) ;
+1 DO BMES^XPDUTL(" Non-billable type code "_IBCODE)
+2 NEW IBIENS,IBFDA,IBER,IBRET
+3 SET IBRET=""
+4 SET IBIENS="+1,"
+5 SET IBFDA(352.5,IBIENS,.01)=IBCODE
+6 SET IBFDA(352.5,IBIENS,.02)=IBEFFDT
+7 SET IBFDA(352.5,IBIENS,.03)=IBTYPE
+8 SET IBFDA(352.5,IBIENS,.04)=IBDES
+9 if IBOVER
SET IBFDA(352.5,IBIENS,.05)=1
+10 DO UPDATE^DIE("","IBFDA","IBRET","IBER")
+11 IF $DATA(IBER)
DO BMES^XPDUTL(IBER("DIERR",1,"TEXT",1))
+12 QUIT $GET(IBRET(1))
+13 ;
+14 ;;billable type data
BTYPE ;;code^non-billable type
+1 ;;533707^0
+2 ;;566707^0
+3 ;;707^0
+4 ;;
+5 ;