How to build a symptom checker and medical diagnose chat bot

I want to build a chatbot which can diagnose an illness depending upon the symptoms which are given to it. I want to show you an example scenario of how it should work;

Application - A , User - U

A) Hello, What is your symptom?

A) How long do you have this symptom? ( System will list possible choices to the user)

U) 3 Months

A) Do you also have photo-affinity? ( System will provide simple "Yes-No-I don't" know choices)

U) Yes

.

.

A) According to your symptoms, you have "migraine".

There are several applications which work in that manner like "Ada Health", "YourMD" and so on.

I want you to show me a way, give me a kick starter where to start. Are there any resources helpful about this topic?

Can you describe briefly, how one would build such a system in terms of machine learning and data science?

After my questions, I want you to show you my way of thinking about how this system can be built. Please give your comments about it as well

Let's say we have a database and there are symptoms - disease wives. Here is the example;

• Once the user enters a symptom to the system, my algorithm is going to find all of the matched diseases from the database, e.g., "headache" is the entered symptom by the user and the matched diseases with this initial symptom are "migraine", "flu", "cold", "tumor", etc...
• After that, all of the symptoms which are connected with these new diseases are added to the question queue, e.g., for "flu" match, new questions about "flu" disease will be asked to the user like "Do you have also sneeze?"
• While the user continues to answer questions, the positive symptoms which user has will be recorded. At the end of the question-answer phase, all of the symptoms which are recorded are going to be used in our machine learning model as the input features.

Does that way of thinking hit the right notes? Thanks in advance for all of the answers.

• You have already tagged your question with decision-trees. What stops you from building a decision tree model based on your database and program your bot to, start the questions based on the root node and follow the path through the tree to leaf according to the given answers? Apr 11 '19 at 8:45
• I think that a bayesian approach, using the probability of the sympton to occur is each disease in your dataset would probably work nicely too. Decision trees would also work well. Check this tutorial Apr 11 '19 at 13:08
• people.dbmi.columbia.edu/~friedma/Projects/DiseaseSymptomKB/… This is above dataset which will be helpful in case Dec 5 '19 at 13:42
• On researchgate there is a ton of papers that did exactly this. This was quite a popular research topic in the last several years. Dec 5 '19 at 23:12