Looking for a book about a Psychiatric Patient with real powers

I'm looking for a novel about a psychiatric patient in an insane asylum who genuinely has superpowers/magic. For example 'seeing ghosts' ; 'seeing the future' ; 'being from another dimension' etc.

They're trying to prove they're not crazy and the doctor assigned to them is determined to prove they are delusional despite increasing evidence to the contrary.