IBY399P3 ;ALB/ARH - IB*2*399 POST-INSTALL - FTF UPDATE ; 09-MAR-2009
;;2.0;INTEGRATED BILLING;**399**;21-MAR-94;Build 8
;;Per VHA Directive 2004-038, this routine should not be modified.
;
; Add Standard Filing Time Frames to file #355.13
; Convert Insurance and Plan Filing Time Frames to Standard Filing Time Frames
;
Q
FTF ; Add and Convert to Standard Filing Time Frames
;
D NEWF ; add Standard Filing Time Frames (#355.13)
D CONVF^IBY399P4 ; Convert Company (#36) and Plan (#355.3) Filing Time Frames
;
Q
;
NEWF ; Add Standard Filing Time Frames to the new file INSURANCE FILING TIME FRAME (#355.13)
N IBI,IBLN,IBNAME,IBVAL,IBDA,DIC,DIE,DR,DA,DD,DO,X,Y,DLAYGO,IBTOT,IBTNC,IBTCH S (IBTOT,IBTNC,IBTCH)=0
;
D MSG(" "),MSG("Add 8 Standard Filing Time Frames (#355.13)...",1)
;
F IBI=1:1 S IBLN=$P($T(NEW+IBI),";;",2,999) Q:IBLN="" D
. S IBNAME=$P(IBLN,U,1),IBVAL=+$P(IBLN,U,2)
. ;
. S IBTOT=IBTOT+1 I $O(^IBE(355.13,"B",IBNAME,0)) S IBTNC=IBTNC+1 Q
. ;
. K DD,DO S DLAYGO=355.13,DIC="^IBE(355.13,",DIC(0)="L",X=IBNAME D FILE^DICN K DIC S IBDA=+Y I Y<1 K X,Y Q
. ;
. I +IBVAL S DIE="^IBE(355.13,",DA=+IBDA,DR=".02////"_IBVAL D ^DIE K DIE,DA,DR,X,Y
. ;
. S IBTCH=IBTCH+1 D MSG(IBNAME_" added")
;
I 'IBTCH D MSG("No Change: "_IBTNC_" of "_IBTOT_" New FTFs Already Exist",2)
I +IBTCH D MSG("Updated: "_IBTCH_" of "_IBTOT_" New FTFs Added"_$S(+IBTNC:", "_IBTNC_" Already Exist",1:""),2)
Q
;
;
MSG(X,Y) ; set lines into patch install message, X is message, Y is line type (1-header, 2-result line)
N CNT,IBA S CNT=1,IBA(1)=" " I +$G(Y) S CNT=2,IBA(2)=IBA(1) I +$G(Y)=1 S IBA(2)=" >> "
S IBA(CNT)=IBA(CNT)_$G(X) D MES^XPDUTL(.IBA) K IBA
Q
;
;
NEW ; List of Standard Filing Time Frames to be added (#355.31)
;;DAYS^1
;;MONTH(S)^1
;;YEAR(S)^1
;;DAYS PLUS ONE YEAR^1
;;DAYS OF FOLLOWING YEAR^1
;;MONTHS OF FOLLOWING YEAR^1
;;END OF FOLLOWING YEAR
;;NO FILING TIME FRAME LIMIT
;;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBY399P3 1981 printed Oct 16, 2024@18:34:37 Page 2
IBY399P3 ;ALB/ARH - IB*2*399 POST-INSTALL - FTF UPDATE ; 09-MAR-2009
+1 ;;2.0;INTEGRATED BILLING;**399**;21-MAR-94;Build 8
+2 ;;Per VHA Directive 2004-038, this routine should not be modified.
+3 ;
+4 ; Add Standard Filing Time Frames to file #355.13
+5 ; Convert Insurance and Plan Filing Time Frames to Standard Filing Time Frames
+6 ;
+7 QUIT
FTF ; Add and Convert to Standard Filing Time Frames
+1 ;
+2 ; add Standard Filing Time Frames (#355.13)
DO NEWF
+3 ; Convert Company (#36) and Plan (#355.3) Filing Time Frames
DO CONVF^IBY399P4
+4 ;
+5 QUIT
+6 ;
NEWF ; Add Standard Filing Time Frames to the new file INSURANCE FILING TIME FRAME (#355.13)
+1 NEW IBI,IBLN,IBNAME,IBVAL,IBDA,DIC,DIE,DR,DA,DD,DO,X,Y,DLAYGO,IBTOT,IBTNC,IBTCH
SET (IBTOT,IBTNC,IBTCH)=0
+2 ;
+3 DO MSG(" ")
DO MSG("Add 8 Standard Filing Time Frames (#355.13)...",1)
+4 ;
+5 FOR IBI=1:1
SET IBLN=$PIECE($TEXT(NEW+IBI),";;",2,999)
if IBLN=""
QUIT
Begin DoDot:1
+6 SET IBNAME=$PIECE(IBLN,U,1)
SET IBVAL=+$PIECE(IBLN,U,2)
+7 ;
+8 SET IBTOT=IBTOT+1
IF $ORDER(^IBE(355.13,"B",IBNAME,0))
SET IBTNC=IBTNC+1
QUIT
+9 ;
+10 KILL DD,DO
SET DLAYGO=355.13
SET DIC="^IBE(355.13,"
SET DIC(0)="L"
SET X=IBNAME
DO FILE^DICN
KILL DIC
SET IBDA=+Y
IF Y<1
KILL X,Y
QUIT
+11 ;
+12 IF +IBVAL
SET DIE="^IBE(355.13,"
SET DA=+IBDA
SET DR=".02////"_IBVAL
DO ^DIE
KILL DIE,DA,DR,X,Y
+13 ;
+14 SET IBTCH=IBTCH+1
DO MSG(IBNAME_" added")
End DoDot:1
+15 ;
+16 IF 'IBTCH
DO MSG("No Change: "_IBTNC_" of "_IBTOT_" New FTFs Already Exist",2)
+17 IF +IBTCH
DO MSG("Updated: "_IBTCH_" of "_IBTOT_" New FTFs Added"_$SELECT(+IBTNC:", "_IBTNC_" Already Exist",1:""),2)
+18 QUIT
+19 ;
+20 ;
MSG(X,Y) ; set lines into patch install message, X is message, Y is line type (1-header, 2-result line)
+1 NEW CNT,IBA
SET CNT=1
SET IBA(1)=" "
IF +$GET(Y)
SET CNT=2
SET IBA(2)=IBA(1)
IF +$GET(Y)=1
SET IBA(2)=" >> "
+2 SET IBA(CNT)=IBA(CNT)_$GET(X)
DO MES^XPDUTL(.IBA)
KILL IBA
+3 QUIT
+4 ;
+5 ;
NEW ; List of Standard Filing Time Frames to be added (#355.31)
+1 ;;DAYS^1
+2 ;;MONTH(S)^1
+3 ;;YEAR(S)^1
+4 ;;DAYS PLUS ONE YEAR^1
+5 ;;DAYS OF FOLLOWING YEAR^1
+6 ;;MONTHS OF FOLLOWING YEAR^1
+7 ;;END OF FOLLOWING YEAR
+8 ;;NO FILING TIME FRAME LIMIT
+9 ;;