People with hypochondria do not have a need for attention. People with hypochondria (also known as health anxiety and illness anxiety disorder) have the belief that they have a serious medical illness, despite doctors and medical tests saying otherwise. They do not fake symptoms to gain your attention- they are in real distress and your invalidating, unhelpful, and inconsiderate comments and behaviors only serve to make their distress and suffering worse.
Certainly, people with hypochondria do not have an underlying medical illness, but their distress and suffering are real. But this is a mental and psychological condition. So I ask you, how do you deal with someone who has depression or anxiety? Do you tell them nothing is wrong and tell them to not see you again or to get more medical tests? Of course not- you treat them with care, consideration, and empathy.
Dealing with people with hypochondria is not any different- they need your care, consideration, and empathy. If you as a health care professional do not agree with this, then maybe you should consider another line of work. Health care professionals are in the business of helping people, not making them worse.