Risk-graded Safety for Handling Medical Queries in Conversational AI