Setting up API communication by REST services with TerraIndex for laboratories - Lab result file - SIKB version 14

Page / - last modified by Robin Huisman on 2024/07/31 23:08

Lab result file - SIKB version 14

last modified by Robin Huisman

on 2024/07/31 23:08

Table of Contents

Exporting lab results to TerraIndex for a customer

What is a Lab result file?

File structure

Questions from Luca to Robin

Structure projectgegevens

Structure analysemonsters

Structure analyseresultaten

What to exchange to store the right results?

SIKB 14 Parameter result combinations

Exporting lab results to TerraIndex for a customer

The file that is used for the examples: Example file

Exporting lab results to TerraIndex for a customer

What is a Lab result file?

File structure

Questions from Luca to Robin

MeasureResult

Accuracy

Validation

AnalyticResult

MeasureUncertainty

DeterminationLimits

Structure projectgegevens

Structure analysemonsters

Structure analyseresultaten

What to exchange to store the right results?

SIKB 14 Parameter result combinations

Warning

SIKB Version 9 is obsolete, and replaced with version 13 or version 14. Latest version can be found here: https://www.sikb.nl/datastandaarden/sikb0101-bodembeheer

What is a Lab result file?

A lab result file is an XML file contains all the lab results. The results are mapped tot their analyses samples. A lab result will be matched to the corresponding analyses sample based on the: “Labassignment Guid/SIKB-ID, projectCode, AnalysisSample Guid/SIKB-ID”

Example files: labresultaat_MengmonsterGr.xml, labresultaat_IndividueelGr.xml, labresultaat_IndividueelGw.xml

XSD: Ask or SIKB Members can download from: https://www.sikb.nl/datastandaarden/richtlijnen/sikb0101

Controle XSLT:

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

File structure

Attribute name	Description	Unit
Versie	The SIKB version of the lab assignment. This must be: 9.0.0	string
Applicatiecode	This is the application code of your LIMS system that you will get from TerraIndex. Be careful this is not the same code as your laboratory number	Integer
Datum	The date on which the lab result file was made	date yyyy-mm-dd
Klantcode	This should be the customer code in the “klantcode” in the lab assignment	string
Laboratorium	The number you get from TerraIndex. This needs to be the same as the laboratorium number in the lab delivery file	integer
Taal	The language of the lab results this depends on the XSD used. dut = dutch eng = English	string
Projectgegevens	This section contains all the result information	-

Questions from Luca to Robin

Do I need to add any other classes to the filestructure description apart from the ones below (those related to the IMMetingen::Result Class) ?

uit de mail van Robin : "Je kunt de Labassignment pagina als basis gebruiken, en de extra klasses vanuit de Voorbeeld bestand LabResult aan toevoegen."

De link naar een "LabResult" voorbeeld bestand wijst naar een directory. Daar staat wel een directory met naam "Example XML 14.8.01". maar die folder bevat niet 1 maar 4 verschillende "labresult_*" XMLs. Welke moet ik hebben? allemaal? en hoe moet ik afleiden welke klasses "extra" zijn? welke tool zou je aanbevelen om xml te lezen. ik heb er nog nooit mee gewerkt.

Do i need to add screenshots of the xml classes as in the labassignment and labdelivery pages? if so, what software did you use?

In Validation: ValidationScore. What are STOWA Protocols? is it Stichting Toegepast Onderzoek Waterbeheer?

What to do with the domain tables refered to in the descriptions? Does it make sense to reference them? Should i translate the names of the domain tables or is that static? are they translated already? who manages these? is it SIKB stuff?

in the section MeasureUncertainty > link to pdf file in description is invalid. What should it be?

SIKB 14 Parameter result combinations> first sentence makes no sense to me. Please review so i can translate.

What should i do with the sections from "Structure projectgegevens" to "What to exchange to store the right results?"? Is this a result of a copy paste and can they be discarded? If not, what classes do they refer to and where can i find the descriptions to be translated?

