TcmEndogenousToxinTransformationRatioChecker
Tcm Endogenous Toxin Transformation Ratio
ℹ️ Utility evaluates safety of toxic medicinal plants through chemometric ratios of transformation products (Paozhi):
• Aconitum spp.: Monoester/Diester Alkaloids Ratio (MDA/DDA ≥ 10)
• Strychnos nux-vomica: Strychnine/Brucine Ratio (0.8 – 2.5)
• Absolute content of highly toxic diester alkaloids (≤30 ppm for Aconite)
• Confirmation of hydrolysis products presence as marker of correct processing
⚠️ CRITICAL: This is a LIFE SAFETY CONTROL UTILITY!
Many TCM herbs (Aconite, Strychnos, Pinellia, Datura) contain lethal endogenous toxins.
Therapeutic window is achieved ONLY through special processing (Paozhi).
Simple measurement of "total content" does not reflect actual toxicity.
Safety is determined by RATIO of toxic form to its degradation products.
Usage:
TcmEndogenousToxinTransformationRatioChecker.exe → demo mode (console output)
TcmEndogenousToxinTransformationRatioChecker.exe input.csv output.json → evaluate your data
Input format:
BatchNumber,HerbName,ToxinClass,DiesterAlkaloids_ppm,MonoesterAlkaloids_ppm,Strychnine_percent,Brucine_percent,TotalAlkaloids_percent,ProcessingMethod
Example (Safe processed Aconite):
TCM-ACONITE-PREP-2026-001,Aconiti_Lateralis_Radix_Praeparata,Aconite,15.0,350.0,0,0,0.45,1
Supported toxin classes:
• Aconite — Aconitine, mesaconitine, hypaconitine (diester → monoester)
• Strychnos — Strychnine, brucine (ratio and total level control)
• (In development) Pinellia — Calcium oxalates (crystalline structure)
• (In development) Datura — Scopolamine/Atropine ratio
— WHY IS THIS NEEDED?
Unlike external contaminants (pesticides, metals), these toxins are NATURAL COMPONENTS of the plant. They cannot simply be "removed". They must be TRANSFORMED into less toxic forms.
• Diester aconite alkaloids (DDAs) are 1000 times more toxic than monoester ones (MDAs)
• Thermal hydrolysis converts DDAs to MDAs while retaining anti-inflammatory activity
• If processing is insufficient → high DDAs → risk of fatal arrhythmia
• If processing is excessive → complete destruction of all alkaloids → loss of efficacy
• MDA/DDA Ratio is an objective indicator of the processing "sweet spot"
⚠️ CRITICAL:
• For Aconite: MDA/DDA Ratio ≥ 10.0 confirms sufficient hydrolysis
• For Aconite: DDAs ≤ 30 ppm (absolute safety limit per ChP 2020)
• For Strychnos: Strychnine/Brucine Ratio 0.8-2.5 indicates standard processing
• Absence of monoester alkaloids with low diester = DEGRADATION, not safety
• Any deviation in ratio requires immediate batch release hold
Key features:
• Chemometric approach to safety (Ratio-based assessment)
• Separate evaluation of toxicity and transformation efficiency
• Support for various detoxification mechanisms (hydrolysis, oxidation, isomerization)
• Compliance with traditional Paozhi technology principles and modern ChP requirements
• Automatic risk classification based on metabolite profile
Critical parameters:
• Aconite MDA/DDA Ratio: ≥ 10.0
• Aconite Diester Alkaloids: ≤ 30 ppm
• Aconite Monoester Alkaloids: ≥ 100 ppm (confirmation of reaction products)
• Strychnos Strychnine/Brucine Ratio: 0.8 – 2.5
• Strychnos Total Alkaloids: ≤ 2.0%
💡 Usage tips:
1. Analysis performed by UHPLC-UV or LC-MS/MS with isomer separation
2. Calibration must include separate standards for each alkaloid (not just aconitine!)
3. Sampling must account for heterogeneity of aconite roots (tubers of different sizes process differently)
4. Comparison with historical batch data helps detect drift in boiling/steaming process
5. If Ratio < 10, batch may be REPROCESSED (re-boiled), but not released
⚠️ Note: This test is a BRIDGE between traditional medicine and modern analytics. Traditional masters checked aconite readiness "by tongue" (numbing sensation). Today we replace subjective sensation with objective chromatographic ratio. Absence of this test in Western pharmacopoeias makes import of unprocessed or poorly processed TCM raw materials extremely risky. The utility closes this critical gap in quality control system.
input.csv
BatchNumber,HerbName,ToxinClass,DiesterAlkaloids_ppm,MonoesterAlkaloids_ppm,Strychnine_percent,Brucine_percent,TotalAlkaloids_percent,ProcessingMethod TCM-ACONITE-PREP-2026-001,Aconiti_Lateralis_Radix_Praeparata,Aconite,15.0,350.0,0,0,0.45,1 TCM-ACONITE-RAW-FAIL-002,Aconiti_Lateralis_Radix_Raw,Aconite,850.0,40.0,0,0,1.10,0 TCM-STRYCHNOS-PROC-2026-003,Strychni_Semen_Processed,Strychnos,0,0,1.20,0.95,2.15,3 TCM-STRYCHNOS-OVERHEAT-004,Strychni_Semen_Overprocessed,Strychnos,0,0,0.40,0.85,1.25,3
TcmEndogenousToxinTransformationRatioChecker — URS & FS
TCM Endogenous Toxin Transformation Ratio Checker
TCM Endogenous Toxin Transformation Ratio Checker
1. Назначение документа
Документ описывает пользовательские требования (URS) и функциональную спецификацию (FS) для утилиты TcmEndogenousToxinTransformationRatioChecker. Утилита предназначена для детерминированной проверки данных input.csv, формирования структурированного результата output.json и поддержки прослеживаемого QA/QC review.
Документ является проектной URS/FS-основой для CSV/CSA, IQ/OQ/PQ и дальнейшей валидации в контексте конкретной лабораторной процедуры.
2. Исходное описание утилиты
3. URS — пользовательские требования
3.1 Цель и область применения
Система должна принимать табличные результаты лабораторного контроля, выполнять проверку по заранее заданным критериям и возвращать понятный статус по каждой серии/записи: Pass, Review или Fail.
3.2 Нормативная / методическая база
В исходном описании и правилах утилиты используются следующие ориентиры: ChP 2020, ChP, EP. Финальные лимиты должны быть подтверждены утверждённой спецификацией, монографией, SOP или протоколом трансфера метода.
3.3 Ключевые QC-проверки
- Aconitum spp.: Соотношение Моноэфирные алкалоиды / Диэфирные алкалоиды (MDA/DDA ≥ 10)
- Strychnos nux-vomica: Соотношение Стрихнин / Бруцин (0.8 – 2.5)
- Абсолютное содержание высокотоксичных диэфирных алкалоидов (≤30 ppm для Aconite)
- Подтверждение наличия продуктов гидролиза как маркера корректной обработки
- Aconite — Аконитин, мезаконитин, гипаконитин (диэфирные → моноэфирные)
- Strychnos — Стрихнин, бруцин (контроль соотношения и общего уровня)
- (В разработке) Pinellia — Оксалаты кальция (кристаллическая структура)
- (В разработке) Datura — Скополамин/Атропин соотношение
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 | HerbName | string | Да | Идентичность продукта, препарата или образца. |
| 3 | ToxinClass | string | Да | Входной атрибут для детерминированной оценки правил и прослеживаемости результата. |
| 4 | DiesterAlkaloids_ppm | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 5 | MonoesterAlkaloids_ppm | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 6 | Strychnine_percent | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 7 | Brucine_percent | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 8 | TotalAlkaloids_percent | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 9 | ProcessingMethod | integer | Да | Метаданные аналитического метода или условий анализа. |
4.3 Пример входных данных
| BatchNumber | HerbName | ToxinClass | DiesterAlkaloids_ppm | MonoesterAlkaloids_ppm | Strychnine_percent | Brucine_percent | TotalAlkaloids_percent | ProcessingMethod |
|---|---|---|---|---|---|---|---|---|
| TCM-ACONITE-PREP-2026-001 | Aconiti_Lateralis_Radix_Praeparata | Aconite | 15.0 | 350.0 | 0 | 0 | 0.45 | 1 |
| TCM-ACONITE-RAW-FAIL-002 | Aconiti_Lateralis_Radix_Raw | Aconite | 850.0 | 40.0 | 0 | 0 | 1.10 | 0 |
| TCM-STRYCHNOS-PROC-2026-003 | Strychni_Semen_Processed | Strychnos | 0 | 0 | 1.20 | 0.95 | 2.15 | 3 |
| TCM-STRYCHNOS-OVERHEAT-004 | Strychni_Semen_Overprocessed | Strychnos | 0 | 0 | 0.40 | 0.85 | 1.25 | 3 |
4.4 Выходной JSON
{
"utility": "TcmEndogenousToxinTransformationRatioChecker",
"runId": "urn:fuzkk:run:example",
"sourceFile": "input.csv",
"recordsProcessed": 4,
"overallStatus": "Pass / Review / Fail",
"records": [
{
"recordId": "TCM-ACONITE-PREP-2026-001",
"status": "Pass / Review / Fail",
"criticalFindings": [],
"warnings": [],
"evaluatedRules": [
"Configured acceptance criteria from the utility rule set"
],
"inputTrace": {
"BatchNumber": "TCM-ACONITE-PREP-2026-001",
"HerbName": "Aconiti_Lateralis_Radix_Praeparata",
"ToxinClass": "Aconite",
"DiesterAlkaloids_ppm": "15.0",
"MonoesterAlkaloids_ppm": "350.0",
"Strychnine_percent": "0",
"Brucine_percent": "0",
"TotalAlkaloids_percent": "0.45"
}
}
],
"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 TcmEndogenousToxinTransformationRatioChecker. 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: ChP 2020, ChP, EP. Final acceptance limits shall be confirmed by the approved specification, pharmacopoeial monograph, SOP or method-transfer protocol.
3.3 Key QC checks
- Aconitum spp.: Monoester/Diester Alkaloids Ratio (MDA/DDA ≥ 10)
- Strychnos nux-vomica: Strychnine/Brucine Ratio (0.8 – 2.5)
- Absolute content of highly toxic diester alkaloids (≤30 ppm for Aconite)
- Confirmation of hydrolysis products presence as marker of correct processing
- Aconite — Aconitine, mesaconitine, hypaconitine (diester → monoester)
- Strychnos — Strychnine, brucine (ratio and total level control)
- (In development) Pinellia — Calcium oxalates (crystalline structure)
- (In development) Datura — Scopolamine/Atropine ratio
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 | HerbName | string | Yes | Product, preparation or sample identity. |
| 3 | ToxinClass | string | Yes | Input attribute required for deterministic rule evaluation and output traceability. |
| 4 | DiesterAlkaloids_ppm | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 5 | MonoesterAlkaloids_ppm | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 6 | Strychnine_percent | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 7 | Brucine_percent | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 8 | TotalAlkaloids_percent | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 9 | ProcessingMethod | integer | Yes | Analytical method / condition metadata required for technical review. |
4.3 Input data example
| BatchNumber | HerbName | ToxinClass | DiesterAlkaloids_ppm | MonoesterAlkaloids_ppm | Strychnine_percent | Brucine_percent | TotalAlkaloids_percent | ProcessingMethod |
|---|---|---|---|---|---|---|---|---|
| TCM-ACONITE-PREP-2026-001 | Aconiti_Lateralis_Radix_Praeparata | Aconite | 15.0 | 350.0 | 0 | 0 | 0.45 | 1 |
| TCM-ACONITE-RAW-FAIL-002 | Aconiti_Lateralis_Radix_Raw | Aconite | 850.0 | 40.0 | 0 | 0 | 1.10 | 0 |
| TCM-STRYCHNOS-PROC-2026-003 | Strychni_Semen_Processed | Strychnos | 0 | 0 | 1.20 | 0.95 | 2.15 | 3 |
| TCM-STRYCHNOS-OVERHEAT-004 | Strychni_Semen_Overprocessed | Strychnos | 0 | 0 | 0.40 | 0.85 | 1.25 | 3 |
4.4 Output JSON
{
"utility": "TcmEndogenousToxinTransformationRatioChecker",
"runId": "urn:fuzkk:run:example",
"sourceFile": "input.csv",
"recordsProcessed": 4,
"overallStatus": "Pass / Review / Fail",
"records": [
{
"recordId": "TCM-ACONITE-PREP-2026-001",
"status": "Pass / Review / Fail",
"criticalFindings": [],
"warnings": [],
"evaluatedRules": [
"Configured acceptance criteria from the utility rule set"
],
"inputTrace": {
"BatchNumber": "TCM-ACONITE-PREP-2026-001",
"HerbName": "Aconiti_Lateralis_Radix_Praeparata",
"ToxinClass": "Aconite",
"DiesterAlkaloids_ppm": "15.0",
"MonoesterAlkaloids_ppm": "350.0",
"Strychnine_percent": "0",
"Brucine_percent": "0",
"TotalAlkaloids_percent": "0.45"
}
}
],
"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