Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Here are some points to consider when designing your application

Table of Contents

Workflow Mapping Guide

In this guide, we present examples and templates to create digital workflow documentation.

The DIIG Digital Workflow Template includes examples, key elements, and templates following the WHO’s Digital Implementation Investment Guide (DIIG). Copy and paste templates to create your own workflows using PowerPoint or Google Slides.



How can your user edit data?

If, for example, your user enters the wrong village name or misspells a name, how will they correct that case data?


 Check out our guide on how to create the above edit form -  Edit Form Tutorial

How will a user close a case?

In a single application there may be many ways to close a case. For example, from the user's perspective a case may be closed automatically when an event occurs, such as giving birth or recovering from an illness. However, sometimes it is important to account for edge cases where a case may have been registered twice or by accident.


  • You can add a "remove name" form to your application to deal with these situations- remember that using language like "close case" may not be clear to the user, as from their perspective you are enabling a way to remove the name from their list.

  • You can add an edit form that allows the user to remove the name (i.e. "do you want to remove this user from your phone? Yes/No -> if yes, close the case)

  • You can alter a case property which filters the case out of the user's case list. This can be a useful approach when you want someone other than the mobile user to have control over actually closing out a case. This solution is only recommended if you have case sharing enabled and therefore a way to actually close out the cases in a different application. Filtering the cases without a way to close them would lead to an build up of non-accessible cases on the phone over time. You could have a CloudCare app that can see all cases where a case property called case_to_close = "yes" and then the CloudCare user can deal with the case (i.e. determine if it is safe to close it, etc.)


How should I organize all my forms related to a single case type?

If you have a lot of forms related to one case type (i.e. registration, follow-up, home visit, counseling, edit/close, etc.) it may be useful to put them in more than one module with the same case type. Specifically, it is often useful to put registration forms in a separate module. This is because how the presence of a registration form affects the way in which the user accesses the forms.


The latter workflow is generally preferred because it allows for effective form filtering.


How can I reference the number of times a given form has been filled out?

You can do some creative work with hidden values to keep track of the number of times a given form has been completed by a specific user. Let's imagine you have a form that is used to take height and weight data every week, but every 10th week you also want to take some additional measurements. Or perhaps you want to show the number of times a form was filled out in the case details screen. Either way you will need hidden values structured like this example:


You can then display the value of visit_count or reference it in a display condition.  

How can I make a form disappear from a form list once it has been filled out, or make forms appear in sequence?

Sometimes you only want a form to be filled out one time for a case. The definitive way to do this is to use case management and form filtering, such that the form is only available until it has been filled out once.


./literacy_form_complete != 'complete' 

For each new case the literacy_form_complete property will be empty, so the form will be displayed. But whenever the Literacy Form is filled out for a case, the case property value will change to "complete" and the form's display condition will never be met.

How can I make forms appear in sequence? 

Sometimes there are a number of different forms for a case and you want only one to be filled out at a time. You can set up an application so that at first it only shows "Home Visit 1" and then after that so it only shows "Home Visit 2," etc.


The value for choice a would be '1' and the value for choice b would be '2'.  The answer to this question should then update the case property next_form. 

How can I prevent a case property like ID from being the same for two cases?

Sometimes you have a field like "ID" which you want to prevent users from giving to two different cases. This is advanced and requires minor editing of the xform.

Step 1: Add the following instance to your form (NOTE: you only need to do this if your form is registering a new case, and do not need to do this if your form is modifying an existing case): <instance id="casedb" src="jr://instance/casedb"></instance>

Step 2: Use the following as an example of a validation condition: count(instance('casedb')/casedb/case[@case_type='MYCASETYPE'][case_property_for_id=#form/my_question_with_participant_id]) = 0

  • For example, if your case type is "participant" and both the question ID and the property you want to check it against is "participant_id" the expression would be: 

count(instance('casedb')/casedb/case[@case_type='participant'][participant_id=#form/participant_id]) = 0


  • This will only check against open cases on the user's phone. If the user has not synced recently this validation may fail to prevent a duplicate.  Moreover, this method will only effectively query for cases already loaded to the user's phone, and so will not query cases that are not assigned to that user or that user's case sharing group.