==== Added by luca: all Classes related to "IMMetingen::Results"

MeasureResult

Attribute Name	Description
numericValue Measure	Numeric Value - the numerical value of the observation. When no unit for the measurement is known, the unit 'Dimensionless' should be used.
valueProcessingMethod GenericName	Value Processing Method - a mathematical/statistical operation that is applied while the method of value determination/analysis standard remains unchanged. The operation can be applied to a series of measurement values with the same parameter (quantity/component or typing or taxon or object) or to a series of measurement values with the same analysis method that are summed up to a sum parameter. Domain table: Value Processing Method
qualityIndicatorType GenericName	Quality Indicator/Judgement -> Detection limit, etc. Domain table: Quality Judgement

Accuracy

Attribute Name	Description	Unit
recovery Float	The part (percentage) of material that is recovered in an analysis.	Percentage [%]
spread Float	Spread = the error measured (in %) in multiple repeated measurements of the same sample/situation (and by the same laboratory technician/measuring device).	Percentage [%]
measurementUncertainty Float	Measurement uncertainty = the total error in the analysis (in %), considering sample collection, variation in measuring equipment/lab technician, and repeated measurements. It practically represents the value indicating the uncertainty of the measurement result.	Percentage [%]
zScore Float	This is an optional value that indicates how the measurement value scores in relation to other techniques or laboratories. This could be from interlaboratory comparisons or comparisons between different measuring equipment.
drift Float	This is the degree of sensor drift over time (in %/year). Sensors will age over time and experience more or less drift depending on the conditions. This drift can be quantified and depends partly on age. This is especially true for online sensors.	Percentage [%]

Validation

This DataClass contains optional attributes and indicates which validation steps the measureResult (measurement value) has undergone.

Attribute Name	Description
automatedControl GenericName	The first-line control is often an automated check of whether the measurement value is correct. It uses a domain table: ValidationSteps. Various steps can be distinguished. For example, a check on hard/soft limits, ion balance, bandwidth, and dissolved not exceeding total analysis (chemistry) are part of the first-line control. The control can be approved or disapproved (see quality judgment). Different possible values are described in the domain table ValidationSteps. Example: pH of 78 and water temperature of 123 degrees Celsius are hard limits (not possible); pH=10.0 is a soft limit because the value is extremely high (but not impossible). Domain table: ValidationSteps
expertControl GenericName	The second-line control (ExpertControl) is often a specialist check of whether the measurement value is correct. It also uses a domain table: ValidationSteps. Here, different steps can be distinguished as well. This analysis usually does not follow immediately after arrival but is performed periodically. Controls on correlation between measurement stations, history, correlations between parameters, and specialist expertise belong to the second-line control. The control can be approved or disapproved (see quality judgment). Different possible values are described in the domain table ValidationSteps. Domain table: ValidationSteps
validationScore GenericName	Score of the validation steps followed, according to the STOWA protocols. The attribute uses the domain table ValidationScore. The score value ranges from 0 to 5 Domain table: ValidationScore

AnalyticResult

The analyzed result of an observation, typically originating from a laboratory.

Attribute Name	Description
limitSymbol CharacterString	LimietSymbool, allowed values: '&lt;' en '&gt;'. '&lt;' stands for 'less than the lowest threshold' '&gt;' stands for 'greater than the highest threshold' The boundary for the limit symbol can be specified in the DeterminationLimits (LimitSymbolReferenceCode) as a reference with the actual value of the limit. The value can be included in the exchange in two ways: 1) as a CData block: <![CDATA[<]]> or <![CDATA[>]]> 2) as HTML code: '&amp; lt;' or '&amp; gt;'
alphanumericValue CharacterString	Textual value associated with an analysis result

MeasureUncertainty

Measurement uncertainty in the result. This is the expanded measuring uncertainty as described in the document: http://www.nordicinnovation.net/nordtestfiler/tec537.pdf

