Skip to main content
. 2022 Nov 25;24(11):e40361. doi: 10.2196/40361

Table 3.

Examples of graph search tasks and queries using Cypher language.

Number Graph search task Cypher querya,b
1
  • Search for patients with LC with 1-6 co-occurring diseases and present the topology.

  • C-389764: Hypocalcemia

  • C-172569: Bacterial Infection

  • C-765209: Obstructive pneumonia

  • C-305976: Pneumothorax

  • C-352894: Leukopenia

  • C-654730: Pneumonia

match (p:Patient {label:'1'})-->(f {cat: 'dac'})
where f.code = 'C-389764'
or f.code = 'C-172569'
or f.code = 'C-765209'
or f.code = 'C-305976'
or f.code = 'C-352894'
or f.code = 'C-654730'
return p, f;
2
  • Search for patients with LC with 1-5 nonlaboratory factors and present the topology

  • C-549780: Pain

  • C-289547: Bloodstained sputum

  • C-127089: Hoarseness

  • C-029761: Productive Cough

  • C-294680: Swollen Lymph Node in head and neck

match (p:Patient {label:'1'})-->(f) where
(f.code = 'C-549780' and f.valcvt = 'true')
or (f.code = 'C-289547' and f.valcvt='true')
or (f.code = 'C-127089' and f.valcvt='true')
or (f.code = 'C-029761' and f.valcvt='true')
or (f.code = 'C-294680' and f.valcvt='true')
return p, f;
3
  • Search for patients with LC with 1-5 laboratory test values and present the topology.

  • C-659218: Hepatitis B virus

  • C-493765: Squamous cell carcinoma antigen

  • C-573086: Neuron-specific enolase measurement

  • C-120948: Gastrin-releasing peptide precursor increased

  • C-814793: Mycoplasma pneumoniae antibody

match (p:Patient {label:'1'})-->(f {cat: 'lab'}) where
(f.code = 'C-659218' and f.valcvt = 'true')
or (f.code = 'C-493765' and f.valcvt = 'up')
or (f.code = 'C-573086' and f.valcvt = 'up')
or (f.code = 'C-120948' and f.valcvt = 'abnormal')
or (f.code = 'C-814793' and f.valcvt = 'abnormal')
return p, f;
4
  • Search for 1 patient, show the electronic medical record health factor graph and the Unified Medical Language System knowledge graph together

match (p:Patient {label:'1', vpid:'_8908085766'})-->(f)
match (p)-->(ap:AbstractPatient)-->(tc:TargetConcept)-->(cr:RelCat)-->(c:Concept)
return p, f, ap, tc, cr, c;

aUsing Neo4j Cypher query language.

bPatient with LC: label=1; background patient: label=0. Factor property f.code: unique local code. Factor property f.valcvt: converted value.