output from here is quite similar to https://github.com/dimagi/commcare-hq/blob/master/corehq/apps/commtrack/resources/v0_1.py#L38