Patient_id not populated when form started just after patient creation in 4.21

Step to reproduce:

  • create a patient
  • once created, stay on the patient page (no reload) and start a form
  • on the report tab the report the CHW name appears instead for the patient name and the field report.form_name.patient_id is empty

What can I do to solve that ? is it a known issue ?

Hi @delcroip

The patient_id field is added by a sentinel transition. This operation happens on the server, and depending on the sentinel queue, there could be some delay until the field gets populated.

So this is expected. The workaround is to populate the patient_uuid field in the form as well, using the _id field of the patient document. The CHT will fall back to that value to determine the patient if patient_id is empty.

1 Like

Please check the documentation about how you can link reports to contacts: Database schema conventions | Community Health Toolkit