{
  "version": "1.0.0",
  "authority": "Medical AI Runtime",

  "safety_rules": {
    "red_flag_categories": [
      {
        "category": "cardiac",
        "priority": "critical",
        "symptoms": [
          "Chest Pain",
          "Left Arm Pain",
          "Dyspnea"
        ],
        "action": "emergency_escalation",
        "message": "Possible cardiac emergency detected."
      },
      {
        "category": "neurological",
        "priority": "critical",
        "symptoms": [
          "Slurred Speech",
          "Dizziness"
        ],
        "action": "emergency_escalation",
        "message": "Possible neurological emergency detected."
      },
      {
        "category": "mental_health",
        "priority": "critical",
        "symptoms": [
          "Suicidal Ideation"
        ],
        "action": "immediate_human_intervention",
        "message": "Mental health emergency detected."
      }
    ]
  },

  "symptom_normalization": [
    {
      "user_input": [
        "chest pain",
        "tight chest",
        "pressure in chest"
      ],
      "normalized_symptom": "Chest Pain",
      "icd10_code": "R07.9",
      "snomed_ct": "29857009",
      "questions": [
        {
          "content": "When did your chest pain start?"
        },
        {
          "content": "Was the pain sudden or gradual?"
        },
        {
          "content": "Does the pain spread to your arm?"
        }
      ]
    },

    {
      "user_input": [
        "shortness of breath",
        "difficulty breathing",
        "can't breathe"
      ],
      "normalized_symptom": "Dyspnea",
      "icd10_code": "R06.0",
      "snomed_ct": "267036007",
      "questions": [
        {
          "content": "When did your breathing difficulty begin?"
        },
        {
          "content": "Do you feel worse while walking?"
        }
      ]
    },

    {
      "user_input": [
        "headache",
        "migraine",
        "pain in head"
      ],
      "normalized_symptom": "Headache",
      "icd10_code": "R51",
      "snomed_ct": "25064002",
      "questions": [
        {
          "content": "When did the headache start?"
        },
        {
          "content": "How severe is the headache?"
        }
      ],
      "fallback_questions": [
      "Can you describe your symptoms in more detail?",
      "When did this start?",
      "Is it getting better or worse?"
    ]
    },

    {
      "user_input": [
        "fever",
        "high temperature",
        "hot body"
      ],
      "normalized_symptom": "Fever",
      "icd10_code": "R50.9",
      "snomed_ct": "386661006",
      "questions": [
        {
          "content": "How long have you had fever?"
        },
        {
          "content": "What is your highest temperature?"
        }
      ]
    },

    {
      "user_input": [
        "dizziness",
        "lightheaded",
        "vertigo"
      ],
      "normalized_symptom": "Dizziness",
      "icd10_code": "R42",
      "snomed_ct": "404640003",
      "questions": [
        {
          "content": "When did the dizziness begin?"
        },
        {
          "content": "Do you feel faint?"
        }
      ]
    },

    {
      "user_input": [
        "slurred speech",
        "mumbled words"
      ],
      "normalized_symptom": "Slurred Speech",
      "icd10_code": "R47.1",
      "snomed_ct": "419891008",
      "questions": [
        {
          "content": "When did the speech difficulty start?"
        }
      ]
    },

    {
      "user_input": [
        "suicidal thoughts",
        "want to die",
        "self harm"
      ],
      "normalized_symptom": "Suicidal Ideation",
      "icd10_code": "R45.851",
      "snomed_ct": "442587001",
      "questions": [
        {
          "content": "Are you currently safe?"
        }
      ]
    }
  ],

  "clinical_reasoning": {
    "conditions": [
      {
        "condition_name": "Myocardial Infarction",
        "icd10_code": "I21.9",
        "snomed_ct": "22298006",
        "associated_symptoms": [
          "Chest Pain",
          "Dyspnea"
        ],
        "severity_score": 10,
        "risk_category": "critical",
        "action": "emergency_escalation",
        "explanation_template": "Symptoms {symptoms_detected} may indicate cardiac emergency."
      },

      {
        "condition_name": "Stroke",
        "icd10_code": "I63.9",
        "snomed_ct": "230690007",
        "associated_symptoms": [
          "Slurred Speech",
          "Dizziness"
        ],
        "severity_score": 10,
        "risk_category": "critical",
        "action": "emergency_escalation",
        "explanation_template": "Symptoms {symptoms_detected} may indicate stroke."
      },

      {
        "condition_name": "Migraine",
        "icd10_code": "G43.9",
        "snomed_ct": "37796009",
        "associated_symptoms": [
          "Headache"
        ],
        "severity_score": 4,
        "risk_category": "moderate",
        "action": "normal_review",
        "explanation_template": "Symptoms {symptoms_detected} may indicate migraine."
      },

      {
        "condition_name": "Common Viral Illness",
        "icd10_code": "B34.9",
        "snomed_ct": "34014006",
        "associated_symptoms": [
          "Fever"
        ],
        "severity_score": 2,
        "risk_category": "low",
        "action": "normal_review",
        "explanation_template": "Symptoms {symptoms_detected} suggest viral illness."
      }
    ]
  }
}