handle error messages in pact patient reports

http://manage.dimagi.com/default.asp?125872
Merge pull request #3971 from dimagi/pact-patient-fix

handle error messages in pact patient reports