TcmPaozhiProcessingComplianceChecker
Tcm Paozhi Processing Compliance
ℹ️ Utility verifies compliance with traditional herbal processing methods:
• Chemical transformation coefficient (product/substrate ratio ≥10)
• Finished product moisture (≤15% for microbiological stability)
• Water-soluble extractives content (marker of boiling/soaking completeness)
• Organoleptic color assessment (Color Score ≥8/10)
• Organoleptic texture assessment (Texture Score ≥8/10)
⚠️ CRITICAL: Paozhi changes DRUG PROPERTIES, not just composition!
• Raw Rehmannia (Sheng Di Huang) — cools blood, stops bleeding.
• Prepared Rehmannia (Shu Di Huang) — warms, nourishes Yin and Blood.
• These are TWO DIFFERENT MEDICINES. Processing error = prescription error.
• Western pharmacopoeias often do not distinguish these states or have averaged standards.
Usage:
TcmPaozhiProcessingComplianceChecker.exe → demo mode (console output)
TcmPaozhiProcessingComplianceChecker.exe input.csv output.json → evaluate your data
Input format:
BatchNumber,HerbName,PaozhiMethod,MarkerOriginal_ppm,MarkerTransformed_ppm,Moisture_pct,Extractives_pct,Ash_pct,ColorScore,TextureScore
Example (Correctly processed Rehmannia):
TCM-REH-001,Rehmanniae_Radix_Praeparata,Steamed_with_Wine,50.0,850.0,12.5,68.0,0.8,9.5,9.0
Supported Paozhi methods:
• Steamed (Zheng) — Steaming (Rehmannia, Polygonatum, Ginseng)
• Honey-Fried (Mi Zhi) — Frying with honey (Astragalus, Licorice, Ephedra)
• Vinegar-Processed (Cu Zhi) — Vinegar treatment (Corydalis, Bupleurum)
• Wine-Washed/Wine-Stewed (Jiu Zhi) — Wine treatment (Angelica, Paeonia)
• Charred (Tan) — Charring (Ginger, Schizonepeta)
• Salt-Water Fried (Yan Zhi) — Salt-water frying (Eucommia, Psoralea)
— WHY IS THIS NEEDED?
Paozhi is a unique TCM feature absent in Western herbal medicine.
1. Toxicity reduction (Aconite, Pinellia, Datura)
2. Therapeutic direction change (Rehmannia, Ginger)
3. Specific action enhancement (Corydalis + vinegar = better analgesia)
4. Side effect correction (Ephedra + honey = less sweating, more cough relief)
5. Improved storage and extraction
Without Paozhi control, clinical effect of traditional formulas cannot be guaranteed.
⚠️ CRITICAL:
• Transformation Ratio ≥10 confirms target reaction progress (hydrolysis, isomerization)
• Moisture ≤15% critical for steamed/honey forms (high mold risk!)
• Extractives ≥50% (for Rehmannia) proves starch-to-sugar conversion
• Color/Texture Scores formalize master's subjective experience ("black as lacquer, sweet as honey")
• Under-processing = toxicity or wrong effect
• Over-processing = activity loss ("ash instead of medicine")
Key features:
• Comprehensive assessment: Chemistry + Physics + Organoleptics
• Adaptability to different Paozhi methods via marker configuration
• Stability control (moisture) immediately after production
• Formalization of traditional quality criteria ("Se-Ze-Xiang-Wei")
• Detection of both under-processing and over-processing
Critical parameters:
• Transformation Ratio: ≥10.0 (depends on marker pair)
• Moisture: ≤15.0% (stricter for honey/wine forms)
• Water-Soluble Extractives: ≥50.0% (for sugar-rich roots)
• Color Conformity: ≥8.0/10
• Texture Conformity: ≥8.0/10
💡 Usage tips:
1. Select transformation markers specific to each species and method
- Rehmannia: Catalpol ↓ / 5-HMF ↑
- Corydalis: Free alkaloids ↑ / Bound alkaloids ↓ (vinegar)
- Astragalus: Sugars ↑ / Saponins stability (honey)
2. Organoleptic assessment must be performed by trained experts or calibrated cameras
3. Measure moisture immediately after cooling/packaging
4. Comparison with reference standard ("Standard Reference Material") is mandatory
5. Track Ratio trends to optimize boiling time/temperature
⚠️ Note: Paozhi is a BLACK BOX for Western QC. Ph.Eur. standards may simply require "Assay > X%" without specifying which component. In TCM, the CHANGE in composition is what matters. This utility translates ancient processing art into GMP-validatable parameters while preserving traditional technology essence. It bridges the gap between "folk medicine" and "pharmaceutical manufacturing".
input.csv
BatchNumber,HerbName,PaozhiMethod,MarkerOriginal_ppm,MarkerTransformed_ppm,MoisturePercent,ExtractivesPercent,AshAcidInsolublePercent,ColorScore,TextureScore TCM-REHMANNIA-PREP-2026-001,Rehmanniae_Radix_Praeparata,Steamed_with_Wine,50.0,850.0,12.5,68.0,0.8,9.5,9.0 TCM-ASTRAGALUS-HONEY-2026-002,Astragali_Radix_Praeparata,Honey_Fried,120.0,450.0,10.0,35.0,1.2,8.5,8.8 TCM-ACONITE-BOILED-FAIL-003,Aconiti_Lateralis_Praeparata,Boiled,400.0,120.0,18.0,25.0,2.5,6.0,5.5 TCM-CORYDALIS-VINEGAR-2026-004,Corydalis_Yanhusuo,Vinegar_Processed,80.0,320.0,11.0,22.0,1.0,9.0,9.2
TcmPaozhiProcessingComplianceChecker — URS & FS
TCM Paozhi Processing Compliance Checker
TCM Paozhi Processing Compliance Checker
1. Назначение документа
Документ описывает пользовательские требования (URS) и функциональную спецификацию (FS) для утилиты TcmPaozhiProcessingComplianceChecker. Утилита предназначена для детерминированной проверки данных 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, Ph.Eur, Ph.Eur., ICH, GMP. Финальные лимиты должны быть подтверждены утверждённой спецификацией, монографией, SOP или протоколом трансфера метода.
3.3 Ключевые QC-проверки
- Коэффициент химической трансформации (соотношение продукт/субстрат ≥10)
- Влажность готового продукта (≤15% для микробиологической стабильности)
- Содержание водорастворимых экстрактивных веществ (маркер полноты варки/пропитки)
- Органолептическая оценка цвета (Color Score ≥8/10)
- Органолептическая оценка текстуры (Texture Score ≥8/10)
- Сырая Rehmannia (Sheng Di Huang) — холодит, останавливает кровотечения.
- Приготовленная Rehmannia (Shu Di Huang) — греет, питает Инь и Кровь.
- Это ДВА РАЗНЫХ ЛЕКАРСТВА. Ошибка в обработке = ошибка в назначении.
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 | PaozhiMethod | string | Да | Метаданные аналитического метода или условий анализа. |
| 4 | MarkerOriginal_ppm | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 5 | MarkerTransformed_ppm | decimal | Да | Классификация для выбора адаптивных лимитов или набора правил. |
| 6 | MoisturePercent | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 7 | ExtractivesPercent | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 8 | AshAcidInsolublePercent | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 9 | ColorScore | decimal | Да | Входной атрибут для детерминированной оценки правил и прослеживаемости результата. |
| 10 | TextureScore | decimal | Да | Входной атрибут для детерминированной оценки правил и прослеживаемости результата. |
4.3 Пример входных данных
| BatchNumber | HerbName | PaozhiMethod | MarkerOriginal_ppm | MarkerTransformed_ppm | MoisturePercent | ExtractivesPercent | AshAcidInsolublePercent | ColorScore | TextureScore |
|---|---|---|---|---|---|---|---|---|---|
| TCM-REHMANNIA-PREP-2026-001 | Rehmanniae_Radix_Praeparata | Steamed_with_Wine | 50.0 | 850.0 | 12.5 | 68.0 | 0.8 | 9.5 | 9.0 |
| TCM-ASTRAGALUS-HONEY-2026-002 | Astragali_Radix_Praeparata | Honey_Fried | 120.0 | 450.0 | 10.0 | 35.0 | 1.2 | 8.5 | 8.8 |
| TCM-ACONITE-BOILED-FAIL-003 | Aconiti_Lateralis_Praeparata | Boiled | 400.0 | 120.0 | 18.0 | 25.0 | 2.5 | 6.0 | 5.5 |
| TCM-CORYDALIS-VINEGAR-2026-004 | Corydalis_Yanhusuo | Vinegar_Processed | 80.0 | 320.0 | 11.0 | 22.0 | 1.0 | 9.0 | 9.2 |
4.4 Выходной JSON
{
"utility": "TcmPaozhiProcessingComplianceChecker",
"runId": "urn:fuzkk:run:example",
"sourceFile": "input.csv",
"recordsProcessed": 4,
"overallStatus": "Pass / Review / Fail",
"records": [
{
"recordId": "TCM-REHMANNIA-PREP-2026-001",
"status": "Pass / Review / Fail",
"criticalFindings": [],
"warnings": [],
"evaluatedRules": [
"Configured acceptance criteria from the utility rule set"
],
"inputTrace": {
"BatchNumber": "TCM-REHMANNIA-PREP-2026-001",
"HerbName": "Rehmanniae_Radix_Praeparata",
"PaozhiMethod": "Steamed_with_Wine",
"MarkerOriginal_ppm": "50.0",
"MarkerTransformed_ppm": "850.0",
"MoisturePercent": "12.5",
"ExtractivesPercent": "68.0",
"AshAcidInsolublePercent": "0.8"
}
}
],
"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 TcmPaozhiProcessingComplianceChecker. 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, Ph.Eur, Ph.Eur., ICH, GMP. Final acceptance limits shall be confirmed by the approved specification, pharmacopoeial monograph, SOP or method-transfer protocol.
3.3 Key QC checks
- Chemical transformation coefficient (product/substrate ratio ≥10)
- Finished product moisture (≤15% for microbiological stability)
- Water-soluble extractives content (marker of boiling/soaking completeness)
- Organoleptic color assessment (Color Score ≥8/10)
- Organoleptic texture assessment (Texture Score ≥8/10)
- Raw Rehmannia (Sheng Di Huang) — cools blood, stops bleeding.
- Prepared Rehmannia (Shu Di Huang) — warms, nourishes Yin and Blood.
- These are TWO DIFFERENT MEDICINES. Processing error = prescription error.
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 | PaozhiMethod | string | Yes | Analytical method / condition metadata required for technical review. |
| 4 | MarkerOriginal_ppm | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 5 | MarkerTransformed_ppm | decimal | Yes | Classification used to select adaptive limits or rule set. |
| 6 | MoisturePercent | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 7 | ExtractivesPercent | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 8 | AshAcidInsolublePercent | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 9 | ColorScore | decimal | Yes | Input attribute required for deterministic rule evaluation and output traceability. |
| 10 | TextureScore | decimal | Yes | Input attribute required for deterministic rule evaluation and output traceability. |
4.3 Input data example
| BatchNumber | HerbName | PaozhiMethod | MarkerOriginal_ppm | MarkerTransformed_ppm | MoisturePercent | ExtractivesPercent | AshAcidInsolublePercent | ColorScore | TextureScore |
|---|---|---|---|---|---|---|---|---|---|
| TCM-REHMANNIA-PREP-2026-001 | Rehmanniae_Radix_Praeparata | Steamed_with_Wine | 50.0 | 850.0 | 12.5 | 68.0 | 0.8 | 9.5 | 9.0 |
| TCM-ASTRAGALUS-HONEY-2026-002 | Astragali_Radix_Praeparata | Honey_Fried | 120.0 | 450.0 | 10.0 | 35.0 | 1.2 | 8.5 | 8.8 |
| TCM-ACONITE-BOILED-FAIL-003 | Aconiti_Lateralis_Praeparata | Boiled | 400.0 | 120.0 | 18.0 | 25.0 | 2.5 | 6.0 | 5.5 |
| TCM-CORYDALIS-VINEGAR-2026-004 | Corydalis_Yanhusuo | Vinegar_Processed | 80.0 | 320.0 | 11.0 | 22.0 | 1.0 | 9.0 | 9.2 |
4.4 Output JSON
{
"utility": "TcmPaozhiProcessingComplianceChecker",
"runId": "urn:fuzkk:run:example",
"sourceFile": "input.csv",
"recordsProcessed": 4,
"overallStatus": "Pass / Review / Fail",
"records": [
{
"recordId": "TCM-REHMANNIA-PREP-2026-001",
"status": "Pass / Review / Fail",
"criticalFindings": [],
"warnings": [],
"evaluatedRules": [
"Configured acceptance criteria from the utility rule set"
],
"inputTrace": {
"BatchNumber": "TCM-REHMANNIA-PREP-2026-001",
"HerbName": "Rehmanniae_Radix_Praeparata",
"PaozhiMethod": "Steamed_with_Wine",
"MarkerOriginal_ppm": "50.0",
"MarkerTransformed_ppm": "850.0",
"MoisturePercent": "12.5",
"ExtractivesPercent": "68.0",
"AshAcidInsolublePercent": "0.8"
}
}
],
"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