Creating a Delivery file and binding them to a customer

This chapter contains the information needed to understand the lab delivery file. A Lab delivery file only has to be updated when there are changes. Otherwise, TerraIndex will always show the last imported file.

What is a lab delivery file?

A lab delivery file contains the Customer code of the customer that will be sending the lab assignment. It also contains the analyses that can be requested from the lab by the customer. A Lab delivery file needs to be custom for every user and needs to be an XML file. This file will be available for the customer to choose their options for requesting and ordering an analysis at the lab. It's the Menu-card of the Lab, the user can choose from.

Example files:   Labdeliveryfile.xml

XSD:   LabDelivery_v14.8.0.xsd

Domaintable files:  immetingen lookup v14.8.0.xml   imsikb0101 lookup v14.8.0.xml
extracted from: https://codes.sikb.nl 

Translations English to Dutch:  
LabdeliveryFile_14.8.0_ENG_NL.xslt

==> nle Add field Certification (screen 1 of labassignment)

File structure

In the image below, the main structure of the XML file is shown. Every table is described in more detail later on in this chapter.

==> nle Dutch text in screenshot
Attribute nameDescriptionUnit
versionSIKB version. This must be: 14.8.0string
versionDeliveryDataA lab indication of the version of the delivered data for this user. Could be a generation date with version: '12-7-2024' or a version 'v12.1'string
laboratoryA number given by SIKB/TerraIndex to the lab when requesting to connect to TerraIndex
Domaintable: Meetinstantie
integer
language

The language of the Delivery file content, like the package names, urgencies etc, in a three-letter ISO-639-2 code:

- dut = Dutch
- eng = English
- fra = French
- spa = Spanish
- ita = Italian
- deu = German

string
LinksA table to connect the “AnalysisSet” and the “Clients”-
AnalysisSetsA table containing the name and lab code of analysis set-
CategoriesA table containing all the possible lab categories-
AnalysisLinksA table containing all the analyses for an analysis set-
ClientsA table of all the customer codes that are available for the company-
LabSampleMatricesA table of all the Lab sample Matrices a lab would like to have selectable.-
SpecialAppointmentsA table of all the special price agreements besides the default quote.-
UrgenciesA table containing a list of time frames in which the lab results need to be returned-
StoragePeriods-not in use- 
Reports-not in use- 
FractionLinks-not in use- 

Structure explanation AnalysisSets

This table contains all the analyses sets or packages that your lab supports. The “AnalysisSetId” is your own identification code for the analysis packages.

It will be the chosen analysis and name, showed in the interface of TerraIndex:

1712163759805-731.png

1712163688142-709.png

Attribute nameDescriptionUnit
AnalysisSetIdThe identification code of the lab for the analyses Set or packagestring
DescriptionThe name/description of the analysis content of the set (This will also be shown in the user interface)string
Sequence-not in use-string
MinimalDeliveryTime-not in use-string

Structure explanation Categories

“Category” does not need a lot of explanation. A category is a group defined by the lab where certain values in the “koppeltabel” can be grouped under. A category is determined by the lab and can be used in the “Links”.

In TerraIndex, it will be shown as Header/Group:
1712162927138-349.png

1712162765631-966.png
 

Attribute nameDescriptionUnit
CategorieIdThe code/Id of the category or group given by the labstring
DescriptionThe name/description of the category (This will also be shown in the user interface)string
SequenceField is redundant and does not have to be filledinteger

Structure explanation AnalysisLink and Analysis

This table contains all the analyses that an analysis package can contain. Be sure the “analysepakketcode” corresponds to a code in the table: “analysepakketten”. The analysecode is your own identification code for the analyses.

1712163145392-331.png

1712163459761-326.png

Attribute nameDescriptionUnit
AnalysisSetIdThe analysis set code that corresponds to a code in the “AnalysisSetsstring
AnalysisA table containing all the analyses that should be in this analysis set or package-

Analysis

Attribute nameDescriptionUnit
AnalysisIdThe identification code of the lab for the analysesstring
DescriptionThe name/description of the analysis content of the set (This will also be shown in the user interface)string
MinimalDeliveryTime-not in use-string
Observation-not in use- 

