TCM_Heavy_Metal_ICPMS_Checker

TCM Heavy Metal ICPMS Checker

AdvancedPharma CSV→JSON EU-first LabWare URS & FS
Open selection
TCM Heavy Metal ICP-MS Checker — Traditional Chinese Medicine Heavy Metal Analyzer

ℹ️ Utility controls toxic element levels using ICP-MS:
• Lead (Pb)
• Cadmium (Cd)
• Arsenic (As)
• Mercury (Hg)
• Copper (Cu)

⚠️ CRITICAL: Heavy metals accumulate in the body!
Herbs can absorb them from contaminated soil.

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

Input format:
BatchNumber,ProductName,Lead_ppm,Cadmium_ppm,Arsenic_ppm,Mercury_ppm,Copper_ppm,Limit_Pb_ppm,Limit_Cd_ppm,Limit_As_ppm,Limit_Hg_ppm,Limit_Cu_ppm

Example:
TCM-HM-2026-001,Panax Ginseng Root,2.5,0.2,1.0,0.05,10.0,5.0,1.0,2.0,0.2,20.0

— WHY IS THIS NEEDED?
Heavy metal control is critical for TCM safety (Yunnan Baiyao, Tong Ren Tang):
• Plants have ability to accumulate heavy metals from soil and water
• Long-term use of products with elevated metal content leads to chronic poisoning
• Some mineral TCM products contain mercury or arsenic as ingredients, requiring strict dosage control
• Pharmacopoeias (ChP, USP, Ph.Eur.) set strict limits for "Big 5" metals

⚠️ CRITICAL:
• Lead (Pb) ≤5.0 ppm — neurotoxin, dangerous for children
• Cadmium (Cd) ≤0.3-1.0 ppm — damages kidneys, has long half-life
• Arsenic (As) ≤2.0 ppm — carcinogen
• Mercury (Hg) ≤0.2 ppm — neurotoxin
• Copper (Cu) ≤20.0 ppm — essential element but toxic in excess

Key features:
• Inductively Coupled Plasma Mass Spectrometry (ICP-MS) data processing
• Compliance check with international safety standards
• Support for specific limits for different raw materials
• Cumulative toxic load assessment

Critical parameters:
• Pb: ≤5.0 ppm
• Cd: ≤1.0 ppm
• As: ≤2.0 ppm
• Hg: ≤0.2 ppm
• Cu: ≤20.0 ppm

💡 Usage tips:
1. Use microwave digestion method for complete sample mineralization
2. Perform analysis for different forms of arsenic and mercury (speciation) if required
3. Control reagent and water purity as background may be high
4. For mineral TCM products, account for permitted components (cinnabar, realgar)
5. Compare results with geochemical background of growing region

⚠️ Note: Unlike organic contaminants, heavy metals do not degrade during processing or heating. Their concentration in final product directly depends on raw material quality. The utility helps prevent release of potentially toxic batches.

input.csv

BatchNumber,ProductName,Lead_ppm,Cadmium_ppm,Arsenic_ppm,Mercury_ppm,Copper_ppm,Limit_Pb_ppm,Limit_Cd_ppm,Limit_As_ppm,Limit_Hg_ppm,Limit_Cu_ppm
TCM-HM-2026-001,Panax Ginseng Root,2.5,0.2,1.0,0.05,10.0,5.0,1.0,2.0,0.2,20.0
TCM-HM-2026-002,Ganoderma Lucidum,1.0,0.1,0.5,0.02,5.0,5.0,1.0,2.0,0.2,20.0
TCM-HM-2026-003,Mineral Drug Sample,8.0,0.5,3.0,0.1,15.0,5.0,1.0,2.0,0.2,20.0
TCM Heavy Metal ICPMS Checker — URS and FS

TCM Heavy Metal ICPMS Checker — URS and FS

The English user requirements and functional specification are provided below.


TCM Heavy Metal ICPMS Checker — URS

TCM Heavy Metal ICPMS Checker

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,Lead_ppm,Cadmium_ppm,Arsenic_ppm,Mercury_ppm,Copper_ppm,Limit_Pb_ppm,Limit_Cd_ppm,Limit_As_ppm,Limit_Hg_ppm,Limit_Cu_ppm
TCM-HM-2026-001,Panax Ginseng Root,2.5,0.2,1.0,0.05,10.0,5.0,1.0,2.0,0.2,20.0
TCM-HM-2026-002,Ganoderma Lucidum,1.0,0.1,0.5,0.02,5.0,5.0,1.0,2.0,0.2,20.0
TCM-HM-2026-003,Mineral Drug Sample,8.0,0.5,3.0,0.1,15.0,5.0,1.0,2.0,0.2,20.0

