dbo.SXAMMBillChargeDetail 
Default Table Name  SXAMMBillChargeDetail 
Definition  The Bill Charge Header and Bill Charge Detail tables are where the Pharmacy system writes data that will trigger the creation of a Financial Transaction segment.
An external process will poll these tables and look for new transactions to send to the Financial System (Charge Control = 'NP').
When the external process has sent the data to to the Financial System, it sets the status to processed (Charge Control = 'PD')
The data in these tables is formatted in HL7 format.
A Financial Transaction is made up of 1 row in Bill Charge Header, and 1 or more rows in Bill Charge Detail.
The Bill Charge Header row contains the information that will go in the PID segment of the Financial Transaction.
Each Bill Charge Detail row contains the information that will go in the FT1 segments of the Financial Transaction.
After storing the data for the new Financial Transaction into these tables, Pharmacy's job is done and as far as Pharmacy is concerned, it has no more work to do. It is the responsibility of the external process to make sure that the transactions are sent to the Financial System. 

dbo.SXAMMBillChargeDetail 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. 
BillChargeDetailID(PK)    bigint  NO  Auto generated unique primary key value. 
BilledTransactionDetailID(FK)    bigint  NO  A foreign key to the BilledTransactionDetailID column in the SXAMMBilledTransactionDetail table. 
BillChargeHeaderID(FK)    bigint  NO  A foreign key to the BillChargeHeaderID column in the SXAMMBillChargeHeader table. 
TransactionDtm    datetime  NO  Visit TimeZone - Identifies the Date / Time of the Transaction (i.e. the Date / Time that the Service was incurred).For a Reversal Transaction (from View Billing Transactions process), this is set to the Transaction Date / Time of the Parent Transaction.Otherwise this is set to the Bill Date / Time from the Billing Header. 
TransactionCode    varchar(300)  NO  Identifies the Charge Code from the Charge Algorithm. The code assigned by the institution for the purpose of uniquely identifying the transaction.
Components: ^ ^ ^ ^ ^
Component Values:
1. SXAMMChargeAlgorithm.ChargeCode (Returned by Determine Price)
2. The Generic Item Name for the Stock Item Product being billed (Returned by Determine Price)
3. ‘SMM’
4. SXAMMProduct.AlternateBillingCode
5. Null
6. ‘FIM’
Components 4, 5, and 6 are only sent if the Alternate Billing Code (SXAMMProduct.AlternateBillingCode) exists. 
TransactionDesc    varchar(40)  YES  Identifies the alternate Charge Code Description. Used to override or extend the TransactionCode meaning. 
TransactionQty    numeric(14, 4)  NO  Identifies the quantity (number of units) billed,
based on the Billing Preference UOM for the Generic Item.
If there is no Billing Preference UOM for this Generic Item, then the UOM for the Cost record is used.Transaction Amount Ext = Transaction Amount * Transaction Quantity 
TransactionExtAmt    numeric(11, 3)  NO  Identifies the Price calculated for the Stock Item Product
,Transaction Amount Ext = Transaction Amount * Transaction Quantity 
TransactionUnitAmt    numeric(11, 3)  NO  Identifies the Unit Price based on the Billing Preference UOM for the Generic Item. If there is no Billing Preference UOM for this Generic Item, then this is the Unit Price based on the UOM for the Cost record.,Transaction Amount Ext = Transaction Amount * Transaction Quantity 
AssignedPatientLocationID    varchar(80)  NO  Identifies the current Patient Location at the time billing took place.Components:
^ ^ ^
Point of care (nursing unit) and Facility are required
Room and bed are optional 
OrderedByCode    varchar(120)  YES  PHI: The corporate number of ordering Physician.Only the first component is sent. 
FillerOrderNumber    varchar(22)  NO  This order number used by SMM to uniquely identify the order.
Components:
^
The components values are:
1. Entity identifier is set to the Pharmacy Order Number (CV3Order.OrderNumber)
2. Namespace ID is set to the Literal 'SMM' 
ProcedureCode    varchar(300)  NO  Identifies HCPCS J Code related billing information such as the J Code Identifier, and J Code Quantity assigned to the Charge.
Components:
^ ^ ^ ^ ^
Components
1. Identifier is set to the Charge Code.
2. Description is set to the Generic Item Name.
3. Name of Coding System is set to the literal 'JCODE'.
4. Alternate Identifier is set to the number of J Code Units (Billable Units).
5. Alternate Description is set to the literal 'UNITS'
,6. Name of Alternate Coding System is set to the literal 'QTY' 
MSrepl_tran_version    uniqueidentifier  NO  Optimistic lock identifier. 
BilledNDCDINCode    varchar(28)  YES  Stores the NDC/DIN Code for any Billing Charges. This is for planning for compliance with Centers for Medicare and Medicaid Services (CMS) requirements related to the Deficit ReductionAct (DRA) of 2005, providers must bill with NDC/DIN codes for all drugs administered in an office/clinic or other outpatient setting with a dates of service on and after January 1, 2007 
MSReplrowguid    uniqueidentifier  NO  Unique GUID used to support merge replication. 
IsJZEligible    bit  NO  Indicates if the order option component is eligible for JZ modifier to be sent to charger 

dbo.SXAMMBillChargeDetail Primary and Unique Keys 
Key Name  Key Type  Keys 
SXAMMBillChargeDetailPK  PrimaryKey  BillChargeDetailID