Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Neo4j - Storing Medical symptoms in graph

I am using Neo4j graph database to store medical symptoms and diseases . the purpose behind that is give recommendation of diseases a person can have from the symptoms the user has entered into the system. Right now I have stored various symptoms as follows .Medical Symptoms

It is a very basic graph structure , from which I am retrieving the disease by matching patterns through cypher query such as intersection of causes by Fever , Headache and Flu. What I want to achieve is to build a complex structure involving location and age factor and etc and write various algorithms to retrieve the most connected node by efficiently traversing. I am unable to find such complex structures into internet, So any suggestions would be appreciated. Even though It is not much coding like of question , please give some suggestions as it is just a college project ,and I have to go further in this.

like image 569
pawan9977 Avatar asked Mar 06 '14 13:03

pawan9977


2 Answers

Here is one simple model that can answer complex queries.

Have 3 types of nodes:

  1. Symptom or Factor - This can be any symptom, temperature, location, age, sex or any factor that can be a cause of the disease.
  2. Patient or Case - This node will have all the required symptom nodes as incoming nodes and will be connected to one disease.
  3. Disease - This node will indicate the disease.

Once you build this with patient's data, you will have a sufficiently complex graph to do the following:

  1. Based on the current patient's symptoms, you can write a simple path query to get the most possible disease. This will not just give you a single disease, but will give you a list of possible diseases and a confidence score based on past patient records.
  2. You can also show interesting statistics like all patient's in location A and age B generally get disease C.
  3. This will also be a database of all past patient's records.

Since it is a college project, you can first try with some mock data. This method should be perfect mixture between effectiveness and simplicity.

like image 79
GautamJeyaraman Avatar answered Oct 10 '22 10:10

GautamJeyaraman


Maybe you should rethink your model. IMHO, you have not separated symptoms, illness and maybe exams.

Give a look to the Neo4J labels

(:symptom)-[BELONGS]->(:symptomGroup)-[MAY_INDICATE]->(:illNess) (:exam)-[VERIFIES]->(:illNess)

You have to group symptoms

As it is a college project and maybe you are not a doctor, you are not expected to build a 'cure it all' system.

Handle the case where the solution is not found.

I shouldn't write that but I know that brilliant ppl working @ Vidal (French medical publisher) have published a graphgist on that topic recently.

like image 25
Jerome_B Avatar answered Oct 10 '22 10:10

Jerome_B