AUTTVND2 ; IHS/DIRM/JDM/DFM - CHECK FOR VENDOR FILE DUPLICATES; [ 10/06/2006 10:08 AM ]
;;98.1;IHS DICTIONARIES (POINTERS);**21**;OCT 2005;Build 6
;
1102 ;EP - input transform file 9999999.11, field 1102
Q:$D(DDS)&($G(DDS)["ACR")
I X["""" K X Q
I $L(X)>2 K X Q
I $L(X)<2 K X Q
I $A(X)=45 K X Q
I X'?2UN K X Q
N AUTEIN,AUTPREF
S AUTEIN=$P($G(^AUTTVNDR(DA,11)),"^",1)
I AUTEIN="" K X Q
S AUTPREF=$E(AUTEIN)
I 12'[AUTPREF K X Q
I AUTPREF=1,$G(X)="" D
.I '$D(ZTQUEUED) W !,"EIN SUFFIX is required for Vendors of type ORGANIZATION."
.K X
Q:'$D(X)
D SUFFIX^AUTTVNDR
Q
AUTTVND2 ; IHS/DIRM/JDM/DFM - CHECK FOR VENDOR FILE DUPLICATES; [ 10/06/2006 10:08 AM ]
+1 ;;98.1;IHS DICTIONARIES (POINTERS);**21**;OCT 2005;Build 6
+2 ;
1102 ;EP - input transform file 9999999.11, field 1102
+1 IF $DATA(DDS)&($GET(DDS)["ACR")
QUIT
+2 IF X[""""
KILL X
QUIT
+3 IF $LENGTH(X)>2
KILL X
QUIT
+4 IF $LENGTH(X)<2
KILL X
QUIT
+5 IF $ASCII(X)=45
KILL X
QUIT
+6 IF X'?2UN
KILL X
QUIT
+7 NEW AUTEIN,AUTPREF
+8 SET AUTEIN=$PIECE($GET(^AUTTVNDR(DA,11)),"^",1)
+9 IF AUTEIN=""
KILL X
QUIT
+10 SET AUTPREF=$EXTRACT(AUTEIN)
+11 IF 12'[AUTPREF
KILL X
QUIT
+12 IF AUTPREF=1
IF $GET(X)=""
Begin DoDot:1
+13 IF '$DATA(ZTQUEUED)
WRITE !,"EIN SUFFIX is required for Vendors of type ORGANIZATION."
+14 KILL X
End DoDot:1
+15 IF '$DATA(X)
QUIT
+16 DO SUFFIX^AUTTVNDR
+17 QUIT