ระบบนี้เป็นเครื่องมือช่วยตัดสินใจทางคลินิก ไม่ใช้แทนดุลยพินิจของแพทย์·This system is a clinical decision support tool and does not replace clinician judgment. Research prototype — not a medical device, not for autonomous diagnosis.

How the AI Works

Eight transparent stages from symptom intake to expert validation. The prototype intentionally uses rule-based logic so that every recommendation is auditable.

  1. 1. Symptom input

    Clinicians enter standardized features — erythema severity, diffuse redness, scaling, pustules, BSA %, itching, burning, joint pain, fever, pregnancy, herbal allergy history. Fields map to the project's ML feature schema for downstream reproducibility.

  2. 2. Rule-based syndrome prediction

    A deterministic rule engine maps symptom combinations to TTM syndrome IDs (e.g. wind-heat, blood-heat, blood-deficiency-wind-dryness). Output includes a syndrome ID, risk level, referral label, confidence score, and human-readable reasoning text. No opaque ML in the prototype.

  3. 3. Knowledge base lookup

    The predicted syndrome ID keys into curated tables — explainability_traces, therapeutic_directions, clinical_safety_rules, and knowledge_consensus. The Evidence Panel renders the supporting evidence with source IDs and citation context.

  4. 4. Clinical safety rules

    clinical_safety_rules entries trigger before therapeutic display. Rules can escalate referral level (e.g. urgent_referral), block suggestions, or require expert review — for fever, pustular presentation, pregnancy, or extensive BSA.

  5. 5. Explainability traces

    Each prediction shows the trace path: input trigger → symptom → element → pathogenesis → syndrome → therapeutic direction → safety rule → final action — with Thai-language explanation and an evidence_source_id citation.

  6. 6. Consensus evidence

    knowledge_consensus indicates whether multiple sources agree on the interpretation. Levels render as high (green), medium (yellow), or low (red), and flag when expert review is recommended.

  7. 7. Clinician override

    The clinician can agree, modify, or override. Disagreement is captured with a rationale, the clinician's syndrome opinion, and an optional urgent-referral safety flag — stored to clinician_observations for audit. The clinician's decision is final.

  8. 8. Validation workflow

    Expert reviewers rate each case on five 1–5 dimensions: clinical usefulness, explanation clarity, safety appropriateness, evidence trustworthiness, and workflow usability — stored to expert_validations and summarized on the Research page.

Why rule-based? For a thesis prototype, every output must be explainable to clinicians and reviewers. Rule-based logic, paired with curated knowledge tables, provides traceable reasoning without the opacity of black-box models — while leaving the door open for future ML integration via the documented ml_feature_schema.