Neo4j - Storage of medical symptoms in a graph

I use the Neo4j database to store medical symptoms and illnesses. The purpose of this is to give recommendations about the diseases that a person can get from the symptoms that the user has entered into the system. I have now saved the various symptoms as follows. Medical symptoms

This is a very simple graph structure from which I get the disease by matching patterns with a cypher query, such as intersecting the causes with fever, headache and flu. I want to create a complex structure, including location and age factor, etc., And write various algorithms to extract the most connected node by efficiently traversing. I cannot find such complex structures on the Internet, so any suggestions would be appreciated. Despite the fact that this is not as many codes as a question, please give some suggestions, as this is just a college project, and I have to go further in this.

+6
source share
3 answers

To find the most connected node, the so-called one that has the most relationships uses

MATCH (n)-[r]-() RETURN n, count(r) ORDER by count(r) desc LIMIT 1 

The above works with Neo4j 2.0. Keep in mind that this crosses the full schedule. But if your requirement as such, you must do the dirty work.

0
source

Perhaps you should rethink your model. IMHO, you did not share the symptoms, illnesses, and possibly exams.

Look at the shortcuts of Neo4J

(: symptom) - [OWNS] → (: symptomGroup) - [MAY_INDICATE] → (: psychosis) (: Exam) - [verifies] → (: psychosis)

You need to group symptoms

Since this is a college project, and you may not be a doctor, you should not build a “cure everything” system.

Refer to the case when no solution is found.

I should not write this, but I know that the brilliant ppl working @Vidal (French medical publisher) has recently posted graphics on this topic.

0
source

Here is one simple model that can answer complex queries.

You have 3 types of nodes:

  • Symptom or factor . This can be any symptom, temperature, location, age, gender, or any factor that may be causing the disease.
  • Patient or case . This node will have all the necessary symptom nodes as incoming nodes and will be associated with one disease.
  • The disease . This node will indicate a disease.

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

  • Based on the patient’s current symptoms, you can write a simple path request to get the most possible illness. This will not only give you one disease, but also give you a list of possible diseases and an indicator of confidence based on data from past patients.
  • You can also show interesting statistics, as all patients at location A and age B tend to get disease C.
  • It will also be a database of all past patient records.

Since this is a college project, you may want to try some mock data first. This method should be the perfect mix between efficiency and simplicity.

0
source

All Articles