optimization for bulk history upload
make the psi reports cacheable
Merge pull request #386 from dimagi/psi

more psi optimizations