Lab Methods versus Generic Methods

You have the option of storing the original lab method by preference (instead of the generic method) and allowing a one-to-many relationship between generic methods and lab methods. This was achieved by removing the old ST_XS_METHOD_ELEMENT table and storing lab combos that are linked directly to STX_XS_ELEMENT and STX_MD_LAB_METHOD.

There are several ways in which, for example, the metal content of an ore sample can be determined. The accuracy of the results obtained will vary, depending on the method used. Consequently, it is important to know how a given assay result was obtained. Sample Tracker uses a coding system to represent the various methods:

There are a finite number of ways in which an assay for a specific commodity can be performed. However, there is no standard coding system in use at laboratories to represent these methods. Each individual laboratory uses its own coding system, resulting in a proliferation of codes that are difficult to manage.

In an attempt to resolve this problem, Sample Tracker uses a mapping system, whereby the method codes used by laboratories are mapped to a set of common, generic method codes.

For example, suppose LabA uses the code XXX for a given method, while LabB uses the code YYY for exactly the same method. Within Sample Tracker these are both mapped to a single generic code (say AAA) and assay results are stored against the generic code (rather than the lab codes).

The following example shows some generic method mappings for a laboratory that uses the code A117 for "Aqua Regia digest with AAS finish", which is mapped to the generic code, AR-AAS.

Theoretically, this generic code mapping makes it easier to identify and search for a specific method in the database. However, laboratories often introduce subtle variations in their analytical processes which (although still within the generic framework) could produce results that are either more accurate or less accurate than other variations. Obviously the system used in Sample Tracker (i.e. mapping lab codes to generic codes) does not lend itself to this level of differentiation and therefore some of the more subtle details may be lost.

The need for this level of differentiation is open to debate. However, in order to provide a practical solution to the problem, Sample Tracker now gives you the option of storing either the generic method code or the original lab method code in the result table and associated metadata.

Using the original lab code in sampling metadata

Sample Tracker now gives you the option of storing either the generic method code or the original lab method code in the result tables and associated metadata. However, note that the use of the original lab method introduces several difficulties when dealing with QC data and therefore this approach is not recommended.

The ST_MD_LAB_COMBO table provides the key to the implementation of the preferred option. In particular, the code stored in the METHOD column of this table will be the one carried over to the metadata.

By comparing the name of the METHOD column in the ST_MD_LAB_COMBO table with the names of the METHOD and LAB_METHOD columns in the ST_MD_LAB_METHOD table, Sample Tracker is able to determine which scenario applies. Sample Tracker must rely on column mappings in order to accomplish this task, since the column names in the user's database may be different from the standard system names.

The following mappings illustrate the default scenario, using the standard Sample Tracker table and column names:

Table Column Description
ST_MD_LAB_METHOD LAB_METHOD Original lab method code
ST_MD_LAB_METHOD METHOD Corresponding generic method
ST_MD_LAB_COMBO METHOD Foreign key column in the combo table

Sample Tracker will compare the column names returned by these mappings and use this as a basis for determining the preferred option, viz:

  • If the column name returned by the mapping for ST_MD_LAB_COMBO.METHOD is the same as the name returned for ST_MD_LAB_METHOD.METHOD, then the default scenario applies (i.e. the generic method code is stored in the combo table and all metadata tables).
  • If the column name returned by the mapping for ST_MD_LAB_COMBO.METHOD is the same as the name returned for ST_MD_LAB_METHOD.LAB_METHOD, then the original lab method code is stored in the combo table and metadata tables.

The latter scenario requires some changes to the database structure, which can be achieved in several ways. The two most obvious choices are as follows:

Changing the name of the METHOD column to LAB_METHOD where appropriate

This is an attractive option from a consistency point of view. However, keep in mind that the name of a primary key column would have to be changed in several tables, including ST_MD_LAB_COMBO, ST_DESPATCH_DETAIL, ST_XS_STANDARD_DETAIL, ST_RESULT and ST_RESULT_STANDARD.

Retaining current field names where possible

This option does not require many field name changes. However, it does introduce an element of confusion since the METHOD field contains the generic code in some tables and the lab code in others. (Maybe the best solution of all is to stick with the generic codes!).

Storing both lab codes in the result tables

If you decide to use the original lab method as your primary method code, you should store both the original and the generic lab codes in your result tables. (This is necessary in order to allow meaningful QC data retrieval.)