fix formatting in api for fields in complex fixtures
fix cloudcare 500 resulting from mistakenly looking up referral details
Merge pull request #3726 from dimagi/cloudcare-hotfix

fix cloudcare 500 resulting from mistakenly looking up referral details
Merge pull request #3720 from dimagi/fix-complex-fixtures-api

fix formatting in api for fields in complex fixtures
hide empty groups in beautiful forms

this code was added during debugging for another fix
which ended up making its way into the commit (4b1478e2)

modify test to reflect the fix
improve readability of test output with assertJSONEqual