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