HeavyMetalsLimitTestQualityChecker
Heavy Metals Limit Test
Heavy Metals Limit Test Quality Checker — Limit Test for Heavy Metals
ℹ️ Utility checks compliance of heavy metals limit test results with Ph. Eur. 2.4.8 / USP requirements:
• Comparison of color intensity of lead thio-complex in sample and standard.
• Passing Criteria: Sample color intensity must not exceed that of the standard solution.
• Standard limits: usually 10 ppm or 20 ppm (calculated as Pb).
⚠️ CRITICAL: If sample is darker than standard, the batch FAILS!
Quantitative analysis (ICP-MS/AAS) is required to determine the exact level of contamination.
Usage:
HeavyMetalsLimitTestQualityChecker.exe → demo mode (console output)
HeavyMetalsLimitTestQualityChecker.exe input.csv output.json → evaluate your data
Input format:
BatchNumber,SampleIntensity,StandardIntensity,LimitPPM,MethodType
Example:
HM-LIMIT-2026-001,0.15,0.20,10.0,Method_A
— WHY IS THIS NEEDED?
Heavy metals limit test is a classic pharmacopoeial method for controlling inorganic impurities.
• Based on the reaction of heavy metal ions with sodium sulfide or thioacetamide to form colored sulfides.
• Used for rapid screening of raw materials where low metal levels are expected.
• Ph. Eur. 2.4.8 describes 4 methods (A-D) depending on substance solubility.
• Automation of intensity comparison (if using colorimeter/photometer) eliminates subjectivity of visual assessment.
⚠️ CRITICAL:
• Solution pH must be strictly controlled (usually 3.0-4.0) for correct sulfide precipitation.
• Standard solution must be prepared from lead salt (lead nitrate).
• Method is non-specific: it determines the sum of metals precipitated by sulfides (Pb, Hg, Cd, Bi, Ag, Cu, etc.).
• In presence of interfering ions (Fe, Co, Ni), special masking or extraction methods may be required.
Key features:
• Comparative analysis "Sample vs Standard".
• Verification of established limit (ppm).
• Generation of PASS/FAIL status for QC reports.
Critical parameters:
• Sample Intensity <= Standard Intensity
• Limit: e.g., 10 ppm or 20 ppm
💡 Usage tips:
1. Use freshly prepared reagents, as sulfide solutions are unstable.
2. Perform reaction under identical conditions for sample and standard (time, temperature).
3. For visual comparison, use white background and side lighting.
4. If sample has intrinsic color, decolorization or compensation method is required.
5. Upon positive result (Fail), immediately initiate investigation of contamination source.
⚠️ Note: This test is considered outdated for registration of new drugs (ICP-MS per ICH Q3D is preferred), but is still widely used for excipient control and in some pharmacopoeial monographs.
input.csv
BatchNumber,SampleIntensity,StandardIntensity,LimitPPM,MethodType HM-LIMIT-2026-001,0.15,0.20,10.0,Method_A HM-LIMIT-2026-002,0.19,0.20,20.0,Method_B HM-FAIL-2026-003,0.25,0.20,10.0,Method_A
URS & FS — Heavy Metals Limit Test
This document describes the user requirements and functional specification for HeavyMetalsLimitTestQualityChecker. The utility is intended for QC laboratory use as a rule-based check of data prepared from an instrument, LIMS, ELN, MES or an approved input.csv.
URS — User Requirements Specification
| ID | Requirement | Criticality | Acceptance criterion |
|---|---|---|---|
| URS-001 | The utility shall accept input.csv with approved columns: BatchNumber, SampleIntensity, StandardIntensity, LimitPPM, MethodType. | High | The CSV file is processed without manual header editing. |
| URS-002 | The utility shall perform deterministic evaluation for “Heavy Metals Limit Test” without machine learning. | High | The same input data produce the same JSON result. |
| URS-003 | The utility shall validate mandatory fields, numeric formats, flags, ranges and domain plausibility. | High | Schema and conversion errors are explicitly reported. |
| URS-004 | The utility shall generate output.json with PASS / WARNING / FAIL statuses, source values, warnings and failures. | High | The JSON result is suitable for review, deviation investigation and integration. |
| URS-005 | The documentation shall support IQ/OQ/PQ or CSV/CSA verification. | Medium | URS/FS, CSV/JSON contract and test scenarios are supplied with the utility. |
input.csv contract
| # | Field | Sample | Purpose |
|---|---|---|---|
| 1 | BatchNumber | HM-LIMIT-2026-001 | Input parameter for deterministic QC evaluation. |
| 2 | SampleIntensity | 0.15 | Input parameter for deterministic QC evaluation. |
| 3 | StandardIntensity | 0.20 | Input parameter for deterministic QC evaluation. |
| 4 | LimitPPM | 10.0 | Input parameter for deterministic QC evaluation. |
| 5 | MethodType | Method_A | Input parameter for deterministic QC evaluation. |
FS — Functional Specification
| ID | Function | Implementation |
|---|---|---|
| FS-001 | CSV import | Read input.csv; validate header, column count and encoding. |
| FS-002 | Schema validation | Check required fields and permitted input values. |
| FS-003 | Rule engine | Apply domain rules, limits and system suitability/specification checks described in the source utility description. |
| FS-004 | Status aggregation | Produce final status: FAIL for critical failure, WARNING for non-critical deviation, PASS for conformance. |
| FS-005 | JSON export | Write machine-readable output.json for LIMS/ELN/MES and QA/QC review. |
OQ/PQ scenarios
- OQ-001: a valid sample row shall be processed without schema error.
- OQ-002: a missing mandatory column shall produce a schema error.
- OQ-003: a non-numeric value in a numeric field shall produce a conversion error.
- OQ-004: a critical parameter outside the limit shall produce
FAILor a critical finding. - PQ-001: user real batches shall be checked with retention of
input.csv,output.json, utility version and checksum.
Included in packages
Biopharmaceuticals Extended QC Suite
Extended QC utility coverage for mAbs, biosimilars, proteins, insulins, vaccines, mRNA/LNP, HCP, sterile release, microbiology, water, cleanroom and stability workflows.
OpenDental & Dental Materials QC Suite
QC utility package for dental medicinal products, oral-care products and dental materials: anaesthetics, antiseptics, analgesic/anti-infective products, polymers/minerals, resins, bonding workflows, microbiology, stability and material QC.
OpenInfectious Diseases QC Suite
QC utility package for infectious diseases: antibacterial, antiviral, antifungal and antiparasitic products, microbiology, sterility, endotoxins, viral safety and vaccine release checks.
OpenLabEx QC Suite
LabEx package for laboratory QC methods: chromatography, spectroscopy, microbiology, sterility, endotoxins, particles, dissolution, water, cleanrooms and sample preparation.
OpenToxicology QC Suite
QC utility package for toxicologically relevant risks: genotoxic impurities, residual solvents, elemental impurities, heavy metals, mercury, mycotoxins, pesticides, extractables/leachables and degradation impurities.
Open