dbo.SXAAMBPharmacy 
Default Table Name  SXAAMBPharmacy 
Definition  Stores pharmacy demographics to enable faxing functionality in the Prescription Writer application. 

dbo.SXAAMBPharmacy Columns 
ColumnName  Domain  Datatype  NULL  Definition 
SiteID    smallint  NO  Identifies the unique distributed database ID where the row was inserted. Distributed databases are no longer supported so this column is deprecated. 
Build    int  NO  Identifies the build number and patch level of the software that inserted/updated this row. The format is the Build number followed by 3 digits for the patch level which is typically 000. The build number is tied to specific versions of the software, e.g. Sunrise 15.3 is Build 5021, Sunrise 16.3 is Build 5503. 
TouchedBy    varchar(50)  NO  Information about the user that last updated the row. This will typically be the UserID (IDCode from CV3User table) and may be prefixed with an environment identifier followed by an underscore, e.g. b96d2bf5_jongmore. 
TouchedWhen    datetime  NO  The date and time that the row was last updated and will be based on the Enterprise time zone. 
CreatedBy    varchar(50)  NO  Information about the user that created the row. This will typically be the UserID (IDCode from CV3User table) and may be prefixed with an environment identifier followed by an underscore, e.g. b96d2bf5_jongmore. 
CreatedWhen    datetime  NO  The date and time that the row was created and will be based on the Enterprise time zone. 
Active    bit  NO  Denotes whether the row is active or not, 0 means the row has been soft deleted or deactivated. 
PharmacyID(PK)    int  NO  Auto generated unique primary key value. 
PharmacyName    varchar(100)  NO  Name of the pharmacy 
Address1    varchar(50)  YES  Line 1 of the pharmacy's address. 
Address2    varchar(50)  YES  Line 2 of the pharmacy's address. 
City    varchar(50)  YES  City of the pharmacy's address. 
CountryDvsnCode    varchar(30)  YES  State/Province of the pharmacy's address. 
PostalCode    varchar(15)  YES  Postal Code of the pharmacy's address 
PhoneAreaCode    varchar(10)  YES  Area code of the pharmacy's phone number. 
PhoneNumber    varchar(25)  YES  Phone number for the pharmacy. 
FaxAreaCode    varchar(10)  YES  Area code of the pharmacy's fax number. 
FaxNumber    varchar(25)  YES  Fax number for the pharmacy. 
MSrepl_tran_version    uniqueidentifier  NO  Optimistic lock identifier. 
NCPDPID    int  YES  Sure Scripts defined Pharmacy ID 
StoreNumber    varchar(35)  YES  Store number information for the pharmacy. 
Email    varchar(80)  YES  Email address for the pharmacy. 
PhoneAlt1    varchar(25)  YES  Alternate phone number 1 
PhoneAlt1Qualifier    char(3)  YES  Alternate phone number 1 qualifier 
PhoneAlt2    varchar(25)  YES  Alternate phone number 2 
PhoneAlt2Qualifier    char(3)  YES  Alternate phone number 2 qualifier 
PhoneAlt3    varchar(25)  YES  Alternate phone number 3 
PhoneAlt3Qualifier    char(3)  YES  Alternate phone number 3 qualifier 
PhoneAlt4    varchar(25)  YES  Alternate phone number 4 
PhoneAlt4Qualifier    char(3)  YES  Alternate phone number 4 qualifier 
PhoneAlt5    varchar(25)  YES  Alternate phone number 5 
PhoneAlt5Qualifier    char(3)  YES  Alternate phone number 5 qualifier 
ActiveStartTime    datetime  YES  Enterprise TimeZone - Pharmacy start time. 
ActiveEndTime    datetime  YES  Enterprise TimeZone - Pharmacy close time. 
ServiceLevel    varchar(5)  YES  Service level code used to determine messaging capabilities. 
PartnerAccount    varchar(35)  YES  Pharmacy trading partner account. 
LastModifiedDate    datetime  YES  Enterprise TimeZone - Date of last pharmacy modification. 
CrossStreet    varchar(35)  YES  Nearest crossing street. 
RecordChange    char(1)  YES  N = New, U = Updated, D = Deactivated 
OldServiceLevel    varchar(5)  YES  Previous service level. 
TextServiceLevel    varchar(100)  YES  Text formatted service level. 
TextServiceLevelChange    varchar(100)  YES  Text formatted service level change. 
Version    varchar(15)  YES  Current SMS version number of pharmacy. 
PharmacyType    int  YES  An enumerated type with the following list of possible values: 0 = [Retail],1 = [Mail Order], 
NPI    varchar(35)  YES  Pharmacy Identifier from Surescripts Pharmacy Flat File. NPI (National Provider Identifier) assigned to the Pharmacy. 
SpecialtyType1    varchar(35)  YES  Pharmacy Specialty Type from Surescripts Pharmacy Flat File. Indicates Mail Order, Retail, Fax, 24 hour, etc. 1 of 4 optional Specialty Types allowed per pharmacy. 
SpecialtyType2    varchar(35)  YES  Pharmacy Specialty Type from Surescripts Pharmacy Flat File. Indicates Mail Order, Retail, Fax, 24 hour, etc. 2 of 4 optional Specialty Types allowed per pharmacy. 
SpecialtyType3    varchar(35)  YES  Pharmacy Specialty Type from Surescripts Pharmacy Flat File. Indicates Mail Order, Retail, Fax, 24 hour, etc. 3 of 4 optional Specialty Types allowed per pharmacy. 
SpecialtyType4    varchar(35)  YES  Pharmacy Specialty Type from Surescripts Pharmacy Flat File. Indicates Mail Order, Retail, Fax, 24 hour, etc. 4 of 4 optional Specialty Types allowed per pharmacy. 
FileID    varchar(35)  YES  Pharmacy Identifier from Surescripts Pharmacy Flat File. The Surescripts internal FileID is seldom used but retained for backward compatibility. 
StateLicenseNumber    varchar(35)  YES  Pharmacy Identifier from Surescripts Pharmacy Flat File. State License Number assigned to the Pharmacy. 
MedicareNumber    varchar(35)  YES  Pharmacy Identifier from Surescripts Pharmacy Flat File. Medicare Identifier assigned to the Pharmacy. 
MedicaidNumber    varchar(35)  YES  Pharmacy Identifier from Surescripts Pharmacy Flat File. Medicaid Identifier assigned to the Pharmacy. 
PPONumber    varchar(35)  YES  Pharmacy Identifier from Surescripts Pharmacy Flat File. PPO Number assigned to the Pharmacy. 
PayerID    varchar(35)  YES  Pharmacy Identifier from Surescripts Pharmacy Flat File. Payer ID assigned to the Pharmacy. 
BINLocationNumber    varchar(35)  YES  Pharmacy Identifier from Surescripts Pharmacy Flat File. BIN Identifier assigned to the Pharmacy. 
DEANumber    varchar(35)  YES  Pharmacy Identifier from Surescripts Pharmacy Flat File. DEA Number assigned to the Pharmacy. 
HIN    varchar(35)  YES  Pharmacy Identifier from Surescripts Pharmacy Flat File. HIN Identifier assigned to the Pharmacy. 
SecondaryCoverage    varchar(35)  YES  Pharmacy Identifier from Surescripts Pharmacy Flat File. Secondary Coverage ID assigned to the Pharmacy. 
NAICCode    varchar(35)  YES  Pharmacy Identifier from Surescripts Pharmacy Flat File. NAIC Code assigned to the Pharmacy. 
PromotionNumber    varchar(35)  YES  Pharmacy Identifier from Surescripts Pharmacy Flat File. Promotion Code assigned to the Pharmacy. 
SocialSecurity    varchar(35)  YES  Pharmacy Identifier from Surescripts Pharmacy Flat File. Tax ID assigned to the Pharmacy. 
PriorAuthorization    varchar(35)  YES  PriorAuth Identifier from Surescripts Pharmacy Flat File. Provided by Pharmacies to Surescripts. 
MutuallyDefined    varchar(35)  YES  MutuallyDefined Identifier from Surescripts Pharmacy Flat File. Provided by Pharmacies to Surescripts. 
MSReplrowguid    uniqueidentifier  NO  Unique GUID used to support merge replication. 
IsContracted    bit  NO  Determine pharmacy as being a contracted/340B pharmacy 
AddressGUID(FK)    HVCIDdt  YES  A foreign key to the GUID column in the CV3Address table. 
FriendlyName    varchar(100)  YES  Pharmacy "nick name" or Synonym defined by the customer 
StdAddressGUID(FK)    HVCIDdt  YES  A foreign key to the GUID column in the CV3Address table. 

dbo.SXAAMBPharmacy Primary and Unique Keys 
Key Name  Key Type  Keys 
SXAAMBPharmacyPK  PrimaryKey  PharmacyID