Community Health Toolkit

Moving Household to new catchment areas moves only contacts and skips reports

I have tried to move households to a different catchment area, However upon investigating the downloaded docs I cannot see any of visits documents/reports, Is this the expected behavior or is there some issue that needs to be resolved?

I have used this command: cht move-contacts --url=<server-url> -- --contacts--<household-uuid> parent=<catchment_area_uuid>

I’m not entirely sure you pasted the exact command you used, but it appears you’re using an -- instead of an = when defining contacts:

cht move-contacts --url=<server-url> -- --contacts--<household-uuid> parent=<catchment_area_uuid>
vs
cht move-contacts --url=<server-url> -- --contacts=<household-uuid> parent=<catchment_area_uuid>

Indeed you should see all documents that should be moved, this includes the household, all of the household’s descendants (all levels) and all of their reports (if they require changes).

cht move-contacts --url=<server-url> -- --contacts=<household-uuid> --parent=<catchment_area_uuid> Is the command I used, sorry about the typos. All the contacts and descendants contacts are moved but their reports are not moved.

Then it might be possible that none of your reports need to be updated.

Reports hold references to two contacts (that are resolved internally):

  • a reference to the patient or place - which is just their uuid or short_code. This is not affected by move contacts. (this is either patient_id or fields.patient_id or fields.patient_uuid or fields.place_id).
  • a reference to the report’s submitter. This is saved in the contact field and has references to the submitter’s lineage. This is affected by move contacts.

If the submitter of your reports is not among the contacts that are being moved, it’s perfectly normal for none of the reports to require updates.
Could you please check if this is the case? Thanks!