dbo.SXAAMBClientPrescriptionHistory 
Default Table Name  SXAAMBClientPrescriptionHistory 
Definition  Stores all modifications to a patient’s list of prescriptions/medications. 

dbo.SXAAMBClientPrescriptionHistory 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. 
PrescriptionHistoryID(PK)    bigint  NO  Auto generated unique primary key value. 
PrescriptionID(FK)    bigint  NO  A foreign key to the PrescriptionID column in the SXAAMBClientPrescription table. 
FieldName    varchar(40)  NO  The name of the field that was modified. 
FromValue    varchar(4000)  NO  PHI: The value of the field before modification 
ToValue    varchar(4000)  NO  PHI: The value of the field after modification. 
ModificationType    int  NO  An enumerated type with the following list of possible values: 1 = [Discontinued],2 = [Renewed],3 = [Cancelled],4 = [MemoUpdated],5 = [Printed],6 = [Approved],7 = [Denied],8 = [Transmitted],9 = [TransmitFailed],10 = [Faxed],11 = [Edited],12 = [Added],13 = [Med Review Update],14 = [Entered in Error],15 = [Resume/Continue],16 = [Completed],17 = [Edited & Accepted],18 = [Rejected],19 = [Accepted],21 = [Transmitted Cancel],22 = [PharmacyResponse],23 = [Change Denied],24 = [Changed],25 = [Change Request],26 = [Renewal Request],27 = [Removed], 
ModificationReason    varchar(1000)  YES  Reason for the modification. 
UserGUID(FK)    HVCIDdt  NO  A foreign key to the GUID column in the CV3User table. 
MSrepl_tran_version    uniqueidentifier  NO  Optimistic lock identifier. 
AppSourceType    int  YES  An enumerated type with the following list of possible values: 1 = [Prescription Writer],2 = [Order Reconciliation (Admission)],3 = [Order Reconciliation (Discharge)],4 = [Order Entry (Discharge Orders)],5 = [Structured Notes],6 = [Clinical Summary], 
VisitIDCode    char(20)  YES  To keep track of at which patient visit the modification was made. 
MSReplrowguid    uniqueidentifier  NO  Unique GUID used to support merge replication. 
ClientVisitGUID(FK)    HVCIDdt  YES  A foreign key to the GUID column in the CV3ClientVisit table. 

dbo.SXAAMBClientPrescriptionHistory Primary and Unique Keys 
Key Name  Key Type  Keys 
SXAAMBClientPrescriptionHistoryPK  PrimaryKey  PrescriptionHistoryID