TCM_Pesticide_Residue_Screener

TCM Pesticide Residue Screener

AdvancedPharma CSV→JSON EU-first LabWare URS & FS
Open selection
TCM Pesticide Residue Screener — Traditional Chinese Medicine Pesticide Residue Screener

ℹ️ Utility controls agrochemical residues (GC-MS/MS, LC-MS/MS):
• Organochlorines (DDT, HCH)
• Organophosphates (Chlorpyrifos)
• Pyrethroids (Deltamethrin)
• Fungicides (Carbendazim)

⚠️ CRITICAL: Pesticides can cause acute and chronic poisoning!
Chinese Pharmacopoeia (ChP) requires screening for 33+ pesticides.

Usage:
TCMPesticideResidueScreener.exe → demo mode (console output)
TCMPesticideResidueScreener.exe input.csv output.json → evaluate your data

Input format:
BatchNumber,ProductName,DDT_Total_ppm,HCH_Total_ppm,Chlorpyrifos_ppm,Dichlorvos_ppm,Deltamethrin_ppm,Cypermethrin_ppm,Carbendazim_ppm,Limit_OC,Limit_OP,Limit_Pyr

Example:
TCM-PEST-2026-001,Goji Berry,0.05,0.02,0.1,0.0,0.05,0.0,0.1,0.2,0.5,0.5

— WHY IS THIS NEEDED?
Pesticide control is critical for TCM safety (Yunnan Baiyao, Tong Ren Tang):
• Herbs are often grown with intensive use of agrochemicals
• Pesticide residues may persist after drying and extraction
• Some pesticides (organochlorines) are highly persistent and accumulate in body
• Pharmacopoeias (ChP 2020, Ph.Eur., USP) set lists of banned and limited substances

⚠️ CRITICAL:
• DDT and HCH: Banned or strictly limited (<0.2 ppm) due to carcinogenicity
• Chlorpyrifos: Neurotoxin, limit usually <0.5 ppm
• Pyrethroids: Less toxic but require control (<0.5 ppm)
• Carbendazim: Popular fungicide, frequent limit violator
• Multi-method analysis (GC-MS/MS + LC-MS/MS) is mandatory for wide spectrum coverage

Key features:
• Grouping pesticides by toxicity classes
• Checking sum parameters (e.g., sum of DDT isomers)
• Support for dynamic limits for different raw materials
• Compliance assessment with ChP 2020 requirements (33 pesticides)

Critical parameters:
• Organochlorines: ≤0.2 ppm
• Organophosphates: ≤0.5 ppm
• Pyrethroids: ≤0.5 ppm
• Carbendazim: ≤0.5 ppm

💡 Usage tips:
1. Use matrix-matched calibration standards to compensate for matrix effect
2. Screen for banned pesticides even if not expected
3. Pay attention to goji berries and chrysanthemum — high-risk crops
4. If positive results obtained, confirm with another detector type
5. Maintain database of suppliers with low pesticide load

⚠️ Note: Unlike synthetic drugs where impurities are known, in herbs the spectrum of possible pesticides is huge. The utility helps systematize complex multi-method analysis data and quickly identify critical exceedances.

input.csv

BatchNumber,ProductName,DDT_Total_ppm,HCH_Total_ppm,Chlorpyrifos_ppm,Dichlorvos_ppm,Deltamethrin_ppm,Cypermethrin_ppm,Carbendazim_ppm,Limit_OC,Limit_OP,Limit_Pyr
TCM-PEST-2026-001,Goji Berry,0.05,0.02,0.1,0.0,0.05,0.0,0.1,0.2,0.5,0.5
TCM-PEST-2026-002,Chrysanthemum Flower,0.01,0.01,0.05,0.0,0.02,0.0,0.05,0.2,0.5,0.5
TCM-PEST-2026-003,Ginseng Root,0.3,0.15,0.8,0.1,0.6,0.1,0.8,0.2,0.5,0.5
TCM Pesticide Residue Screener — URS and FS

TCM Pesticide Residue Screener — URS and FS

The English user requirements and functional specification are provided below.


TCM Pesticide Residue Screener — URS

TCM Pesticide Residue Screener

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

  1. 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.
  2. The utility shall run with two arguments: input.csv output.json.
  3. The utility shall not read input.csv and shall not write output.json when started without arguments.
  4. CSV numeric values shall be parsed using CultureInfo.InvariantCulture.
  5. Output shall be generated as LabWare-compatible JSON with Header, Samples, Results, Status, StatusCode, ErrorMessage, Description and DescriptionEN.
  6. For PASS records, ErrorMessage shall be an empty string.
  7. Embedded limits shall follow this priority: Ph. Eur. → British Pharmacopoeia / UK implementation → EAEU / regional requirements → EMA/ICH/EU guidance → USP fallback.
  8. 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%.
  9. For biologics and mAb-like products, aggregation, sterility and endotoxin checks shall be included where relevant to the utility purpose.
  10. 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,DDT_Total_ppm,HCH_Total_ppm,Chlorpyrifos_ppm,Dichlorvos_ppm,Deltamethrin_ppm,Cypermethrin_ppm,Carbendazim_ppm,Limit_OC,Limit_OP,Limit_Pyr
TCM-PEST-2026-001,Goji Berry,0.05,0.02,0.1,0.0,0.05,0.0,0.1,0.2,0.5,0.5
TCM-PEST-2026-002,Chrysanthemum Flower,0.01,0.01,0.05,0.0,0.02,0.0,0.05,0.2,0.5,0.5
TCM-PEST-2026-003,Ginseng Root,0.3,0.15,0.8,0.1,0.6,0.1,0.8,0.2,0.5,0.5

