Search in a graph of medical records

Hi(a)all,

I apologize in advance if this is a trivial question, I’m not very
experienced with graphs.

First, I have a hierarchical order of a disease list. Just for example:

1. Respiratory system disease

1.1. Asphyxia neonatorum

1.2. Croup

1.3. Lower respiratory tract disease

1.4. Bronchial disease

1.4.1. asthma
<http://bioportal.bioontology.org/ontologies/DOID/?p=classes&conceptid=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FDOID_2841&gt;

1.4.2. bronchiectasis

1.4.3. bronchitis

1.5. lung disease

1.5.1. acute chest syndrome

1.5.2. bronchiolitis

1.5.3. brown induration

1.6. interstitial lung disease

1.6.1. bronchiolitis obliterans

1.6.2. extrinsic allergic alveolitis

1.6.3. pneumoconiosis

Next, I have a database with people’s medical records. For example:

Patient-1: asthma, bronchiolitis

Patient-2: asthma, pneumoconiosis

Lastly, when a new patient enters the system. For example:

Patient-to-search: asthma, brown induration

I want to find the person which is “most similar” in terms of the diseases
hierarchy. (Which is Patient-1). How do I accomplish such task efficiently
with the graph tool?

Thanks,

Dov

attachment.html (5.13 KB)

I'm not sure if graph-tool is designed to do this.
Basically, you have a disease ontology, and an EMR database that annotates
patients with diseases in that disease ontology. In order to find the "most
similar" patient, you should use one of the semantic similarity measures,
such as the Resnik similarity. I recommend the fastSemSim python package
for calculating semantic similarity, but there are also many R packages
that can do this.

Alexey

attachment.html (8.33 KB)