AyurPolyherbalRatioVerificationChecker
Ayur Polyherbal Ratio Verification
ℹ️ Utility verifies accuracy of formulation proportions in polyherbal Ayurvedic formulas through quantitative analysis of unique markers for each component:
• Quantitative determination of specific marker for each plant in mixture
• Calculation of actual component proportion accounting for reference marker content
• Proportion normalization relative to target formula
• Deviation from declared ratio (%)
• Adaptive tolerance (default ±15%, configurable)
• Support for 2–3 components in single test
⚠️ WHY THIS IS NOT COVERED BY PH.EUR./BHP/USP:
Western pharmacopoeias verify IDENTIFICATION (presence) and TOTAL CONTENT of markers.
They DO NOT verify RATIOS between components of polyherbal mixtures.
In Ayurveda, ratio is a THERAPEUTIC PARAMETER:
• Triphala = Amalaki:Bibhitaki:Haritaki strictly 1:1:1
• Sitopaladi = Vanshlochan:Pippali:Ela:Tvacha:Nagakeshar = 4:2:1:1:1
• Dashamula = 10 roots in equal parts
Ratio violation changes pharmacological action of the formula.
Manufacturer may save on expensive component (Amalaki, Vanshlochan)
and compensate mass with cheap one (Haritaki, Pippali).
HPLC fingerprint will show presence of all species but WILL NOT detect ratio substitution.
Usage:
AyurPolyherbalRatioVerificationChecker.exe → demo mode
AyurPolyherbalRatioVerificationChecker.exe input.csv output.json → evaluate data
Input format:
Batch,Product,Comp1_Name,Comp1_Marker%,Comp1_Ref%,Comp1_Target,Comp2_Name,Comp2_Marker%,Comp2_Ref%,Comp2_Target,[Comp3_Name,Comp3_Marker%,Comp3_Ref%,Comp3_Target],[MaxDev%]
Example (Triphala 1:1:1, tolerance ±15%):
AYUR-001,Triphala,Amalaki,2.8,3.0,1.0,Bibhitaki,1.9,2.0,1.0,Haritaki,2.7,3.0,1.0,15.0
— CALCULATION METHODOLOGY:
1. Unique marker content measured for each component (HPLC/GC)
2. Actual proportion = (Measured marker / Reference marker in pure raw material) × Target proportion
3. Normalization: all actual proportions scaled so their sum = sum of target proportions
4. Deviation = |Actual proportion − Target proportion| / Target proportion × 100%
5. PASS if deviation ≤ tolerance threshold for ALL components
— MARKER REQUIREMENTS:
• Marker must be UNIQUE to given component (not present in others)
• Reference marker content in pure raw material must be pre-established
• Marker must be stable during processing (drying, grinding, mixing)
• Recommended markers:
Amalaki → Gallic acid / Emblicanin
Bibhitaki → Chebulagic acid / Bellericanin
Haritaki → Chebulinic acid
Vanshlochan → Silica content / Bambusae extractive
Pippali → Piperine
Ela → 1,8-Cineole
💡 Usage tips:
1. Reference marker values (Ref%) must be established on verified raw materials
2. Use internal standards to compensate for sample preparation losses
3. For mixtures >3 components, extend CSV and logic (or split into sub-tests)
4. Tolerance ±15% suitable for most churna; for extracts may be ±20%
5. Track deviation trends: systematic drift of one component = dosing problem
6. Correlate with TcmFingerprintConsistencyQualityChecker for comprehensive verification
⚠️ Note: This utility closes a critical gap in quality control of polyherbal
traditional preparations. No Western pharmacopoeia requires verification of
formulation proportions. In Ayurveda, proportion is not just technology but part
of therapeutic concept (Yoga). This utility translates this concept into
quantitative GMP control language, protecting patients from economically motivated
composition adulteration.
input.csv
BatchNumber,ProductName,Component1_Name,Component1_MarkerPercent,Component1_RefMarkerPercent,Component1_TargetRatio,Component2_Name,Component2_MarkerPercent,Component2_RefMarkerPercent,Component2_TargetRatio,Component3_Name,Component3_MarkerPercent,Component3_RefMarkerPercent,Component3_TargetRatio,MaxAllowedDeviation_Percent AYUR-TRIPHALA-OK-2026-001,Triphala_Churna,Amalaki,2.8,3.0,1.0,Bibhitaki,1.9,2.0,1.0,Haritaki,2.7,3.0,1.0,15.0 AYUR-DASHAMULA-2026-002,Dashamula_Churna,Bilva,1.2,1.5,1.0,Agnimantha,0.9,1.0,1.0,,,,,,,,15.0 AYUR-TRIPHALA-FAIL-2026-003,Triphala_Churna,Amalaki,1.5,3.0,1.0,Bibhitaki,2.0,2.0,1.0,Haritaki,3.0,3.0,1.0,15.0 AYUR-SITOPALADI-2026-004,Sitopaladi_Churna,Vanshlochan,15.0,20.0,4.0,Pippali,3.5,5.0,2.0,Ela,0.8,1.0,1.0,20.0
AyurPolyherbalRatioVerificationChecker — URS & FS
Ayur Polyherbal Ratio Verification Checker
Ayur Polyherbal Ratio Verification Checker
1. Назначение документа
Документ описывает пользовательские требования (URS) и функциональную спецификацию (FS) для утилиты AyurPolyherbalRatioVerificationChecker. Утилита предназначена для детерминированной проверки данных input.csv, формирования структурированного результата output.json и поддержки прослеживаемого QA/QC review.
Документ является проектной URS/FS-основой для CSV/CSA, IQ/OQ/PQ и дальнейшей валидации в контексте конкретной лабораторной процедуры.
2. Исходное описание утилиты
3. URS — пользовательские требования
3.1 Цель и область применения
Система должна принимать табличные результаты лабораторного контроля, выполнять проверку по заранее заданным критериям и возвращать понятный статус по каждой серии/записи: Pass, Review или Fail.
3.2 Нормативная / методическая база
В исходном описании и правилах утилиты используются следующие ориентиры: USP, EP, Ph.Eur, Ph.Eur., BHP, EMA, GMP. Финальные лимиты должны быть подтверждены утверждённой спецификацией, монографией, SOP или протоколом трансфера метода.
3.3 Ключевые QC-проверки
- Количественное определение специфического маркера каждого растения в смеси
- Расчёт фактической доли компонента с учётом эталонного содержания маркера
- Нормализация пропорций относительно целевой формулы
- Отклонение от заявленного соотношения (%)
- Адаптивный допуск (по умолчанию ±15%, настраивается)
- Поддержка 2–3 компонентов в одном тесте
- Трифала = Amalaki:Bibhitaki:Haritaki строго 1:1:1
- Sitopaladi = Vanshlochan:Pippali:Ela:Tvacha:Nagakeshar = 4:2:1:1:1
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 | Component1_Name | string | Да | Идентичность продукта, препарата или образца. |
| 4 | Component1_MarkerPercent | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 5 | Component1_RefMarkerPercent | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 6 | Component1_TargetRatio | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 7 | Component2_Name | string | Да | Идентичность продукта, препарата или образца. |
| 8 | Component2_MarkerPercent | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 9 | Component2_RefMarkerPercent | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 10 | Component2_TargetRatio | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 11 | Component3_Name | string | Да | Идентичность продукта, препарата или образца. |
| 12 | Component3_MarkerPercent | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 13 | Component3_RefMarkerPercent | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 14 | Component3_TargetRatio | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
| 15 | MaxAllowedDeviation_Percent | decimal | Да | Измеренный аналитический результат для сравнения с критерием приемлемости. |
4.3 Пример входных данных
| BatchNumber | ProductName | Component1_Name | Component1_MarkerPercent | Component1_RefMarkerPercent | Component1_TargetRatio | Component2_Name | Component2_MarkerPercent | Component2_RefMarkerPercent | Component2_TargetRatio | Component3_Name | Component3_MarkerPercent | Component3_RefMarkerPercent | Component3_TargetRatio | MaxAllowedDeviation_Percent |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| AYUR-TRIPHALA-OK-2026-001 | Triphala_Churna | Amalaki | 2.8 | 3.0 | 1.0 | Bibhitaki | 1.9 | 2.0 | 1.0 | Haritaki | 2.7 | 3.0 | 1.0 | 15.0 |
| AYUR-DASHAMULA-2026-002 | Dashamula_Churna | Bilva | 1.2 | 1.5 | 1.0 | Agnimantha | 0.9 | 1.0 | 1.0 | |||||
| AYUR-TRIPHALA-FAIL-2026-003 | Triphala_Churna | Amalaki | 1.5 | 3.0 | 1.0 | Bibhitaki | 2.0 | 2.0 | 1.0 | Haritaki | 3.0 | 3.0 | 1.0 | 15.0 |
| AYUR-SITOPALADI-2026-004 | Sitopaladi_Churna | Vanshlochan | 15.0 | 20.0 | 4.0 | Pippali | 3.5 | 5.0 | 2.0 | Ela | 0.8 | 1.0 | 1.0 | 20.0 |
4.4 Выходной JSON
{
"utility": "AyurPolyherbalRatioVerificationChecker",
"runId": "urn:fuzkk:run:example",
"sourceFile": "input.csv",
"recordsProcessed": 4,
"overallStatus": "Pass / Review / Fail",
"records": [
{
"recordId": "AYUR-TRIPHALA-OK-2026-001",
"status": "Pass / Review / Fail",
"criticalFindings": [],
"warnings": [],
"evaluatedRules": [
"Configured acceptance criteria from the utility rule set"
],
"inputTrace": {
"BatchNumber": "AYUR-TRIPHALA-OK-2026-001",
"ProductName": "Triphala_Churna",
"Component1_Name": "Amalaki",
"Component1_MarkerPercent": "2.8",
"Component1_RefMarkerPercent": "3.0",
"Component1_TargetRatio": "1.0",
"Component2_Name": "Bibhitaki",
"Component2_MarkerPercent": "1.9"
}
}
],
"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 AyurPolyherbalRatioVerificationChecker. 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: USP, EP, Ph.Eur, Ph.Eur., BHP, EMA, GMP. Final acceptance limits shall be confirmed by the approved specification, pharmacopoeial monograph, SOP or method-transfer protocol.
3.3 Key QC checks
- Quantitative determination of specific marker for each plant in mixture
- Calculation of actual component proportion accounting for reference marker content
- Proportion normalization relative to target formula
- Deviation from declared ratio (%)
- Adaptive tolerance (default ±15%, configurable)
- Support for 2–3 components in single test
- Triphala = Amalaki:Bibhitaki:Haritaki strictly 1:1:1
- Sitopaladi = Vanshlochan:Pippali:Ela:Tvacha:Nagakeshar = 4:2:1:1:1
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 | Component1_Name | string | Yes | Product, preparation or sample identity. |
| 4 | Component1_MarkerPercent | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 5 | Component1_RefMarkerPercent | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 6 | Component1_TargetRatio | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 7 | Component2_Name | string | Yes | Product, preparation or sample identity. |
| 8 | Component2_MarkerPercent | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 9 | Component2_RefMarkerPercent | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 10 | Component2_TargetRatio | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 11 | Component3_Name | string | Yes | Product, preparation or sample identity. |
| 12 | Component3_MarkerPercent | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 13 | Component3_RefMarkerPercent | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 14 | Component3_TargetRatio | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
| 15 | MaxAllowedDeviation_Percent | decimal | Yes | Measured analytical result compared with the configured acceptance criterion. |
4.3 Input data example
| BatchNumber | ProductName | Component1_Name | Component1_MarkerPercent | Component1_RefMarkerPercent | Component1_TargetRatio | Component2_Name | Component2_MarkerPercent | Component2_RefMarkerPercent | Component2_TargetRatio | Component3_Name | Component3_MarkerPercent | Component3_RefMarkerPercent | Component3_TargetRatio | MaxAllowedDeviation_Percent |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| AYUR-TRIPHALA-OK-2026-001 | Triphala_Churna | Amalaki | 2.8 | 3.0 | 1.0 | Bibhitaki | 1.9 | 2.0 | 1.0 | Haritaki | 2.7 | 3.0 | 1.0 | 15.0 |
| AYUR-DASHAMULA-2026-002 | Dashamula_Churna | Bilva | 1.2 | 1.5 | 1.0 | Agnimantha | 0.9 | 1.0 | 1.0 | |||||
| AYUR-TRIPHALA-FAIL-2026-003 | Triphala_Churna | Amalaki | 1.5 | 3.0 | 1.0 | Bibhitaki | 2.0 | 2.0 | 1.0 | Haritaki | 3.0 | 3.0 | 1.0 | 15.0 |
| AYUR-SITOPALADI-2026-004 | Sitopaladi_Churna | Vanshlochan | 15.0 | 20.0 | 4.0 | Pippali | 3.5 | 5.0 | 2.0 | Ela | 0.8 | 1.0 | 1.0 | 20.0 |
4.4 Output JSON
{
"utility": "AyurPolyherbalRatioVerificationChecker",
"runId": "urn:fuzkk:run:example",
"sourceFile": "input.csv",
"recordsProcessed": 4,
"overallStatus": "Pass / Review / Fail",
"records": [
{
"recordId": "AYUR-TRIPHALA-OK-2026-001",
"status": "Pass / Review / Fail",
"criticalFindings": [],
"warnings": [],
"evaluatedRules": [
"Configured acceptance criteria from the utility rule set"
],
"inputTrace": {
"BatchNumber": "AYUR-TRIPHALA-OK-2026-001",
"ProductName": "Triphala_Churna",
"Component1_Name": "Amalaki",
"Component1_MarkerPercent": "2.8",
"Component1_RefMarkerPercent": "3.0",
"Component1_TargetRatio": "1.0",
"Component2_Name": "Bibhitaki",
"Component2_MarkerPercent": "1.9"
}
}
],
"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
Ayurveda QC Suite
QC utility package for Ayurvedic products, botanical raw materials, Bhasma/Rasa Shastra, fermented preparations, lipid matrices and finished products.
Open