Medical Triage Rules Engine (triage/triage-rules.ts)

nitrostack · sample-apps/Agentic-Bridge/nitrostack-main/sample-apps/Zerogravity/src/modules/triage/triage-rules.ts · typescript · Apache-2.0
automation, tag:triage, tag:healthcare, tag:severity-scoring, tag:decision-logic

Defines red-flag keywords, severity weights, and urgency thresholds for medical triage scoring; reuse as the single source of truth for triage decision logic.

// Source: https://github.com/nitrocloudofficial/nitrostack | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Triage Rules Engine
 * 
 * Defines red flags, their severity weights, and urgency thresholds.
 * This is the single source of truth for triage decision logic.
 * Adjust severity values (0-1 scale) to tune urgency scoring.
 */

export interface RedFlag {
  id: string;
  keywords: string[];
  severity: number; // 0-1 scale: 0 = low, 1 = emergency
  category: 'cardiac' | 'respiratory' | 'neurological' | 'hemorrhage' | 'trauma' | 'metabolic' | 'infectious' | 'other';
  description: string;
}

export const RED_FLAGS: RedFlag[] = [
  // CARDIAC EMERGENCIES
  {
    id: 'ches

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key