TcmForbiddenSubstanceAdulterationScreening
Tcm Forbidden Substance Adulteration Screening
ℹ️ Utility performs targeted high-sensitivity screening for undeclared pharmaceutical substances in herbal products:
• NSAIDs (Diclofenac, Indomethacin, Piroxicam, Ibuprofen)
• Corticosteroids (Dexamethasone, Prednisolone, Betamethasone)
• PDE5 Inhibitors (Sildenafil, Tadalafil, Vardenafil + analogues)
• Antidiabetics (Metformin, Glibenclamide, Glimepiride)
• Anorectics/Stimulants (Sibutramine, Fenfluramine, Phenolphthalein)
• Analgesics/Opioids (Tramadol, Codeine, Paracetamol)
• Specific adulteration markers by indication category
⚠️ CRITICAL: THIS IS AN ADULTERATION AND LIFE SAFETY TEST!
Presence of ANY amount of synthetic substance in a "purely herbal" product is:
1. Criminal offense (fraud, sale of unsafe goods)
2. Direct health threat (uncontrolled dosage, interactions, allergies)
3. Grounds for immediate batch recall and regulator notification
Acceptance Limit: STRICTLY 0 (Not Detected). Method LOQ must be ≤1 ppm.
Usage:
TcmForbiddenSubstanceAdulterationScreening.exe → demo mode (console output)
TcmForbiddenSubstanceAdulterationScreening.exe input.csv output.json → evaluate your data
Input format:
BatchNumber,ProductName,ClaimedIndication,NSAIDs_ppm,Steroids_ppm,PDE5_ppm,Antidiabetics_ppm,Anorectics_ppm,Opioids_ppm,DetectedCount,DetectedSubstances
Example (Clean product):
TCM-001,Herbal_Joint_Relief,Pain,0.0,0.0,0.0,0.0,0.0,0.0,0,
Risk groups by indication:
• Pain Relief / Arthritis → NSAIDs, Steroids, Tramadol
• Weight Loss / Detox → Sibutramine, Phenolphthalein, Furosemide
• Male Power / Energy → Sildenafil, Tadalafil, Yohimbine (synth.)
• Diabetes / Sugar Control → Metformin, Sulfonylureas
• Skin Diseases / Allergy → Corticosteroids, Antihistamines
• Sedatives / Sleep → Benzodiazepines, Barbiturates
— WHY IS THIS NEEDED?
Adulteration of TCM with synthetic drugs is a global safety problem:
• Manufacturers add cheap APIs to create "rapid action" effect
• Patients believe they take "natural" product and do not inform doctors
• Severe adverse effects occur: hypoglycemia, bleeding, heart attacks, serotonin syndrome
• Standard tests for heavy metals and pesticides DO NOT detect this problem
• Special targeted screening by LC-MS/MS or HRMS is required
⚠️ CRITICAL:
• Zero tolerance: any detection = FAIL
• Method must be validated for specificity (exclusion of false positives from herbal matrix)
• Must check not only original substances but also structural analogues (designer drugs)
• Positive result requires confirmation by second independent method
• Screening results are legally significant evidence of adulteration
Key features:
• Multi-class screening of 6 main adulterant categories
• Contextual linkage to product claimed indications
• Automatic generation of warnings about detected adulterant type
• Support for tracking specific identified substances
• Compliance with FDA, EMA and WHO guidelines on counterfeit medicines
Critical parameters:
• All categories: Not Detected (< LOQ)
• Method LOQ: ≤ 1.0 ppm (recommended ≤ 0.1 ppm)
• Specificity: No interference from plant matrix
• Confirmation: Required for any positive result
💡 Usage tips:
1. Use mass spectral library of forbidden substances (≥200 compounds)
2. Apply HRMS (High Resolution Mass Spectrometry) for detecting unknown analogues
3. Thorough sample preparation (QuEChERS, SPE) is mandatory for complex matrices (teas, ointments)
4. Regularly update target compound database (new designer drugs/APIs appear)
5. Upon positive result, immediately quarantine entire batch and notify QA/RA department
⚠️ Note: This test is fundamentally different from all other TCM QC tests. Here we look NOT for natural component NOR accidental contaminant, but for INTENTIONALLY ADDED DRUG. This is an act of bioterrorism against consumer under guise of traditional medicine. The utility serves as last line of defense protecting patient from unscrupulous manufacturers exploiting trust in word "natural". Absence of such screening in routine practice makes TCM market high-risk zone.
input.csv
BatchNumber,ProductName,ClaimedIndication,NSAIDs_Total_ppm,Corticosteroids_Total_ppm,PDE5_Inhibitors_ppm,Antidiabetics_ppm,Anorectics_ppm,Analgesics_Opioid_ppm,DetectedCount,DetectedSubstances TCM-JOINT-OK-2026-001,Herbal_Joint_Relief_Capsules,Pain_Arthritis,0.0,0.0,0.0,0.0,0.0,0.0,0, TCM-SLIM-FAIL-2026-002,Natural_Slimming_Tea,Weight_Loss,0.0,0.0,0.0,0.0,450.0,0.0,1,Sibutramine TCM-MAN-POWER-FAIL-2026-003,Dragon_Force_Tablets,Erectile_Dysfunction,0.0,0.0,1200.0,0.0,0.0,0.0,1,Sildenafil_Analog TCM-DIABETES-FAIL-2026-004,Sugar_Balance_Herbs,Diabetes,0.0,50.0,0.0,800.0,0.0,0.0,2,Dexamethasone;Glibenclamide TCM-PAIN-FAIL-2026-005,Miracle_Pain_Patch,Chronic_Pain,350.0,0.0,0.0,0.0,0.0,15.0,2,Diclofenac;Tramadol
TcmForbiddenSubstanceAdulterationScreening — URS & FS
TCM Forbidden Substance Adulteration Screening
TCM Forbidden Substance Adulteration Screening
1. Назначение документа
Документ описывает пользовательские требования (URS) и функциональную спецификацию (FS) для утилиты TcmForbiddenSubstanceAdulterationScreening. Утилита предназначена для детерминированной проверки данных input.csv, формирования структурированного результата output.json и поддержки прослеживаемого QA/QC review.
Документ является проектной URS/FS-основой для CSV/CSA, IQ/OQ/PQ и дальнейшей валидации в контексте конкретной лабораторной процедуры.
2. Исходное описание утилиты
3. URS — пользовательские требования
3.1 Цель и область применения
Система должна принимать табличные результаты лабораторного контроля, выполнять проверку по заранее заданным критериям и возвращать понятный статус по каждой серии/записи: Pass, Review или Fail.
3.2 Нормативная / методическая база
В исходном описании и правилах утилиты используются следующие ориентиры: EP, WHO, EMA, FDA. Финальные лимиты должны быть подтверждены утверждённой спецификацией, монографией, SOP или протоколом трансфера метода.
3.3 Ключевые QC-проверки
- НПВС (Diclofenac, Indomethacin, Piroxicam, Ibuprofen)
- Кортикостероиды (Dexamethasone, Prednisolone, Betamethasone)
- Ингибиторы ФДЭ-5 (Sildenafil, Tadalafil, Vardenafil + аналоги)
- Антидиабетики (Metformin, Glibenclamide, Glimepiride)
- Аноректики/Стимуляторы (Sibutramine, Fenfluramine, Phenolphthalein)
- Анальгетики/Опиоиды (Tramadol, Codeine, Paracetamol)
- Специфические маркеры фальсификации по категориям показаний
- Обезболивающие / Артрит → НПВС, Стероиды, Трамадол
3.4 Пользователи
- QC analyst — подготовка и загрузка
input.csv. - QA/QC reviewer — проверка результата и отклонений.
- CSV/validation specialist — подтверждение пригодности утилиты.
- System owner — управление версией, доступом и изменениями.
3.5 Требования к данным и Data Integrity
- каждая строка CSV должна быть прослеживаемой к серии, образцу или измерению;
- исходные значения не должны изменяться утилитой;
- расчёты должны быть воспроизводимыми при повторном запуске;
- любое отклонение должно сохраняться как структурированное finding с указанием поля и правила;
- ручное изменение итогового статуса вне QA-процесса не допускается.
4. FS — функциональная спецификация
4.1 Поток обработки
- Проверить наличие и кодировку
input.csv. - Проверить заголовки, обязательные поля и типы данных.
- Нормализовать числовые и булевы значения без изменения исходного следа.
- Выбрать набор правил по категории продукта/типа, если он предусмотрен.
- Сравнить значения с лимитами и вычислить derived metrics.
- Сформировать запись результата по каждой строке.
- Сохранить
output.jsonс общей сводкой, findings и traceability.
4.2 CSV-схема
| № | Поле CSV | Тип | Обяз. | Назначение |
|---|---|---|---|---|
| 1 | BatchNumber | string | Да | Идентификатор серии / лота для прослеживаемости. |
| 2 | ProductName | string | Да | Идентичность продукта, препарата или образца. |
| 3 | ClaimedIndication | string | Да | Входной атрибут для детерминированной оценки правил и прослеживаемости результата. |
| 4 | NSAIDs_Total_ppm | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 5 | Corticosteroids_Total_ppm | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 6 | PDE5_Inhibitors_ppm | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 7 | Antidiabetics_ppm | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 8 | Anorectics_ppm | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 9 | Analgesics_Opioid_ppm | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 10 | DetectedCount | integer | Да | Бинарный признак обнаружения для правил нулевой толерантности или предупреждений. |
| 11 | DetectedSubstances | string | Да | Бинарный признак обнаружения для правил нулевой толерантности или предупреждений. |
4.3 Пример входных данных
| BatchNumber | ProductName | ClaimedIndication | NSAIDs_Total_ppm | Corticosteroids_Total_ppm | PDE5_Inhibitors_ppm | Antidiabetics_ppm | Anorectics_ppm | Analgesics_Opioid_ppm | DetectedCount | DetectedSubstances |
|---|---|---|---|---|---|---|---|---|---|---|
| TCM-JOINT-OK-2026-001 | Herbal_Joint_Relief_Capsules | Pain_Arthritis | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0 | |
| TCM-SLIM-FAIL-2026-002 | Natural_Slimming_Tea | Weight_Loss | 0.0 | 0.0 | 0.0 | 0.0 | 450.0 | 0.0 | 1 | Sibutramine |
| TCM-MAN-POWER-FAIL-2026-003 | Dragon_Force_Tablets | Erectile_Dysfunction | 0.0 | 0.0 | 1200.0 | 0.0 | 0.0 | 0.0 | 1 | Sildenafil_Analog |
| TCM-DIABETES-FAIL-2026-004 | Sugar_Balance_Herbs | Diabetes | 0.0 | 50.0 | 0.0 | 800.0 | 0.0 | 0.0 | 2 | Dexamethasone;Glibenclamide |
| TCM-PAIN-FAIL-2026-005 | Miracle_Pain_Patch | Chronic_Pain | 350.0 | 0.0 | 0.0 | 0.0 | 0.0 | 15.0 | 2 | Diclofenac;Tramadol |
4.4 Выходной JSON
{
"utility": "TcmForbiddenSubstanceAdulterationScreening",
"runId": "urn:fuzkk:run:example",
"sourceFile": "input.csv",
"recordsProcessed": 5,
"overallStatus": "Pass / Review / Fail",
"records": [
{
"recordId": "TCM-JOINT-OK-2026-001",
"status": "Pass / Review / Fail",
"criticalFindings": [],
"warnings": [],
"evaluatedRules": [
"Configured acceptance criteria from the utility rule set"
],
"inputTrace": {
"BatchNumber": "TCM-JOINT-OK-2026-001",
"ProductName": "Herbal_Joint_Relief_Capsules",
"ClaimedIndication": "Pain_Arthritis",
"NSAIDs_Total_ppm": "0.0",
"Corticosteroids_Total_ppm": "0.0",
"PDE5_Inhibitors_ppm": "0.0",
"Antidiabetics_ppm": "0.0",
"Anorectics_ppm": "0.0"
}
}
],
"dataIntegrity": {
"deterministicEvaluation": true,
"sourceRowTraceability": true,
"manualOverrideAllowed": false
}
}
5. Трассировка URS → FS → тесты
| URS | FS-механизм | Проверка |
|---|---|---|
| Загрузка корректного input.csv | CSV parser + schema validator | OQ: валидный/невалидный CSV |
| Детерминированная оценка лимитов | Rule engine с фиксированной конфигурацией | OQ: граничные значения и known expected results |
| Статусы Pass/Review/Fail | Status aggregator по findings | OQ/PQ: образцы с проходными и провальными сериями |
| Прослеживаемость к исходной строке | inputTrace + recordId | PQ: сверка output.json с исходным CSV |
| Поддержка QA review | структурированные findings и warnings | PQ: review сценарии и deviation handling |
6. CSV/CSA и валидационный подход
IQ
- проверка версии утилиты;
- проверка расположения исполняемого файла;
- проверка шаблона CSV;
- контроль прав доступа.
OQ
- проверка обязательных полей;
- проверка типов данных;
- проверка граничных значений;
- проверка zero-tolerance правил.
PQ
- прогоны на реальных/репрезентативных данных;
- сверка с ручным расчётом;
- подтверждение QA review workflow.
Change control
- версионирование лимитов;
- impact assessment при изменении правил;
- регрессия после обновления.
1. Document purpose
This document defines user requirements (URS) and functional specification (FS) for TcmForbiddenSubstanceAdulterationScreening. The utility is intended to evaluate input.csv data deterministically, generate structured output.json output and support traceable QA/QC review.
This document is a project-level URS/FS baseline for CSV/CSA, IQ/OQ/PQ and further validation under an approved laboratory procedure.
2. Source utility description
3. URS — user requirements
3.1 Intended use and scope
The system shall accept tabular laboratory QC results, evaluate them against configured acceptance criteria and return a clear status for each batch or record: Pass, Review or Fail.
3.2 Regulatory / methodological basis
The source description and utility rules refer to the following framework: EP, WHO, EMA, FDA. Final acceptance limits shall be confirmed by the approved specification, pharmacopoeial monograph, SOP or method-transfer protocol.
3.3 Key QC checks
- NSAIDs (Diclofenac, Indomethacin, Piroxicam, Ibuprofen)
- Corticosteroids (Dexamethasone, Prednisolone, Betamethasone)
- PDE5 Inhibitors (Sildenafil, Tadalafil, Vardenafil + analogues)
- Antidiabetics (Metformin, Glibenclamide, Glimepiride)
- Anorectics/Stimulants (Sibutramine, Fenfluramine, Phenolphthalein)
- Analgesics/Opioids (Tramadol, Codeine, Paracetamol)
- Specific adulteration markers by indication category
- Pain Relief / Arthritis → NSAIDs, Steroids, Tramadol
3.4 Users
- QC analyst — prepares and loads
input.csv. - QA/QC reviewer — reviews output, findings and deviations.
- CSV/validation specialist — confirms fitness for intended use.
- System owner — controls versioning, access and change management.
3.5 Data and data-integrity requirements
- each CSV row shall be traceable to a batch, sample or analytical measurement;
- source values shall not be modified by the utility;
- calculations shall be reproducible on repeated execution;
- each deviation shall be captured as a structured finding with field and rule references;
- manual override of the final status outside QA process is not allowed.
4. FS — functional specification
4.1 Processing flow
- Verify presence and encoding of
input.csv. - Validate headers, mandatory fields and data types.
- Normalize numeric and boolean values while preserving the source trace.
- Select an adaptive rule set by product/category type, where applicable.
- Compare values with limits and compute derived metrics.
- Create a result record for each input row.
- Write
output.jsonwith summary, findings and traceability.
4.2 CSV schema
| # | CSV field | Type | Req. | Purpose |
|---|---|---|---|---|
| 1 | BatchNumber | string | Yes | Batch / lot identifier used for traceability. |
| 2 | ProductName | string | Yes | Product, preparation or sample identity. |
| 3 | ClaimedIndication | string | Yes | Input attribute required for deterministic rule evaluation and output traceability. |
| 4 | NSAIDs_Total_ppm | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 5 | Corticosteroids_Total_ppm | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 6 | PDE5_Inhibitors_ppm | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 7 | Antidiabetics_ppm | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 8 | Anorectics_ppm | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 9 | Analgesics_Opioid_ppm | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 10 | DetectedCount | integer | Yes | Binary detection flag used for zero-tolerance or warning rules. |
| 11 | DetectedSubstances | string | Yes | Binary detection flag used for zero-tolerance or warning rules. |
4.3 Input data example
| BatchNumber | ProductName | ClaimedIndication | NSAIDs_Total_ppm | Corticosteroids_Total_ppm | PDE5_Inhibitors_ppm | Antidiabetics_ppm | Anorectics_ppm | Analgesics_Opioid_ppm | DetectedCount | DetectedSubstances |
|---|---|---|---|---|---|---|---|---|---|---|
| TCM-JOINT-OK-2026-001 | Herbal_Joint_Relief_Capsules | Pain_Arthritis | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0 | |
| TCM-SLIM-FAIL-2026-002 | Natural_Slimming_Tea | Weight_Loss | 0.0 | 0.0 | 0.0 | 0.0 | 450.0 | 0.0 | 1 | Sibutramine |
| TCM-MAN-POWER-FAIL-2026-003 | Dragon_Force_Tablets | Erectile_Dysfunction | 0.0 | 0.0 | 1200.0 | 0.0 | 0.0 | 0.0 | 1 | Sildenafil_Analog |
| TCM-DIABETES-FAIL-2026-004 | Sugar_Balance_Herbs | Diabetes | 0.0 | 50.0 | 0.0 | 800.0 | 0.0 | 0.0 | 2 | Dexamethasone;Glibenclamide |
| TCM-PAIN-FAIL-2026-005 | Miracle_Pain_Patch | Chronic_Pain | 350.0 | 0.0 | 0.0 | 0.0 | 0.0 | 15.0 | 2 | Diclofenac;Tramadol |
4.4 Output JSON
{
"utility": "TcmForbiddenSubstanceAdulterationScreening",
"runId": "urn:fuzkk:run:example",
"sourceFile": "input.csv",
"recordsProcessed": 5,
"overallStatus": "Pass / Review / Fail",
"records": [
{
"recordId": "TCM-JOINT-OK-2026-001",
"status": "Pass / Review / Fail",
"criticalFindings": [],
"warnings": [],
"evaluatedRules": [
"Configured acceptance criteria from the utility rule set"
],
"inputTrace": {
"BatchNumber": "TCM-JOINT-OK-2026-001",
"ProductName": "Herbal_Joint_Relief_Capsules",
"ClaimedIndication": "Pain_Arthritis",
"NSAIDs_Total_ppm": "0.0",
"Corticosteroids_Total_ppm": "0.0",
"PDE5_Inhibitors_ppm": "0.0",
"Antidiabetics_ppm": "0.0",
"Anorectics_ppm": "0.0"
}
}
],
"dataIntegrity": {
"deterministicEvaluation": true,
"sourceRowTraceability": true,
"manualOverrideAllowed": false
}
}
5. Traceability URS → FS → tests
| URS | FS mechanism | Test evidence |
|---|---|---|
| Load valid input.csv | CSV parser + schema validator | OQ: valid/invalid CSV cases |
| Deterministic limit evaluation | Rule engine with fixed configuration | OQ: boundary values and known expected results |
| Pass/Review/Fail statuses | Status aggregator based on findings | OQ/PQ: passing and failing representative batches |
| Traceability to source row | inputTrace + recordId | PQ: output.json reconciliation to source CSV |
| QA review support | structured findings and warnings | PQ: review and deviation-handling scenarios |
6. CSV/CSA and validation approach
IQ
- utility version check;
- executable location check;
- CSV template check;
- access-right verification.
OQ
- mandatory field checks;
- data type checks;
- boundary-value checks;
- zero-tolerance rule checks.
PQ
- runs on real or representative data;
- comparison with manual calculation;
- confirmation of QA review workflow.
Change control
- rule and limit versioning;
- impact assessment for rule changes;
- regression after updates.
Included in packages
Traditional Chinese Medicine (TCM) QC Suite
QC utility package for TCM: botanical identity, fingerprint consistency, marker compounds, decoction pieces, Paozhi processing, pesticides, mycotoxins, heavy metals, sulfur fumigation, microbial limits and adulteration screening.
Open