Attribute Name	Description
distributionType GenericName	The type of statistical distribution associated with the observation. Domain table: ProbabilityDistribution
statisticalParameter Measure	Parameters that determine the shape and size of the statistical distribution. Domain table: StatisticalParameter

DeterminationLimits

Attribute Name	Description
detectionLimit Measure	The smallest value of the measured content or the observed value of the parameter in a sample, which can still be determined with a certain reliability by the laboratory. Conventionally, this is the amount that corresponds to three times the standard deviation at that level (thus, relative standard deviation is 33%). The standard deviation is established under (intra-lab) reproducibility. Also known in English as 'LOD' (Limit of Detection). See also: Wikipedia on Detection Limit
reportingLimit Measure	The smallest value of the measured content or the observed value of the parameter in a sample, agreed upon with the client by the executing laboratory, which is reported to the client. The reporting limit is at least the detection limit and is sometimes specified in an accreditation scheme like AS3000.
limitSymbolReferenceCode GenericName	The threshold value that the limitSymbol of AnalyticResult refers to. Domain table: LimitSymbolReference
quantitationLimit Measure	The smallest value of the measured content or the observed value of the parameter in a sample, which can still be determined with a certain reliability by the laboratory. Conventionally, this is the amount that corresponds to ten times the standard deviation at that level (thus, relative standard deviation is 10%). Also known in English as 'LOQ' (Limit of Quantitation). At this value, the rate of 'false negatives' is less than 1%.

Structure projectgegevens

Attribute name	Description	Unit
idopdracht	The TerraIndex id of the lab assignment the result belongs to.	-
projectcode	The project code of the project as it was delivered in the lab assignment	string
projectnaam	The name of the project as it was delivered in the lab assignment.	string
ordernummer	Not relevant. The order in which the lab result could be shown	string
projectleider	The project leader of the customer. This needs the be the “contactpersoon” from the lab assignment with the code PL	string
status	The status of the lab assignment. See Labstatus Codegroup 76 in the attachments for all the options.	integer
datumverwacht	The date on which the lab expects the certificate to be available	Date yyyy-mm-dd
certificaatnummer	The number of the certificate that will be send to the user.	string
analysemonsters	A table containing all the analysis sample with their corresponding results	-

Structure analysemonsters

Attribute name	Description	Unit
Idanlmons	The unique identification code of the analyses sample as given in the lab assignment file	string
Anlmons	The name of the analyses sample as given in the lab assignment file	string
Certificaat	The way the name of the sample should be on the certificate. This is also given in the lab assignment	string
Monstersoort	The code referencing the type the sample is. Check the attachment: Sample type codegroup 51 for all the options	integer
Status	The status of the sample. See Labstatus Codegroup 76 in the attachments.	integer
Datumverwacht	The date on which the results for the sample are expected	date yyyy-mm-dd
Volgorde	Is a unused field in TerraIndex	integer
analyseresultaten	A table containing all the measurement values of the analysis samples.	-

Structure analyseresultaten

Attribute name	Description	Unit
componentcode	The SIKB component code. See ComponentCode Codegroup 52 in the attachements for all possible options.	integer
meetwaarde	What the measured value is for the analyses	float
meetwaardeomschrijving	Alpha numerical description of the result	string
eenheidcode	The unit of the measured value. See Unit CodeGroup 40 in the attachements for all possible options	integer
referentiecode	This defines what the reference for the measurement value is. See ReferenceType CodeGroup 41 for all the possible options	integer
analysenorm	Against which standard the analysis has been tested. See Laboratory method Codegroup 57 in the attachments for all the option. I your standard is not in the list leave this empty	integer
datummonstervoorbehandeling	The date on which the sample was pre-treated. We don’t do anything with this value	date yyyy-mm-dd
opmerking	A remark for this result	string
certificering	Under which certificate the analyses has been done. See CertificateCode Codegroup 48 for all the possible options. If you do not find you code leave this field empty	integer
status	The status of the labresult in the labassignemnt. See Labstatus Codegroep 76 in the attachments	integer
datumverwacht	Date on which the analyses results are expected.	date

