IB20P128 ;ALB/RB - IB*2*128 POST-INIT ; 10-FEB-00
;;2.0;INTEGRATED BILLING;**128**;21-MAR-94
;
; - Change values of input variables IBCANC and IBINRC of INSURANCE
; PAYMENT TREND GRAND TOTALS entry in file #351.7
S A0=+$O(^IBE(351.7,"B","INSURANCE PAYMENT TREND GRAND ",0))
S A1=$O(^IBE(351.7,A0,1,"B","IBCANC",0)) I 'A1 G DEL
S A2=$O(^IBE(351.7,A0,1,"B","IBINRC",0)) I 'A2 G DEL
I '$P($G(^IBE(351.7,A0,1,A1,0)),U,2) G DEL
D BMES^XPDUTL("Updating variables IBCANC & IBINRC in file #351.7 entry")
F X=A1,A2 S $P(^IBE(351.7,A0,1,X,0),U,2)=0
;
DEL ; - Delete entries GRAND TOTAL NUMBER OF CANCELLED BILLS and GRAND
; TOTAL AMOUNT OF CANCELLED BILLS from file #351.701 and re-index.
I '$O(^IBE(351.701,"B","GRAND TOTAL NUMBER OF CANCELLE",0)) G ENQ
D BMES^XPDUTL("Deleting GRAND TOTAL NUMBER OF CANCELLED BILLS entry")
D BMES^XPDUTL("Deleting GRAND TOTAL AMOUNT OF CANCELLED BILLS entry")
S A1=$O(^IBE(351.701,"B","GRAND TOTAL NUMBER OF CANCELLE",0))
S A2=$O(^IBE(351.701,"B","GRAND TOTAL AMOUNT OF CANCELLE",0))
F X=A1,A2 K ^IBE(351.701,X,0)
D BMES^XPDUTL("Re-indexing file #351.701")
S A1=$O(^IBE(351.701,"B","LESS THAN 30 DAYS OLD/TOTAL",0))
S A2=$P(^IBE(351.701,0),U,4)
F X=A1:1:A2 D
.S ^IBE(351.701,(X-2),0)=$G(^IBE(351.701,X,0)) K ^IBE(351.701,X,0)
.I X=A2 S A3=A2-2,$P(^IBE(351.701,0),U,3,4)=A3_U_A3
F X="B","C" K ^IBE(351.701,X)
S DIK="^IBE(351.701," D IXALL^DIK
;
ENQ K DA,DIK,A0,A1,A2,A3,X D BMES^XPDUTL("Post-init finished")
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIB20P128 1497 printed Dec 13, 2024@02:01:36 Page 2
IB20P128 ;ALB/RB - IB*2*128 POST-INIT ; 10-FEB-00
+1 ;;2.0;INTEGRATED BILLING;**128**;21-MAR-94
+2 ;
+3 ; - Change values of input variables IBCANC and IBINRC of INSURANCE
+4 ; PAYMENT TREND GRAND TOTALS entry in file #351.7
+5 SET A0=+$ORDER(^IBE(351.7,"B","INSURANCE PAYMENT TREND GRAND ",0))
+6 SET A1=$ORDER(^IBE(351.7,A0,1,"B","IBCANC",0))
IF 'A1
GOTO DEL
+7 SET A2=$ORDER(^IBE(351.7,A0,1,"B","IBINRC",0))
IF 'A2
GOTO DEL
+8 IF '$PIECE($GET(^IBE(351.7,A0,1,A1,0)),U,2)
GOTO DEL
+9 DO BMES^XPDUTL("Updating variables IBCANC & IBINRC in file #351.7 entry")
+10 FOR X=A1,A2
SET $PIECE(^IBE(351.7,A0,1,X,0),U,2)=0
+11 ;
DEL ; - Delete entries GRAND TOTAL NUMBER OF CANCELLED BILLS and GRAND
+1 ; TOTAL AMOUNT OF CANCELLED BILLS from file #351.701 and re-index.
+2 IF '$ORDER(^IBE(351.701,"B","GRAND TOTAL NUMBER OF CANCELLE",0))
GOTO ENQ
+3 DO BMES^XPDUTL("Deleting GRAND TOTAL NUMBER OF CANCELLED BILLS entry")
+4 DO BMES^XPDUTL("Deleting GRAND TOTAL AMOUNT OF CANCELLED BILLS entry")
+5 SET A1=$ORDER(^IBE(351.701,"B","GRAND TOTAL NUMBER OF CANCELLE",0))
+6 SET A2=$ORDER(^IBE(351.701,"B","GRAND TOTAL AMOUNT OF CANCELLE",0))
+7 FOR X=A1,A2
KILL ^IBE(351.701,X,0)
+8 DO BMES^XPDUTL("Re-indexing file #351.701")
+9 SET A1=$ORDER(^IBE(351.701,"B","LESS THAN 30 DAYS OLD/TOTAL",0))
+10 SET A2=$PIECE(^IBE(351.701,0),U,4)
+11 FOR X=A1:1:A2
Begin DoDot:1
+12 SET ^IBE(351.701,(X-2),0)=$GET(^IBE(351.701,X,0))
KILL ^IBE(351.701,X,0)
+13 IF X=A2
SET A3=A2-2
SET $PIECE(^IBE(351.701,0),U,3,4)=A3_U_A3
End DoDot:1
+14 FOR X="B","C"
KILL ^IBE(351.701,X)
+15 SET DIK="^IBE(351.701,"
DO IXALL^DIK
+16 ;
ENQ KILL DA,DIK,A0,A1,A2,A3,X
DO BMES^XPDUTL("Post-init finished")
+1 QUIT