Versions Compared

Key

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

...

The customizable elements and file names of the solution are listed below;

  1. Questions - question.json

  2. Algorithms - algorithm.json

  3. Exceptions - exceptions.json

...

Anchor
Questions
Questions
Questions

...

questions.json

The questions

...

file

...

The questions file is just a list of all possible questions (and their possible answers) that may be asked to a user. Questions can be added in any order as the actual flow of questions is determined by the algorithm.

...

As you can see regardless of the answers given by the client, the algorithm will always reach at least one recommended method of contraception.

...

Options

Each question contains at least two options to be presented to the user as possible answers. Their choice determines the path to follow: which question to ask next, or presenting the final result in the form of family planning methods recommendation.

Additionally, the questions and their options (answers) are directly connected to POEditor terms, the service used for localization.

...

Anchor
Algorithm
Algorithm
Algorithm - algorithm.json

The algorithm drives the logic of what question to ask next, based on the previous answer. All possible paths end with a family planning method list recommendation.

...

Anchor
Exceptions
Exceptions
Exceptions - exception.json

The exceptions file restricts the methods to be returned based on various criteria. Currently, they include country, age, and breastfeeding.