import httpx def main(): client = httpx.Client(timeout=30.0) test_cases = [ ("Cardiology Test", "எனக்கு நெஞ்சு வலி மற்றும் மூச்சு திணறல் இருக்கு"), ("Dermatology Test", "தோல் அரிப்பு மற்றும் படை உள்ளது"), ("Orthopedics Test", "மூட்டு வலி நடக்க முடியல"), ("Neurology Test", "headache and dizziness for 3 days"), ("Gastroenterology Test", "வயிற்று வலி மற்றும் வாந்தி"), ("Pulmonology Test", "இருமல் மற்றும் சளி அதிகமாக உள்ளது"), ("ENT Test", "காது வலி மற்றும் தொண்டை வலி") ] print("=== AUTOMATIC SPECIALTY TRIAGE ENGINE TEST ===") for label, symptom in test_cases: start_res = client.post("http://127.0.0.1:8000/v1/voice-onboarding/start", json={ "patient": {"id": "PAT-AUTO", "first_name": "Arun", "last_name": "Kumar"}, "category": {"type": "general", "code": "general_medicine", "name": "General Medicine"}, "language": "ta-IN" }) sid = start_res.json()["session_id"] turn_res = client.post(f"http://127.0.0.1:8000/v1/voice-onboarding/{sid}/turn", data={"text_fallback": symptom}) spec = turn_res.json().get("suggested_specialty", {}) print(f"Label: {label}") print(f" Patient Symptom: '{symptom}'") print(f" --> Auto-Assigned Specialty: {spec.get('name')} (Code: {spec.get('code')})") print(f" --> Reasoning: {spec.get('reason')}\n") if __name__ == '__main__': main()