Structure explanation Clients

A customer can have multiple “clients”. There always needs to be one “client” so that a lab assignment can be sent. But for example, when there is a price agreement for a certain project, a new “Client” can be added. Or when a company has multiple offices, every office can have its own “Client”.

It will be shown in the interface of TerraIndex, and needs to be chosen before selecting analysis sets:
1712163957735-690.png

1712163986350-364.png

Attribute nameDescriptionUnit
ClientIdThe customer identification code(s) for the company or officestring
DescriptionThe name\description of the customer code, as shown in the interface, and will be invoiced.string

Structure explanation LabSampleMatrices

The “LabSampleMatrices” is an important section of the XML. The “matrix” defines the main type of sample for the lab, and can contain multiple or predefined additional pretreatments of preservatives. Without a sample type in this table, a customer will not be able to send in lab assignments to the laboratory.

It needs to be chosen in the interface of TerraIndex, before any analysis set can be chosen:

1712164314258-543.png
 

1712164255757-638.png

Attribute nameDescriptionunit
CompartimentIdAn SIKB ID that determines to which matrix the analyses belongs.
Domaintable: Compartment/Matrix
int
CompartimentCode-not in use- 
LabSampleMatrixCodeThe laboratory matrix- or compartment-code of the lab, that will be also be sent in the Labassignment to the labstring
DescriptionThe name\description of the matrix or compartment of the lab, as shown in the interface.string

Structure explanation SpecialAppointment

The “SpecialAppointment" contains the names of the price catalogs, the default quote or the special project quote. This way, extra discount options are possible. It will be sent in the labassignment to the lab.

It needs to be chosen in the interface of TerraIndex, before any analysis set can be chosen, and empty means 'default quote':

1712164853683-202.png

1712165258813-987.png

Attribute nameDescriptionunit
SpecialAppointmentIdAn identification code from the lab that will be sent in the Labassignment to the lab.string
DescriptionThe name\description of the matrix or compartment of the lab, as shown in the interface.string
startdate-not in use- 
finaldate-not in use- 
AppointmentTypeCodeThe type of appointment, like: total pricelist, default quotation or special project agreement.
Domaintable: PriceAgreement Type
int

The “Links” is one of the most important sections of the XML. The “Link” defines the combination of Analysespackages, customer/clientcode, categories and sampletype. Without a combination in this table, a customer will not be able to send in lab assignments to the laboratory.
1712158823685-514.png
 

Attribute nameDescriptionunit
AnalysisSetIdThe AnalysisSet code that corresponds to a code in the AnalysisSets tablestring
ClientIdThe code that corresponds to a code in Clients tablestring
SpecialAppointmentIdThe code that corresponds to a code in SpecialAppointments table 
LabSampleMatrixCodeThe code that corresponds to a code in LabSampleMatrix table

integer

 

PriceThe optional Price indication for this combination of the Analysisdecimal
CertificationIdThe optional code that corresponds to the way of Sample and analysis handling as described in a certification.
Some other labs have this arranged by the LabSampleMatrix types.
Domaintable: CertificeringsCode 
int
CategoryIdThe code that corresponds to a category code in Categories tablestring
Accredited-not in use-bool

Structure explanation Urgencies

This table contains a list with different delivery times for analyses results. For example, 5 work days, overnight, within 48 hours and so on. The “UrgencyId” is a code given by the lab.

1712324236054-772.png

Attribute nameDescriptionUnit
UrgencyIdThe code of the lab for when the analysis results need to be returned to the customerstring
DescriptionThe name/ description of the urgency, to show in the interface.string

Structure explanation StoragePeriods

This table contains a list with different storage periods for the storage of the delivered Samples and its containers. For example, '1 month', '5 weeks', 'customer agreement' and so on. The “StoragePeriodId” is a code given by the lab.

1712324393233-546.png

Attribute nameDescriptionUnit
StoragePeriodIdThe code of the lab for when the analysis results need to be returned to the customerstring
DescriptionThe name/ description of the Storage Period, to show in the interface.string
Tags:
 
TerraIndex