Hi All, I'm a newbie at modeling graph databases and I need your help regarding designing a graph for what I thought was a simple graph:
A clinical study identified by STUDYID can have many subjects enrolled (identified by USUBJID). Subjects can be seen at scheduled visits ('1 year', '2 years', ...), identified by AVISIT/AVISITN and at those visits, endpoints are collected. Those endpoints have names and a numerical score. For example, subject 123 was seen at visit '1 year' (AVISITN=1) and her PAIN endpoint was 34 (out of 100 for ex). How would I model this?
I'm OK with having a Study node and a Subject node and a relationship 'IS_ENROLLED_IN'. So far so good. I struggle with the visits and endpoints because the endpoint score is unique for each subject/visit/endpoint. How would you do it?
Maybe I'm off topic, but can I suggest you to investigate the Medical Model provided by HL7 FHIR.
A lot of medical situation are modeled there, and if you find what you need, it's easy to bring the model to Neo4j
Yes, you can only have one 'usubID' at the top when you create a participant. I added 'usubID' for every year as there is a time lag between year 1 and year 2. Also, you can extract data for a given participant for any year .
match (a:ParticipantEndpoints)
where a.participantID = "usub 123" and a.visitYear = "Year 3"
return a
This will fetch you the endpoint node for the participant for Year 3 without traversing the path.