Is it appropriate for any health care provider (pneuropsychologist) to ask the patient if he/she had a sexual relationship with a specific person?

If it is context. Questions regarding sexuality, that may include perferencex, number of partners or whether risky behavior occurs are all appropriate questions in the right clinical context. When you Doctor is asking you questions, they are usually to help get a complete picture of the patient in order to anticipate medical problems that might arise or to assess risk facts that need addressed.