The protoporphyrin test is used to diagnose blood abnormalities caused by lead. The test can indicate lead exposure or lead poisoning.