What would you think of a blue bump on the palm of your hand that pulsated in time with your heart beat? As a 27-year-old man recently found out, it can be the sign of a potentially life-threatening heart infection.

It had started out as an innocuous red swelling, but over the course of two weeks became a raised blue bump that was sore to the touch. Add abdominal pain in the left upper quadrant and you can see why the man took a trip to the emergency department.

As a team of doctors notes in the case study, the patient had been feeling ill for six weeks with fevers, a loss of appetite, a weight decrease of 12 kg (26.5 lbs), and night sweats.

After blood samples detected the bacteria Streptococcus salivarius, antibiotics were prescribed. But further scans revealed the scary diagnosis of bacterial endocarditis – a bacterial infection that settles in the heart valves or lining.

Because blood doesn't flow directly into the valves of the heart, the body's usual immune defences can't fight infections there – and in the worst case scenarios, the condition can be fatal.

Thankfully, in this case the doctors caught it in time, working out that an infected mass had collected on the aortic valve, which regulates the flow of blood from the heart into the aorta.

As Live Science reports, the infection then spread to his blood, resulting in the weird-looking mutation on the man's hand – an oversized blood vessel or aneurysm.

And how did the bacteria take hold in the first place? The infection "was possibly related to poor oral hygiene and a recent dental procedure", according to doctors.

The man ended up having heart surgery - an aortic valve replacement - followed by a six-week course of the antibiotic ceftriaxone. That seemed to do the trick – the fevers and night sweats subsided within a couple of days.

It's another example of the fine work that healthcare professionals do all across the world in diagnosing problems and treating them promptly, a process that's now getting sped up with the introduction of artificial intelligence.

Of course while we know deep down that doctors are the experts, many of us still like to diagnose ourselves with all kinds of problems and ailments. Just remember if your palm goes blue and starts pulsating – it's best to get that checked out.

The case study was published in The New England Journal of Medicine.