def priority_score(text): urgent_keywords = ["emergency", "urgent", "severe", "immediate", "pain", "critical"] score = sum(1 for word in text.lower().split() if word in urgent_keywords) return "High" if score > 1 else "Medium" if score == 1 else "Low"