Creating relationships

Hello folks. I'm a ms user, self challenge, trying to do something nice in neo4j.

I would like to have your support, because, I don't know how to go ahead, since the point where I'm now.

I have a comunity version of neo4j. I uploaded some data I have from brazilian health system through hop.

In attached image, you can see my nodes, but, I dont have these relationships done yet. How can I do that?

For a better understandment: Paciente = Patient, Regiao = Region, CID = international desease code, sexo = gender, idade = age, data = date.

I apreciate your support for a beginer.
Thanks.

In general, to create a relationship between two nodes you would search for each node with a ‘match’ or ‘ merge’ statement then use a ‘create’ or ‘merge’ statement to relate the two nodes. Here is an example:

match(n:Person{name:’Mickey Mouse’})

match(m:Company{name:’Walt Disney’})

merge(n)-[:WORKS_AT]->(m)

I used ‘merge’ in case the relation already existed it would not be created again.

Do you want to create the relationships from a file that defines nodes to be related? If so, can you post a few lines from the file?

https://neo4j.com/developer/cypher/updating/#_using_merge_on_a_relationship

I suggest you take some of the free neo4j GraphAcademy classes. The first two would be neo4j fundamentals and cypher fundamentals. They claim it will take you about an hour for each. that is how I started, as well as reading the cypher documentation many times.

https://graphacademy.neo4j.com