Herbal_Mycotoxin_Quantifier
Herbal Mycotoxin Quantifier
ℹ️ Utility controls levels of dangerous mycotoxins:
• Total aflatoxins (B1, B2, G1, G2)
• Ochratoxin A
• Zearalenone
⚠️ CRITICAL: Mycotoxins are carcinogens and nephrotoxins!
Mold contamination is often visually invisible.
Usage:
HerbalMycotoxinQuantifier.exe → demo mode (console output)
HerbalMycotoxinQuantifier.exe input.csv output.json → evaluate your data
Input format:
BatchNumber,ProductName,Aflatoxin_B1_ppb,Aflatoxin_B2_ppb,Aflatoxin_G1_ppb,Aflatoxin_G2_ppb,Ochratoxin_A_ppb,Zearalenone_ppb,Limit_Aflatoxins_Total_ppb,Limit_Ochratoxin_A_ppb
Example:
TCM-MYCO-2026-001,Panax Notoginseng Root,1.5,0.5,1.0,0.2,2.0,10.0,10.0,5.0
— WHY IS THIS NEEDED?
Mycotoxin control is critical for raw material safety (Yunnan Baiyao, Tong Ren Tang):
• Herbs are susceptible to mold contamination during improper storage or drying
• Aflatoxins (Aspergillus producers) are potent liver carcinogens
• Ochratoxin A causes kidney damage
• Zearalenone has estrogenic activity
• Pharmacopoeias (ChP, USP, EP) set strict limits for each toxin group
⚠️ CRITICAL:
• Total aflatoxins (B1+B2+G1+G2) ≤10 ppb (or ≤20 ppb depending on raw material)
• Aflatoxin B1 separately ≤5 ppb (most toxic component)
• Ochratoxin A ≤5-10 ppb
• Zearalenone ≤100 ppb
• Use of sensitive methods (LC-MS/MS, HPLC-FLD) is mandatory
Key features:
• Automatic calculation of total aflatoxins
• Individual limit check for each toxin
• Support for various standards (ChP, USP, EP)
• Patient health risk assessment
Critical parameters:
• Total Aflatoxins: ≤10 ppb
• Aflatoxin B1: ≤5 ppb
• Ochratoxin A: ≤5-10 ppb
• Zearalenone: ≤100 ppb
💡 Usage tips:
1. Take representative samples as contamination may be uneven ("hot spots")
2. Use immunoaffinity cleanup before analysis to reduce matrix effect
3. Control raw material storage conditions (humidity <60%, temperature <20°C)
4. If positive results obtained, confirm with another detection method
5. Monitor suppliers of high-risk raw materials (roots, fruits) for mold
⚠️ Note: Unlike pesticides which come from outside, mycotoxins form inside the raw material itself due to biological processes. Their removal after formation is practically impossible, so incoming control is the only effective protection measure.
input.csv
BatchNumber,ProductName,Aflatoxin_B1_ppb,Aflatoxin_B2_ppb,Aflatoxin_G1_ppb,Aflatoxin_G2_ppb,Ochratoxin_A_ppb,Zearalenone_ppb,Limit_Aflatoxins_Total_ppb,Limit_Ochratoxin_A_ppb TCM-MYCO-2026-001,Panax Notoginseng Root,1.5,0.5,1.0,0.2,2.0,10.0,10.0,5.0 TCM-MYCO-2026-002,Licorice Root,0.2,0.1,0.1,0.0,1.5,5.0,10.0,5.0 TCM-MYCO-2026-003,Ginseng Powder,6.0,2.0,3.0,1.0,8.0,20.0,10.0,5.0
Herbal Mycotoxin Quantifier — URS and FS
The English user requirements and functional specification are provided below.
Herbal Mycotoxin Quantifier — URS
Herbal Mycotoxin Quantifier
This document is generated for the English localization. Non-Russian portal languages must use this English version, not a mixed Russian/English document.
Purpose
Define user requirements for a standalone FUZKK utility that accepts laboratory CSV data, evaluates the records using limits embedded in code, and produces LabWare-compatible JSON.
Scope
The utility is intended for preliminary QC/QA review, integration testing, LIMS/LabWare flow and evidence-trail preparation. Final release decisions remain under the laboratory's validated procedure and responsible personnel.
Users
QC analyst, QA reviewer, CSV/validation engineer, LIMS/LabWare integration engineer, responsible laboratory specialist.
User requirements
- The utility shall run without arguments and print its self-description, a built-in input.csv example from GetDemoData(), and demo evaluation for the embedded records.
- The utility shall run with two arguments: input.csv output.json.
- The utility shall not read input.csv and shall not write output.json when started without arguments.
- CSV numeric values shall be parsed using CultureInfo.InvariantCulture.
- Output shall be generated as LabWare-compatible JSON with Header, Samples, Results, Status, StatusCode, ErrorMessage, Description and DescriptionEN.
- For PASS records, ErrorMessage shall be an empty string.
- Embedded limits shall follow this priority: Ph. Eur. → British Pharmacopoeia / UK implementation → EAEU / regional requirements → EMA/ICH/EU guidance → USP fallback.
- If an exact monograph is not known, strict standard API limits are used where applicable: assay 98–102%, total impurities ≤1.0%, individual impurity ≤0.5%.
- For biologics and mAb-like products, aggregation, sterility and endotoxin checks shall be included where relevant to the utility purpose.
- If a parameter may arrive in different units, the unit shall be represented as a separate input field or explicitly reflected in the input.csv field name.
Input CSV
BatchNumber,ProductName,Aflatoxin_B1_ppb,Aflatoxin_B2_ppb,Aflatoxin_G1_ppb,Aflatoxin_G2_ppb,Ochratoxin_A_ppb,Zearalenone_ppb,Limit_Aflatoxins_Total_ppb,Limit_Ochratoxin_A_ppb TCM-MYCO-2026-001,Panax Notoginseng Root,1.5,0.5,1.0,0.2,2.0,10.0,10.0,5.0 TCM-MYCO-2026-002,Licorice Root,0.2,0.1,0.1,0.0,1.5,5.0,10.0,5.0 TCM-MYCO-2026-003,Ginseng Powder,6.0,2.0,3.0,1.0,8.0,20.0,10.0,5.0
input.csv fields
| Field | Sample |
|---|---|
| BatchNumber | TCM-MYCO-2026-001 |
| ProductName | Panax Notoginseng Root |
| Aflatoxin_B1_ppb | 1.5 |
| Aflatoxin_B2_ppb | 0.5 |
| Aflatoxin_G1_ppb | 1.0 |
| Aflatoxin_G2_ppb | 0.2 |
| Ochratoxin_A_ppb | 2.0 |
| Zearalenone_ppb | 10.0 |
| Limit_Aflatoxins_Total_ppb | 10.0 |
| Limit_Ochratoxin_A_ppb | 5.0 |
Utility description
Herbal Mycotoxin Quantifier — Quantitative analysis of mycotoxins in medicinal herbs
Herbal Mycotoxin Quantifier — Quantitative analysis of mycotoxins in medicinal herbs
ℹ️ Utility controls levels of dangerous mycotoxins:
• Total aflatoxins (B1, B2, G1, G2)
• Ochratoxin A
• Zearalenone
⚠️ CRITICAL: Mycotoxins are carcinogens and nephrotoxins!
Mold contamination is often visually invisible.
Usage:
HerbalMycotoxinQuantifier.exe → demo mode (console output)
HerbalMycotoxinQuantifier.exe input.csv output.json → evaluate your data
Input format:
BatchNumber,ProductName,Aflatoxin_B1_ppb,Aflatoxin_B2_ppb,Aflatoxin_G1_ppb,Aflatoxin_G2_ppb,Ochratoxin_A_ppb,Zearalenone_ppb,Limit_Aflatoxins_Total_ppb,Limit_Ochratoxin_A_ppb
Example:
TCM-MYCO-2026-001,Panax Notoginseng Root,1.5,0.5,1.0,0.2,2.0,10.0,10.0,5.0
— WHY IS THIS NEEDED?
Mycotoxin control is critical for raw material safety (Yunnan Baiyao, Tong Ren Tang):
• Herbs are susceptible to mold contamination during improper storage or drying
• Aflatoxins (Aspergillus producers) are potent liver carcinogens
• Ochratoxin A causes kidney damage
• Zearalenone has estrogenic activity
• Pharmacopoeias (ChP, USP, EP) set strict limits for each toxin group
⚠️ CRITICAL:
• Total aflatoxins (B1+B2+G1+G2) ≤10 ppb (or ≤20 ppb depending on raw material)
• Aflatoxin B1 separately ≤5 ppb (most toxic component)
• Ochratoxin A ≤5-10 ppb
• Zearalenone ≤100 ppb
• Use of sensitive methods (LC-MS/MS, HPLC-FLD) is mandatory
Key features:
• Automatic calculation of total aflatoxins
• Individual limit check for each toxin
• Support for various standards (ChP, USP, EP)
• Patient health risk assessment
Critical parameters:
• Total Aflatoxins: ≤10 ppb
• Aflatoxin B1: ≤5 ppb
• Ochratoxin A: ≤5-10 ppb
• Zearalenone: ≤100 ppb
💡 Usage tips:
1. Take representative samples as contamination may be uneven ("hot spots")
2. Use immunoaffinity cleanup before analysis to reduce matrix effect
3. Control raw material storage conditions (humidity <60%, temperature <20°C)
4. If positive results obtained, confirm with another detection method
5. Monitor suppliers of high-risk raw materials (roots, fruits) for mold
⚠️ Note: Unlike pesticides which come from outside, mycotoxins form inside the raw material itself due to biological processes. Their removal after formation is practically impossible, so incoming control is the only effective protection measure.
Traceability and limitations
- The URS is used as the source document for functional specification, CSV review and later validation work.
- This document does not replace an approved pharmacopoeial monograph, validated analytical method or internal product specification.
- For product-specific limits, the approved customer specification takes priority.
Herbal Mycotoxin Quantifier — FS
Herbal Mycotoxin Quantifier
The functional specification describes the behaviour of the standalone FUZKK console utility, input-data format, evaluation algorithm and output JSON structure.
Functional flow
- Main() checks the number of arguments.
- If no arguments are provided: PrintHello() prints the description and built-in input.csv example, then RunDemoEvaluation() executes Evaluate() over GetDemoData() and prints demo JSON.
- If two arguments are provided: RunWithFiles(input.csv, output.json) reads CSV, evaluates each record and writes LabWare-compatible JSON.
- LoadData() uses CultureInfo.InvariantCulture and shall not be called in no-arguments mode.
- Evaluate() returns a named tuple with BatchNumber, ProductName, Parameters, CriticalFailCount, WarningCount, Recommendation and RecommendationEN.
- GetIssues() builds messages for ErrorMessage in WARNING/FAIL cases.
Evaluation rules
- PASS: CriticalFailCount = 0 and WarningCount = 0.
- WARNING: CriticalFailCount = 0 and WarningCount > 0.
- FAIL: CriticalFailCount > 0.
- ERROR: exception during reading or processing.
- ErrorMessage remains empty for PASS.
- Limits are embedded in Program.cs; no external limit configuration is required.
Input and fields
BatchNumber,ProductName,Aflatoxin_B1_ppb,Aflatoxin_B2_ppb,Aflatoxin_G1_ppb,Aflatoxin_G2_ppb,Ochratoxin_A_ppb,Zearalenone_ppb,Limit_Aflatoxins_Total_ppb,Limit_Ochratoxin_A_ppb TCM-MYCO-2026-001,Panax Notoginseng Root,1.5,0.5,1.0,0.2,2.0,10.0,10.0,5.0 TCM-MYCO-2026-002,Licorice Root,0.2,0.1,0.1,0.0,1.5,5.0,10.0,5.0 TCM-MYCO-2026-003,Ginseng Powder,6.0,2.0,3.0,1.0,8.0,20.0,10.0,5.0
| Field | Sample |
|---|---|
| BatchNumber | TCM-MYCO-2026-001 |
| ProductName | Panax Notoginseng Root |
| Aflatoxin_B1_ppb | 1.5 |
| Aflatoxin_B2_ppb | 0.5 |
| Aflatoxin_G1_ppb | 1.0 |
| Aflatoxin_G2_ppb | 0.2 |
| Ochratoxin_A_ppb | 2.0 |
| Zearalenone_ppb | 10.0 |
| Limit_Aflatoxins_Total_ppb | 10.0 |
| Limit_Ochratoxin_A_ppb | 5.0 |
Output JSON
{
"Header": {
"UtilityName": "Herbal_Mycotoxin_Quantifier",
"Version": "1.0.0",
"Timestamp": "UTC",
"InstrumentID": "FUZKK-QC-WORKSTATION",
"OperatorID": "Admin"
},
"Samples": [
{
"SampleID": "from BatchNumber",
"BatchNumber": "from CSV",
"ProductName": "from CSV",
"TestName": "utility-specific test",
"AnalysisCode": "utility-specific code",
"Status": "PASS | WARNING | FAIL | ERROR",
"StatusCode": "1 | 2 | 0 | -1",
"ErrorMessage": "",
"Description": "Russian recommendation",
"DescriptionEN": "English recommendation",
"Results": [
{
"ParameterName": "parameter",
"ResultValue": 0.0,
"UnitOfMeasure": "unit",
"SpecificationLimit": "limit",
"IsWithinSpec": true
}
]
}
]
}Included in packages
Herbal / TCM / Ayurveda Instrumental QC Suite
Herbal / TCM / Ayurveda Instrumental QC Suite: FUZKK utility package for CSV→JSON QC checks with EU-first limit priority.
Open