What to exchange to store the right results?

The data stream ‘Lab Result’ is the feedback of analysis results on the requested lab assignment at a laboratory.

Important fields:

Entity	Fixed value	Remark
Project	lokaalID (GUID)	As submitted in the Lab assignment XML
projectCode	As submitted in the Lab assignment XML
Labassignment	lokaalID (GUID)	As submitted in the Lab assignment XML
Sample (analysis sample)	lokaalID (GUID)	As submitted in the Lab assignment XML, if assignment in SIKB<11, but results in >=11; fill with old BISNR/IDANLMONS.
Name	As submitted in the Lab assignment XML
Sample (field sample)	lokaalID (GUID)	Only if this entity is included, which is optional.

Remarks:

The entity ‘Analysis Result’ does not yet have a fixed lokaalID (GUID), connected laboratories cannot yet guarantee that a unique ID will be generated.

For Asbestos and Asphalt, new samples are also created at the Lab, which are therefore fed back with a reference to the sample from which they are derived.

There is still a desire to feedback from a lab whether an analysis sample has been modified at the lab in terms of sub-samples. For example, if a jar has broken and been replaced with another jar. This has not yet been included in current practices.

Importing the data can be done based on the following steps:

Search Project with Project.lokaalID (as placed in the Lab assignment XML).

Search Project with Project.ProjectCode (as placed in the Lab assignment XML) if searching on Project.LokaalID yields no results.

Search Project and Lab assignment with Labassignment.LokaalID (as placed in the Lab assignment XML) if the Project has not yet been found.

Search Project (if Project not yet found) and Analysis Sample with Sample.LokaalID as GUID (as placed in the Lab assignment XML, version 11 and higher).

Search Project (if Project not yet found) and Analysis Sample with Sample.LokaalID as BISNR (as placed in the Lab assignment XML, versions lower than 11, 'old' idanlmons/BISNR).

Search Analysis Sample with Sample.Name within the project, if the Analysis Sample has not been found but the project has.

What can be imported?

If an Analysis Sample is found, the Analysis Results are always updated or added.

If Project is found, but the analysis sample is not; then this analysis sample is imported as a new analysis sample with all results.

(If it concerns water samples, a new fictional/temporary measuring point and filter could be created.)

SIKB 14 Parameter result combinations

In the SIKB0101 version 14 exchange of labresults is combination needed for exchanging the result parameters of the Lab analysis.
It's based on PhysicalProperty, the combination of Quantity, Parameter and Condition.
*small remark, condition will be used as: [0..1]

The combinations are defined for different compartiments like soil/ground, groundwater, wastewater.
Below are some examples, and some attachments included to support all combinations.

2 Examples for Soil:

Parameter Name	Parameter ID	Quantity ID	Quantity name	Condition ID	Condition Name
lood	1116	2725	Massafractie	1	t.o.v. drooggewicht
minerale olie	1200	2725	Massafractie	93	koolwaterstoffractie C10-C40 / drooggewicht

2 Examples for Groundwater:

Parameter Name	Parameter ID	Quantity ID	Quantity name	Condition ID	Condition Name
cyanide-complex	2595	2720	(massa)Concentratie	9	opgeloste fractie (bijv. na filtratie)
som 29 dioxines (Bbk, 1-10-2010, als TEQ)	2160	2720	(massa)Concentratie	10	uitgedrukt in Toxiciteit equivalenten

2 Examples for Wastewater:

Parameter Name	Parameter ID	Quantity ID	Quantity name	Condition ID	Condition Name
cyanide-complex	2595	2720	(massa)Concentratie	8	Niet van toepassing
som 29 dioxines (Bbk, 1-10-2010, als TEQ)	2160	2720	(massa)Concentratie	10	uitgedrukt in Toxiciteit equivalenten

Full combinations sheet: Full List of AnalysisResult combinations 04-2024.xlsx