ACHSVNDR ; IHS/ITSC/PMF - extract standard vars from the vender file [ 10/16/2001 8:16 AM ]
;;3.1;CONTRACT HEALTH MGMT SYSTEM;;JUN 11, 2001
;
;standard call to retrieve and piece out vendor info
;
;INPUT:
; VNDPTR pointer to the vender file
;
;OUTPUT:
;
; VLSTUPD date of last update
; VLSTTRN date of last transmission
;
; VNDEIN ein number
; VNDEINSF ein suffix
; VNDRNAM name
; VNDTYPE type code
; VNDFNFC federal non federal code
; VNDLUPD date of last update
; VNDTXDT date this vendor was translated
; VNDSTRET street address
; VNDCITY city
; VNDSTATE state
; VNDZIP zip
;
;
S OK=0
I '$G(VNDPTR) Q
;
S VNDNAM=$P($G(^AUTTVNDR(VNDPTR,0)),U,1)
I VNDNAM="" Q
N DATA
S DATA=$G(^AUTTVNDR(VNDPTR,11))
;
;the vendor number is supposed to be prescreened and
;be exactly 10 chars long. However, sometimes it is not.
;for that reason, we are cutting it off at 10
S VNDEIN=$E($P(DATA,U,1),1,10)
S VNDEINSF=$P(DATA,U,2)
S VNDTYPE=$P(DATA,U,3)
S VNDFNFC=$P(DATA,U,10) I VNDFNFC'=2 S VNDFNFC=1
S VNDLUPD=$P(DATA,U,11)
S VNDTXDT=$P(DATA,U,12)
;
;
S DATA=$G(^AUTTVNDR(VNDPTR,13))
S VNDSTRET=$P(DATA,U,1)
S VNDCITY=$P(DATA,U,2)
S VNDSTATE=$P(DATA,U,3)
S VNDZIP=$P(DATA,U,4)
;
S OK=1
Q
;
INIT ;
S (VNDEIN,VNDEINSF,VNDTYPE,VNDFNFC,VNDLUPD,VNDTXDT,VNDSTRET,VNDCITY,VNDSTATE,VNDZIP)=""
Q
;
KLL ;EP from ACHSTX11
K VNDEIN,VNDEINSF,VNDTYPE,VNDFNFC,VNDLUPD,VNDTXDT,VNDSTRET,VNDCITY,VNDSTATE,VNDZIP
Q
;
ACHSVNDR ; IHS/ITSC/PMF - extract standard vars from the vender file [ 10/16/2001 8:16 AM ]
+1 ;;3.1;CONTRACT HEALTH MGMT SYSTEM;;JUN 11, 2001
+2 ;
+3 ;standard call to retrieve and piece out vendor info
+4 ;
+5 ;INPUT:
+6 ; VNDPTR pointer to the vender file
+7 ;
+8 ;OUTPUT:
+9 ;
+10 ; VLSTUPD date of last update
+11 ; VLSTTRN date of last transmission
+12 ;
+13 ; VNDEIN ein number
+14 ; VNDEINSF ein suffix
+15 ; VNDRNAM name
+16 ; VNDTYPE type code
+17 ; VNDFNFC federal non federal code
+18 ; VNDLUPD date of last update
+19 ; VNDTXDT date this vendor was translated
+20 ; VNDSTRET street address
+21 ; VNDCITY city
+22 ; VNDSTATE state
+23 ; VNDZIP zip
+24 ;
+25 ;
+26 SET OK=0
+27 IF '$GET(VNDPTR)
QUIT
+28 ;
+29 SET VNDNAM=$PIECE($GET(^AUTTVNDR(VNDPTR,0)),U,1)
+30 IF VNDNAM=""
QUIT
+31 NEW DATA
+32 SET DATA=$GET(^AUTTVNDR(VNDPTR,11))
+33 ;
+34 ;the vendor number is supposed to be prescreened and
+35 ;be exactly 10 chars long. However, sometimes it is not.
+36 ;for that reason, we are cutting it off at 10
+37 SET VNDEIN=$EXTRACT($PIECE(DATA,U,1),1,10)
+38 SET VNDEINSF=$PIECE(DATA,U,2)
+39 SET VNDTYPE=$PIECE(DATA,U,3)
+40 SET VNDFNFC=$PIECE(DATA,U,10)
IF VNDFNFC'=2
SET VNDFNFC=1
+41 SET VNDLUPD=$PIECE(DATA,U,11)
+42 SET VNDTXDT=$PIECE(DATA,U,12)
+43 ;
+44 ;
+45 SET DATA=$GET(^AUTTVNDR(VNDPTR,13))
+46 SET VNDSTRET=$PIECE(DATA,U,1)
+47 SET VNDCITY=$PIECE(DATA,U,2)
+48 SET VNDSTATE=$PIECE(DATA,U,3)
+49 SET VNDZIP=$PIECE(DATA,U,4)
+50 ;
+51 SET OK=1
+52 QUIT
+53 ;
INIT ;
+1 SET (VNDEIN,VNDEINSF,VNDTYPE,VNDFNFC,VNDLUPD,VNDTXDT,VNDSTRET,VNDCITY,VNDSTATE,VNDZIP)=""
+2 QUIT
+3 ;
KLL ;EP from ACHSTX11
+1 KILL VNDEIN,VNDEINSF,VNDTYPE,VNDFNFC,VNDLUPD,VNDTXDT,VNDSTRET,VNDCITY,VNDSTATE,VNDZIP
+2 QUIT
+3 ;