ACGSCAN ;IHS/OIRM/DSD/THL,AEF - CAN AMOUNT CHECK UTILITY; [ 03/27/2000 2:22 PM ]
;;2.0t1;CONTRACT INFORMATION SYSTEM;;FEB 16, 2000
;;UTILITY USED TO ENSURE THAT CAN AMOUNT TOTAL IS CONSISTENT WITH THE
;;TOTAL AMOUNT OF THE CONTRACT ACTION
CAN1 ;EP;INPUT CHECK CAN1
N ACGX,ACGY
S ACGX=X+$P(^ACGS(DA,"DT2"),U,5)+$P(^("DT2"),U,7),ACGY=$P(^("DT1"),U,5)
I ACGX<0 S ACGX=ACGX*-1
I ACGY<0 S ACGY=ACGY*-1
I ACGX>ACGY K X D MESS
Q
CAN2 ;EP;INPUT CHECK CAN2
N ACGX,ACGY
S ACGX=X+$P(^ACGS(DA,"DT2"),U,3)+$P(^("DT2"),U,7),ACGY=$P(^("DT1"),U,5)
I ACGX<0 S ACGX=ACGX*-1
I ACGY<0 S ACGY=ACGY*-1
I ACGX>ACGY K X D MESS
Q
CAN3 ;EP;INPUT CHECK CAN3
N ACGX,ACGY
S ACGX=X+$P(^ACGS(DA,"DT2"),U,3)+$P(^("DT2"),U,5),ACGY=$P(^("DT1"),U,5)
I ACGX<0 S ACGX=ACGX*-1
I ACGY<0 S ACGY=ACGY*-1
I ACGX>ACGY K X D MESS
Q
MESS W !!,"Sum of dollars for CANS cannot exceed ",$P(^ACGS(DA,"DT1"),U,5),!
Q
ACGSCAN ;IHS/OIRM/DSD/THL,AEF - CAN AMOUNT CHECK UTILITY; [ 03/27/2000 2:22 PM ]
+1 ;;2.0t1;CONTRACT INFORMATION SYSTEM;;FEB 16, 2000
+2 ;;UTILITY USED TO ENSURE THAT CAN AMOUNT TOTAL IS CONSISTENT WITH THE
+3 ;;TOTAL AMOUNT OF THE CONTRACT ACTION
CAN1 ;EP;INPUT CHECK CAN1
+1 NEW ACGX,ACGY
+2 SET ACGX=X+$PIECE(^ACGS(DA,"DT2"),U,5)+$PIECE(^("DT2"),U,7)
SET ACGY=$PIECE(^("DT1"),U,5)
+3 IF ACGX<0
SET ACGX=ACGX*-1
+4 IF ACGY<0
SET ACGY=ACGY*-1
+5 IF ACGX>ACGY
KILL X
DO MESS
+6 QUIT
CAN2 ;EP;INPUT CHECK CAN2
+1 NEW ACGX,ACGY
+2 SET ACGX=X+$PIECE(^ACGS(DA,"DT2"),U,3)+$PIECE(^("DT2"),U,7)
SET ACGY=$PIECE(^("DT1"),U,5)
+3 IF ACGX<0
SET ACGX=ACGX*-1
+4 IF ACGY<0
SET ACGY=ACGY*-1
+5 IF ACGX>ACGY
KILL X
DO MESS
+6 QUIT
CAN3 ;EP;INPUT CHECK CAN3
+1 NEW ACGX,ACGY
+2 SET ACGX=X+$PIECE(^ACGS(DA,"DT2"),U,3)+$PIECE(^("DT2"),U,5)
SET ACGY=$PIECE(^("DT1"),U,5)
+3 IF ACGX<0
SET ACGX=ACGX*-1
+4 IF ACGY<0
SET ACGY=ACGY*-1
+5 IF ACGX>ACGY
KILL X
DO MESS
+6 QUIT
MESS WRITE !!,"Sum of dollars for CANS cannot exceed ",$PIECE(^ACGS(DA,"DT1"),U,5),!
+1 QUIT