AUM4103M ;IHS/ITSC/DMJ - SCB UPDATE 2/18/2004 [ 03/29/2004 5:11 PM ]
;;04.1;TABLE MAINTENANCE;**3**;OCT 13,2003
;
VAL(X,%,Y) ;EP - return background info.
I X["AREA" Q $T(@%)
S Y=0
I X["SU" D Q Y
. NEW C,T
. F C=1:1 S T=$P($T(SU+C),";",3) Q:T="END" I $P(T,U,1,2)=($E(%,1,2)_U_$E(%,3,4)) S Y=1_";;"_T Q
.Q
I '(X["CTY") Q 0
NEW C,T
F C=1:1 S T=$P($T(COUNTY+C),";",3) Q:T="END" I $P(T,U,1,2)=($E(%,1,2)_U_$E(%,3,4)) S Y=1_";;"_T Q
Q Y
;
;
AREA ; CODE^NAME^PREFIX/REGION^CAN PREFIX
;;END
;
SU ; AREA^SU^NAME
;;END
;
COUNTY ; STATE^COUNTY^NAME
;;END
;
AUM4103M ;IHS/ITSC/DMJ - SCB UPDATE 2/18/2004 [ 03/29/2004 5:11 PM ]
+1 ;;04.1;TABLE MAINTENANCE;**3**;OCT 13,2003
+2 ;
VAL(X,%,Y) ;EP - return background info.
+1 IF X["AREA"
QUIT $TEXT(@%)
+2 SET Y=0
+3 IF X["SU"
Begin DoDot:1
+4 NEW C,T
+5 FOR C=1:1
SET T=$PIECE($TEXT(SU+C),";",3)
IF T="END"
QUIT
IF $PIECE(T,U,1,2)=($EXTRACT(%,1,2)_U_$EXTRACT(%,3,4))
SET Y=1_";;"_T
QUIT
+6 QUIT
End DoDot:1
QUIT Y
+7 IF '(X["CTY")
QUIT 0
+8 NEW C,T
+9 FOR C=1:1
SET T=$PIECE($TEXT(COUNTY+C),";",3)
IF T="END"
QUIT
IF $PIECE(T,U,1,2)=($EXTRACT(%,1,2)_U_$EXTRACT(%,3,4))
SET Y=1_";;"_T
QUIT
+10 QUIT Y
+11 ;
+12 ;
AREA ; CODE^NAME^PREFIX/REGION^CAN PREFIX
+1 ;;END
+2 ;
SU ; AREA^SU^NAME
+1 ;;END
+2 ;
COUNTY ; STATE^COUNTY^NAME
+1 ;;END
+2 ;