"Secondary gains" is the term applied to the gains a person obtains through being ill or injured: through defining themselves by their diagnosis. These gains could be monetary, social, or personal.
On the surface it seems illogical to think that a person could obtain any gain from any diagnosis, and no professional medical provider would automatically assume that any patient would have any gain from a diagnosis. How could someone possibly benefit from never being able to get out of pain after an auto accident, or never be able to heal completely from a surgical procedure? It is rare for the mind to take this direction, and it is almost always on a subconscious level, at least at first, but it happens. Munchausen, and Munchausen by proxy are extreme examples of having secondary gain from a diagnosis.
What this looks like in the treatment room can be very subtle with most people. as a pain management therapist, I have seen patients use an illness to say "no" for her when she cannot say "no" herself to bosses, family, friends. Her diagnosis now gives her an out from all the business and service; an excuse to care for herself for once. I have seen patients use the diagnosis to punish and manipulate family for not serving her/him. The patient always gets more ill, or more in pain after doing a thing and then complains bitterly that "nobody else" would do it.. "and now just look at me". Patients who get out of work as a result of diagnosis find that others will pay their way, and they no longer really have to work, and the diagnosis is a very good "reason" to not work.
The most interesting secondary gain I have seen is when a patient actually begins to define him/herself by the diagnosis. Every aspect of this person's life will revolve around the diagnosis. It is the single most intense focus on any social media page, they usurp conversations to divert toward the diagnosis and how any subject involves the diagnosis. Often you will hear them say variations of, "well at least you don't have.... (fill in the blank, I have heard them all.)
This person will spend their time with me complaining about all the other medical professionals who have not helped them, who would not listen to them, who have fired them, etc. This person will reject any and all suggestions I make with a reason or two why that suggestion cannot work. this patient also makes it his/her mission to educate everyone, including doctors, nurses, therapists, the check out person at the sore... regarding the diagnosis and how much suffering it entails.
When a person has come to define himself/herself by a diagnosis, this entrenched mentality is very difficult to overcome, because none of us wants to lose our identity as such a loss creates quite a bit of internal chaos. The patient actually has the diagnosis, and it really is painful and often debilitating, so identifying and understanding the line between treating the diagnosis and enabling the mental illness becomes very difficult.