Skip to content
Voorhees.json edited this page Oct 30, 2025 · 2 revisions

Screening Experience Overview

This page translates the product brief into a concrete walkthrough of the person screening flow. It connects the multilingual questionnaire to the scoring engine and the qualitative guidance the UI surfaces after each run.

Language → Methodology routing

Languages map directly to the diagnostic edition defined in src/config/methodologyRegistry.js:

  • ru and ja load the ICD-10 configuration.
  • en loads the ICD-11 configuration.
  • uk loads the DSM-5-TR configuration.

The presentation layer asks for a language first, then resolves a ConfigMethodology instance through MethodologyProvider, which caches the chosen methodology for subsequent calculations.

Questionnaire and response capture

Each methodology exposes categories, questions, and diagnostic labels via ConfigMethodology. The UI renders the questions grouped by category; when a respondent marks “yes”, we store true in the response map keyed by the question identifier. Category insights sum the positive answers to inform downstream guidance.

Diagnostic label scoring formula

ScreeningCalculator composes the scoring pipeline from four collaborating services:

  1. A WeightedScoreEngine that calculates label scores.
  2. A CategoryInsightBuilder that aggregates how many questions per category were answered positively.
  3. A ResultInsightBuilder that formats label-specific copy.
  4. A GuidanceInsightBuilder that chooses which fears, triggers, and irritants to display.

The weighted score engine implements the formula described in the brief:

  • Core questions contribute 1.0 point each; support questions contribute 0.5.
  • We count how many “impact/duration” questions were answered positively and increase the base score by 0.25 per hit, capped at a ×1.5 multiplier.
  • A label passes when the score meets or exceeds its threshold (defaults to 2.0) and at least two core questions are positive.
  • Labels are returned in descending score order, so the UI can highlight the strongest match while still listing comorbid candidates.

This mirrors the TЗ requirement of needing at least two matching core symptoms before surfacing a label, and aligns with the weighting table shared for the ICD/DSM adaptations.

Guidance derived from symptom matches

For every category where at least one question is positive, GuidanceInsightBuilder loads the translated guidance payload that was seeded from the canonical methodology documents. The payload contains three parallel lists:

  • Triggers – situations to avoid (e.g., substance-related cues for ICD-10 F10–F19).
  • Fears – themes likely to raise anxiety.
  • Irritants – other environmental factors we should monitor.

Because the guidance lookup only checks whether a category recorded any positive symptom, the advice is intentionally broad: we simply assume that any reported symptom in the category is enough to warrant surfacing the associated notes. This keeps the experience transparent and avoids overfitting the messaging to specific question IDs while still rooting the copy in the canonical “Triggers, Fears, and Irritants” tables.

Clone this wiki locally