input.csv fields

FieldSample
BatchNumberTCM-PEST-2026-001
ProductNameGoji Berry
DDT_Total_ppm0.05
HCH_Total_ppm0.02
Chlorpyrifos_ppm0.1
Dichlorvos_ppm0.0
Deltamethrin_ppm0.05
Cypermethrin_ppm0.0
Carbendazim_ppm0.1
Limit_OC0.2
Limit_OP0.5
Limit_Pyr0.5

Utility description

TCM Pesticide Residue Screener — Traditional Chinese Medicine Pesticide Residue Screener

TCM Pesticide Residue Screener — Traditional Chinese Medicine Pesticide Residue Screener

ℹ️ Utility controls agrochemical residues (GC-MS/MS, LC-MS/MS):
• Organochlorines (DDT, HCH)
• Organophosphates (Chlorpyrifos)
• Pyrethroids (Deltamethrin)
• Fungicides (Carbendazim)

⚠️ CRITICAL: Pesticides can cause acute and chronic poisoning!
Chinese Pharmacopoeia (ChP) requires screening for 33+ pesticides.

Usage:
TCMPesticideResidueScreener.exe → demo mode (console output)
TCMPesticideResidueScreener.exe input.csv output.json → evaluate your data

Input format:
BatchNumber,ProductName,DDT_Total_ppm,HCH_Total_ppm,Chlorpyrifos_ppm,Dichlorvos_ppm,Deltamethrin_ppm,Cypermethrin_ppm,Carbendazim_ppm,Limit_OC,Limit_OP,Limit_Pyr

Example:
TCM-PEST-2026-001,Goji Berry,0.05,0.02,0.1,0.0,0.05,0.0,0.1,0.2,0.5,0.5

— WHY IS THIS NEEDED?
Pesticide control is critical for TCM safety (Yunnan Baiyao, Tong Ren Tang):
• Herbs are often grown with intensive use of agrochemicals
• Pesticide residues may persist after drying and extraction
• Some pesticides (organochlorines) are highly persistent and accumulate in body
• Pharmacopoeias (ChP 2020, Ph.Eur., USP) set lists of banned and limited substances

⚠️ CRITICAL:
• DDT and HCH: Banned or strictly limited (<0.2 ppm) due to carcinogenicity
• Chlorpyrifos: Neurotoxin, limit usually <0.5 ppm
• Pyrethroids: Less toxic but require control (<0.5 ppm)
• Carbendazim: Popular fungicide, frequent limit violator
• Multi-method analysis (GC-MS/MS + LC-MS/MS) is mandatory for wide spectrum coverage

Key features:
• Grouping pesticides by toxicity classes
• Checking sum parameters (e.g., sum of DDT isomers)
• Support for dynamic limits for different raw materials
• Compliance assessment with ChP 2020 requirements (33 pesticides)

Critical parameters:
• Organochlorines: ≤0.2 ppm
• Organophosphates: ≤0.5 ppm
• Pyrethroids: ≤0.5 ppm
• Carbendazim: ≤0.5 ppm

💡 Usage tips:
1. Use matrix-matched calibration standards to compensate for matrix effect
2. Screen for banned pesticides even if not expected
3. Pay attention to goji berries and chrysanthemum — high-risk crops
4. If positive results obtained, confirm with another detector type
5. Maintain database of suppliers with low pesticide load

⚠️ Note: Unlike synthetic drugs where impurities are known, in herbs the spectrum of possible pesticides is huge. The utility helps systematize complex multi-method analysis data and quickly identify critical exceedances.

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.

TCM Pesticide Residue Screener — FS

TCM Pesticide Residue Screener

The functional specification describes the behaviour of the standalone FUZKK console utility, input-data format, evaluation algorithm and output JSON structure.

Functional flow

  1. Main() checks the number of arguments.
  2. 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.
  3. If two arguments are provided: RunWithFiles(input.csv, output.json) reads CSV, evaluates each record and writes LabWare-compatible JSON.
  4. LoadData() uses CultureInfo.InvariantCulture and shall not be called in no-arguments mode.
  5. Evaluate() returns a named tuple with BatchNumber, ProductName, Parameters, CriticalFailCount, WarningCount, Recommendation and RecommendationEN.
  6. 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,DDT_Total_ppm,HCH_Total_ppm,Chlorpyrifos_ppm,Dichlorvos_ppm,Deltamethrin_ppm,Cypermethrin_ppm,Carbendazim_ppm,Limit_OC,Limit_OP,Limit_Pyr
TCM-PEST-2026-001,Goji Berry,0.05,0.02,0.1,0.0,0.05,0.0,0.1,0.2,0.5,0.5
TCM-PEST-2026-002,Chrysanthemum Flower,0.01,0.01,0.05,0.0,0.02,0.0,0.05,0.2,0.5,0.5
TCM-PEST-2026-003,Ginseng Root,0.3,0.15,0.8,0.1,0.6,0.1,0.8,0.2,0.5,0.5
FieldSample
BatchNumberTCM-PEST-2026-001
ProductNameGoji Berry
DDT_Total_ppm0.05
HCH_Total_ppm0.02
Chlorpyrifos_ppm0.1
Dichlorvos_ppm0.0
Deltamethrin_ppm0.05
Cypermethrin_ppm0.0
Carbendazim_ppm0.1
Limit_OC0.2
Limit_OP0.5
Limit_Pyr0.5

Output JSON

{
  "Header": {
    "UtilityName": "TCM_Pesticide_Residue_Screener",
    "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