AGS Sample Workflows

One of the biggest “problems” with AGS data produced from laboratories is the corruption of the client sample references. This problem is usually a result of poor communication and may not be the fault of the laboratory. This article will explain what the AGS Sample References are, how they get corrupted and what to do if they do.

The data contained within an AGS file generated by a laboratory can be split into two broad categories: sample data and test data.

The Sample Data, which generally consists of location data and sample parameters, is passed to the laboratory from the customer. This data is traditionally supplied to the laboratory either via an Excel schedule sheet or simply via a paper hard copy.

The Test Data are the results that the laboratory has produced from the tests carried out.  Each set of test parameters is linked back to the source sample using four reference parameters: Location ID, Top Depth, Type and Reference Number (we will talk more about sample ID later).  If more than one test has been carried out on a sample, then a unique specimen number and/or depth are assigned to each test to make it uniquely identifiable.

The link between the test data and the sample references is where things can go wrong for the following reasons:-

  1. The client did not supply all 4 fields to the laboratory (The client’s fault)
  2. The client supplied the sample references in a format that could not be imported or cut and pasted into the lab’s system and so mistakes were made when retyping (The client’s fault)
  3. The client changes the sample reference fields after it has requested testing (The Client’s fault)
  4. The Lab did not enter all the fields as their system did not need all 4 fields (The Lab’s fault)

An Orphan Record is when a test result is produced with sample references that do not exist in the sample table. This is reported in the checking tool as “No Parent Record Found”

A key point for laboratory managers “If a client ask for AGS data then you ask for their AGS data at the start of the project”.

The Ideal Laboratory Workflow

  1. The Client requests testing and supplied a testing schedule and an AGS file with the sample data.
  2. The Lab imports the sample data into their system, therefore reducing time consuming data entry and sample reference corruption.
  3. The Lab keeps a copy of the supplied AGS data for a final check.
  4. Testing is completed and an AGS file is produced with the results
  5. The Replace Feature is used to replace the SAMP and LOCA tables produced by the lab system with the ones in the AGS file supplied with the request.
  6. This file is checked. Any orphans reported can be fixed using the orphan fixer or in the original data and exported again.
  7. This AGS file is sent back to the Client

Note there sho ne no errors found in step 6 if the original client data has been imported into the system and used.

The Ideal Client Workflow

  1. An AGS file is received from the Laboratory.
  2. The Replace Feature is used to replace the SAMP and LOCA tables produced by the lab system with the ones in the AGS file supplied with the request. If the lab has followed the workflow above, then this will not change the file but is still good practice to double check.
  3. This file is checked. Any orphans reported can be fixed using the orphan fixer or reported back to the laboratory.
  4. If there are no errors in this file then the laboratory has been successful in producing your AGS file without Sample corruption but there is still one more test.
  5. Re-export the Sample and Location details from your project and repeat step 2 and 3 using this file. This allows you to check that the sample data has not changed within your application since you requested testing.

Once this file checks without orphans you will be able to import this file into your system without creating phantom samples.

Watch out for SAMP_ID

AGS added a 5th sample reference called SAMP_ID to work as a single sample reference when it is important for environmental testing locations to remain anonymous. This field is to be completed only if the client has included it in their file. For the majority of clients this fields will be blank. Most Lab software that produce AGS, such as KeyLAB have an option to not include the data in SAMP_ID on the export.

Benefits for the Laboratory

AGS data is often seen as a hassle and costly request from a client.  However if the laboratory focuses on the benefits that AGS data can provide the laboratory at the start of a project then it can save them a large amount of time in setting up projects by getting their client to do the data entry for them.

If the simple procedure outlined in this article is also followed, then the laboratory should never be involved with sample referencing disputes with their clients.

Leave a Comment