Your question shows that you're mixing up sentence tenses with sentence voices. It's a bit complicated, but let me try to explain.
I have done ... - in this sentence, to do is the verb. The tense is present perfect.
I have been ... - in this sentence, to be is the verb. The tense is also present perfect.
I have been doing ... - in this sentence, to do is the verb. The tense is present perfect continuous.
I have been being ... - this sentence is extremely unlikely, but technically speaking, to be is the verb (being). Again, the tense is present perfect continuous.
All four of the above examples are in the active voice. Simplified, this means the subject (the "I") is at the start of the sentence. A couple more active sentences are:
"I ate the cake" (past simple) and "I have eaten the cake" (present perfect).
OK, so let's change the last two examples into passive voice. We get: "The cake was eaten by me" (past simple) and "The cake has been eaten by me" (present perfect). By the way, the second sentence has the same tense as in your "Has he been discharged from the hospital?" example.
You'll notice there is no -ING after the word "been" here. A passive sentence doesn't say "has been eatING", but rather "has been eatEN"!
So the -ING has nothing to do with a PASSIVE sentence in the present perfect, like "The cake has been eaten...".
The -ING is only in an ACTIVE sentence, and here are two more examples: "The cake has been eating..." and "He has been discharging...". Both of these are present perfect continous, and hopefully you'll never have to experience a cake that has been eating something or a person who has been discharging something in your life.
A little thing which might help is to ask yourself whether you're looking at a verb or an adjective. The following examples cover active and passive voices, as well as present perfect and present perfect continous tenses: "She has been hungry since this morning", "She has eaten her lunch", "She has been eating snacks all day", "Her lunch has eaten her", "An anaconda has eaten her", "An anaconda has been eaten by her", "Her lunch has been finished".
If you can say which sentences are active and which are passive, as well as which are present perfect and which are present perfect continuous, and finally, if you can recognize which are verbs and which are adjectives, then you understand!