Ibn al-Nafis was the first to correctly describe the anatomy of the heart and lungs, and the way the blood flows through the heart. He is credited with the discovery of pulmonary circulation. As a result, though he studied law, literature, and theology, as well as medicine, he is considered to have made his major contribution in medicine.
Ibn al-Nafis (fully, Ala-al-Din Abu al-Hasan Ali Ibn Abi al-Hazm al-Nafis al-Qarshi al-Misri al-Shafi-i al-Damashqi) was born in a town near Damascus and studied medicine in Damascus, but spent most of his medical career in Cairo. He wrote commentaries on the medical writings of earlier Greek (e.g. of Hippocrates and Galen) and Islamic doctors. His discovery of circulation is detailed in Sharah Tashrih al Qanun (or Mujaz al-Qanun), a commentary on the work of Ibn Sina (known to the West as Avicenna).
Some of Ibn al-Nafis's original writings include a book on the effects of diet and health, entitled Kitab al-Mukhtar fi al-Aghdhiya, and a work (Al-Shamil fi al-Tibb) which was designed to be a comprehensive, 300-volume medical encyclopedia, of which only 80 volumes were finished.
Some of his work was finally translated into Latin in 1547, but it did not really become known in the West until after it was translated into German in 1924.