Qualifiers
This is a static helper class to assist with laboratory qualifiers.
Class
- class ONE.Operations.Spreadsheet.Qualifiers
Concepts
Cascade rule
CASCADE RULE: Sets when to display the data qualifiers (<,>, ND) with the calculated statistic. Valid settings are:
Display no data qualifiers in result.
Display the data qualifier if one of the values contains the qualifier.
Display data qualifier if over half the values contains the qualifier.
Display data qualifier if all of the values contains the qualifier.
Qualifier Rules
Zero
Entered Value
Half of <, twice of >
Qualifier |
Rule 0 |
Rule 1 |
Rule 2 |
|---|---|---|---|
< |
0 |
Entered Value |
Half Value |
> |
Entered Value |
Entered Value |
Double Value |
ND |
0 |
0 |
0 |
E |
0 |
Entered Value |
Half Value |
DNQ |
0 |
Entered Value |
Half Value |
TNTC |
Enter Value or 10000 if no value |
Enter Value or 10000 if no value |
Enter Value or 10000 if no value |
P |
1 |
1 |
1 |
A |
0 |
0 |
0 |
Sort Rules
California Sort Rule
California requires the Average or the Geometric Mean to be reported as a Median if any values in the data set contains a data qualifier (i.e. <,ND, DNQ, etc…). WIMS Spread Functions GAVGMEDZ, GGMMEDZ, and STATZ support these calculations.
The following is the Rule as stated in a typical California Permit:
When determining compliance with an average monthly limit and more than one sample result is available in a month, the discharger shall compute the arithmetic mean unless the data set contains one or more reported determinations of detected but not quantified (DNQ) or not detected (ND). In those cases, the discharger shall compute the median in place of the arithmetic mean in accordance with the following procedure:
The data set shall be ranked from low to high, reported ND determinations lowest, DNQ determinations next, followed by quantified values (if any). The order of the individual ND or DNQ determinations is unimportant.
The median value of the data set shall be determined. If the data set has an odd number of data points, then the median is the middle value. If the data set has an even number of data points, then the median is the average of the two values around the middle unless one or both of the points are ND or DNQ, in which case the median value shall be the lower of the two data points where DNQ is lower than a value and ND is lower than DNQ. If a sample result, or the arithmetic mean or median of multiple sample results, is below the reported ML, and there is evidence that the priority pollutant is present in the effluent above an effluent limitation and the discharger conducts a pollutant minimization program (PMP)16 (as described in Section I.7.), the discharger shall not be deemed out of compliance.
Other permits state: (which implies Geometric Mean should also be calculated as a Median if data qualifiers exist)
When determining compliance with a measure of central tendency (arithmetic mean, geometric mean, median, etc…) of multiple sample analyses and the data set contains one or more reported determinations of detected but not quantified (DNQ) or not detected (ND), the Permittee shall compute the median in place of the arithmetic mean in accordance with the following procedure:
The data set shall be ranked from low to high, ranking the ND determinations lowest, DNQ determinations next, followed by quantified values (if any). The order of the individual ND or DNQ determinations is unimportant.
The median value of the data set shall be determined. If the data set has an odd number of data points, then the median is the middle value. If the data set has an even number of data points, then the median is the average of the two values around the middle unless one or both of the points are ND or DNQ, in which case the median value shall be the lower of the two data points where DNQ is lower than a value and ND is lower than DNQ.
Methods
GetAggregateQualifier
Gets the qualifier that should be applied to an aggregate result.
- ONE.Operations.Spreadsheet.RowNumber.GetAggregateQualifier(List<Measurement> measurements, int cascadeRule)
- Parameters
measurements (List<Measurement>) – A collection of measurements.
cascadeRule (int) – Cascade rule: See concepts above.
- Returns
The resulting qualifier from the aggregate.
- Return type
string
GetRowNumberFromDateTimeAndWorksheetType
Gets the count of each of the qualifiers from the QualifierList. This is helpful for many statistical queries that will bias the result based on the weight of the qualifiers.
GetSymbol
Retrieves the symbol from a string value.
- ONE.Operations.Spreadsheet.RowNumber.GetSymbol(string value)
- Parameters
value (string) – The value to retrieve the symbol.
- Returns
The symbol if one exists in the input value.
- Return type
string
GetValue
Retrieves the numeric value from a string value taking into consideration the qualifier rules.
Sort
Returns a sorted list of items based on qualifier and sort rules.
Properties
- ONE.Operations.Spreadsheet.Qualifiers.QualifierList
- Returns
A comma delimited list of supported qualifiers.
- Return type
string