STANDARD DATA DICTIONARY #5.12 -- POSTAL CODE FILE                                                                3/24/25    PAGE 1
STORED IN ^XIP(5.12,  (60859 ENTRIES)   SITE: WWW.BMIRWIN.COM   UCI: VISTA,VISTA                                   (VERSION 8.0)   

DATA          NAME                  GLOBAL        DATA
ELEMENT       TITLE                 LOCATION      TYPE
-----------------------------------------------------------------------------------------------------------------------------------
*** NOTICE: DO NOT POINT DIRECTLY TO THIS FILE UNTILL YOU GET AN IA *** 
 
This file will store all known Postal Codes as well as other associated information related to the Postal Code.  Although the
original data in this file will only contain US Postal Code, the file has been designed to allow non-US Postal Codes to be added in
the future if desired.  


              DD ACCESS: @
              RD ACCESS: 
              WR ACCESS: @
             DEL ACCESS: @
           LAYGO ACCESS: @
           AUDIT ACCESS: @

   APPLICATION GROUP(S): XU
IDENTIFIED BY: UNIQUE KEY (VA) (#8)[R]
         "W1": D EN^DDIOL($P(^(0),U,2)_"  "_$P(^(0),U,6)_"  "_$P(^(0),U,7),"","?0")

CROSS
REFERENCED BY: COUNTY(AC), MAIL CODE(B), CITY(C), CITY KEY(D), UNIQUE KEY (VA)(E)

INDEXED BY:    MAIL CODE & CITY & COUNTY & STATE & INACTIVE DATE & CITY KEY & PREFERRED CITY KEY & CITY ABBREVIATION & UNIQUE KEY
               (VA) (AD)




5.12,.01      MAIL CODE              0;1 FREE TEXT (Required) (audited)

              INPUT TRANSFORM:  K:$L(X)>12!($L(X)<3) X
              LAST EDITED:      DEC 27, 2006 
              HELP-PROMPT:      Please enter the Postal Code 
              DESCRIPTION:      This field holds recognized postal codes.  Although this file will only start with US postal codes,
                                it may be expanded in the future to also contain postal codes from other countries.  

              TECHNICAL DESCR:  This value is currently obtained from the USPS AIS City-State file.  The data in the file is
                                located at: 
                                                                 
                                  Field Reference Number: 2 
                                  Field Description: ZIP code 
                                  Logical Length: 5 
                                  Relative Position From/Thru: 02-06 

              AUDIT:            EDITED OR DELETED
              DELETE TEST:      1,0)= D EN^DDIOL("Entries can only be Inactivated.","","!?5,$C(7)") I 1

              CROSS-REFERENCE:  5.12^B 
                                1)= S ^XIP(5.12,"B",$E(X,1,30),DA)=""
                                2)= K ^XIP(5.12,"B",$E(X,1,30),DA)

              RECORD INDEXES:   AD (#272)

5.12,1        CITY                   0;2 FREE TEXT

              INPUT TRANSFORM:  K:$L(X)>28!($L(X)<3) X
              LAST EDITED:      JUN 10, 2003 
              HELP-PROMPT:      Please enter the City associated with this Postal Code. 
              DESCRIPTION:
                                This field holds the city represented by this Postal Code.  

              TECHNICAL DESCR:  This value is currently obtained from the USPS AIS City-State file.  The data in the file is
                                located at: 
                                 
                                  Field Reference Number: 5 
                                  Field Description: City State Name 
                                  Logical Length: 28 
                                  Relative Position From/Thru: 14-41 

              CROSS-REFERENCE:  5.12^C 
                                1)= S ^XIP(5.12,"C",$E(X,1,30),DA)=""
                                2)= K ^XIP(5.12,"C",$E(X,1,30),DA)

              RECORD INDEXES:   AD (#272)

5.12,2        COUNTY                 0;3 POINTER TO COUNTY CODE FILE (#5.13)

              LAST EDITED:      JUN 26, 2003 
              HELP-PROMPT:      Please enter the county associated with this Postal Code. 
              DESCRIPTION:
                                This field contains a pointer to the County that this Postal Code is within.  

              CROSS-REFERENCE:  5.12^AC 
                                1)= S ^XIP(5.12,"AC",$E(X,1,30),DA)=""
                                2)= K ^XIP(5.12,"AC",$E(X,1,30),DA)

              RECORD INDEXES:   AD (#272)

5.12,3        STATE                  0;4 POINTER TO STATE FILE (#5)

              LAST EDITED:      JUN 10, 2003 
              HELP-PROMPT:      Please enter the State associated with this Postal Code. 
              DESCRIPTION:      This field contains a pointer to the State File to represent the state associated with this Postal
                                Code.  

              RECORD INDEXES:   AD (#272)

5.12,4        INACTIVE DATE          0;5 DATE

              INPUT TRANSFORM:  S %DT="EX" D ^%DT S X=Y K:X<1 X
              LAST EDITED:      JUN 10, 2003 
              HELP-PROMPT:      Please enter the Inactive Date for this Postal Code. 
              DESCRIPTION:
                                This is the date that the Postal Code became Inactive.  

              RECORD INDEXES:   AD (#272)

5.12,5        CITY KEY               0;6 FREE TEXT (Required)

              INPUT TRANSFORM:  K:$L(X)>6!($L(X)<6) X
              LAST EDITED:      JUN 10, 2003 
              HELP-PROMPT:      Answer must be 6 characters in length. 
              DESCRIPTION:
                                This is the unique City State Key that has been assigned by the USPS.  

              TECHNICAL DESCR:  This value is currently obtained from the USPS AIS City-State file.  The data in the file is
                                located at: 
                                 
                                  Field Reference Number: 3 
                                  Field Description: City State Key 
                                  Logical Length: 6 
                                  Relative Position From/Thru: 07-12 

              CROSS-REFERENCE:  5.12^D 
                                1)= S ^XIP(5.12,"D",$E(X,1,30),DA)=""
                                2)= K ^XIP(5.12,"D",$E(X,1,30),DA)

              CROSS-REFERENCE:  ^^TRIGGER^5.12^8 
                                1)= K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^XIP(5.12,D0,0)):^(0),1:"") S X=$P(Y(1),U,9),X=X S D
                                IU=X K Y X ^DD(5.12,5,1,2,1.1) S DIH=$G(^XIP(5.12,DIV(0),0)),DIV=X S $P(^(0),U,9)=DIV,DIH=5.12,DIG=
                                8 D ^DICR

                                1.1)= S X=DIV S Y(1)=$S($D(^XIP(5.12,D0,0)):^(0),1:"") S X=$P(Y(1),U,1),Y(2)=$G(X) S X=DIV,Y=X,X=Y(
                                2),X=X_Y

                                2)= Q

                                CREATE VALUE)= ((#.01)_(#5))
                                DELETE VALUE)= NO EFFECT
                                FIELD)= UNI
                                The field value is created by the concatenation of the MAIL CODE(#.01) field and the CITY KEY(#5)
                                that creates a unique key for lookups. The value is stuffed into the UNIQUE KEY(#8).  


              RECORD INDEXES:   AD (#272)

5.12,6        PREFERRED CITY KEY     0;7 FREE TEXT (Required)

              INPUT TRANSFORM:  K:$L(X)>6!($L(X)<6) X
              LAST EDITED:      JUL 10, 2003 
              HELP-PROMPT:      Answer must be 6 characters in length. 
              DESCRIPTION:
                                This key is assigned by USPS.  

              TECHNICAL DESCR:  This value is currently obtained from the USPS AIS City-State file.  The data in the file is
                                located at: 
                                 
                                  Field Reference Number: 9 
                                  Field Description: Preferred Last Line City State Key 
                                  Logical Length: 6 
                                  Relative Position From/Thru: 57-62 
                                 
                                If this field equals 'UNIQUE CITY KEY' then this city is considered the DEFAULT city.  On the other
                                hand, if this is not equal to 'UNIQUE CITY KEY' then the city is considered an ACCEPTABLE city.  

              RECORD INDEXES:   AD (#272)

5.12,7        CITY ABBREVIATION      0;8 FREE TEXT

              INPUT TRANSFORM:  K:$L(X)>13!($L(X)<1) X
              LAST EDITED:      JUN 10, 2003 
              HELP-PROMPT:      Answer must be 1-13 characters in length. 
              DESCRIPTION:
                                This field contains the USPS's city abbreviation.  

              TECHNICAL DESCR:  This value is currently obtained from the USPS AIS City-State file.  The data in the file is
                                located at: 
                                  
                                  Field Reference Number: 6 
                                  Field Description: City State Name Abbreviation 
                                  Logical Length: 13 
                                  Relative Position From/Thru: 42-54 

              RECORD INDEXES:   AD (#272)

5.12,8        UNIQUE KEY (VA)        0;9 FREE TEXT (Required)

              INPUT TRANSFORM:  K:$L(X)>18!($L(X)<9) X
              LAST EDITED:      JUN 19, 2003 
              HELP-PROMPT:      Answer must be 9-18 characters in length. 
              DESCRIPTION:      This field is the value when the MAIL CODE(#.01) and the CITY KEY(#6) are concatenated.  The
                                purpose of this field is to create a unique lookup value using the "E" cross-reference.  

              TECHNICAL DESCR:  A single Zip code can represent multiple City names or an individual City name can represent
                                multiple Zip Code.  But each object in and of themselves are unique, a combination of these two
                                unique properties will create a unique lookup value.  For example: 
                                 
                                 Case A: 
                                 Zip code: 26452 
                                 City Name: VALLEY CHAPEL, City Key: X2A444, Unique Key: 26452X2A444 
                                 City Name: WESTON, City Key: X29362, Unique Key: 26452X29362 
                                 
                                 Case B: 
                                 City: HAGERSTOWN, City Key: V23622, Zip code: 21740 UKey: 21740V23622 
                                 City: HAGERSTOWN, City Key: V23622, Zip code: 21741, UKey: 21741V23622 
                                 City: HAGERSTOWN, City Key: V23622, Zip code: 21742, UKey: 21742V23622 
                                 City: HAGERSTOWN, City Key: V23622, Zip code: 21746, UKey: 21746V23622 
                                 City: HAGERSTOWN, City Key: V23622, Zip code: 21747, UKey: 21747V23622 
                                  

              WRITE AUTHORITY:  ^
              NOTES:            TRIGGERED by the CITY KEY field of the POSTAL CODE File 

              CROSS-REFERENCE:  5.12^E 
                                1)= S ^XIP(5.12,"E",$E(X,1,30),DA)=""
                                2)= K ^XIP(5.12,"E",$E(X,1,30),DA)

              RECORD INDEXES:   AD (#272)


      FILES POINTED TO                      FIELDS

COUNTY CODE (#5.13)               COUNTY (#2)

STATE (#5)                        STATE (#3)


File #5.12

  Record Indexes:

  AD (#272)    RECORD    MUMPS    IR    SORTING ONLY
      Short Descr:  Used to keep track of records that have changes
      Description:  This cross reference is used to keep track of any field changes that are made during updates via the USPS's
                    'Address Information System' the are obtained from the 'City State Product - Detail Record'.  The format of the
                    cross reference is: 
                     
                      S ^XIP(5.12,"AD",)="" 
                     
                    If there are any changes to one or more of the field values, then a background job will transmit the record to
                    all of the VAMC's via a MFN message.  
        Set Logic:  D:'$D(XIPSEED) X512AD^XIPXREF
       Kill Logic:  Q
       Whole Kill:  K ^XIP(5.12,"AD")
             X(1):  MAIL CODE  (5.12,.01)  (forwards)
             X(2):  CITY  (5.12,1)  (forwards)
             X(3):  COUNTY  (5.12,2)  (forwards)
             X(4):  STATE  (5.12,3)  (forwards)
             X(5):  INACTIVE DATE  (5.12,4)  (forwards)
             X(6):  CITY KEY  (5.12,5)  (forwards)
             X(7):  PREFERRED CITY KEY  (5.12,6)  (forwards)
             X(8):  CITY ABBREVIATION  (5.12,7)  (forwards)
             X(9):  UNIQUE KEY (VA)  (5.12,8)  (forwards)


INPUT TEMPLATE(S):

PRINT TEMPLATE(S):
XIP ZIP CODE LIST             APR 30, 2004@06:45  USER #0                                                             ZIP CODE LIST

SORT TEMPLATE(S):
XIP ZIP CODE LIST             APR 30, 2004@07:03  USER #0    
SORT BY: @MAIL CODE;S1//    (User is asked range)
  WITHIN MAIL CODE, SORT BY: @$S((#5)=(#6):0,1:1)// ($S((#5)=(#6):0,1:1) not null)


FORM(S)/BLOCK(S):