onaio / steps-app

WHO STEPS App
Apache License 2.0
2 stars 2 forks source link

Update household data fields #153

Closed ciremusyoka closed 2 years ago

ciremusyoka commented 2 years ago

Add Ona form_id and form_title to each household data submitted to the API

owais-vd commented 2 years ago

Hi @ciremusyoka based on the discussion. I will split the CSV data file into multiple files based on the form-id. cc: @bkimondiu @ukanga

owais-vd commented 2 years ago

Here is the process of how the form-id will be assigned to the household.

  1. When we will create a household then the active form-id will be assigned to the household.
  2. Once the interview will be conducted then the household form-id will be updated with the active form-id.

cc: @bkimondiu @ciremusyoka @ukanga

ukanga commented 2 years ago

Here is the process of how the form-id will be assigned to the household.

  1. When we will create a household then the active form-id will be assigned to the household.
  2. Once the interview will be conducted then the household form-id will be updated with the active form-id.

cc: @bkimondiu @ciremusyoka @ukanga

@owais-vd What does this mean exactly? Should we expect a household might be created with FormA and at some point when the interview is conducted let's say with FormB that the form-id will change to FormB?

owais-vd commented 2 years ago

Initially, we don't know that which form-id will be assigned to the newly created household so in that case, the household has a null form-id until we fill-up the form. I mean we can assign the form-id when we fill up and save the FormA in the ODK collect app and get back to the steps app.

ukanga commented 2 years ago

Initially, we don't know that which form-id will be assigned to the newly created household so in that case, the household has a null form-id until we fill-up the form. I mean we can assign the form-id when we fill up and save the FormA in the ODK collect app and get back to the steps app.

Oh, okay. thin this should be okay. We need to ensure we should not submit any records with a the form-id as null. Is that possible? Is there a use case where we might submit households with no form?

owais-vd commented 2 years ago

Yes, we are sending all households even it has no members. Therefore, to avoid null form-id we have two options available.

Option 1: We need to set the default form id instead of null when creating a new household. i.e active form-id Option 2: All those households will not be sent to the server until they hold a non-null form-id.

ukanga commented 2 years ago

I think this may require clarity from WHO team but for now let's go with Option 1.

faith-mutua commented 2 years ago

@ukanga @owais-vd @ciremusyoka this has been resolved. The data in the STEPS web app now includes both the form-id and form-title for household data with or without the survey.

bkimondiu commented 2 years ago

@ukanga We are still requiring users to enter a Survey ID when setting up the apk. I think it will be really confusing to use both the form-id and survey ID when considering submissions since the survey ID is user-defined and can be changed with each submission and even used across different forms as shared here https://github.com/onaio/steps-csv-uploader/pull/31#issuecomment-1098146133 cc: @owais-vd @faith-mutua @ciremusyoka

ukanga commented 2 years ago

We can chat about this with Stefan tomorrow so we agree on the way forward.