dbo.SXAAMBClientPrescription 
Default Table Name  SXAAMBClientPrescription 
Definition  For the Outpatient Medication Profile within Ambulatory, the system needs to keep a record of all the prescriptions assigned to a given patient. This table stores that information.
Store the prescription data 

dbo.SXAAMBClientPrescription 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. 
PrescriptionID(PK)    bigint  NO  Auto generated unique primary key value. 
ClientGUID(FK)    HVCIDdt  NO  A foreign key to the GUID column in the CV3Client table. 
ChartGUID(FK)    HVCIDdt  NO  A foreign key to the GUID column in the CV3Chart table. 
ClientVisitGUID    HVCIDdt  NO  Link to the CV3ClientVisit table 
GenericItemID(FK)    int  YES  A foreign key to the GenericItemID column in the SXARxGenericItem table. 
GenericNameID(FK)    int  YES  A foreign key to the GenericNameID column in the SXARxGenericName table. 
DrugName    varchar(255)  YES  The name of the medication being prescribed. Used for free text entries. 
DoseAmount    float  YES  An enumerated type with the following list of possible values: 0 = [DoseAmount], 
DoseUOMID(FK)    int  YES  A foreign key to the RxUOMID column in the SXARxUnitOfMeasure table. 
ScriptFrequencyID(FK)    int  YES  A foreign key to the ScriptFrequencyID column in the SXAAMBScriptFrequency table. 
Route    varchar(255)  YES  An enumerated type with the following list of possible values: 0 = [Route], 
DurationAmount    float  YES  The length of this prescription 
IsContinuous    bit  YES  A flag indicating whether or not this is a continuous prescription. 
QuantityAmount    float  YES  The quantity of the medication being prescribed. 
Refills    int  YES  The number of refills allowed for this prescription. 
Instructions    varchar(4000)  YES  An enumerated type with the following list of possible values: 0 = [Instructions], 
Comments    varchar(1000)  YES  PHI: Any comments to include with this prescription. 
Memo    varchar(4000)  YES  PHI: The physician-only comments for this prescription. 
IsDaw    bit  YES  A flag indicating whether or not this prescription is to be dispensed as written. 
UserGUID(FK)    HVCIDdt  NO  A foreign key to the GUID column in the CV3User table. 
CareproviderGUID(FK)    HVCIDdt  NO  A foreign key to the GUID column in the CV3User table. 
StartDate    datetime  YES  Visit TimeZone - The date this prescription was entered. 
EndDate    datetime  YES  Visit TimeZone - The date this prescription should become inactive 
RenewalDate    datetime  YES  Visit TimeZone - The date this prescription was renewed. 
StatusType    int  NO  An enumerated type with the following list of possible values: 1 = [Active],2 = [Inactive],3 = [Discontinued],4 = [Cancelled],5 = [Unapproved],6 = [NoLongerTaking],7 = [Completed],8 = [EnteredInError],11 = [Deleted], 
PrescriptionType    int  NO  An enumerated type with the following list of possible values: 1 = [Rx],2 = [DRx],3 = [Hx],4 = [eHx],5 = [cHx], 
CSASchedule    smallint  NO  The national standard schedule of the drug used for auditing and classification purposes. 
DispensedUnits    varchar(50)  YES  Number of units dispensed 
MSrepl_tran_version    uniqueidentifier  NO  Optimistic lock identifier. 
FormularyOrgName    varchar(100)  YES  The name of the patient's insurance organization used to check pharmacy benefits 
FormularyDrugKey    varchar(30)  YES  The drug ID from the 3rd party drug database vendor that maps to a drug ID in the formulary. 
FormularyBrandKey    varchar(30)  YES  The brand ID from the 3rd party drug database vendor that maps to a brand ID in the formulary 
FormularyStatus    varchar(100)  YES  The status of the prescribed drug in the patient's insurance plan - Approved, Not Reimbursed, etc. 
InnerPackageSize    numeric(15, 3)  YES  The size of the package used to fill this prescription if applicable. 
InnerPackageSizeUOMID(FK)    int  YES  A foreign key to the RxUOMID column in the SXARxUnitOfMeasure table. 
CDSUniqueIDGUID    HVCIDdt  YES  A unique Identifier in the form of an HVCIDdt. Used by CDS to uniquely identify a row. 
ManufacturerName    varchar(100)  YES  The name of the manufacturer of the sample given to a patient (applies only to prescriptions marked as "samples" 
TransmissionStatus    smallint  YES  An enumerated type with the following list of possible values: 0 = [None],1 = [Printed],2 = [Faxed],3 = [eTransmitted],4 = [Failed],5 = [Received],11 = [SentToQueue],12 = [SentToQueueFailed],13 = [ReceivedByHandler], 
DiscontinueDate    datetime  YES  Visit TimeZone - Date a prescription was discontinued 
DenialDate    datetime  YES  Visit TimeZone - Date a prescription was denied 
DenialReason    varchar(255)  YES  PHI: Reason for the denial of a prescription 
RxReferenceNumber    varchar(35)  YES  Pharmacy Rx Reference Number 
Pharmacist    varchar(125)  YES  PHI: Pharmacist Name (last | first | mid | suffix | prefix) 
PharmacyID    int  YES  Related ID from SXAAMBPharmacy table 
NDC    varchar(35)  YES  National Drug Code 
LastRenewDate    datetime  YES  visit TimeZone - The date of the last renewal of the prescription 
PharmacyMemo    varchar(4000)  YES  PHI: A note to the pharmacist. 
SourceCode    varchar(100)  YES  Indicates the source of the formulary information saved with the prescription. 
SourceCodeType    int  YES  Indicates the type of source of the formulary information saved with the prescription. 0=MediMedia; 1=RxHub 
FormularySourceType    int  YES  Indicates the source of the formulary information saved with the prescription. 
SupervisorGUID    HVCIDdt  YES  The User who was supervising the Prescriber at the time of Prescription creation. 
SourceApplicationType    int  YES  An enumerated type with the following list of possible values: 0 = [PrescriptionWriter],1 = [ORMAdmission],2 = [ORMDischarge],3 = [OrderEntryDischarge],4 = [StructuredNotes],5 = [ClinicalSummary],6 = [Inbox],7 = [MyView],8 = [PhoneNote],9 = [Workbench],10 = [External],11 = [TakeHomeMedRequest],12 = [PharmacyOutPatient],13 = [ORMTransfer],14 = [ORMOutPatient],15 = [Community], 
IsPrn    bit  YES  Indicates whether a medication should be taken as needed for a specified complaint. 
PrnReason    varchar(500)  YES  An enumerated type with the following list of possible values: 0 = [PrnReason], 
SelectedSubmitMethodType    int  YES  An enumerated type with the following list of possible values: 1 = [Print],2 = [Fax],3 = [eSubmit],4 = [SaveOnly],5 = [None],6 = [eCancel], 
IsStartDateApprox    bit  YES  Indicates if the start date entered is a fuzzy date (ex. 12/1/2011 would display as Dec 2011). 
IsEndDateApprox    bit  YES  Indicates if the end date entered is a fuzzy date (ex. 12/1/2011 would display as Dec 2011). 
SelectedProviderAddressGUID    HVCIDdt  YES  Link to the address table CV3Address 
ProductRouteID    int  YES  Multum RouteID for the Product Route 
ClinicalRouteID    int  YES  Multum RouteID for the Clinical Route 
StartDateApproxType    int  YES  An enumerated type with the following list of possible values: 0 = [CompleteDate],1 = [MonthYear],2 = [Year], 
EndDateApproxType    int  YES  An enumerated type with the following list of possible values: 0 = [CompleteDate],1 = [MonthYear],2 = [Year], 
IsSIG    bit  NO  To store the Show sig day state for medication 
IsTaperDose    bit  NO  To store the Taper dose state for medication 
IndicationForUse    varchar(1000)  YES  User can store the Indication for use while adding prescription for favorites from Add Rx 
SignedMessageID    uniqueidentifier  YES  Unique identifier of the signed prescription stored in Rx Archive database on shield 
DEANumber    varchar(50)  YES  DEA Number associated with the provider address selected while submitting the prescription 
MDD    varchar(500)  YES  Maximum Daily Dosage 
DispensedDetailID(FK)    bigint  YES  A foreign key to the DispensedDetailID column in the SXAAMBeRXDispensedDetail table. 
MSReplrowguid    uniqueidentifier  NO  Unique GUID used to support merge replication. 
FormularyQueryGeneratedType    int  NO  An enumerated type with the following list of possible values: 0 = [Not Recorded],1 = [No Formulary Query Generated],2 = [Formulary Query Generated], 
DrugCoverageStatusCodeType    int  YES  An enumerated type with the following list of possible values: 0 = [n/a],1 = [Compound Drugs (CP)],2 = [Supplies (SP)], 
CommunitySourceDocumentGUID    HVCIDdt  YES  Saves CXD Document link 
OriginatingSource    varchar(50)  YES  PHI: Source from where Medicaiton was Initiated 
PriorAuthorizationNumber    varchar(50)  YES  Store Rx Prior Authorization Number 
PriorAuthorizationStatusCode    char(1)  YES  Store Rx Prior Authorization Status Code: A|D|R|N|F 
eRxStructuredSigID(FK)    int  YES  A foreign key to the eRxStructuredSigID column in the SXAAMBeRxStructuredSig table. 
RepresentativeNDC    varchar(35)  YES  Contains representative NDC of a drug 
QuantityUOMID    int  YES  Contains Quantity Unit of measure ID selected from the RxWriter 
PrintReason    varchar(255)  YES  Stores the reason for printing a prescription 
TransmissionDateUTC    datetimeoffset(3)  YES  The date and time that the prescription was eTransmitted and will be based on the Visit time zone. 
EffectiveDateUTC    datetimeoffset(3)  YES  SXAAMBClientPrescription 
FreeTextSig    varchar(4000)  YES  An enumerated type with the following list of possible values: 0 = [FreeTextSig], 
IsAutoCalc    bit  NO  AutoCalc selected. 
IsFreeTextSig    bit  NO  Freetext SIG selected 
eRXTransDetailID    int  YES  Transaction Detail ID number to save a selected benefit plan with the prescription. 
Response271DTM    datetime  YES  271 response time stamp of Transaction Detail ID. 
DoseCalcHeightCm    numeric(5, 2)  YES  store height in cm 
DoseCalcWeightKg    numeric(8, 4)  YES  store weight in kg 
RxNormCUI    varchar(20)  YES  RxNormCUI is stand for RxNorm Concept Unique Identifier and it is a normalized naming system for generic and branded drugs. It is produced by the National Library of Medicine for purposes of interoperable electronic data exchange in the United States. 
RxNormQualifier    varchar(40)  YES  RxNorm Qualifier is a term type of RxNorm i.e. SCD, SBD, BPCK, GPCK. 
IsAutoComplete    bit  NO  this is a toogle flag. If it is off, a prescription status would not be reevaluated. Otherwise, it would be by checking if the current date pass the end of refill date.  

dbo.SXAAMBClientPrescription Primary and Unique Keys 
Key Name  Key Type  Keys 
SXAAMBClientPrescriptionPK  PrimaryKey  PrescriptionID