The Bradford Heart Support Group recently gave money to buy new machines which will measure the blood oxygen levels of all newborn babies at Bradford Teaching Hospitals NHS Foundation Trust.
Consultant neonatologist Sam Oddie said: "These pulse oximeters will allow us to detect heart disease before any clinical signs make its presence obvious.
"This should result in fewer babies getting very ill with congenital heart disease and so improve their chances of survival with a good quality of life.
"Congenital heart disease is rare (about 6 cases per 1000 live births) and while this test will only identify a proportion of these cases, it should find those who will benefit most from early diagnosis."
Midwives will apply a probe to the foot of every baby born at the hospital and all those newborns with abnormal results will be investigated thoroughly.
"If the babies are ill, or have congenital heart disease, this will be explained to their families, and appropriate treatment given," added Dr Oddie.
"But we'd like to say a big thank you to all the Bradford Heart Support Group volunteers who raised this money as it is very gratefully received."
The 4,000 for the new machines was raised in a number of ways by the group including book stalls, raffles and sponsored events.
Bradford Heart Support Group honorary treasurer Alan Sykes said he was delighted to see the practice up and running in the maternity unit.
Mr Sykes said: "Bradford Heart Support Group works incredibly hard to raise money to fund cardiac equipment and give support to heart patients throughout the city.
"We also receive occasional donations made in memory of a deceased heart patient which are so vital to helping us buy equipment like this and without these funds we would not be able to help the hospital in this way."
The group has made numerous donations to the infirmary.
"If any little lives can be saved through the use of this heart machine in the neo-natal unit then all the volunteers will be very pleased," added Mr Sykes.