{
"group": "Matching relationships",
"entries": [
{
"name": "Labelled patients",
"sentence": "Read patients and bind each record to a name.",
"query": "match (c:${collection})",
"change": "Change ${collection} to the collection name.",
"defaults": {
"collection": "patients"
}
},
{
"name": "Patients admitted to wards",
"sentence": "Read patients and wards joined by an outgoing admission relation.",
"query": "match (c:${collection})-[:${kind}]->(w:${target})",
"change": "Change ${collection} and ${target} to collection names and ${kind} to the relation kind.",
"defaults": {
"collection": "patients",
"kind": "admitted_to",
"target": "wards"
}
},
{
"name": "Wards admitting patients",
"sentence": "Read wards and patients joined by an incoming admission relation.",
"query": "match (w:${collection})<-[:${kind}]-(c:${target})",
"change": "Change ${collection} and ${target} to collection names and ${kind} to the relation kind.",
"defaults": {
"collection": "wards",
"kind": "admitted_to",
"target": "patients"
}
},
{
"name": "Patients with ward nurses",
"sentence": "Read patients, their wards and the nurses staffing those wards.",
"query": "match (c:${collection})-[:${kind}]->(w:${target})<-[:${staffing}]-(n:${nurses})",
"change": "Change ${collection}, ${target} and ${nurses} to collection names and ${kind} and ${staffing} to relation kinds.",
"defaults": {
"collection": "patients",
"kind": "admitted_to",
"target": "wards",
"staffing": "staffed_by",
"nurses": "nurses"
}
}
]
}