How can the data transition be achieved?

HI Team, I’m concerned about three situations and I’d like to find some solutions:

  1. we have a household with its members, and there can’t be just one caregiver in the household. If the caregiver enrolment form is completed for one member of the household, it should no longer appear for the other members of the household, except in the event of the caregiver’s death.
  2. The caregiver’s telephone number is recorded on the enrolment form. Can we update a contact’s details from an app form?
  3. We have an action form completed by the supervisor and we need to transfer the data from this form to an action form for patients in his area. Is this possible? If so, how do we go about it?
1 Like

To add more context.

  • The idea is to have a new form that allows the CHW to register who is the caregiver in a household, including their phone number. (PS: The caregiver is not guaranteed to be the primary contact in the household).
  • Once the caregiver and their number has been recorded, the goal is to send them an sms when a danger sign is noted on submission of a u5_assessment form for a child in the same household.

As such, the challenge is how does submission of the u5_assessment form trigger sending an sms to the phone number linked to the caregiver of the household ?

Hi @Ben_Kiarie and @Justinho

I believe you can use linked_docs to achieve this: Ability to configure SMS sending to other contacts that aren't the primary contact · Issue #5817 · medic/cht-core · GitHub

This is how you would get access to the linked contact from your report: app_settings.json – Community Health Toolkit

I’m imagining you would change your household registration form to have the linked_docs property - you can build this in your form in any way that you like, it’s just the end format that matters, which is described here: Database document hydration – Community Health Toolkit

And then all of your linked_docs will be hydrated within your SMS context and you will have access to your not-primary contact.

This feature was added specifically to address cases like this, albeit how rare they are.

2 Likes

Time to try it out and report back. Thank you Diana.

2 Likes

Hi @diana I have a clarification question.

We created a new nutrition_messages_enrollement form that captures the caregiver’s phone number.

When you mention changing the household registration form to have linked_docs property does that refer to the new nutrition_messages_enrollement form or the existing household registration for adding users to the household?

I was trying to get the nutrition_messages_enrollement form to “hydrate” the existing household doc. But now I think I may have understood something incorrectly.

It seems like we need to update the existing household doc with a linked_docs field, such that when the nutrition_messages_enrollement form is submitted, we hydrate a household doc with the content from the nutrition_messages_enrollement doc.

is that correct ?

I am not sure I follow what these forms are.
linked_docs works for contact forms because the form allows you to add base properties to the contact doc, whereas in reports, all of your form values go into doc.fields.

nutrition_messages_enrollement is an app form that captures name of caregiver and their phone number.

It’s a simple form

{
  "_id": "8d8bbd94-0da9-4df7-9dcf-1c9b4b6b1c66",
  "_rev": "1-58f1300c7ad19adaa0b0e340a1fbd99b",
  "form": "nutrition_messages_enrollement_doc",
  "type": "data_record",
  "created_from": "eb3979ce-ed68-4a3c-8fcb-6597b046a98d",
  "content_type": "xml",
  "contact": {
    "parent_id": "0d14717b-e58d-4829-9d3f-1813d4587802"
  },
  "fields": {
    "place_id": "74aff231-ef6c-4a42-8c11-2316657421fa",
    "out": {
      "caregiver_id": "7c55729a-f08d-4a28-b98e-4814764923d0",
      "caregiver_name": "Wife   One",
      "caregiver_gender": "female",
      "caregiver_date_of_birth": "2000-05-16",
      "c_caregiver_receive_message": "yes",
      "c_mobile_service": "safaricom",
      "c_other_mobile_service": "",
      "c_cg_phone": "0718345346",
      "c_cg_sms_language": "english"
    }
  },
  "reported_date": 1747825781903,
  "geolocation_log": [
    {
      "timestamp": 1747825781913,
      "recording": {
        "code": 1,
        "message": "User denied Geolocation"
      }
    }
  ],
  "geolocation": {
    "code": 1,
    "message": "User denied Geolocation"
  }
}

I understand. linked_docs can be added to contacts.
What was the purpose of this form nutrition_messages_enrollement? I understand what information it stores, but how was it envisioned that this information would be accessible somewhere else?

  • The idea is to have a new form that allows the CHW to register who is the caregiver in a household, including their phone number. (PS: The caregiver is not guaranteed to be the primary contact in the household).
  • Once the caregiver and their number has been recorded, the goal is to send them an sms when a danger sign is noted on submission of a u5_assessment form for a child in the same household.

Can this logic be changed to:

  • have the user edit the household to select a new contact as the caregiver instead?

“but how was it envisioned that this information would be accessible somewhere else?”

  • That’s the challenge we ran into., we brainstormed wondering how can we get that information to the household level.

" have the user edit the household to select a new contact as the caregiver instead?"

  • Yes, this was our initial idea to simply have the CHWs click edit on the household. We wanted to explore the other option (request from Design side) to try and add 2 new forms. nutrition_messages_enrollement and caregiver_status_change_form