Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: DVBABADR

DVBABADR.m

Go to the documentation of this file.
DVBABADR ;ALB/RPM - CAPRI ADDRESS UTILITIES ; 06/11/2009
 ;;2.7;AMIE;**143**;Apr 10, 1995;Build 4
 ;
 Q  ;NO DIRECT ENTRY
 ;
ZIP2CITY(RESULT,DVBZIP) ;return city/state list for a given zip code
 ;RPC: DVBAB ZIP2CITY
 ;
 N DVBCITY
 N DVBI
 D POSTALB^XIPUTIL(DVBZIP,.DVBCITY)
 S DVBI=0
 S RESULT(0)=DVBCITY_U_$G(DVBCITY("ERROR"))
 F  S DVBI=$O(DVBCITY(DVBI)) Q:'DVBI  D
 . N DVBCNTYP
 . S DVBCNTYP=$$GETCNTYP($G(DVBCITY(DVBI,"COUNTY")),$G(DVBCITY(DVBI,"STATE POINTER")))
 . S RESULT(DVBI)=$G(DVBCITY(DVBI,"CITY"))_U_$G(DVBCITY(DVBI,"COUNTY"))_U_DVBCNTYP_U_$G(DVBCITY(DVBI,"STATE"))_U_$G(DVBCITY(DVBI,"STATE POINTER"))
 Q
 ;
GETCNTYP(DVBCNTY,DVBSTATE) ;
 N DVBRSLT
 S DVBRSLT=$$FIND1^DIC(5.01,","_DVBSTATE_",","X",DVBCNTY)
 Q $S(DVBRSLT>0:DVBRSLT,1:"")