TcmMicrobialLimitsAndPathogensQualityChecker
Tcm Microbial Limits And Pathogens
ℹ️ Utility checks microbiological purity of Traditional Chinese Medicine according to ChP 2020 and WHO guidelines:
• TAMC (Total Aerobic Microbial Count): ≤10^4 CFU/g (processed) / ≤10^5 CFU/g (raw)
• TYMC (Total Yeasts and Molds Count): ≤10^3 CFU/g (processed) / ≤10^4 CFU/g (raw)
• Escherichia coli: Absent in 1g
• Salmonella species: Absent in 10g
• Staphylococcus aureus: Absent in 1g
• Pseudomonas aeruginosa: Absent in 1g
• Bile-tolerant gram-negative bacteria: ≤10^2 CFU/g
⚠️ CRITICAL: Detection of any specified pathogens (Salmonella, E. coli) leads to immediate batch rejection!
High mold count may indicate presence of mycotoxins (aflatoxins, ochratoxin).
Usage:
TcmMicrobialLimitsAndPathogensQualityChecker.exe → demo mode (console output)
TcmMicrobialLimitsAndPathogensQualityChecker.exe input.csv output.json → evaluate your data
Input format:
BatchNumber,HerbName,PreparationType,TAMC_CFU_g,TYMC_CFU_g,EColi_CFU_g,Salmonella_CFU_g,StaphAureus_CFU_g,Pseudomonas_CFU_g,BileTolerantGramNeg_CFU_g
Example (0=Absent, >0=Present/Count):
TCM-GINSENG-2026-MIC-001,Panax_ginseng,Raw,5000.0,500.0,0,0,0,0,10.0
Supported product types:
• Raw — Unprocessed herbal raw material (higher limits allowed)
• Processed — Extracts, powders, granules for direct oral intake (strict limits)
• Topical — Preparations for external use (intermediate limits)
— WHY IS THIS NEEDED?
Microbiological safety is a fundamental requirement for TCM:
• Herbal raw materials contact soil and water, being natural carriers of microflora
• Improper drying and storage lead to mold growth and toxin production
• Pathogenic bacteria can cause severe infections in immunocompromised patients
• Compliance with ChP 2020 (Chapter 1105/1106) is mandatory for legal circulation
⚠️ CRITICAL:
• TAMC/TYMC — indicators of overall sanitation of production and storage conditions
• E. coli — marker of fecal contamination, unacceptable in oral preparations
• Salmonella — causative agent of severe foodborne illnesses, zero tolerance
• S. aureus — producer of enterotoxins, dangerous even in small amounts
• P. aeruginosa — opportunistic pathogen, resistant to many antibiotics
• Bile-tolerant bacteria — risk group for intestinal infections
Key features:
• Differentiated approach to limits for raw materials and finished products
• Check of full spectrum of specified pathogens per ChP
• Control of bile-tolerant microflora as additional hygiene marker
• Automatic PASS/FAIL status classification with detailed reasons
• LIMS/LabWare compatible format
Critical parameters:
• TAMC: ≤10,000 CFU/g (Processed) / ≤100,000 CFU/g (Raw)
• TYMC: ≤1,000 CFU/g (Processed) / ≤10,000 CFU/g (Raw)
• E. coli: Absent in 1g
• Salmonella: Absent in 10g
• S. aureus: Absent in 1g
• P. aeruginosa: Absent in 1g
• Bile-tolerant Gram-neg: ≤100 CFU/g
💡 Usage tips:
1. Sampling must be performed under aseptic conditions to avoid secondary contamination
2. Pre-decontamination (steam, EtO) is allowed for raw materials with high natural bioburden
3. If molds are detected, mycotoxin analysis is mandatory
4. Test methods must be validated for absence of antimicrobial activity of the sample
5. Regular environmental monitoring helps prevent limit exceedances
⚠️ Note: TCM microbiology is more complex than synthetic drugs due to natural origin of raw materials. It is important to distinguish between acceptable saprophytic flora and dangerous pathogens. The utility uses conservative limits for processed forms to guarantee end-consumer safety, even if pharmacopoeia allows relaxations for certain raw materials.
input.csv
BatchNumber,HerbName,PreparationType,TAMC_CFU_g,TYMC_CFU_g,EColi_CFU_g,Salmonella_CFU_g,StaphAureus_CFU_g,Pseudomonas_CFU_g,BileTolerantGramNeg_CFU_g TCM-GINSENG-2026-MIC-001,Panax_ginseng,Raw,5000.0,500.0,0,0,0,0,10.0 TCM-EXTRACT-2026-MIC-002,Astragalus_Extract,Processed,800.0,50.0,0,0,0,0,5.0 TCM-FAIL-SALMONELLA-003,Angelica_sinensis,Raw,12000.0,2000.0,0,1,0,0,150.0 TCM-FAIL-TAMC-004,Lycium_barbarum,Processed,15000.0,1500.0,5,0,0,0,200.0
TcmMicrobialLimitsAndPathogensQualityChecker — URS & FS
TCM Microbial Limits and Pathogens Quality Checker
TCM Microbial Limits and Pathogens Quality Checker
1. Назначение документа
Документ описывает пользовательские требования (URS) и функциональную спецификацию (FS) для утилиты TcmMicrobialLimitsAndPathogensQualityChecker. Утилита предназначена для детерминированной проверки данных 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, WHO, ICH. Финальные лимиты должны быть подтверждены утверждённой спецификацией, монографией, SOP или протоколом трансфера метода.
3.3 Ключевые QC-проверки
- TAMC (Общее число аэробных микроорганизмов): ≤10^4 КОЕ/г (обработанные) / ≤10^5 КОЕ/г (сырьё)
- TYMC (Дрожжи и плесени): ≤10^3 КОЕ/г (обработанные) / ≤10^4 КОЕ/г (сырьё)
- Escherichia coli: Отсутствие в 1 г
- Salmonella species: Отсутствие в 10 г
- Staphylococcus aureus: Отсутствие в 1 г
- Pseudomonas aeruginosa: Отсутствие в 1 г
- Желчетолерантные грамотрицательные бактерии: ≤10^2 КОЕ/г
- Raw — Необрабатываемое растительное сырьё (допускаются более высокие лимиты)
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 | PreparationType | string | Да | Классификация для выбора адаптивных лимитов или набора правил. |
| 4 | TAMC_CFU_g | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 5 | TYMC_CFU_g | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 6 | EColi_CFU_g | integer | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 7 | Salmonella_CFU_g | boolean | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 8 | StaphAureus_CFU_g | boolean | Да | Показатель pH для контроля качества и совместимости матрицы. |
| 9 | Pseudomonas_CFU_g | boolean | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 10 | BileTolerantGramNeg_CFU_g | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
4.3 Пример входных данных
| BatchNumber | HerbName | PreparationType | TAMC_CFU_g | TYMC_CFU_g | EColi_CFU_g | Salmonella_CFU_g | StaphAureus_CFU_g | Pseudomonas_CFU_g | BileTolerantGramNeg_CFU_g |
|---|---|---|---|---|---|---|---|---|---|
| TCM-GINSENG-2026-MIC-001 | Panax_ginseng | Raw | 5000.0 | 500.0 | 0 | 0 | 0 | 0 | 10.0 |
| TCM-EXTRACT-2026-MIC-002 | Astragalus_Extract | Processed | 800.0 | 50.0 | 0 | 0 | 0 | 0 | 5.0 |
| TCM-FAIL-SALMONELLA-003 | Angelica_sinensis | Raw | 12000.0 | 2000.0 | 0 | 1 | 0 | 0 | 150.0 |
| TCM-FAIL-TAMC-004 | Lycium_barbarum | Processed | 15000.0 | 1500.0 | 5 | 0 | 0 | 0 | 200.0 |
4.4 Выходной JSON
{
"utility": "TcmMicrobialLimitsAndPathogensQualityChecker",
"runId": "urn:fuzkk:run:example",
"sourceFile": "input.csv",
"recordsProcessed": 4,
"overallStatus": "Pass / Review / Fail",
"records": [
{
"recordId": "TCM-GINSENG-2026-MIC-001",
"status": "Pass / Review / Fail",
"criticalFindings": [],
"warnings": [],
"evaluatedRules": [
"Configured acceptance criteria from the utility rule set"
],
"inputTrace": {
"BatchNumber": "TCM-GINSENG-2026-MIC-001",
"HerbName": "Panax_ginseng",
"PreparationType": "Raw",
"TAMC_CFU_g": "5000.0",
"TYMC_CFU_g": "500.0",
"EColi_CFU_g": "0",
"Salmonella_CFU_g": "0",
"StaphAureus_CFU_g": "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 TcmMicrobialLimitsAndPathogensQualityChecker. 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, WHO, ICH. Final acceptance limits shall be confirmed by the approved specification, pharmacopoeial monograph, SOP or method-transfer protocol.
3.3 Key QC checks
- TAMC (Total Aerobic Microbial Count): ≤10^4 CFU/g (processed) / ≤10^5 CFU/g (raw)
- TYMC (Total Yeasts and Molds Count): ≤10^3 CFU/g (processed) / ≤10^4 CFU/g (raw)
- Escherichia coli: Absent in 1g
- Salmonella species: Absent in 10g
- Staphylococcus aureus: Absent in 1g
- Pseudomonas aeruginosa: Absent in 1g
- Bile-tolerant gram-negative bacteria: ≤10^2 CFU/g
- Raw — Unprocessed herbal raw material (higher limits allowed)
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 | PreparationType | string | Yes | Classification used to select adaptive limits or rule set. |
| 4 | TAMC_CFU_g | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 5 | TYMC_CFU_g | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 6 | EColi_CFU_g | integer | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 7 | Salmonella_CFU_g | boolean | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 8 | StaphAureus_CFU_g | boolean | Yes | pH-related measurement used for quality and matrix compatibility control. |
| 9 | Pseudomonas_CFU_g | boolean | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 10 | BileTolerantGramNeg_CFU_g | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
4.3 Input data example
| BatchNumber | HerbName | PreparationType | TAMC_CFU_g | TYMC_CFU_g | EColi_CFU_g | Salmonella_CFU_g | StaphAureus_CFU_g | Pseudomonas_CFU_g | BileTolerantGramNeg_CFU_g |
|---|---|---|---|---|---|---|---|---|---|
| TCM-GINSENG-2026-MIC-001 | Panax_ginseng | Raw | 5000.0 | 500.0 | 0 | 0 | 0 | 0 | 10.0 |
| TCM-EXTRACT-2026-MIC-002 | Astragalus_Extract | Processed | 800.0 | 50.0 | 0 | 0 | 0 | 0 | 5.0 |
| TCM-FAIL-SALMONELLA-003 | Angelica_sinensis | Raw | 12000.0 | 2000.0 | 0 | 1 | 0 | 0 | 150.0 |
| TCM-FAIL-TAMC-004 | Lycium_barbarum | Processed | 15000.0 | 1500.0 | 5 | 0 | 0 | 0 | 200.0 |
4.4 Output JSON
{
"utility": "TcmMicrobialLimitsAndPathogensQualityChecker",
"runId": "urn:fuzkk:run:example",
"sourceFile": "input.csv",
"recordsProcessed": 4,
"overallStatus": "Pass / Review / Fail",
"records": [
{
"recordId": "TCM-GINSENG-2026-MIC-001",
"status": "Pass / Review / Fail",
"criticalFindings": [],
"warnings": [],
"evaluatedRules": [
"Configured acceptance criteria from the utility rule set"
],
"inputTrace": {
"BatchNumber": "TCM-GINSENG-2026-MIC-001",
"HerbName": "Panax_ginseng",
"PreparationType": "Raw",
"TAMC_CFU_g": "5000.0",
"TYMC_CFU_g": "500.0",
"EColi_CFU_g": "0",
"Salmonella_CFU_g": "0",
"StaphAureus_CFU_g": "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