Both are correct, but we use them in different situations. Your choice of tense will depend on the context. Here are two examples:
"The patient has been diagnosed with pneumonia. He needs to be admitted to hospital immediately.""
This tells us about the present situation.
"The patient was diagnosed with pneumonia on 3rd March. The hospital refused to treat him and he died two days later."
This tells us about something which happened in the past.
I hope that helps.