23.04. Internal tables

These are tables that are used internally that you most likely shouldn't be interested in

Internal tables

insuranceProvider

item_store_join

nameInsuranceJoin

name_store_join

name_group

numbers

number_re-use

permissions

prefs

reports

ship_method

sync_out

transaction_category

transaction_notes

units

Insurance provider

Field name	Description	Type	Length	Ind
ID	Alpha
providerName	The insurance provider name.	Text
comment	Text
prescriptionValidityDays	The number of days that can expire from when a prescription is created and when it is paid for.	Long Integer
isActive	If false, no policies associated with this insurance provider can be used to pay for any new or outstanding prescriptions.	Boolean

Item store join

Field name	Description	Type	Length	Ind
Note that records are created for each item- there should always be one record for each item in each store
id	Text
store_ID	Text
item_ID	Text
inactive	true means item is not visible in this store. False means it is visible	bool

Name insurance join

Field name	Description	Type	Length	Ind
ID	Alpha
insuranceProviderID	Alpha
nameID	Alpha
isActive	If false, insurance policy cannot be used to pay for any outstanding or new prescriptions.
policyNumberFamily	Alpha
policyNumberPerson	Alpha
discountRate	The percent of the prescription cost that is payable by this policy.	Real
expiryDate	The date after which this policy will be inactive.	Date
policyNumberFull	The full policy number (family policy number + personal policy number)	Alpha
enteredByID	The ID of the user who created this policy	Alpha

Name store join

Field name	Description	Type	Length	Ind
Note that records are only created as needed- that is a missing record implies the name is invisible for that store
id	Text
store_ID	Text
name_ID	Text
inactive	true means name is not visible in this store. False means it is visible	bool

Name group

Field name	Description	Type	Length	Ind
id	Text
name	Alpha	40

Name note

Field name	Description	Type	Length	Ind
note_type	Alpha	3
entry_date	Date
note	Text
name_key	Alpha	8
id	Text

Numbers

Stores serial numbers such as invoice numbers

Field name	Description	Type	Length	Ind
name	Text
value	Long

Number re-use

Stores serial numbers such as invoice numbers

Field name	Description	Type	Length	Ind
name	Stores deleted serial numbers for reuse- not relevant to users	Text
number_to_use	Long

Permissions

Field name	Description	Type	Length	Ind
item_dept_id	Text
name_group_id	Stores which name groups have permission to be supplied which item departments	Text

Preferences

The data for each preference is in binary format. You're not interested.

Field name	Description	Type	Length	Ind
item	Internally used: storing preferences of text type(Now deprecated in favour of pref blob)	Alpha	20
value	Alpha	60

Reports

Field name	Description	Type	Length	Ind
report_name	Alpha	80
report_blob	BLOB
owner_ID	Text
id	Text
last_updated	Date

Ship method

Field name	Description	Type	Length	Ind
id	Text
method	Alpha	80

Sync out

Field name	Description	Type	Length	Ind
id	Text
type	I=insert, U=update, D=delete, M=merge, T=transfer	Alpha	2
record_id	ID of the record to be synced	Text
to_from_id	sync site ID to send the record	Long
store_id	if store-specific data, the store ID for the record. For example a remote sync site might have multiple stores. If this sync_out record if for a transact record, the Store_ID that it's for. Can be blank	Text
record_data	(deprecated)	BLOB
table_num	Internal table number of the record	Long
sequence	Integer for correct sync ordering	Long
table_id_num	Internal field number for the ID field of the record's table	Long
merge_ID_to_keep	ID of record being kept in merge	Text
merge_ID_to_delete	ID of record being deleted in merge	Text

Transaction category

Field name	Description	Type	Length	Ind
id	Text
category	Alpha	80
type	“ci” for customer invoices “pi” for prescriptions “cc” for customer credits “si” for supplier invoices “sc” for supplier credits “sr for repacks “bu” for builds “in” for inventory adjustments	Alpha	3

Transaction notes

Field name	Description	Type	Length	Ind
id	Text
note	Text

Units

Field name	Description	Type	Length	Ind
id	Text
units	Alpha	60
comment	Text

Previous: 24.03. Foreign keys | | Next: 25. Technical Administration