input.csv fields

FieldSample
BatchNumberTCM-HM-2026-001
ProductNamePanax Ginseng Root
Lead_ppm2.5
Cadmium_ppm0.2
Arsenic_ppm1.0
Mercury_ppm0.05
Copper_ppm10.0
Limit_Pb_ppm5.0
Limit_Cd_ppm1.0
Limit_As_ppm2.0
Limit_Hg_ppm0.2
Limit_Cu_ppm20.0

Utility description

TCM Heavy Metal ICP-MS Checker — Traditional Chinese Medicine Heavy Metal Analyzer

TCM Heavy Metal ICP-MS Checker — Traditional Chinese Medicine Heavy Metal Analyzer

ℹ️ Utility controls toxic element levels using ICP-MS:
• Lead (Pb)
• Cadmium (Cd)
• Arsenic (As)
• Mercury (Hg)
• Copper (Cu)

⚠️ CRITICAL: Heavy metals accumulate in the body!
Herbs can absorb them from contaminated soil.

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

Input format:
BatchNumber,ProductName,Lead_ppm,Cadmium_ppm,Arsenic_ppm,Mercury_ppm,Copper_ppm,Limit_Pb_ppm,Limit_Cd_ppm,Limit_As_ppm,Limit_Hg_ppm,Limit_Cu_ppm

Example:
TCM-HM-2026-001,Panax Ginseng Root,2.5,0.2,1.0,0.05,10.0,5.0,1.0,2.0,0.2,20.0

— WHY IS THIS NEEDED?
Heavy metal control is critical for TCM safety (Yunnan Baiyao, Tong Ren Tang):
• Plants have ability to accumulate heavy metals from soil and water
• Long-term use of products with elevated metal content leads to chronic poisoning
• Some mineral TCM products contain mercury or arsenic as ingredients, requiring strict dosage control
• Pharmacopoeias (ChP, USP, Ph.Eur.) set strict limits for "Big 5" metals

⚠️ CRITICAL:
• Lead (Pb) ≤5.0 ppm — neurotoxin, dangerous for children
• Cadmium (Cd) ≤0.3-1.0 ppm — damages kidneys, has long half-life
• Arsenic (As) ≤2.0 ppm — carcinogen
• Mercury (Hg) ≤0.2 ppm — neurotoxin
• Copper (Cu) ≤20.0 ppm — essential element but toxic in excess

Key features:
• Inductively Coupled Plasma Mass Spectrometry (ICP-MS) data processing
• Compliance check with international safety standards
• Support for specific limits for different raw materials
• Cumulative toxic load assessment

Critical parameters:
• Pb: ≤5.0 ppm
• Cd: ≤1.0 ppm
• As: ≤2.0 ppm
• Hg: ≤0.2 ppm
• Cu: ≤20.0 ppm

💡 Usage tips:
1. Use microwave digestion method for complete sample mineralization
2. Perform analysis for different forms of arsenic and mercury (speciation) if required
3. Control reagent and water purity as background may be high
4. For mineral TCM products, account for permitted components (cinnabar, realgar)
5. Compare results with geochemical background of growing region

⚠️ Note: Unlike organic contaminants, heavy metals do not degrade during processing or heating. Their concentration in final product directly depends on raw material quality. The utility helps prevent release of potentially toxic batches.

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 Heavy Metal ICPMS Checker — FS

TCM Heavy Metal ICPMS Checker

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,Lead_ppm,Cadmium_ppm,Arsenic_ppm,Mercury_ppm,Copper_ppm,Limit_Pb_ppm,Limit_Cd_ppm,Limit_As_ppm,Limit_Hg_ppm,Limit_Cu_ppm
TCM-HM-2026-001,Panax Ginseng Root,2.5,0.2,1.0,0.05,10.0,5.0,1.0,2.0,0.2,20.0
TCM-HM-2026-002,Ganoderma Lucidum,1.0,0.1,0.5,0.02,5.0,5.0,1.0,2.0,0.2,20.0
TCM-HM-2026-003,Mineral Drug Sample,8.0,0.5,3.0,0.1,15.0,5.0,1.0,2.0,0.2,20.0
FieldSample
BatchNumberTCM-HM-2026-001
ProductNamePanax Ginseng Root
Lead_ppm2.5
Cadmium_ppm0.2
Arsenic_ppm1.0
Mercury_ppm0.05
Copper_ppm10.0
Limit_Pb_ppm5.0
Limit_Cd_ppm1.0
Limit_As_ppm2.0
Limit_Hg_ppm0.2
Limit_Cu_ppm20.0

Output JSON

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