Consolidate real cases report
Change get_request_data to get_request_params
Fix outgoing message graph
Factor out domain query
pep8
Merge pull request #4293 from dimagi/refactor-domain-query

Refactor domain query