In [1]:
import requests
import os
import itertools
import multiprocessing
import pickle

In [4]:
def request_synonyms(oid, iri):
    j = requests.get('http://www.ebi.ac.uk/ols/api/ontologies/' + oid + '/terms?iri=' + iri).json()
    return j["_embedded"]["terms"][0]["synonyms"] if "_embedded" in j else []

def search_others(query, doids):
    j = requests.get('http://www.ebi.ac.uk/ols/api/search?q=' + query + '&ontology=efo, hp, ogms, ordo').json()
    
    results = []
    syns = set()
    for item in j['response']['docs']:
        if 'iri' in item:
            ss = request_synonyms(item['ontology_name'], item['iri'])
            if ss:
                for s in ss:
                    syns.add(s.lower().strip())            

    for syn in syns:
        r = search_doid(syn, True, doids)
        if len(r) > 0:
            results.append(r)

    return results

def search_doid(query, exact, doids):
    j = requests.get('http://www.ebi.ac.uk/ols/api/search?q=' + query + '&ontology=doid&exact=' + str(exact).lower()).json()
    
    matches = []
    for item in j['response']['docs']:
        if 'obo_id' in item and item['obo_id'] not in doids:
            matches.append({
                             'id':item['obo_id'],
                             'desc':next(iter(item['description'])) if 'description' in item else '',
                             'label':item['label'],
                            })
            doids.add(item['obo_id'])
    
    return matches

def search(query):
    doids = set()
    doid_results = search_doid(query, False, doids)
    other_results = search_others(query, doids)
    return {'query': query, 'top_matches': doid_results, 'synonym_matches': other_results}
                     
def parse(filename):
    with open(filename, 'rt') as f:
        lines = list(iter(f))
        def text(line):
            return line.split(':')[1]
        return filename, [text(lines[0]).strip()] + [s.strip() for s in text(lines[3]).split(',')]

def mapper(file):
    if file.endswith(".txt"):
        filename, terms = parse(os.path.join("/Users/elvirakinzina/src/Medhack/data", file))
        return {'filename':str(file), 'terms': [search(s) for s in terms]}


def parseFiles():
    
    pool = multiprocessing.Pool(15)
    result = pool.map(mapper, itertools.islice(os.listdir("/Users/elvirakinzina/src/Medhack/data"), 30))
        
    return result

parsed = parseFiles()

pickle.dump( parsed, open( "lookup.p", "wb" ) )

In [5]:
parsed


Out[5]:
[None,
 {'filename': 's0002_re.txt',
  'terms': [{'query': 'Unstable angina',
    'synonym_matches': [],
    'top_matches': [{'desc': '',
      'id': u'DOID:8805',
      'label': u'intermediate coronary syndrome'},
     {'desc': '', 'id': u'DOID:4558', 'label': u"Ludwig's angina"},
     {'desc': '', 'id': u'HP:0001681', 'label': u'Angina pectoris'},
     {'desc': '',
      'id': u'DOID:13924',
      'label': u'necrotizing ulcerative gingivitis'},
     {'desc': u'A viral infectious disease that results_in inflammation, located_in pharynx, has_material_basis_in Human herpesvirus 4 and has_symptom fever, has_symptom fatigue, has_symptom lymphadenopathy, and has_symptom splenomegaly.',
      'id': u'DOID:8568',
      'label': u'infectious mononucleosis'},
     {'desc': u'An eye disease that is characterized by an unstable or a sustained increase in the intraocular pressure which the eye cannot withstand without damage to its structure or impairment of its function.',
      'id': u'DOID:1686',
      'label': u'glaucoma'}]},
   {'query': 'Arterial hypertension',
    'synonym_matches': [],
    'top_matches': [{'desc': u'An artery disease characterized by chronic elevated blood pressure in the arteries.',
      'id': u'DOID:10763',
      'label': u'hypertension'},
     {'desc': '', 'id': u'HP:0000822', 'label': u'Hypertension'},
     {'desc': '', 'id': u'DOID:1073', 'label': u'renal hypertension'},
     {'desc': '', 'id': u'DOID:10824', 'label': u'malignant hypertension'},
     {'desc': u'A hypertension with no known cause. It is the most common type of hypertension.',
      'id': u'DOID:10825',
      'label': u'essential hypertension'},
     {'desc': '', 'id': u'DOID:10762', 'label': u'portal hypertension'},
     {'desc': '', 'id': u'DOID:1591', 'label': u'renovascular hypertension'},
     {'desc': u'An eye disease that is characterized by elevated intraocular pressure in the absence of optic nerve damage or visual field loss.',
      'id': u'DOID:9282',
      'label': u'ocular hypertension'},
     {'desc': u'A hypertension characterized by an increase of blood pressure in the pulmonary artery, pulmonary vein or pulmonary capillaries.',
      'id': u'DOID:6432',
      'label': u'pulmonary hypertension'},
     {'desc': '', 'id': u'DOID:9428', 'label': u'intracranial hypertension'}]},
   {'query': 'Recurrent pulmonary oedema',
    'synonym_matches': [[{'desc': '',
       'id': u'HP:0100598',
       'label': u'Pulmonary edema'}]],
    'top_matches': [{'desc': u'A sleep disorder that involves recurring bouts of excessive amounts of sleepiness.',
      'id': u'DOID:8619',
      'label': u'recurrent hypersomnia'},
     {'desc': '', 'id': u'DOID:11030', 'label': u'corneal edema'},
     {'desc': '', 'id': u'DOID:3770', 'label': u'pulmonary fibrosis'},
     {'desc': '', 'id': u'DOID:13406', 'label': u'pulmonary sarcoidosis'},
     {'desc': '', 'id': u'DOID:9675', 'label': u'pulmonary emphysema'},
     {'desc': u"A lung disease with an unknown etiology affecting the lungs which results in bleeding from tiny alveolar capillaries. Examination of sputum and bronchoalveolar lavage fluid can disclose hemosiderin-laden alveolar macrophages (siderophages), and the lung biopsy shows numerous siderophages in the alveoli. Alveolar hemorrhage is characterized by hemoptysis, dyspnea, alveolar infiltrates on chest radiograph, and various degrees of anaemia. Following a bleeding episode, the alveolar macrophages convert the hemoglobin's iron into hemosiderin within 36-72h.",
      'id': u'DOID:12118',
      'label': u'pulmonary hemosiderosis'},
     {'desc': u'A tuberculosis that is a contagious disease located_in lungs. The infection has_symptom fever, has_symptom cough, has_symptom difficulty in breathing, has_symptom inflammatory infiltrations, has_symptom formation of tubercles, has_symptom caseation, has_symptom pleural effusion, and has_symptom fibrosis.',
      'id': u'DOID:2957',
      'label': u'pulmonary tuberculosis'},
     {'desc': u'An embryoma and malignant neoplasm of lung that derives_from tissues of the lung and derives_from pleura (a thin layer of tissue that covers the lungs and lines the interior wall of the chest cavity). It is most commonly effects children.',
      'id': u'DOID:4765',
      'label': u'pulmonary blastoma'},
     {'desc': '', 'id': u'DOID:11396', 'label': u'pulmonary edema'},
     {'desc': u'A hypertension characterized by an increase of blood pressure in the pulmonary artery, pulmonary vein or pulmonary capillaries.',
      'id': u'DOID:6432',
      'label': u'pulmonary hypertension'}]},
   {'query': 'Diabetes mellitus',
    'synonym_matches': [],
    'top_matches': [{'desc': u'A glucose metabolism disease characterized  by chronic hyperglycaemia with disturbances of carbohydrate, fat and protein metabolism resulting from defects in insulin secretion, insulin action, or both.',
      'id': u'DOID:9351',
      'label': u'diabetes mellitus'},
     {'desc': '', 'id': u'HP:0000819', 'label': u'Diabetes mellitus'},
     {'desc': u"A diabetes mellitus that results from the body's failure to produce insulin and has_material_basis_in autoimmune destruction of insulin-producing beta cells of the pancreas.",
      'id': u'DOID:9744',
      'label': u'type 1 diabetes mellitus'},
     {'desc': '', 'id': u'DOID:11717', 'label': u'neonatal diabetes mellitus'},
     {'desc': u'A neonatal diabetes mellitus that has_material_basis_in homozygous mutation in the glucokinase gene (GCK), heterozygous mutation in the KCNJ11 and INS genes, or by heterozygous or homozygous mutation in the ABCC8 gene.',
      'id': u'DOID:0060639',
      'label': u'permanent neonatal diabetes mellitus'},
     {'desc': u'A diabetes mellitus that involves high blood glucose resulting from cells fail to use insulin properly.',
      'id': u'DOID:9352',
      'label': u'type 2 diabetes mellitus'},
     {'desc': u'A neonatal diabetes mellitus characterized by hyperglycemia during the neonatal period that remits during infancy but recurs in later life in most patients.',
      'id': u'DOID:0060334',
      'label': u'transient neonatal diabetes mellitus'},
     {'desc': '', 'id': u'DOID:11714', 'label': u'gestational diabetes'},
     {'desc': '',
      'id': u'HP:0008255',
      'label': u'Transient neonatal diabetes mellitus'},
     {'desc': '',
      'id': u'HP:0005978',
      'label': u'Type II diabetes mellitus'}]},
   {'query': 'Hyperlipoproteinemia',
    'synonym_matches': [[{'desc': u'A lipid metabolism disorder characterized by elevated triglyceride levels as a result of excess hepatic production of VLDL or heterozygous LPL deficiency.',
       'id': u'DOID:0050527',
       'label': u'familial hypertriglyceridemia'}]],
    'top_matches': [{'desc': '',
      'id': u'HP:0010980',
      'label': u'Hyperlipoproteinemia'},
     {'desc': '',
      'id': u'DOID:1172',
      'label': u'hyperlipoproteinemia type IV'},
     {'desc': '', 'id': u'DOID:1171', 'label': u'hyperlipoproteinemia type V'},
     {'desc': '',
      'id': u'DOID:3145',
      'label': u'hyperlipoproteinemia type III'},
     {'desc': '', 'id': u'DOID:1168', 'label': u'familial hyperlipidemia'},
     {'desc': u'A familial hyperlipidemia characterized by very high levels of low-density lipoprotein (LDL) and early cardiovascular disease.',
      'id': u'DOID:13810',
      'label': u'familial hypercholesterolemia'},
     {'desc': '',
      'id': u'DOID:14118',
      'label': u'familial lipoprotein lipase deficiency'},
     {'desc': '',
      'id': u'DOID:13809',
      'label': u'familial combined hyperlipidemia'}]}]},
 {'filename': 's0003_re.txt',
  'terms': [{'query': 'Valvular heart disease',
    'synonym_matches': [[{'desc': u'An artery disease that is characterized by plaque building up along the inner walls of the arteries of the heart resulting in a narrowing of the arteries and a reduced blood supply to the cardiac muscles.',
       'id': u'DOID:3393',
       'label': u'coronary artery disease'}],
     [{'desc': '', 'id': u'HP:0001677', 'label': u'Coronary artery disease'}]],
    'top_matches': [{'desc': u'A heart disease involving one or more of the four valves of the heart (the aortic and mitral valves on the left and the pulmonary and tricuspid valves on the right).',
      'id': u'DOID:4079',
      'label': u'heart valve disease'},
     {'desc': u'A heart valve disease that is characterized by repeated inflammation with fibrinous repair. The cardinal anatomic changes of the valve include leaflet thickening, commissural fusion, and shortening and thickening of the tendinous cords.It is caused by an autoimmune reaction to Group A beta-hemolytic streptococci (GAS) that results in valvular damage.',
      'id': u'DOID:0050827',
      'label': u'rheumatic heart disease'},
     {'desc': u'A cardiovascular system disease that involves the heart.',
      'id': u'DOID:114',
      'label': u'heart disease'},
     {'desc': '',
      'id': u'HP:0001726',
      'label': u'Increased prevalence of valvular disease'},
     {'desc': '',
      'id': u'HP:0006694',
      'label': u'Early progressive calcific cardiac valvular disease'},
     {'desc': '',
      'id': u'DOID:8514',
      'label': u'acute pulmonary heart disease'},
     {'desc': u"A cardiovascular system disease that involves the heart's electrical conduction system.",
      'id': u'DOID:10273',
      'label': u'heart conduction disease'},
     {'desc': '',
      'id': u'DOID:12326',
      'label': u'chronic pulmonary heart disease'},
     {'desc': '',
      'id': u'DOID:12325',
      'label': u'kyphoscoliotic heart disease'}]},
   {'query': 'Mitral regurgitation',
    'synonym_matches': [],
    'top_matches': [{'desc': '',
      'id': u'HP:0001653',
      'label': u'Mitral regurgitation'},
     {'desc': '', 'id': u'DOID:11502', 'label': u'mitral valve insufficiency'},
     {'desc': '', 'id': u'DOID:61', 'label': u'mitral valve disease'},
     {'desc': '', 'id': u'HP:0011469', 'label': u'Nasal regurgitation'},
     {'desc': '', 'id': u'HP:0001659', 'label': u'Aortic regurgitation'},
     {'desc': '', 'id': u'HP:0005180', 'label': u'Tricuspid regurgitation'},
     {'desc': u'A mitral valve disease where one or both of the cusps of the mitral valve bulge or collapse backward in the left atrium during systole.',
      'id': u'DOID:988',
      'label': u'mitral valve prolapse'},
     {'desc': u'A mitral valve disease that is characterized by the narrowing of the orifice of the mitral valve of the heart.',
      'id': u'DOID:1754',
      'label': u'mitral valve stenosis'},
     {'desc': '', 'id': u'HP:0011560', 'label': u'Mitral atresia'},
     {'desc': '', 'id': u'CL:1001502', 'label': u'mitral cell'}]},
   {'query': 'Arterial hypertension',
    'synonym_matches': [],
    'top_matches': [{'desc': u'An artery disease characterized by chronic elevated blood pressure in the arteries.',
      'id': u'DOID:10763',
      'label': u'hypertension'},
     {'desc': '', 'id': u'HP:0000822', 'label': u'Hypertension'},
     {'desc': '', 'id': u'DOID:1073', 'label': u'renal hypertension'},
     {'desc': '', 'id': u'DOID:10824', 'label': u'malignant hypertension'},
     {'desc': u'A hypertension with no known cause. It is the most common type of hypertension.',
      'id': u'DOID:10825',
      'label': u'essential hypertension'},
     {'desc': '', 'id': u'DOID:10762', 'label': u'portal hypertension'},
     {'desc': '', 'id': u'DOID:1591', 'label': u'renovascular hypertension'},
     {'desc': u'An eye disease that is characterized by elevated intraocular pressure in the absence of optic nerve damage or visual field loss.',
      'id': u'DOID:9282',
      'label': u'ocular hypertension'},
     {'desc': u'A hypertension characterized by an increase of blood pressure in the pulmonary artery, pulmonary vein or pulmonary capillaries.',
      'id': u'DOID:6432',
      'label': u'pulmonary hypertension'},
     {'desc': '',
      'id': u'DOID:9428',
      'label': u'intracranial hypertension'}]}]},
 {'filename': 's0004_re.txt',
  'terms': [{'query': 'Myocardial infarction',
    'synonym_matches': [[{'desc': '',
       'id': u'DOID:3454',
       'label': u'brain infarction'}],
     [{'desc': '', 'id': u'DOID:2533', 'label': u'splenic infarction'}],
     [{'desc': '',
       'id': u'DOID:5850',
       'label': u'inferior myocardial infarction'}]],
    'top_matches': [{'desc': u'A coronary artery disease characterized by myocardial cell death (myocardial necrosis) due to prolonged ischaemia.',
      'id': u'DOID:5844',
      'label': u'myocardial infarction'},
     {'desc': '', 'id': u'HP:0001658', 'label': u'Myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10266',
      'label': u'subendocardial infarction acute myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10649',
      'label': u'acute inferolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10651',
      'label': u'acute anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5849',
      'label': u'subendocardial myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5848',
      'label': u'apical myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5843',
      'label': u'posteroinferior myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5845',
      'label': u'anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5847',
      'label': u'posterior myocardial infarction'}]},
   {'query': 'Diabetes mellitus',
    'synonym_matches': [],
    'top_matches': [{'desc': u'A glucose metabolism disease characterized  by chronic hyperglycaemia with disturbances of carbohydrate, fat and protein metabolism resulting from defects in insulin secretion, insulin action, or both.',
      'id': u'DOID:9351',
      'label': u'diabetes mellitus'},
     {'desc': '', 'id': u'HP:0000819', 'label': u'Diabetes mellitus'},
     {'desc': u"A diabetes mellitus that results from the body's failure to produce insulin and has_material_basis_in autoimmune destruction of insulin-producing beta cells of the pancreas.",
      'id': u'DOID:9744',
      'label': u'type 1 diabetes mellitus'},
     {'desc': '', 'id': u'DOID:11717', 'label': u'neonatal diabetes mellitus'},
     {'desc': u'A neonatal diabetes mellitus that has_material_basis_in homozygous mutation in the glucokinase gene (GCK), heterozygous mutation in the KCNJ11 and INS genes, or by heterozygous or homozygous mutation in the ABCC8 gene.',
      'id': u'DOID:0060639',
      'label': u'permanent neonatal diabetes mellitus'},
     {'desc': u'A diabetes mellitus that involves high blood glucose resulting from cells fail to use insulin properly.',
      'id': u'DOID:9352',
      'label': u'type 2 diabetes mellitus'},
     {'desc': u'A neonatal diabetes mellitus characterized by hyperglycemia during the neonatal period that remits during infancy but recurs in later life in most patients.',
      'id': u'DOID:0060334',
      'label': u'transient neonatal diabetes mellitus'},
     {'desc': '', 'id': u'DOID:11714', 'label': u'gestational diabetes'},
     {'desc': '',
      'id': u'HP:0008255',
      'label': u'Transient neonatal diabetes mellitus'},
     {'desc': '',
      'id': u'HP:0005978',
      'label': u'Type II diabetes mellitus'}]}]},
 {'filename': 's0005_re.txt',
  'terms': [{'query': 'Myocardial infarction',
    'synonym_matches': [[{'desc': '',
       'id': u'DOID:3454',
       'label': u'brain infarction'}],
     [{'desc': '', 'id': u'DOID:2533', 'label': u'splenic infarction'}],
     [{'desc': '',
       'id': u'DOID:5850',
       'label': u'inferior myocardial infarction'}]],
    'top_matches': [{'desc': u'A coronary artery disease characterized by myocardial cell death (myocardial necrosis) due to prolonged ischaemia.',
      'id': u'DOID:5844',
      'label': u'myocardial infarction'},
     {'desc': '', 'id': u'HP:0001658', 'label': u'Myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10266',
      'label': u'subendocardial infarction acute myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10649',
      'label': u'acute inferolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10651',
      'label': u'acute anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5849',
      'label': u'subendocardial myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5848',
      'label': u'apical myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5843',
      'label': u'posteroinferior myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5845',
      'label': u'anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5847',
      'label': u'posterior myocardial infarction'}]},
   {'query': 'Coronary artery disease',
    'synonym_matches': [[{'desc': '',
       'id': u'HP:0004929',
       'label': u'Coronary atherosclerosis'}]],
    'top_matches': [{'desc': u'An artery disease that is characterized by plaque building up along the inner walls of the arteries of the heart resulting in a narrowing of the arteries and a reduced blood supply to the cardiac muscles.',
      'id': u'DOID:3393',
      'label': u'coronary artery disease'},
     {'desc': '', 'id': u'HP:0001677', 'label': u'Coronary artery disease'},
     {'desc': '',
      'id': u'HP:0005181',
      'label': u'Premature coronary artery disease'},
     {'desc': '',
      'id': u'HP:0012436',
      'label': u'Nonocclusive coronary artery disease'},
     {'desc': '', 'id': u'DOID:4248', 'label': u'coronary stenosis'},
     {'desc': '', 'id': u'DOID:11847', 'label': u'coronary thrombosis'},
     {'desc': '', 'id': u'DOID:11843', 'label': u'coronary artery anomaly'},
     {'desc': '', 'id': u'DOID:11840', 'label': u'coronary artery vasospasm'},
     {'desc': '', 'id': u'UBERON:0001621', 'label': u'coronary artery'},
     {'desc': '', 'id': u'DOID:3362', 'label': u'coronary aneurysm'}]},
   {'query': 'Arterial Hypertension',
    'synonym_matches': [],
    'top_matches': [{'desc': u'An artery disease characterized by chronic elevated blood pressure in the arteries.',
      'id': u'DOID:10763',
      'label': u'hypertension'},
     {'desc': '', 'id': u'HP:0000822', 'label': u'Hypertension'},
     {'desc': '', 'id': u'DOID:1073', 'label': u'renal hypertension'},
     {'desc': '', 'id': u'DOID:10824', 'label': u'malignant hypertension'},
     {'desc': u'A hypertension with no known cause. It is the most common type of hypertension.',
      'id': u'DOID:10825',
      'label': u'essential hypertension'},
     {'desc': '', 'id': u'DOID:10762', 'label': u'portal hypertension'},
     {'desc': '', 'id': u'DOID:1591', 'label': u'renovascular hypertension'},
     {'desc': u'An eye disease that is characterized by elevated intraocular pressure in the absence of optic nerve damage or visual field loss.',
      'id': u'DOID:9282',
      'label': u'ocular hypertension'},
     {'desc': u'A hypertension characterized by an increase of blood pressure in the pulmonary artery, pulmonary vein or pulmonary capillaries.',
      'id': u'DOID:6432',
      'label': u'pulmonary hypertension'},
     {'desc': '', 'id': u'DOID:9428', 'label': u'intracranial hypertension'}]},
   {'query': 'Hyperuricemia',
    'synonym_matches': [],
    'top_matches': [{'desc': u'An acquired metabolic disease that has_material_basis_in an abnormally high level of uric acid in the blood.',
      'id': u'DOID:1920',
      'label': u'hyperuricemia'},
     {'desc': '', 'id': u'HP:0002149', 'label': u'Hyperuricemia'},
     {'desc': '', 'id': u'DOID:1919', 'label': u'Lesch-Nyhan syndrome'},
     {'desc': u'A kidney disease that is characterized by hyperuricemia with renal uric acid under-excretion, gout and chronic kidney disease.',
      'id': u'DOID:0060062',
      'label': u'familial juvenile hyperuricemic nephropathy'}]}]},
 {'filename': 's0008_re.txt',
  'terms': [{'query': 'Myocardial infarction',
    'synonym_matches': [[{'desc': '',
       'id': u'DOID:3454',
       'label': u'brain infarction'}],
     [{'desc': '', 'id': u'DOID:2533', 'label': u'splenic infarction'}],
     [{'desc': '',
       'id': u'DOID:5850',
       'label': u'inferior myocardial infarction'}]],
    'top_matches': [{'desc': u'A coronary artery disease characterized by myocardial cell death (myocardial necrosis) due to prolonged ischaemia.',
      'id': u'DOID:5844',
      'label': u'myocardial infarction'},
     {'desc': '', 'id': u'HP:0001658', 'label': u'Myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10266',
      'label': u'subendocardial infarction acute myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10649',
      'label': u'acute inferolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10651',
      'label': u'acute anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5849',
      'label': u'subendocardial myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5848',
      'label': u'apical myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5843',
      'label': u'posteroinferior myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5845',
      'label': u'anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5847',
      'label': u'posterior myocardial infarction'}]},
   {'query': 'WPW', 'synonym_matches': [], 'top_matches': []},
   {'query': 'paroxysmal atrial fibrillation',
    'synonym_matches': [[{'desc': '',
       'id': u'HP:0004765',
       'label': u'Episodic supraventricular tachycardia'}]],
    'top_matches': [{'desc': '',
      'id': u'HP:0004757',
      'label': u'Paroxysmal atrial fibrillation'},
     {'desc': u"A heart conduction disease that is characterized by uncoordinated electrical activity in the heart's upper chambers (the atria), which causes the heartbeat to become fast and irregular and has symptoms palpitations, weakness, fatigue, lightheadedness, dizziness, confusion, shortness of breath and chest pain.",
      'id': u'DOID:0060224',
      'label': u'atrial fibrillation'},
     {'desc': '', 'id': u'HP:0005110', 'label': u'Atrial fibrillation'},
     {'desc': u'An atrial fibrillation that has_material_basis_in autosomal dominant inheritance of the familial atrial fibrillation (ATFB) genes.',
      'id': u'DOID:0050650',
      'label': u'familial atrial fibrillation'},
     {'desc': '',
      'id': u'HP:0004754',
      'label': u'Permanent atrial fibrillation'},
     {'desc': '',
      'id': u'HP:0006671',
      'label': u'Paroxysmal atrial tachycardia'},
     {'desc': '',
      'id': u'DOID:13941',
      'label': u'benign paroxysmal positional nystagmus'},
     {'desc': '',
      'id': u'DOID:0060284',
      'label': u'paroxysmal nocturnal hemoglobinuria'},
     {'desc': u'A hypersensitivity reaction type II disease characterized by recurrent episodes of fever and acute inflammation of the membranes lining the abdomen, joints and lungs; that has material basis in mutations in the MEFV gene, which encodes the protein pyrin.',
      'id': u'DOID:2987',
      'label': u'familial Mediterranean fever'},
     {'desc': u'A visceral heterotaxy characterized by complete atrioventricular septal defect with a common atrium and univentricular AV connection, total anomalous pulmonary drainage, and transposition or malposition of the great arteries and may be associated with bilateral trilobed lungs, midline liver, asplenia and situs inversus affecting other organs that has_material_basis_in homozygous mutation in the GDF1 gene on chromosome 19p12.',
      'id': u'DOID:0060856',
      'label': u'right atrial isomerism'}]}]},
 {'filename': 's0010_re.txt',
  'terms': [{'query': 'Myocardial infarction',
    'synonym_matches': [[{'desc': '',
       'id': u'DOID:3454',
       'label': u'brain infarction'}],
     [{'desc': '', 'id': u'DOID:2533', 'label': u'splenic infarction'}],
     [{'desc': '',
       'id': u'DOID:5850',
       'label': u'inferior myocardial infarction'}]],
    'top_matches': [{'desc': u'A coronary artery disease characterized by myocardial cell death (myocardial necrosis) due to prolonged ischaemia.',
      'id': u'DOID:5844',
      'label': u'myocardial infarction'},
     {'desc': '', 'id': u'HP:0001658', 'label': u'Myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10266',
      'label': u'subendocardial infarction acute myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10649',
      'label': u'acute inferolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10651',
      'label': u'acute anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5849',
      'label': u'subendocardial myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5848',
      'label': u'apical myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5843',
      'label': u'posteroinferior myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5845',
      'label': u'anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5847',
      'label': u'posterior myocardial infarction'}]},
   {'query': 'Diabetes mellitus',
    'synonym_matches': [],
    'top_matches': [{'desc': u'A glucose metabolism disease characterized  by chronic hyperglycaemia with disturbances of carbohydrate, fat and protein metabolism resulting from defects in insulin secretion, insulin action, or both.',
      'id': u'DOID:9351',
      'label': u'diabetes mellitus'},
     {'desc': '', 'id': u'HP:0000819', 'label': u'Diabetes mellitus'},
     {'desc': u"A diabetes mellitus that results from the body's failure to produce insulin and has_material_basis_in autoimmune destruction of insulin-producing beta cells of the pancreas.",
      'id': u'DOID:9744',
      'label': u'type 1 diabetes mellitus'},
     {'desc': '', 'id': u'DOID:11717', 'label': u'neonatal diabetes mellitus'},
     {'desc': u'A neonatal diabetes mellitus that has_material_basis_in homozygous mutation in the glucokinase gene (GCK), heterozygous mutation in the KCNJ11 and INS genes, or by heterozygous or homozygous mutation in the ABCC8 gene.',
      'id': u'DOID:0060639',
      'label': u'permanent neonatal diabetes mellitus'},
     {'desc': u'A diabetes mellitus that involves high blood glucose resulting from cells fail to use insulin properly.',
      'id': u'DOID:9352',
      'label': u'type 2 diabetes mellitus'},
     {'desc': u'A neonatal diabetes mellitus characterized by hyperglycemia during the neonatal period that remits during infancy but recurs in later life in most patients.',
      'id': u'DOID:0060334',
      'label': u'transient neonatal diabetes mellitus'},
     {'desc': '', 'id': u'DOID:11714', 'label': u'gestational diabetes'},
     {'desc': '',
      'id': u'HP:0008255',
      'label': u'Transient neonatal diabetes mellitus'},
     {'desc': '',
      'id': u'HP:0005978',
      'label': u'Type II diabetes mellitus'}]}]},
 {'filename': 's0012_re.txt',
  'terms': [{'query': 'Valvular heart disease',
    'synonym_matches': [[{'desc': u'An artery disease that is characterized by plaque building up along the inner walls of the arteries of the heart resulting in a narrowing of the arteries and a reduced blood supply to the cardiac muscles.',
       'id': u'DOID:3393',
       'label': u'coronary artery disease'}],
     [{'desc': '', 'id': u'HP:0001677', 'label': u'Coronary artery disease'}]],
    'top_matches': [{'desc': u'A heart disease involving one or more of the four valves of the heart (the aortic and mitral valves on the left and the pulmonary and tricuspid valves on the right).',
      'id': u'DOID:4079',
      'label': u'heart valve disease'},
     {'desc': u'A heart valve disease that is characterized by repeated inflammation with fibrinous repair. The cardinal anatomic changes of the valve include leaflet thickening, commissural fusion, and shortening and thickening of the tendinous cords.It is caused by an autoimmune reaction to Group A beta-hemolytic streptococci (GAS) that results in valvular damage.',
      'id': u'DOID:0050827',
      'label': u'rheumatic heart disease'},
     {'desc': u'A cardiovascular system disease that involves the heart.',
      'id': u'DOID:114',
      'label': u'heart disease'},
     {'desc': '',
      'id': u'HP:0001726',
      'label': u'Increased prevalence of valvular disease'},
     {'desc': '',
      'id': u'HP:0006694',
      'label': u'Early progressive calcific cardiac valvular disease'},
     {'desc': '',
      'id': u'DOID:8514',
      'label': u'acute pulmonary heart disease'},
     {'desc': u"A cardiovascular system disease that involves the heart's electrical conduction system.",
      'id': u'DOID:10273',
      'label': u'heart conduction disease'},
     {'desc': '',
      'id': u'DOID:12326',
      'label': u'chronic pulmonary heart disease'},
     {'desc': '',
      'id': u'DOID:12325',
      'label': u'kyphoscoliotic heart disease'}]},
   {'query': 'Synkope', 'synonym_matches': [], 'top_matches': []},
   {'query': 'Stable angina',
    'synonym_matches': [[{'desc': u'A diabetes mellitus that involves high blood glucose resulting from cells fail to use insulin properly.',
       'id': u'DOID:9352',
       'label': u'type 2 diabetes mellitus'}],
     [{'desc': u'A genetic disease that has_material_basis_in mutations in the MODY genes disrupting insulin production.',
       'id': u'DOID:0050524',
       'label': u'maturity-onset diabetes of the young'}]],
    'top_matches': [{'desc': '',
      'id': u'DOID:4558',
      'label': u"Ludwig's angina"},
     {'desc': '', 'id': u'HP:0001681', 'label': u'Angina pectoris'},
     {'desc': '',
      'id': u'DOID:10428',
      'label': u'stable condition keratoconus'},
     {'desc': '',
      'id': u'DOID:8805',
      'label': u'intermediate coronary syndrome'},
     {'desc': '',
      'id': u'DOID:13924',
      'label': u'necrotizing ulcerative gingivitis'},
     {'desc': '', 'id': u'DOID:2215', 'label': u'factor VII deficiency'},
     {'desc': u'A viral infectious disease that results_in inflammation, located_in pharynx, has_material_basis_in Human herpesvirus 4 and has_symptom fever, has_symptom fatigue, has_symptom lymphadenopathy, and has_symptom splenomegaly.',
      'id': u'DOID:8568',
      'label': u'infectious mononucleosis'},
     {'desc': u'An autosomal recessive nonsyndromic deafness that is characterized by prelingual onset with severe to profound, stable hearing loss and has_material_basis_in mutation in the COL11A2 gene on chromosome 6p21.',
      'id': u'DOID:0110509',
      'label': u'autosomal recessive nonsyndromic deafness 53'},
     {'desc': u'An autosomal recessive nonsyndromic deafness that is characterized by prelingual onset with moderate to profound, stable hearing loss and has_material_basis_in mutation in the MARVELD2 gene on chromosome 5q13.',
      'id': u'DOID:0110506',
      'label': u'autosomal recessive nonsyndromic deafness 49'},
     {'desc': u'An autosomal recessive nonsyndromic deafness that is characterized by prelingual onset with severe to profound, stable hearing loss and has_material_basis_in mutation in the TMC1 gene on chromosome 9q21.',
      'id': u'DOID:0110520',
      'label': u'autosomal recessive nonsyndromic deafness 7'}]},
   {'query': 'Aortic stenosis (gradient 90mmHg)',
    'synonym_matches': [],
    'top_matches': [{'desc': '',
      'id': u'DOID:5805',
      'label': u'subvalvular aortic stenosis'},
     {'desc': '',
      'id': u'DOID:1929',
      'label': u'supravalvular aortic stenosis'},
     {'desc': u'An aortic valve disease that has_physical_basis_in incomplete opening of the aortic valve.',
      'id': u'DOID:1712',
      'label': u'aortic valve stenosis'},
     {'desc': '',
      'id': u'HP:0001691',
      'label': u'Muscular subvalvular aortic stenosis'},
     {'desc': '', 'id': u'HP:0001650', 'label': u'Aortic valve stenosis'},
     {'desc': '',
      'id': u'HP:0005174',
      'label': u'Membranous subvalvular aortic stenosis'},
     {'desc': '',
      'id': u'HP:0005173',
      'label': u'Calcific aortic valve stenosis'},
     {'desc': '',
      'id': u'HP:0004381',
      'label': u'Supravalvular aortic stenosis'},
     {'desc': '', 'id': u'DOID:12639', 'label': u'pyloric stenosis'},
     {'desc': '', 'id': u'DOID:3227', 'label': u'tracheal stenosis'}]},
   {'query': 'Varicosis', 'synonym_matches': [], 'top_matches': []}]},
 {'filename': 's0013_re.txt',
  'terms': [{'query': 'Myocardial infarction',
    'synonym_matches': [[{'desc': '',
       'id': u'DOID:3454',
       'label': u'brain infarction'}],
     [{'desc': '', 'id': u'DOID:2533', 'label': u'splenic infarction'}],
     [{'desc': '',
       'id': u'DOID:5850',
       'label': u'inferior myocardial infarction'}]],
    'top_matches': [{'desc': u'A coronary artery disease characterized by myocardial cell death (myocardial necrosis) due to prolonged ischaemia.',
      'id': u'DOID:5844',
      'label': u'myocardial infarction'},
     {'desc': '', 'id': u'HP:0001658', 'label': u'Myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10266',
      'label': u'subendocardial infarction acute myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10649',
      'label': u'acute inferolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10651',
      'label': u'acute anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5849',
      'label': u'subendocardial myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5848',
      'label': u'apical myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5843',
      'label': u'posteroinferior myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5845',
      'label': u'anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5847',
      'label': u'posterior myocardial infarction'}]},
   {'query': 'Peripheral atherosclerosis',
    'synonym_matches': [[{'desc': '',
       'id': u'DOID:2348',
       'label': u'arteriosclerotic cardiovascular disease'}],
     [{'desc': u'An artery disease that is characterized by build up of plaque in the arteries that carry blood to your head, organs, and limbs.',
       'id': u'DOID:0050830',
       'label': u'peripheral artery disease'}],
     [{'desc': '',
       'id': u'DOID:13097',
       'label': u'intracranial arteriosclerosis'}]],
    'top_matches': [{'desc': '',
      'id': u'DOID:1936',
      'label': u'atherosclerosis'},
     {'desc': '', 'id': u'HP:0002621', 'label': u'Atherosclerosis'},
     {'desc': '', 'id': u'DOID:10230', 'label': u'aortic atherosclerosis'},
     {'desc': '', 'id': u'DOID:12720', 'label': u'cerebral atherosclerosis'},
     {'desc': '', 'id': u'DOID:2347', 'label': u'generalized atherosclerosis'},
     {'desc': '',
      'id': u'HP:0004943',
      'label': u'Accelerated atherosclerosis'},
     {'desc': '', 'id': u'HP:0004929', 'label': u'Coronary atherosclerosis'},
     {'desc': '', 'id': u'HP:0012397', 'label': u'Aortic atherosclerosis'},
     {'desc': '', 'id': u'HP:0004416', 'label': u'Precocious atherosclerosis'},
     {'desc': '', 'id': u'DOID:9847', 'label': u'peripheral vertigo'}]},
   {'query': 'Cerebral stroke',
    'synonym_matches': [],
    'top_matches': [{'desc': '', 'id': u'HP:0001297', 'label': u'Stroke'},
     {'desc': u'An artery disease that is characterized by dysfunction of the blood vessels supplying the brain.',
      'id': u'DOID:6713',
      'label': u'cerebrovascular disease'},
     {'desc': '', 'id': u'HP:0001727', 'label': u'Thromboembolic stroke'},
     {'desc': '', 'id': u'HP:0002140', 'label': u'Ischemic stroke'},
     {'desc': '', 'id': u'DOID:13403', 'label': u'cerebral sarcoidosis'},
     {'desc': '', 'id': u'DOID:10742', 'label': u'cerebral lipidosis'},
     {'desc': '', 'id': u'DOID:12720', 'label': u'cerebral atherosclerosis'},
     {'desc': '', 'id': u'DOID:3526', 'label': u'cerebral infarction'},
     {'desc': u'A cerebrum cancer that affects the lymph cells and derives_from the brain.',
      'id': u'DOID:5815',
      'label': u'cerebral lymphoma'},
     {'desc': u'A malaria that involves neurologic damage resulting from blockage of the blood vessels, caused due to the infection of the red blood cells by Plasmodium species.',
      'id': u'DOID:14069',
      'label': u'cerebral malaria'}]},
   {'query': 'COLD',
    'synonym_matches': [],
    'top_matches': [{'desc': u'An upper respiratory tract disease which involves inflammation of the mucous membranes of the nose, throat, eyes, and eustachian tubes with watery then purulent discharge. This is an acute contagious disease caused by rhinoviruses, human parainfluenza viruses, human respiratory syncytial virus, influenza viruses, adenoviruses, enteroviruses, or metapneumovirus.',
      'id': u'DOID:10459',
      'label': u'common cold'},
     {'desc': u'An autosomal dominant disease characterized by problems with regulating body temperature and other abnormalities affecting many parts of the body. It has material basis in mutations in the CRLF1 gene.',
      'id': u'DOID:0060294',
      'label': u'cold-induced sweating syndrome'},
     {'desc': '',
      'id': u'CL:0000587',
      'label': u'cold sensing thermoreceptor cell'},
     {'desc': '', 'id': u'HP:0003435', 'label': u'Cold-induced hand cramps'},
     {'desc': '', 'id': u'HP:0003449', 'label': u'Cold-induced muscle cramps'},
     {'desc': '',
      'id': u'DOID:3083',
      'label': u'chronic obstructive pulmonary disease'},
     {'desc': u'A bronchial disease that is an inflammation of the bronchial tubes. It is caused by bacteria and viruses. The disease has_symptom cough with mucus, has_symptom shortness of breath, has_symptom low fever and has_symptom chest tightness.',
      'id': u'DOID:6132',
      'label': u'bronchitis'},
     {'desc': u'A hypersensitivity reaction type IV disease that involves large amounts of cryoglobulins in the blood which become thick or gel-like in cold temperatures.',
      'id': u'DOID:2917',
      'label': u'cryoglobulinemia'},
     {'desc': u'A syndrome characterized by progressive weakness and atrophy of muscles in feet, legs and hands. In some patients the syndrome also causes decreased sensitivity to touch, heat or cold, particularly in the lower arms or legs.',
      'id': u'DOID:0050526',
      'label': u'Gamstorp-Wohlfart syndrome'},
     {'desc': u'An asthma that is triggered by factors not related to allergies such as anxiety, stress, exercise, cold air, dry air, hyperventilation, smoke, viruses, chemical irritants, autonomic imbalance, hormonal deficiencies and psychogenic influences. It is characterized by airway obstruction and inflammation that is at least partially reversible with medication. The symptoms include coughing, wheezing, shortness of breath or rapid breathing, and chest tightness.',
      'id': u'DOID:9360',
      'label': u'intrinsic asthma'}]}]},
 {'filename': 's0014lre.txt',
  'terms': [{'query': 'Myocardial infarction',
    'synonym_matches': [[{'desc': '',
       'id': u'DOID:3454',
       'label': u'brain infarction'}],
     [{'desc': '', 'id': u'DOID:2533', 'label': u'splenic infarction'}],
     [{'desc': '',
       'id': u'DOID:5850',
       'label': u'inferior myocardial infarction'}]],
    'top_matches': [{'desc': u'A coronary artery disease characterized by myocardial cell death (myocardial necrosis) due to prolonged ischaemia.',
      'id': u'DOID:5844',
      'label': u'myocardial infarction'},
     {'desc': '', 'id': u'HP:0001658', 'label': u'Myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10266',
      'label': u'subendocardial infarction acute myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10649',
      'label': u'acute inferolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10651',
      'label': u'acute anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5849',
      'label': u'subendocardial myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5848',
      'label': u'apical myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5843',
      'label': u'posteroinferior myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5845',
      'label': u'anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5847',
      'label': u'posterior myocardial infarction'}]},
   {'query': 'Diabetes mellitus',
    'synonym_matches': [],
    'top_matches': [{'desc': u'A glucose metabolism disease characterized  by chronic hyperglycaemia with disturbances of carbohydrate, fat and protein metabolism resulting from defects in insulin secretion, insulin action, or both.',
      'id': u'DOID:9351',
      'label': u'diabetes mellitus'},
     {'desc': '', 'id': u'HP:0000819', 'label': u'Diabetes mellitus'},
     {'desc': u"A diabetes mellitus that results from the body's failure to produce insulin and has_material_basis_in autoimmune destruction of insulin-producing beta cells of the pancreas.",
      'id': u'DOID:9744',
      'label': u'type 1 diabetes mellitus'},
     {'desc': '', 'id': u'DOID:11717', 'label': u'neonatal diabetes mellitus'},
     {'desc': u'A neonatal diabetes mellitus that has_material_basis_in homozygous mutation in the glucokinase gene (GCK), heterozygous mutation in the KCNJ11 and INS genes, or by heterozygous or homozygous mutation in the ABCC8 gene.',
      'id': u'DOID:0060639',
      'label': u'permanent neonatal diabetes mellitus'},
     {'desc': u'A diabetes mellitus that involves high blood glucose resulting from cells fail to use insulin properly.',
      'id': u'DOID:9352',
      'label': u'type 2 diabetes mellitus'},
     {'desc': u'A neonatal diabetes mellitus characterized by hyperglycemia during the neonatal period that remits during infancy but recurs in later life in most patients.',
      'id': u'DOID:0060334',
      'label': u'transient neonatal diabetes mellitus'},
     {'desc': '', 'id': u'DOID:11714', 'label': u'gestational diabetes'},
     {'desc': '',
      'id': u'HP:0008255',
      'label': u'Transient neonatal diabetes mellitus'},
     {'desc': '',
      'id': u'HP:0005978',
      'label': u'Type II diabetes mellitus'}]}]},
 {'filename': 's0015lre.txt',
  'terms': [{'query': 'Myocardial infarction',
    'synonym_matches': [[{'desc': '',
       'id': u'DOID:3454',
       'label': u'brain infarction'}],
     [{'desc': '', 'id': u'DOID:2533', 'label': u'splenic infarction'}],
     [{'desc': '',
       'id': u'DOID:5850',
       'label': u'inferior myocardial infarction'}]],
    'top_matches': [{'desc': u'A coronary artery disease characterized by myocardial cell death (myocardial necrosis) due to prolonged ischaemia.',
      'id': u'DOID:5844',
      'label': u'myocardial infarction'},
     {'desc': '', 'id': u'HP:0001658', 'label': u'Myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10266',
      'label': u'subendocardial infarction acute myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10649',
      'label': u'acute inferolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10651',
      'label': u'acute anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5849',
      'label': u'subendocardial myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5848',
      'label': u'apical myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5843',
      'label': u'posteroinferior myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5845',
      'label': u'anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5847',
      'label': u'posterior myocardial infarction'}]},
   {'query': 'Arterial hypertension',
    'synonym_matches': [],
    'top_matches': [{'desc': u'An artery disease characterized by chronic elevated blood pressure in the arteries.',
      'id': u'DOID:10763',
      'label': u'hypertension'},
     {'desc': '', 'id': u'HP:0000822', 'label': u'Hypertension'},
     {'desc': '', 'id': u'DOID:1073', 'label': u'renal hypertension'},
     {'desc': '', 'id': u'DOID:10824', 'label': u'malignant hypertension'},
     {'desc': u'A hypertension with no known cause. It is the most common type of hypertension.',
      'id': u'DOID:10825',
      'label': u'essential hypertension'},
     {'desc': '', 'id': u'DOID:10762', 'label': u'portal hypertension'},
     {'desc': '', 'id': u'DOID:1591', 'label': u'renovascular hypertension'},
     {'desc': u'An eye disease that is characterized by elevated intraocular pressure in the absence of optic nerve damage or visual field loss.',
      'id': u'DOID:9282',
      'label': u'ocular hypertension'},
     {'desc': u'A hypertension characterized by an increase of blood pressure in the pulmonary artery, pulmonary vein or pulmonary capillaries.',
      'id': u'DOID:6432',
      'label': u'pulmonary hypertension'},
     {'desc': '', 'id': u'DOID:9428', 'label': u'intracranial hypertension'}]},
   {'query': 'Adiposis hepatis',
    'synonym_matches': [],
    'top_matches': [{'desc': '',
      'id': u'DOID:3928',
      'label': u'adiposis dolorosa'},
     {'desc': '', 'id': u'DOID:914', 'label': u'peliosis hepatis'}]},
   {'query': 'Gastritis',
    'synonym_matches': [[{'desc': '',
       'id': u'DOID:8757',
       'label': u'gastric mucosal hypertrophy'}]],
    'top_matches': [{'desc': u'A stomach disease that is an inflammation of the lining of the stomach.',
      'id': u'DOID:4029',
      'label': u'gastritis'},
     {'desc': '', 'id': u'HP:0005263', 'label': u'Gastritis'},
     {'desc': '', 'id': u'DOID:8680', 'label': u'alcoholic gastritis'},
     {'desc': u'A viral gastritis that involves inflammation of the stomach lining caused by herpes simplex virus.',
      'id': u'DOID:6102',
      'label': u'herpetic gastritis'},
     {'desc': '', 'id': u'DOID:8929', 'label': u'atrophic gastritis'},
     {'desc': u'A gastrointestinal system infectious disease that involves inflammation of the stomach lining caused by viruses. The symptoms include abdominal pain, indigestion, ulcer formation, abdominal bloating, nausea and vomiting.',
      'id': u'DOID:2327',
      'label': u'viral gastritis'},
     {'desc': '', 'id': u'DOID:4030', 'label': u'eosinophilic gastritis'},
     {'desc': u'A gastritis that involves inflammation of the stomach lining caused by bacteria. The disease has_symptom abdominal pain, has_symptom indigestion, has_symptom ulcer formation, has_symptom abdominal bloating, has_symptom nausea and has_symptom vomiting.',
      'id': u'DOID:4033',
      'label': u'bacterial gastritis'},
     {'desc': '', 'id': u'DOID:4035', 'label': u'lymphocytic gastritis'},
     {'desc': u'A gastrointestinal system infectious disease that involves inflammation of the stomach lining caused by fungal infection in immunocompromised patients.',
      'id': u'DOID:4034',
      'label': u'fungal gastritis'}]}]},
 {'filename': 's0016lre.txt',
  'terms': [{'query': 'Myocardial infarction',
    'synonym_matches': [[{'desc': '',
       'id': u'DOID:3454',
       'label': u'brain infarction'}],
     [{'desc': '', 'id': u'DOID:2533', 'label': u'splenic infarction'}],
     [{'desc': '',
       'id': u'DOID:5850',
       'label': u'inferior myocardial infarction'}]],
    'top_matches': [{'desc': u'A coronary artery disease characterized by myocardial cell death (myocardial necrosis) due to prolonged ischaemia.',
      'id': u'DOID:5844',
      'label': u'myocardial infarction'},
     {'desc': '', 'id': u'HP:0001658', 'label': u'Myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10266',
      'label': u'subendocardial infarction acute myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10649',
      'label': u'acute inferolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10651',
      'label': u'acute anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5849',
      'label': u'subendocardial myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5848',
      'label': u'apical myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5843',
      'label': u'posteroinferior myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5845',
      'label': u'anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5847',
      'label': u'posterior myocardial infarction'}]},
   {'query': 'Diabetes mellitus',
    'synonym_matches': [],
    'top_matches': [{'desc': u'A glucose metabolism disease characterized  by chronic hyperglycaemia with disturbances of carbohydrate, fat and protein metabolism resulting from defects in insulin secretion, insulin action, or both.',
      'id': u'DOID:9351',
      'label': u'diabetes mellitus'},
     {'desc': '', 'id': u'HP:0000819', 'label': u'Diabetes mellitus'},
     {'desc': u"A diabetes mellitus that results from the body's failure to produce insulin and has_material_basis_in autoimmune destruction of insulin-producing beta cells of the pancreas.",
      'id': u'DOID:9744',
      'label': u'type 1 diabetes mellitus'},
     {'desc': '', 'id': u'DOID:11717', 'label': u'neonatal diabetes mellitus'},
     {'desc': u'A neonatal diabetes mellitus that has_material_basis_in homozygous mutation in the glucokinase gene (GCK), heterozygous mutation in the KCNJ11 and INS genes, or by heterozygous or homozygous mutation in the ABCC8 gene.',
      'id': u'DOID:0060639',
      'label': u'permanent neonatal diabetes mellitus'},
     {'desc': u'A diabetes mellitus that involves high blood glucose resulting from cells fail to use insulin properly.',
      'id': u'DOID:9352',
      'label': u'type 2 diabetes mellitus'},
     {'desc': u'A neonatal diabetes mellitus characterized by hyperglycemia during the neonatal period that remits during infancy but recurs in later life in most patients.',
      'id': u'DOID:0060334',
      'label': u'transient neonatal diabetes mellitus'},
     {'desc': '', 'id': u'DOID:11714', 'label': u'gestational diabetes'},
     {'desc': '',
      'id': u'HP:0008255',
      'label': u'Transient neonatal diabetes mellitus'},
     {'desc': '',
      'id': u'HP:0005978',
      'label': u'Type II diabetes mellitus'}]}]},
 {'filename': 's0018cre.txt',
  'terms': [{'query': 'Dysrhythmia',
    'synonym_matches': [],
    'top_matches': [{'desc': u'A syndrome characterized by a unique combination of cardiac arrhythmias and intestinal pseudo-obstruction. It has material basis in the mutated SGOL1 protein. Distinctive clinical features include atrial dysrhythmias, sick sinus syndrome (SSS) and valve anomalies and chronic intestinal pseudo-obstruction (CIPO).',
      'id': u'DOID:0060339',
      'label': u'chronic atrial and intestinal dysrhythmia'}]},
   {'query': 'Atrial fibrillation',
    'synonym_matches': [],
    'top_matches': [{'desc': u"A heart conduction disease that is characterized by uncoordinated electrical activity in the heart's upper chambers (the atria), which causes the heartbeat to become fast and irregular and has symptoms palpitations, weakness, fatigue, lightheadedness, dizziness, confusion, shortness of breath and chest pain.",
      'id': u'DOID:0060224',
      'label': u'atrial fibrillation'},
     {'desc': '', 'id': u'HP:0005110', 'label': u'Atrial fibrillation'},
     {'desc': u'An atrial fibrillation that has_material_basis_in autosomal dominant inheritance of the familial atrial fibrillation (ATFB) genes.',
      'id': u'DOID:0050650',
      'label': u'familial atrial fibrillation'},
     {'desc': '',
      'id': u'HP:0004757',
      'label': u'Paroxysmal atrial fibrillation'},
     {'desc': '',
      'id': u'HP:0004754',
      'label': u'Permanent atrial fibrillation'},
     {'desc': '', 'id': u'HP:0001663', 'label': u'Ventricular fibrillation'},
     {'desc': '', 'id': u'HP:0010546', 'label': u'Muscle fibrillation'},
     {'desc': u'A visceral heterotaxy characterized by complete atrioventricular septal defect with a common atrium and univentricular AV connection, total anomalous pulmonary drainage, and transposition or malposition of the great arteries and may be associated with bilateral trilobed lungs, midline liver, asplenia and situs inversus affecting other organs that has_material_basis_in homozygous mutation in the GDF1 gene on chromosome 19p12.',
      'id': u'DOID:0060856',
      'label': u'right atrial isomerism'},
     {'desc': u'A heart septal defect located_in in the septum that separates the two atria of the heart.',
      'id': u'DOID:1882',
      'label': u'atrial heart septal defect'},
     {'desc': u'An atrial heart septal defect type 1 associated with variation in the region 5p.',
      'id': u'DOID:0110106',
      'label': u'atrial heart septal defect 1'}]},
   {'query': 'Coronary artery disease',
    'synonym_matches': [[{'desc': '',
       'id': u'HP:0004929',
       'label': u'Coronary atherosclerosis'}]],
    'top_matches': [{'desc': u'An artery disease that is characterized by plaque building up along the inner walls of the arteries of the heart resulting in a narrowing of the arteries and a reduced blood supply to the cardiac muscles.',
      'id': u'DOID:3393',
      'label': u'coronary artery disease'},
     {'desc': '', 'id': u'HP:0001677', 'label': u'Coronary artery disease'},
     {'desc': '',
      'id': u'HP:0005181',
      'label': u'Premature coronary artery disease'},
     {'desc': '',
      'id': u'HP:0012436',
      'label': u'Nonocclusive coronary artery disease'},
     {'desc': '', 'id': u'DOID:4248', 'label': u'coronary stenosis'},
     {'desc': '', 'id': u'DOID:11847', 'label': u'coronary thrombosis'},
     {'desc': '', 'id': u'DOID:11843', 'label': u'coronary artery anomaly'},
     {'desc': '', 'id': u'DOID:11840', 'label': u'coronary artery vasospasm'},
     {'desc': '', 'id': u'UBERON:0001621', 'label': u'coronary artery'},
     {'desc': '', 'id': u'DOID:3362', 'label': u'coronary aneurysm'}]},
   {'query': 'COLD',
    'synonym_matches': [],
    'top_matches': [{'desc': u'An upper respiratory tract disease which involves inflammation of the mucous membranes of the nose, throat, eyes, and eustachian tubes with watery then purulent discharge. This is an acute contagious disease caused by rhinoviruses, human parainfluenza viruses, human respiratory syncytial virus, influenza viruses, adenoviruses, enteroviruses, or metapneumovirus.',
      'id': u'DOID:10459',
      'label': u'common cold'},
     {'desc': u'An autosomal dominant disease characterized by problems with regulating body temperature and other abnormalities affecting many parts of the body. It has material basis in mutations in the CRLF1 gene.',
      'id': u'DOID:0060294',
      'label': u'cold-induced sweating syndrome'},
     {'desc': '',
      'id': u'CL:0000587',
      'label': u'cold sensing thermoreceptor cell'},
     {'desc': '', 'id': u'HP:0003435', 'label': u'Cold-induced hand cramps'},
     {'desc': '', 'id': u'HP:0003449', 'label': u'Cold-induced muscle cramps'},
     {'desc': '',
      'id': u'DOID:3083',
      'label': u'chronic obstructive pulmonary disease'},
     {'desc': u'A bronchial disease that is an inflammation of the bronchial tubes. It is caused by bacteria and viruses. The disease has_symptom cough with mucus, has_symptom shortness of breath, has_symptom low fever and has_symptom chest tightness.',
      'id': u'DOID:6132',
      'label': u'bronchitis'},
     {'desc': u'A hypersensitivity reaction type IV disease that involves large amounts of cryoglobulins in the blood which become thick or gel-like in cold temperatures.',
      'id': u'DOID:2917',
      'label': u'cryoglobulinemia'},
     {'desc': u'A syndrome characterized by progressive weakness and atrophy of muscles in feet, legs and hands. In some patients the syndrome also causes decreased sensitivity to touch, heat or cold, particularly in the lower arms or legs.',
      'id': u'DOID:0050526',
      'label': u'Gamstorp-Wohlfart syndrome'},
     {'desc': u'An asthma that is triggered by factors not related to allergies such as anxiety, stress, exercise, cold air, dry air, hyperventilation, smoke, viruses, chemical irritants, autonomic imbalance, hormonal deficiencies and psychogenic influences. It is characterized by airway obstruction and inflammation that is at least partially reversible with medication. The symptoms include coughing, wheezing, shortness of breath or rapid breathing, and chest tightness.',
      'id': u'DOID:9360',
      'label': u'intrinsic asthma'}]},
   {'query': 'Aortic stenosis(gradient 85 mmHg)/regurgitation (grade 1-2)',
    'synonym_matches': [],
    'top_matches': [{'desc': '',
      'id': u'HP:0001659',
      'label': u'Aortic regurgitation'},
     {'desc': '', 'id': u'DOID:5805', 'label': u'subvalvular aortic stenosis'},
     {'desc': '',
      'id': u'DOID:1929',
      'label': u'supravalvular aortic stenosis'},
     {'desc': u'An aortic valve disease that has_physical_basis_in incomplete opening of the aortic valve.',
      'id': u'DOID:1712',
      'label': u'aortic valve stenosis'},
     {'desc': u'An aortic valve disease that is characterized by leaking of the aortic valve of the heart causes blood to flow in the reverse direction during ventricular diastole, from the aorta into the left ventricle.',
      'id': u'DOID:57',
      'label': u'aortic valve insufficiency'},
     {'desc': u'An aortic aneurysm that is located_in the abdominal aorta.',
      'id': u'DOID:7693',
      'label': u'abdominal aortic aneurysm'},
     {'desc': '',
      'id': u'HP:0001691',
      'label': u'Muscular subvalvular aortic stenosis'},
     {'desc': '', 'id': u'HP:0001650', 'label': u'Aortic valve stenosis'},
     {'desc': '',
      'id': u'HP:0005174',
      'label': u'Membranous subvalvular aortic stenosis'},
     {'desc': '',
      'id': u'HP:0005173',
      'label': u'Calcific aortic valve stenosis'}]}]},
 {'filename': 's0018lre.txt',
  'terms': [{'query': 'Dysrhythmia',
    'synonym_matches': [],
    'top_matches': [{'desc': u'A syndrome characterized by a unique combination of cardiac arrhythmias and intestinal pseudo-obstruction. It has material basis in the mutated SGOL1 protein. Distinctive clinical features include atrial dysrhythmias, sick sinus syndrome (SSS) and valve anomalies and chronic intestinal pseudo-obstruction (CIPO).',
      'id': u'DOID:0060339',
      'label': u'chronic atrial and intestinal dysrhythmia'}]},
   {'query': 'Atrial fibrillation',
    'synonym_matches': [],
    'top_matches': [{'desc': u"A heart conduction disease that is characterized by uncoordinated electrical activity in the heart's upper chambers (the atria), which causes the heartbeat to become fast and irregular and has symptoms palpitations, weakness, fatigue, lightheadedness, dizziness, confusion, shortness of breath and chest pain.",
      'id': u'DOID:0060224',
      'label': u'atrial fibrillation'},
     {'desc': '', 'id': u'HP:0005110', 'label': u'Atrial fibrillation'},
     {'desc': u'An atrial fibrillation that has_material_basis_in autosomal dominant inheritance of the familial atrial fibrillation (ATFB) genes.',
      'id': u'DOID:0050650',
      'label': u'familial atrial fibrillation'},
     {'desc': '',
      'id': u'HP:0004757',
      'label': u'Paroxysmal atrial fibrillation'},
     {'desc': '',
      'id': u'HP:0004754',
      'label': u'Permanent atrial fibrillation'},
     {'desc': '', 'id': u'HP:0001663', 'label': u'Ventricular fibrillation'},
     {'desc': '', 'id': u'HP:0010546', 'label': u'Muscle fibrillation'},
     {'desc': u'A visceral heterotaxy characterized by complete atrioventricular septal defect with a common atrium and univentricular AV connection, total anomalous pulmonary drainage, and transposition or malposition of the great arteries and may be associated with bilateral trilobed lungs, midline liver, asplenia and situs inversus affecting other organs that has_material_basis_in homozygous mutation in the GDF1 gene on chromosome 19p12.',
      'id': u'DOID:0060856',
      'label': u'right atrial isomerism'},
     {'desc': u'A heart septal defect located_in in the septum that separates the two atria of the heart.',
      'id': u'DOID:1882',
      'label': u'atrial heart septal defect'},
     {'desc': u'An atrial heart septal defect type 1 associated with variation in the region 5p.',
      'id': u'DOID:0110106',
      'label': u'atrial heart septal defect 1'}]},
   {'query': 'Coronary artery disease',
    'synonym_matches': [[{'desc': '',
       'id': u'HP:0004929',
       'label': u'Coronary atherosclerosis'}]],
    'top_matches': [{'desc': u'An artery disease that is characterized by plaque building up along the inner walls of the arteries of the heart resulting in a narrowing of the arteries and a reduced blood supply to the cardiac muscles.',
      'id': u'DOID:3393',
      'label': u'coronary artery disease'},
     {'desc': '', 'id': u'HP:0001677', 'label': u'Coronary artery disease'},
     {'desc': '',
      'id': u'HP:0005181',
      'label': u'Premature coronary artery disease'},
     {'desc': '',
      'id': u'HP:0012436',
      'label': u'Nonocclusive coronary artery disease'},
     {'desc': '', 'id': u'DOID:4248', 'label': u'coronary stenosis'},
     {'desc': '', 'id': u'DOID:11847', 'label': u'coronary thrombosis'},
     {'desc': '', 'id': u'DOID:11843', 'label': u'coronary artery anomaly'},
     {'desc': '', 'id': u'DOID:11840', 'label': u'coronary artery vasospasm'},
     {'desc': '', 'id': u'UBERON:0001621', 'label': u'coronary artery'},
     {'desc': '', 'id': u'DOID:3362', 'label': u'coronary aneurysm'}]},
   {'query': 'COLD',
    'synonym_matches': [],
    'top_matches': [{'desc': u'An upper respiratory tract disease which involves inflammation of the mucous membranes of the nose, throat, eyes, and eustachian tubes with watery then purulent discharge. This is an acute contagious disease caused by rhinoviruses, human parainfluenza viruses, human respiratory syncytial virus, influenza viruses, adenoviruses, enteroviruses, or metapneumovirus.',
      'id': u'DOID:10459',
      'label': u'common cold'},
     {'desc': u'An autosomal dominant disease characterized by problems with regulating body temperature and other abnormalities affecting many parts of the body. It has material basis in mutations in the CRLF1 gene.',
      'id': u'DOID:0060294',
      'label': u'cold-induced sweating syndrome'},
     {'desc': '',
      'id': u'CL:0000587',
      'label': u'cold sensing thermoreceptor cell'},
     {'desc': '', 'id': u'HP:0003435', 'label': u'Cold-induced hand cramps'},
     {'desc': '', 'id': u'HP:0003449', 'label': u'Cold-induced muscle cramps'},
     {'desc': '',
      'id': u'DOID:3083',
      'label': u'chronic obstructive pulmonary disease'},
     {'desc': u'A bronchial disease that is an inflammation of the bronchial tubes. It is caused by bacteria and viruses. The disease has_symptom cough with mucus, has_symptom shortness of breath, has_symptom low fever and has_symptom chest tightness.',
      'id': u'DOID:6132',
      'label': u'bronchitis'},
     {'desc': u'A hypersensitivity reaction type IV disease that involves large amounts of cryoglobulins in the blood which become thick or gel-like in cold temperatures.',
      'id': u'DOID:2917',
      'label': u'cryoglobulinemia'},
     {'desc': u'A syndrome characterized by progressive weakness and atrophy of muscles in feet, legs and hands. In some patients the syndrome also causes decreased sensitivity to touch, heat or cold, particularly in the lower arms or legs.',
      'id': u'DOID:0050526',
      'label': u'Gamstorp-Wohlfart syndrome'},
     {'desc': u'An asthma that is triggered by factors not related to allergies such as anxiety, stress, exercise, cold air, dry air, hyperventilation, smoke, viruses, chemical irritants, autonomic imbalance, hormonal deficiencies and psychogenic influences. It is characterized by airway obstruction and inflammation that is at least partially reversible with medication. The symptoms include coughing, wheezing, shortness of breath or rapid breathing, and chest tightness.',
      'id': u'DOID:9360',
      'label': u'intrinsic asthma'}]},
   {'query': 'Aortic stenosis(gradient 85 mmHg)/regurgitation (grade 1-2)',
    'synonym_matches': [],
    'top_matches': [{'desc': '',
      'id': u'HP:0001659',
      'label': u'Aortic regurgitation'},
     {'desc': '', 'id': u'DOID:5805', 'label': u'subvalvular aortic stenosis'},
     {'desc': '',
      'id': u'DOID:1929',
      'label': u'supravalvular aortic stenosis'},
     {'desc': u'An aortic valve disease that has_physical_basis_in incomplete opening of the aortic valve.',
      'id': u'DOID:1712',
      'label': u'aortic valve stenosis'},
     {'desc': u'An aortic valve disease that is characterized by leaking of the aortic valve of the heart causes blood to flow in the reverse direction during ventricular diastole, from the aorta into the left ventricle.',
      'id': u'DOID:57',
      'label': u'aortic valve insufficiency'},
     {'desc': u'An aortic aneurysm that is located_in the abdominal aorta.',
      'id': u'DOID:7693',
      'label': u'abdominal aortic aneurysm'},
     {'desc': '',
      'id': u'HP:0001691',
      'label': u'Muscular subvalvular aortic stenosis'},
     {'desc': '', 'id': u'HP:0001650', 'label': u'Aortic valve stenosis'},
     {'desc': '',
      'id': u'HP:0005174',
      'label': u'Membranous subvalvular aortic stenosis'},
     {'desc': '',
      'id': u'HP:0005173',
      'label': u'Calcific aortic valve stenosis'}]}]},
 {'filename': 's0019_re.txt',
  'terms': [{'query': 'Myocardial infarction',
    'synonym_matches': [[{'desc': '',
       'id': u'DOID:3454',
       'label': u'brain infarction'}],
     [{'desc': '', 'id': u'DOID:2533', 'label': u'splenic infarction'}],
     [{'desc': '',
       'id': u'DOID:5850',
       'label': u'inferior myocardial infarction'}]],
    'top_matches': [{'desc': u'A coronary artery disease characterized by myocardial cell death (myocardial necrosis) due to prolonged ischaemia.',
      'id': u'DOID:5844',
      'label': u'myocardial infarction'},
     {'desc': '', 'id': u'HP:0001658', 'label': u'Myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10266',
      'label': u'subendocardial infarction acute myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10649',
      'label': u'acute inferolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10651',
      'label': u'acute anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5849',
      'label': u'subendocardial myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5848',
      'label': u'apical myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5843',
      'label': u'posteroinferior myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5845',
      'label': u'anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5847',
      'label': u'posterior myocardial infarction'}]},
   {'query': 'Pericardial effusion',
    'synonym_matches': [[{'desc': u'A pericardial effusion that results from blood in the pericardial sac.',
       'id': u'DOID:11482',
       'label': u'hemopericardium'}]],
    'top_matches': [{'desc': u'A pericardium disease that is characterized by an abnormal accumulation of fluid in the pericardial cavity.',
      'id': u'DOID:118',
      'label': u'pericardial effusion'},
     {'desc': '', 'id': u'HP:0001698', 'label': u'Pericardial effusion'},
     {'desc': '',
      'id': u'HP:0011853',
      'label': u'Serous pericardial effusion'},
     {'desc': u'An extrapulmonary tuberculosis that is located_in pericardium resulting in acute pericarditis, chronic pericardial effusion, cardiac tamponade or pericardial constriction.',
      'id': u'DOID:4962',
      'label': u'pericardial tuberculosis'},
     {'desc': u'A pericardial effusion in which fluid accumulates in the pericardium (the sac in which the heart is enclosed) and the pericardial spaces fills up faster than the pericardial sac can stretch.',
      'id': u'DOID:115',
      'label': u'cardiac tamponade'},
     {'desc': '', 'id': u'DOID:6201', 'label': u'pericardial mesothelioma'},
     {'desc': '', 'id': u'HP:0002202', 'label': u'Pleural effusion'},
     {'desc': '', 'id': u'UBERON:0000175', 'label': u'pleural effusion'},
     {'desc': '', 'id': u'DOID:8012', 'label': u'benign pericardial teratoma'},
     {'desc': '',
      'id': u'HP:0011920',
      'label': u'Transudative pleural effusion'}]},
   {'query': 'Diabetes mellitus',
    'synonym_matches': [],
    'top_matches': [{'desc': u'A glucose metabolism disease characterized  by chronic hyperglycaemia with disturbances of carbohydrate, fat and protein metabolism resulting from defects in insulin secretion, insulin action, or both.',
      'id': u'DOID:9351',
      'label': u'diabetes mellitus'},
     {'desc': '', 'id': u'HP:0000819', 'label': u'Diabetes mellitus'},
     {'desc': u"A diabetes mellitus that results from the body's failure to produce insulin and has_material_basis_in autoimmune destruction of insulin-producing beta cells of the pancreas.",
      'id': u'DOID:9744',
      'label': u'type 1 diabetes mellitus'},
     {'desc': '', 'id': u'DOID:11717', 'label': u'neonatal diabetes mellitus'},
     {'desc': u'A neonatal diabetes mellitus that has_material_basis_in homozygous mutation in the glucokinase gene (GCK), heterozygous mutation in the KCNJ11 and INS genes, or by heterozygous or homozygous mutation in the ABCC8 gene.',
      'id': u'DOID:0060639',
      'label': u'permanent neonatal diabetes mellitus'},
     {'desc': u'A diabetes mellitus that involves high blood glucose resulting from cells fail to use insulin properly.',
      'id': u'DOID:9352',
      'label': u'type 2 diabetes mellitus'},
     {'desc': u'A neonatal diabetes mellitus characterized by hyperglycemia during the neonatal period that remits during infancy but recurs in later life in most patients.',
      'id': u'DOID:0060334',
      'label': u'transient neonatal diabetes mellitus'},
     {'desc': '', 'id': u'DOID:11714', 'label': u'gestational diabetes'},
     {'desc': '',
      'id': u'HP:0008255',
      'label': u'Transient neonatal diabetes mellitus'},
     {'desc': '',
      'id': u'HP:0005978',
      'label': u'Type II diabetes mellitus'}]},
   {'query': 'Renal insufficiency',
    'synonym_matches': [[{'desc': '',
       'id': u'HP:0004893',
       'label': u'progressive respiratory failure'}],
     [{'desc': u'A kidney disease characterized by the failure of the kidneys to adequately filter waste products from the blood.',
       'id': u'DOID:1074',
       'label': u'kidney failure'}]],
    'top_matches': [{'desc': '',
      'id': u'HP:0000083',
      'label': u'Renal insufficiency'},
     {'desc': '',
      'id': u'DOID:12465',
      'label': u'secondary hyperparathyroidism of renal origin'},
     {'desc': u'A vein disease that is characterized by impaired flow of blood through the veins.',
      'id': u'DOID:10128',
      'label': u'venous insufficiency'},
     {'desc': u'A placenta disease that is characterized by insufficient blood flow to the placenta during pregnancy.',
      'id': u'DOID:3891',
      'label': u'placental insufficiency'},
     {'desc': '',
      'id': u'DOID:13003',
      'label': u'vertebrobasilar insufficiency'},
     {'desc': u'A viral infectious disease that is a hemorrhagic fever, located_in kidney, has_material_basis_in Hantaan virus, has_material_basis_in Dobrava-Belgrade virus, has_material_basis_in Seoul virus, or has_material_basis_in Puumala virus, which are carried and transmitted_by rodents. The infection has_symptom headache, has_symptom fever, has_symptom muscle pains, has_symptom facial flush, has_symptom petechiae, has_symptom hemorrhagic features, has_symptom proteinuria, and has_symptom renal failure.',
      'id': u'DOID:11266',
      'label': u'hemorrhagic fever with renal syndrome'},
     {'desc': '',
      'id': u'DOID:13316',
      'label': u'exocrine pancreatic insufficiency'},
     {'desc': '',
      'id': u'DOID:8633',
      'label': u'chronic intestinal vascular insufficiency'},
     {'desc': u'A pulmonary valve disease that occurs when the pulmonary valve is not strong enough to prevent backflow into the right ventricle. If it is secondary to pulmonary hypertension it is referred to as a Graham Steell murmur.',
      'id': u'DOID:14265',
      'label': u'pulmonary valve insufficiency'},
     {'desc': u'An aortic valve disease that is characterized by leaking of the aortic valve of the heart causes blood to flow in the reverse direction during ventricular diastole, from the aorta into the left ventricle.',
      'id': u'DOID:57',
      'label': u'aortic valve insufficiency'}]},
   {'query': 'Dialysis',
    'synonym_matches': [[{'desc': '',
       'id': u'DOID:783',
       'label': u'end stage renal failure'}],
     [{'desc': '',
       'id': u'DOID:14702',
       'label': u'branchiootorenal syndrome'}],
     [{'desc': u'A syndrome characterized by malformations of the outer, middle and inner ear and branchial and renal malformations. Mutations of the EYA1, SIX1 and SIX5 genes are associated with the syndrome.',
       'id': u'DOID:0060232',
       'label': u'branchiootic syndrome'}]],
    'top_matches': [{'desc': '',
      'id': u'DOID:12514',
      'label': u'retinal perforation'},
     {'desc': u'A gastrointestinal system disease that involves inflammation of the peritoneum resulting from perforation of the gastrointestinal tract, which produces immediate chemical inflammation followed shortly by infection from intestinal organisms. Peritonitis can also result from appendicitis, diverticulitis, strangulating intestinal obstruction, pancreatitis, pelvic inflammatory disease, mesenteric ischemia, intraperitoneal blood, barium, or peritoneo-systemic shunts, drains, and dialysis catheters in the peritoneal cavity. The symptoms include abdominal pain and tenderness, fever, fluid in the abdomen, nausea, vomiting and low urine output.',
      'id': u'DOID:8283',
      'label': u'peritonitis'}]},
   {'query': 'Arterial hypertension',
    'synonym_matches': [],
    'top_matches': [{'desc': u'An artery disease characterized by chronic elevated blood pressure in the arteries.',
      'id': u'DOID:10763',
      'label': u'hypertension'},
     {'desc': '', 'id': u'HP:0000822', 'label': u'Hypertension'},
     {'desc': '', 'id': u'DOID:1073', 'label': u'renal hypertension'},
     {'desc': '', 'id': u'DOID:10824', 'label': u'malignant hypertension'},
     {'desc': u'A hypertension with no known cause. It is the most common type of hypertension.',
      'id': u'DOID:10825',
      'label': u'essential hypertension'},
     {'desc': '', 'id': u'DOID:10762', 'label': u'portal hypertension'},
     {'desc': '', 'id': u'DOID:1591', 'label': u'renovascular hypertension'},
     {'desc': u'An eye disease that is characterized by elevated intraocular pressure in the absence of optic nerve damage or visual field loss.',
      'id': u'DOID:9282',
      'label': u'ocular hypertension'},
     {'desc': u'A hypertension characterized by an increase of blood pressure in the pulmonary artery, pulmonary vein or pulmonary capillaries.',
      'id': u'DOID:6432',
      'label': u'pulmonary hypertension'},
     {'desc': '', 'id': u'DOID:9428', 'label': u'intracranial hypertension'}]},
   {'query': 'Hyperlipoproteinemia',
    'synonym_matches': [[{'desc': u'A lipid metabolism disorder characterized by elevated triglyceride levels as a result of excess hepatic production of VLDL or heterozygous LPL deficiency.',
       'id': u'DOID:0050527',
       'label': u'familial hypertriglyceridemia'}]],
    'top_matches': [{'desc': '',
      'id': u'HP:0010980',
      'label': u'Hyperlipoproteinemia'},
     {'desc': '',
      'id': u'DOID:1172',
      'label': u'hyperlipoproteinemia type IV'},
     {'desc': '', 'id': u'DOID:1171', 'label': u'hyperlipoproteinemia type V'},
     {'desc': '',
      'id': u'DOID:3145',
      'label': u'hyperlipoproteinemia type III'},
     {'desc': '', 'id': u'DOID:1168', 'label': u'familial hyperlipidemia'},
     {'desc': u'A familial hyperlipidemia characterized by very high levels of low-density lipoprotein (LDL) and early cardiovascular disease.',
      'id': u'DOID:13810',
      'label': u'familial hypercholesterolemia'},
     {'desc': '',
      'id': u'DOID:14118',
      'label': u'familial lipoprotein lipase deficiency'},
     {'desc': '',
      'id': u'DOID:13809',
      'label': u'familial combined hyperlipidemia'}]},
   {'query': 'Peripheral atherosclerosis',
    'synonym_matches': [[{'desc': '',
       'id': u'DOID:2348',
       'label': u'arteriosclerotic cardiovascular disease'}],
     [{'desc': u'An artery disease that is characterized by build up of plaque in the arteries that carry blood to your head, organs, and limbs.',
       'id': u'DOID:0050830',
       'label': u'peripheral artery disease'}],
     [{'desc': '',
       'id': u'DOID:13097',
       'label': u'intracranial arteriosclerosis'}]],
    'top_matches': [{'desc': '',
      'id': u'DOID:1936',
      'label': u'atherosclerosis'},
     {'desc': '', 'id': u'HP:0002621', 'label': u'Atherosclerosis'},
     {'desc': '', 'id': u'DOID:10230', 'label': u'aortic atherosclerosis'},
     {'desc': '', 'id': u'DOID:12720', 'label': u'cerebral atherosclerosis'},
     {'desc': '', 'id': u'DOID:2347', 'label': u'generalized atherosclerosis'},
     {'desc': '',
      'id': u'HP:0004943',
      'label': u'Accelerated atherosclerosis'},
     {'desc': '', 'id': u'HP:0004929', 'label': u'Coronary atherosclerosis'},
     {'desc': '', 'id': u'HP:0012397', 'label': u'Aortic atherosclerosis'},
     {'desc': '', 'id': u'HP:0004416', 'label': u'Precocious atherosclerosis'},
     {'desc': '', 'id': u'DOID:9847', 'label': u'peripheral vertigo'}]}]},
 {'filename': 's0020are.txt',
  'terms': [{'query': 'Myocardial infarction',
    'synonym_matches': [[{'desc': '',
       'id': u'DOID:3454',
       'label': u'brain infarction'}],
     [{'desc': '', 'id': u'DOID:2533', 'label': u'splenic infarction'}],
     [{'desc': '',
       'id': u'DOID:5850',
       'label': u'inferior myocardial infarction'}]],
    'top_matches': [{'desc': u'A coronary artery disease characterized by myocardial cell death (myocardial necrosis) due to prolonged ischaemia.',
      'id': u'DOID:5844',
      'label': u'myocardial infarction'},
     {'desc': '', 'id': u'HP:0001658', 'label': u'Myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10266',
      'label': u'subendocardial infarction acute myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10649',
      'label': u'acute inferolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10651',
      'label': u'acute anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5849',
      'label': u'subendocardial myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5848',
      'label': u'apical myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5843',
      'label': u'posteroinferior myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5845',
      'label': u'anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5847',
      'label': u'posterior myocardial infarction'}]},
   {'query': 'Arterial hypertension',
    'synonym_matches': [],
    'top_matches': [{'desc': u'An artery disease characterized by chronic elevated blood pressure in the arteries.',
      'id': u'DOID:10763',
      'label': u'hypertension'},
     {'desc': '', 'id': u'HP:0000822', 'label': u'Hypertension'},
     {'desc': '', 'id': u'DOID:1073', 'label': u'renal hypertension'},
     {'desc': '', 'id': u'DOID:10824', 'label': u'malignant hypertension'},
     {'desc': u'A hypertension with no known cause. It is the most common type of hypertension.',
      'id': u'DOID:10825',
      'label': u'essential hypertension'},
     {'desc': '', 'id': u'DOID:10762', 'label': u'portal hypertension'},
     {'desc': '', 'id': u'DOID:1591', 'label': u'renovascular hypertension'},
     {'desc': u'An eye disease that is characterized by elevated intraocular pressure in the absence of optic nerve damage or visual field loss.',
      'id': u'DOID:9282',
      'label': u'ocular hypertension'},
     {'desc': u'A hypertension characterized by an increase of blood pressure in the pulmonary artery, pulmonary vein or pulmonary capillaries.',
      'id': u'DOID:6432',
      'label': u'pulmonary hypertension'},
     {'desc': '', 'id': u'DOID:9428', 'label': u'intracranial hypertension'}]},
   {'query': 'Obesity',
    'synonym_matches': [],
    'top_matches': [{'desc': '', 'id': u'DOID:9970', 'label': u'obesity'},
     {'desc': '', 'id': u'HP:0001513', 'label': u'Obesity'},
     {'desc': '', 'id': u'DOID:11981', 'label': u'morbid obesity'},
     {'desc': '', 'id': u'HP:0001956', 'label': u'Truncal obesity'},
     {'desc': '', 'id': u'HP:0012743', 'label': u'Abdominal obesity'},
     {'desc': '',
      'id': u'DOID:0060611',
      'label': u'abdominal obesity-metabolic syndrome'},
     {'desc': u'An abdominal obesity-metabolic syndrome that has_material_basis_in heterozygous mutation in the DYRK1B gene on chromosome 19q13.',
      'id': u'DOID:0060612',
      'label': u'abdominal obesity-metabolic syndrome 3'},
     {'desc': '',
      'id': u'HP:0008915',
      'label': u'Childhood-onset truncal obesity'},
     {'desc': '', 'id': u'DOID:14221', 'label': u'metabolic syndrome X'},
     {'desc': u'A syndromic X-linked intellectual disability characterized by intellectual disability, truncal obesity, gynecomastia, hypogonadism, dysmorphic facial features, and short stature  that has_material_basis_in hemizygous mutation in the LAS1L gene (300964) on chromosome Xq12.',
      'id': u'DOID:0060814',
      'label': u'Wilson-Turner syndrome'}]}]},
 {'filename': 's0020bre.txt',
  'terms': [{'query': 'Myocardial infarction',
    'synonym_matches': [[{'desc': '',
       'id': u'DOID:3454',
       'label': u'brain infarction'}],
     [{'desc': '', 'id': u'DOID:2533', 'label': u'splenic infarction'}],
     [{'desc': '',
       'id': u'DOID:5850',
       'label': u'inferior myocardial infarction'}]],
    'top_matches': [{'desc': u'A coronary artery disease characterized by myocardial cell death (myocardial necrosis) due to prolonged ischaemia.',
      'id': u'DOID:5844',
      'label': u'myocardial infarction'},
     {'desc': '', 'id': u'HP:0001658', 'label': u'Myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10266',
      'label': u'subendocardial infarction acute myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10649',
      'label': u'acute inferolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10651',
      'label': u'acute anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5849',
      'label': u'subendocardial myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5848',
      'label': u'apical myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5843',
      'label': u'posteroinferior myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5845',
      'label': u'anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5847',
      'label': u'posterior myocardial infarction'}]},
   {'query': 'Arterial hypertension',
    'synonym_matches': [],
    'top_matches': [{'desc': u'An artery disease characterized by chronic elevated blood pressure in the arteries.',
      'id': u'DOID:10763',
      'label': u'hypertension'},
     {'desc': '', 'id': u'HP:0000822', 'label': u'Hypertension'},
     {'desc': '', 'id': u'DOID:1073', 'label': u'renal hypertension'},
     {'desc': '', 'id': u'DOID:10824', 'label': u'malignant hypertension'},
     {'desc': u'A hypertension with no known cause. It is the most common type of hypertension.',
      'id': u'DOID:10825',
      'label': u'essential hypertension'},
     {'desc': '', 'id': u'DOID:10762', 'label': u'portal hypertension'},
     {'desc': '', 'id': u'DOID:1591', 'label': u'renovascular hypertension'},
     {'desc': u'An eye disease that is characterized by elevated intraocular pressure in the absence of optic nerve damage or visual field loss.',
      'id': u'DOID:9282',
      'label': u'ocular hypertension'},
     {'desc': u'A hypertension characterized by an increase of blood pressure in the pulmonary artery, pulmonary vein or pulmonary capillaries.',
      'id': u'DOID:6432',
      'label': u'pulmonary hypertension'},
     {'desc': '', 'id': u'DOID:9428', 'label': u'intracranial hypertension'}]},
   {'query': 'Obesity',
    'synonym_matches': [],
    'top_matches': [{'desc': '', 'id': u'DOID:9970', 'label': u'obesity'},
     {'desc': '', 'id': u'HP:0001513', 'label': u'Obesity'},
     {'desc': '', 'id': u'DOID:11981', 'label': u'morbid obesity'},
     {'desc': '', 'id': u'HP:0001956', 'label': u'Truncal obesity'},
     {'desc': '', 'id': u'HP:0012743', 'label': u'Abdominal obesity'},
     {'desc': '',
      'id': u'DOID:0060611',
      'label': u'abdominal obesity-metabolic syndrome'},
     {'desc': u'An abdominal obesity-metabolic syndrome that has_material_basis_in heterozygous mutation in the DYRK1B gene on chromosome 19q13.',
      'id': u'DOID:0060612',
      'label': u'abdominal obesity-metabolic syndrome 3'},
     {'desc': '',
      'id': u'HP:0008915',
      'label': u'Childhood-onset truncal obesity'},
     {'desc': '', 'id': u'DOID:14221', 'label': u'metabolic syndrome X'},
     {'desc': u'A syndromic X-linked intellectual disability characterized by intellectual disability, truncal obesity, gynecomastia, hypogonadism, dysmorphic facial features, and short stature  that has_material_basis_in hemizygous mutation in the LAS1L gene (300964) on chromosome Xq12.',
      'id': u'DOID:0060814',
      'label': u'Wilson-Turner syndrome'}]}]},
 {'filename': 's0021are.txt',
  'terms': [{'query': 'Myocardial infarction',
    'synonym_matches': [[{'desc': '',
       'id': u'DOID:3454',
       'label': u'brain infarction'}],
     [{'desc': '', 'id': u'DOID:2533', 'label': u'splenic infarction'}],
     [{'desc': '',
       'id': u'DOID:5850',
       'label': u'inferior myocardial infarction'}]],
    'top_matches': [{'desc': u'A coronary artery disease characterized by myocardial cell death (myocardial necrosis) due to prolonged ischaemia.',
      'id': u'DOID:5844',
      'label': u'myocardial infarction'},
     {'desc': '', 'id': u'HP:0001658', 'label': u'Myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10266',
      'label': u'subendocardial infarction acute myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10649',
      'label': u'acute inferolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10651',
      'label': u'acute anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5849',
      'label': u'subendocardial myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5848',
      'label': u'apical myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5843',
      'label': u'posteroinferior myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5845',
      'label': u'anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5847',
      'label': u'posterior myocardial infarction'}]},
   {'query': 'Skoliosis', 'synonym_matches': [], 'top_matches': []}]},
 {'filename': 's0021bre.txt',
  'terms': [{'query': 'Myocardial infarction',
    'synonym_matches': [[{'desc': '',
       'id': u'DOID:3454',
       'label': u'brain infarction'}],
     [{'desc': '', 'id': u'DOID:2533', 'label': u'splenic infarction'}],
     [{'desc': '',
       'id': u'DOID:5850',
       'label': u'inferior myocardial infarction'}]],
    'top_matches': [{'desc': u'A coronary artery disease characterized by myocardial cell death (myocardial necrosis) due to prolonged ischaemia.',
      'id': u'DOID:5844',
      'label': u'myocardial infarction'},
     {'desc': '', 'id': u'HP:0001658', 'label': u'Myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10266',
      'label': u'subendocardial infarction acute myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10649',
      'label': u'acute inferolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10651',
      'label': u'acute anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5849',
      'label': u'subendocardial myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5848',
      'label': u'apical myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5843',
      'label': u'posteroinferior myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5845',
      'label': u'anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5847',
      'label': u'posterior myocardial infarction'}]},
   {'query': 'Skoliosis', 'synonym_matches': [], 'top_matches': []}]},
 {'filename': 's0022lre.txt',
  'terms': [{'query': 'Myocardial infarction',
    'synonym_matches': [[{'desc': '',
       'id': u'DOID:3454',
       'label': u'brain infarction'}],
     [{'desc': '', 'id': u'DOID:2533', 'label': u'splenic infarction'}],
     [{'desc': '',
       'id': u'DOID:5850',
       'label': u'inferior myocardial infarction'}]],
    'top_matches': [{'desc': u'A coronary artery disease characterized by myocardial cell death (myocardial necrosis) due to prolonged ischaemia.',
      'id': u'DOID:5844',
      'label': u'myocardial infarction'},
     {'desc': '', 'id': u'HP:0001658', 'label': u'Myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10266',
      'label': u'subendocardial infarction acute myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10649',
      'label': u'acute inferolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10651',
      'label': u'acute anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5849',
      'label': u'subendocardial myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5848',
      'label': u'apical myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5843',
      'label': u'posteroinferior myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5845',
      'label': u'anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5847',
      'label': u'posterior myocardial infarction'}]},
   {'query': 'Struma (euthyroid)',
    'synonym_matches': [],
    'top_matches': [{'desc': '',
      'id': u'DOID:2640',
      'label': u'struma ovarii'},
     {'desc': '', 'id': u'DOID:5209', 'label': u'benign struma ovarii'},
     {'desc': '', 'id': u'DOID:5208', 'label': u'malignant struma ovarii'},
     {'desc': '', 'id': u'DOID:2856', 'label': u'euthyroid sick syndrome'},
     {'desc': '',
      'id': u'HP:0008247',
      'label': u'Euthyroid hyperthyroxinemia'},
     {'desc': '', 'id': u'HP:0009798', 'label': u'Euthyroid goiter'},
     {'desc': '',
      'id': u'HP:0000866',
      'label': u'Euthyroid multinodular goiter'},
     {'desc': u'An autosomal recessive disease characterized by bilateral prelingual sensorineural hearing loss and euthyroid goiter and that has_material_basis_in homozygous or compound heterozygous mutation in the SLC26A4 gene on chromosome 7q.',
      'id': u'DOID:0060744',
      'label': u'Pendred Syndrome'}]}]},
 {'filename': 's0023_re.txt',
  'terms': [{'query': 'Heart failure (NYHA 2)',
    'synonym_matches': [],
    'top_matches': [{'desc': u'A heart disease that is characterized by any structural or functional cardiac disorder that impairs the ability of the heart to fill with or pump a sufficient amount of blood throughout the body.',
      'id': u'DOID:6000',
      'label': u'congestive heart failure'},
     {'desc': '', 'id': u'DOID:9775', 'label': u'diastolic heart failure'},
     {'desc': '', 'id': u'DOID:9651', 'label': u'systolic heart failure'},
     {'desc': '',
      'id': u'DOID:14172',
      'label': u'rheumatic congestive heart failure'},
     {'desc': '', 'id': u'HP:0001635', 'label': u'Congestive heart failure'},
     {'desc': '', 'id': u'HP:0005130', 'label': u'Restrictive heart failure'},
     {'desc': '',
      'id': u'HP:0001722',
      'label': u'High-output congestive heart failure'},
     {'desc': '',
      'id': u'HP:0009805',
      'label': u'Low-output congestive heart failure'},
     {'desc': u'A syndromic X-linked intellectual disability characterized by intellectual disability, delayed psychomotor development, seizures, large joint contractures, cardiac abnormalities, and abnormal positioning of the thumbs that has_material_basis_in mutation in the CLIC2 gene on chromosome Xq28.',
      'id': u'DOID:0060828',
      'label': u'X-linked intellectual disability-cardiomegaly-congestive heart failure syndrome'},
     {'desc': u'An atrial heart septal defect type 2 that has material basis in heterozygous mutation in the GATA4 gene on chromosome 8p23.',
      'id': u'DOID:0110107',
      'label': u'atrial heart septal defect 2'}]},
   {'query': 'Arteriel hypertension',
    'synonym_matches': [],
    'top_matches': [{'desc': u'An artery disease characterized by chronic elevated blood pressure in the arteries.',
      'id': u'DOID:10763',
      'label': u'hypertension'},
     {'desc': '', 'id': u'HP:0000822', 'label': u'Hypertension'},
     {'desc': '', 'id': u'DOID:1073', 'label': u'renal hypertension'},
     {'desc': '', 'id': u'DOID:10824', 'label': u'malignant hypertension'},
     {'desc': u'A hypertension with no known cause. It is the most common type of hypertension.',
      'id': u'DOID:10825',
      'label': u'essential hypertension'},
     {'desc': '', 'id': u'DOID:10762', 'label': u'portal hypertension'},
     {'desc': '', 'id': u'DOID:1591', 'label': u'renovascular hypertension'},
     {'desc': u'An eye disease that is characterized by elevated intraocular pressure in the absence of optic nerve damage or visual field loss.',
      'id': u'DOID:9282',
      'label': u'ocular hypertension'},
     {'desc': u'A hypertension characterized by an increase of blood pressure in the pulmonary artery, pulmonary vein or pulmonary capillaries.',
      'id': u'DOID:6432',
      'label': u'pulmonary hypertension'},
     {'desc': '', 'id': u'DOID:9428', 'label': u'intracranial hypertension'}]},
   {'query': 'Diabetes mellitus',
    'synonym_matches': [],
    'top_matches': [{'desc': u'A glucose metabolism disease characterized  by chronic hyperglycaemia with disturbances of carbohydrate, fat and protein metabolism resulting from defects in insulin secretion, insulin action, or both.',
      'id': u'DOID:9351',
      'label': u'diabetes mellitus'},
     {'desc': '', 'id': u'HP:0000819', 'label': u'Diabetes mellitus'},
     {'desc': u"A diabetes mellitus that results from the body's failure to produce insulin and has_material_basis_in autoimmune destruction of insulin-producing beta cells of the pancreas.",
      'id': u'DOID:9744',
      'label': u'type 1 diabetes mellitus'},
     {'desc': '', 'id': u'DOID:11717', 'label': u'neonatal diabetes mellitus'},
     {'desc': u'A neonatal diabetes mellitus that has_material_basis_in homozygous mutation in the glucokinase gene (GCK), heterozygous mutation in the KCNJ11 and INS genes, or by heterozygous or homozygous mutation in the ABCC8 gene.',
      'id': u'DOID:0060639',
      'label': u'permanent neonatal diabetes mellitus'},
     {'desc': u'A diabetes mellitus that involves high blood glucose resulting from cells fail to use insulin properly.',
      'id': u'DOID:9352',
      'label': u'type 2 diabetes mellitus'},
     {'desc': u'A neonatal diabetes mellitus characterized by hyperglycemia during the neonatal period that remits during infancy but recurs in later life in most patients.',
      'id': u'DOID:0060334',
      'label': u'transient neonatal diabetes mellitus'},
     {'desc': '', 'id': u'DOID:11714', 'label': u'gestational diabetes'},
     {'desc': '',
      'id': u'HP:0008255',
      'label': u'Transient neonatal diabetes mellitus'},
     {'desc': '',
      'id': u'HP:0005978',
      'label': u'Type II diabetes mellitus'}]},
   {'query': 'diabetic nephropathy',
    'synonym_matches': [[{'desc': '',
       'id': u'HP:0001953',
       'label': u'Diabetic ketoacidosis'}],
     [{'desc': '',
       'id': u'DOID:11503',
       'label': u'diabetic autonomic neuropathy'}],
     [{'desc': '',
       'id': u'DOID:10976',
       'label': u'membranous glomerulonephritis'}]],
    'top_matches': [{'desc': '', 'id': u'HP:0000112', 'label': u'Nephropathy'},
     {'desc': u'A urinary system disease that is located_in the kidney.',
      'id': u'DOID:557',
      'label': u'kidney disease'},
     {'desc': u'An interstitial nephritis endemic to the regions along the Danube river, in the modern countries of Croatia, Bosnia and Herzegovina, Serbia, Romania and Bulgaria.',
      'id': u'DOID:3052',
      'label': u'Balkan nephropathy'},
     {'desc': '', 'id': u'DOID:13328', 'label': u'diabetic cataract'},
     {'desc': '', 'id': u'DOID:12785', 'label': u'diabetic polyneuropathy'},
     {'desc': '', 'id': u'DOID:9743', 'label': u'diabetic neuropathy'},
     {'desc': '', 'id': u'DOID:8947', 'label': u'diabetic retinopathy'},
     {'desc': '', 'id': u'DOID:11713', 'label': u'diabetic angiopathy'},
     {'desc': '', 'id': u'DOID:1837', 'label': u'diabetic ketoacidosis'},
     {'desc': u'A brain disease that is characterized by functional impairment of cognition, cerebral signal conduction, neurotransmission and synaptic plasticity, and underlying structural pathology associated with diabetes.',
      'id': u'DOID:0050850',
      'label': u'diabetic encephalopathy'}]},
   {'query': 'Basalioma', 'synonym_matches': [], 'top_matches': []}]},
 {'filename': 's0025lre.txt',
  'terms': [{'query': 'Myocardial infarction',
    'synonym_matches': [[{'desc': '',
       'id': u'DOID:3454',
       'label': u'brain infarction'}],
     [{'desc': '', 'id': u'DOID:2533', 'label': u'splenic infarction'}],
     [{'desc': '',
       'id': u'DOID:5850',
       'label': u'inferior myocardial infarction'}]],
    'top_matches': [{'desc': u'A coronary artery disease characterized by myocardial cell death (myocardial necrosis) due to prolonged ischaemia.',
      'id': u'DOID:5844',
      'label': u'myocardial infarction'},
     {'desc': '', 'id': u'HP:0001658', 'label': u'Myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10266',
      'label': u'subendocardial infarction acute myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10649',
      'label': u'acute inferolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10651',
      'label': u'acute anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5849',
      'label': u'subendocardial myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5848',
      'label': u'apical myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5843',
      'label': u'posteroinferior myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5845',
      'label': u'anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5847',
      'label': u'posterior myocardial infarction'}]},
   {'query': 'Skoliosis', 'synonym_matches': [], 'top_matches': []}]},
 {'filename': 's0026lre.txt',
  'terms': [{'query': 'Myocardial infarction',
    'synonym_matches': [[{'desc': '',
       'id': u'DOID:3454',
       'label': u'brain infarction'}],
     [{'desc': '', 'id': u'DOID:2533', 'label': u'splenic infarction'}],
     [{'desc': '',
       'id': u'DOID:5850',
       'label': u'inferior myocardial infarction'}]],
    'top_matches': [{'desc': u'A coronary artery disease characterized by myocardial cell death (myocardial necrosis) due to prolonged ischaemia.',
      'id': u'DOID:5844',
      'label': u'myocardial infarction'},
     {'desc': '', 'id': u'HP:0001658', 'label': u'Myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10266',
      'label': u'subendocardial infarction acute myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10649',
      'label': u'acute inferolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10651',
      'label': u'acute anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5849',
      'label': u'subendocardial myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5848',
      'label': u'apical myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5843',
      'label': u'posteroinferior myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5845',
      'label': u'anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5847',
      'label': u'posterior myocardial infarction'}]},
   {'query': 'Hyperlipoproteinemia',
    'synonym_matches': [[{'desc': u'A lipid metabolism disorder characterized by elevated triglyceride levels as a result of excess hepatic production of VLDL or heterozygous LPL deficiency.',
       'id': u'DOID:0050527',
       'label': u'familial hypertriglyceridemia'}]],
    'top_matches': [{'desc': '',
      'id': u'HP:0010980',
      'label': u'Hyperlipoproteinemia'},
     {'desc': '',
      'id': u'DOID:1172',
      'label': u'hyperlipoproteinemia type IV'},
     {'desc': '', 'id': u'DOID:1171', 'label': u'hyperlipoproteinemia type V'},
     {'desc': '',
      'id': u'DOID:3145',
      'label': u'hyperlipoproteinemia type III'},
     {'desc': '', 'id': u'DOID:1168', 'label': u'familial hyperlipidemia'},
     {'desc': u'A familial hyperlipidemia characterized by very high levels of low-density lipoprotein (LDL) and early cardiovascular disease.',
      'id': u'DOID:13810',
      'label': u'familial hypercholesterolemia'},
     {'desc': '',
      'id': u'DOID:14118',
      'label': u'familial lipoprotein lipase deficiency'},
     {'desc': '',
      'id': u'DOID:13809',
      'label': u'familial combined hyperlipidemia'}]}]},
 {'filename': 's0027lre.txt',
  'terms': [{'query': 'Myocardial infarction',
    'synonym_matches': [[{'desc': '',
       'id': u'DOID:3454',
       'label': u'brain infarction'}],
     [{'desc': '', 'id': u'DOID:2533', 'label': u'splenic infarction'}],
     [{'desc': '',
       'id': u'DOID:5850',
       'label': u'inferior myocardial infarction'}]],
    'top_matches': [{'desc': u'A coronary artery disease characterized by myocardial cell death (myocardial necrosis) due to prolonged ischaemia.',
      'id': u'DOID:5844',
      'label': u'myocardial infarction'},
     {'desc': '', 'id': u'HP:0001658', 'label': u'Myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10266',
      'label': u'subendocardial infarction acute myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10649',
      'label': u'acute inferolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10651',
      'label': u'acute anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5849',
      'label': u'subendocardial myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5848',
      'label': u'apical myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5843',
      'label': u'posteroinferior myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5845',
      'label': u'anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5847',
      'label': u'posterior myocardial infarction'}]},
   {'query': 'Struma (euthyroid)',
    'synonym_matches': [],
    'top_matches': [{'desc': '',
      'id': u'DOID:2640',
      'label': u'struma ovarii'},
     {'desc': '', 'id': u'DOID:5209', 'label': u'benign struma ovarii'},
     {'desc': '', 'id': u'DOID:5208', 'label': u'malignant struma ovarii'},
     {'desc': '', 'id': u'DOID:2856', 'label': u'euthyroid sick syndrome'},
     {'desc': '',
      'id': u'HP:0008247',
      'label': u'Euthyroid hyperthyroxinemia'},
     {'desc': '', 'id': u'HP:0009798', 'label': u'Euthyroid goiter'},
     {'desc': '',
      'id': u'HP:0000866',
      'label': u'Euthyroid multinodular goiter'},
     {'desc': u'An autosomal recessive disease characterized by bilateral prelingual sensorineural hearing loss and euthyroid goiter and that has_material_basis_in homozygous or compound heterozygous mutation in the SLC26A4 gene on chromosome 7q.',
      'id': u'DOID:0060744',
      'label': u'Pendred Syndrome'}]}]},
 {'filename': 's0028lre.txt',
  'terms': [{'query': 'Myocardial infarction',
    'synonym_matches': [[{'desc': '',
       'id': u'DOID:3454',
       'label': u'brain infarction'}],
     [{'desc': '', 'id': u'DOID:2533', 'label': u'splenic infarction'}],
     [{'desc': '',
       'id': u'DOID:5850',
       'label': u'inferior myocardial infarction'}]],
    'top_matches': [{'desc': u'A coronary artery disease characterized by myocardial cell death (myocardial necrosis) due to prolonged ischaemia.',
      'id': u'DOID:5844',
      'label': u'myocardial infarction'},
     {'desc': '', 'id': u'HP:0001658', 'label': u'Myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10266',
      'label': u'subendocardial infarction acute myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10649',
      'label': u'acute inferolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10651',
      'label': u'acute anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5849',
      'label': u'subendocardial myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5848',
      'label': u'apical myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5843',
      'label': u'posteroinferior myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5845',
      'label': u'anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5847',
      'label': u'posterior myocardial infarction'}]},
   {'query': 'Hypercholesterinemia',
    'synonym_matches': [],
    'top_matches': []}]},
 {'filename': 's0029lre.txt',
  'terms': [{'query': 'Myocardial infarction',
    'synonym_matches': [[{'desc': '',
       'id': u'DOID:3454',
       'label': u'brain infarction'}],
     [{'desc': '', 'id': u'DOID:2533', 'label': u'splenic infarction'}],
     [{'desc': '',
       'id': u'DOID:5850',
       'label': u'inferior myocardial infarction'}]],
    'top_matches': [{'desc': u'A coronary artery disease characterized by myocardial cell death (myocardial necrosis) due to prolonged ischaemia.',
      'id': u'DOID:5844',
      'label': u'myocardial infarction'},
     {'desc': '', 'id': u'HP:0001658', 'label': u'Myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10266',
      'label': u'subendocardial infarction acute myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10649',
      'label': u'acute inferolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10651',
      'label': u'acute anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5849',
      'label': u'subendocardial myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5848',
      'label': u'apical myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5843',
      'label': u'posteroinferior myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5845',
      'label': u'anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5847',
      'label': u'posterior myocardial infarction'}]},
   {'query': 'Hyperlipoproteinemia',
    'synonym_matches': [[{'desc': u'A lipid metabolism disorder characterized by elevated triglyceride levels as a result of excess hepatic production of VLDL or heterozygous LPL deficiency.',
       'id': u'DOID:0050527',
       'label': u'familial hypertriglyceridemia'}]],
    'top_matches': [{'desc': '',
      'id': u'HP:0010980',
      'label': u'Hyperlipoproteinemia'},
     {'desc': '',
      'id': u'DOID:1172',
      'label': u'hyperlipoproteinemia type IV'},
     {'desc': '', 'id': u'DOID:1171', 'label': u'hyperlipoproteinemia type V'},
     {'desc': '',
      'id': u'DOID:3145',
      'label': u'hyperlipoproteinemia type III'},
     {'desc': '', 'id': u'DOID:1168', 'label': u'familial hyperlipidemia'},
     {'desc': u'A familial hyperlipidemia characterized by very high levels of low-density lipoprotein (LDL) and early cardiovascular disease.',
      'id': u'DOID:13810',
      'label': u'familial hypercholesterolemia'},
     {'desc': '',
      'id': u'DOID:14118',
      'label': u'familial lipoprotein lipase deficiency'},
     {'desc': '',
      'id': u'DOID:13809',
      'label': u'familial combined hyperlipidemia'}]}]},
 {'filename': 's0030_re.txt',
  'terms': [{'query': 'Valvular heart disease',
    'synonym_matches': [[{'desc': u'An artery disease that is characterized by plaque building up along the inner walls of the arteries of the heart resulting in a narrowing of the arteries and a reduced blood supply to the cardiac muscles.',
       'id': u'DOID:3393',
       'label': u'coronary artery disease'}],
     [{'desc': '', 'id': u'HP:0001677', 'label': u'Coronary artery disease'}]],
    'top_matches': [{'desc': u'A heart disease involving one or more of the four valves of the heart (the aortic and mitral valves on the left and the pulmonary and tricuspid valves on the right).',
      'id': u'DOID:4079',
      'label': u'heart valve disease'},
     {'desc': u'A heart valve disease that is characterized by repeated inflammation with fibrinous repair. The cardinal anatomic changes of the valve include leaflet thickening, commissural fusion, and shortening and thickening of the tendinous cords.It is caused by an autoimmune reaction to Group A beta-hemolytic streptococci (GAS) that results in valvular damage.',
      'id': u'DOID:0050827',
      'label': u'rheumatic heart disease'},
     {'desc': u'A cardiovascular system disease that involves the heart.',
      'id': u'DOID:114',
      'label': u'heart disease'},
     {'desc': '',
      'id': u'HP:0001726',
      'label': u'Increased prevalence of valvular disease'},
     {'desc': '',
      'id': u'HP:0006694',
      'label': u'Early progressive calcific cardiac valvular disease'},
     {'desc': '',
      'id': u'DOID:8514',
      'label': u'acute pulmonary heart disease'},
     {'desc': u"A cardiovascular system disease that involves the heart's electrical conduction system.",
      'id': u'DOID:10273',
      'label': u'heart conduction disease'},
     {'desc': '',
      'id': u'DOID:12326',
      'label': u'chronic pulmonary heart disease'},
     {'desc': '',
      'id': u'DOID:12325',
      'label': u'kyphoscoliotic heart disease'}]},
   {'query': 'Prosthetic valve',
    'synonym_matches': [[{'desc': u'An aortic valve disease that has_physical_basis_in incomplete opening of the aortic valve.',
       'id': u'DOID:1712',
       'label': u'aortic valve stenosis'}]],
    'top_matches': [{'desc': '', 'id': u'UBERON:0003978', 'label': u'valve'},
     {'desc': '', 'id': u'DOID:5644', 'label': u'tricuspid valve prolapse'},
     {'desc': '', 'id': u'DOID:5232', 'label': u'aortic valve prolapse'},
     {'desc': u'A mitral valve disease where one or both of the cusps of the mitral valve bulge or collapse backward in the left atrium during systole.',
      'id': u'DOID:988',
      'label': u'mitral valve prolapse'},
     {'desc': '', 'id': u'DOID:5749', 'label': u'pulmonary valve disease'},
     {'desc': '',
      'id': u'DOID:5748',
      'label': u'rheumatic pulmonary valve disease'},
     {'desc': u'A pulmonary valve disease that occurs when the pulmonary valve is not strong enough to prevent backflow into the right ventricle. If it is secondary to pulmonary hypertension it is referred to as a Graham Steell murmur.',
      'id': u'DOID:14265',
      'label': u'pulmonary valve insufficiency'},
     {'desc': '', 'id': u'DOID:61', 'label': u'mitral valve disease'},
     {'desc': '', 'id': u'DOID:62', 'label': u'aortic valve disease'},
     {'desc': u'An aortic valve disease that is characterized by leaking of the aortic valve of the heart causes blood to flow in the reverse direction during ventricular diastole, from the aorta into the left ventricle.',
      'id': u'DOID:57',
      'label': u'aortic valve insufficiency'}]},
   {'query': 'Aortic stenosis (moderate',
    'synonym_matches': [],
    'top_matches': [{'desc': '',
      'id': u'DOID:5805',
      'label': u'subvalvular aortic stenosis'},
     {'desc': '',
      'id': u'DOID:1929',
      'label': u'supravalvular aortic stenosis'},
     {'desc': u'An aortic valve disease that has_physical_basis_in incomplete opening of the aortic valve.',
      'id': u'DOID:1712',
      'label': u'aortic valve stenosis'},
     {'desc': '',
      'id': u'HP:0001691',
      'label': u'Muscular subvalvular aortic stenosis'},
     {'desc': '', 'id': u'HP:0001650', 'label': u'Aortic valve stenosis'},
     {'desc': '',
      'id': u'HP:0005174',
      'label': u'Membranous subvalvular aortic stenosis'},
     {'desc': '',
      'id': u'HP:0005173',
      'label': u'Calcific aortic valve stenosis'},
     {'desc': '',
      'id': u'HP:0004381',
      'label': u'Supravalvular aortic stenosis'},
     {'desc': '', 'id': u'DOID:12639', 'label': u'pyloric stenosis'},
     {'desc': '', 'id': u'DOID:3227', 'label': u'tracheal stenosis'}]},
   {'query': 'prostetic valve)',
    'synonym_matches': [[{'desc': u'An aortic valve disease that has_physical_basis_in incomplete opening of the aortic valve.',
       'id': u'DOID:1712',
       'label': u'aortic valve stenosis'}]],
    'top_matches': [{'desc': '', 'id': u'UBERON:0003978', 'label': u'valve'},
     {'desc': '', 'id': u'DOID:5644', 'label': u'tricuspid valve prolapse'},
     {'desc': '', 'id': u'DOID:5232', 'label': u'aortic valve prolapse'},
     {'desc': u'A mitral valve disease where one or both of the cusps of the mitral valve bulge or collapse backward in the left atrium during systole.',
      'id': u'DOID:988',
      'label': u'mitral valve prolapse'},
     {'desc': '', 'id': u'DOID:5749', 'label': u'pulmonary valve disease'},
     {'desc': '',
      'id': u'DOID:5748',
      'label': u'rheumatic pulmonary valve disease'},
     {'desc': u'A pulmonary valve disease that occurs when the pulmonary valve is not strong enough to prevent backflow into the right ventricle. If it is secondary to pulmonary hypertension it is referred to as a Graham Steell murmur.',
      'id': u'DOID:14265',
      'label': u'pulmonary valve insufficiency'},
     {'desc': '', 'id': u'DOID:61', 'label': u'mitral valve disease'},
     {'desc': '', 'id': u'DOID:62', 'label': u'aortic valve disease'},
     {'desc': u'An aortic valve disease that is characterized by leaking of the aortic valve of the heart causes blood to flow in the reverse direction during ventricular diastole, from the aorta into the left ventricle.',
      'id': u'DOID:57',
      'label': u'aortic valve insufficiency'}]},
   {'query': 'Aortic regurgitation (grade 2-3)',
    'synonym_matches': [[{'desc': '',
       'id': u'DOID:11502',
       'label': u'mitral valve insufficiency'}]],
    'top_matches': [{'desc': '',
      'id': u'HP:0001659',
      'label': u'Aortic regurgitation'},
     {'desc': u'An aortic valve disease that is characterized by leaking of the aortic valve of the heart causes blood to flow in the reverse direction during ventricular diastole, from the aorta into the left ventricle.',
      'id': u'DOID:57',
      'label': u'aortic valve insufficiency'},
     {'desc': '', 'id': u'HP:0011469', 'label': u'Nasal regurgitation'},
     {'desc': '', 'id': u'HP:0001653', 'label': u'Mitral regurgitation'},
     {'desc': '', 'id': u'HP:0005180', 'label': u'Tricuspid regurgitation'},
     {'desc': '', 'id': u'DOID:10230', 'label': u'aortic atherosclerosis'},
     {'desc': u'An aortic disease that is characterized by an enlargement (dilation) of the aorta to greater than 1.5 times normal size.',
      'id': u'DOID:3627',
      'label': u'aortic aneurysm'},
     {'desc': u'An artery disease that is characterized by degeneration of the cells composing the aortic wall.',
      'id': u'DOID:520',
      'label': u'aortic disease'},
     {'desc': '', 'id': u'DOID:5232', 'label': u'aortic valve prolapse'},
     {'desc': u'An aortic aneurysm that is located_in the abdominal aorta.',
      'id': u'DOID:7693',
      'label': u'abdominal aortic aneurysm'}]}]},
 {'filename': 's0031lre.txt',
  'terms': [{'query': 'Myocardial infarction',
    'synonym_matches': [[{'desc': '',
       'id': u'DOID:3454',
       'label': u'brain infarction'}],
     [{'desc': '', 'id': u'DOID:2533', 'label': u'splenic infarction'}],
     [{'desc': '',
       'id': u'DOID:5850',
       'label': u'inferior myocardial infarction'}]],
    'top_matches': [{'desc': u'A coronary artery disease characterized by myocardial cell death (myocardial necrosis) due to prolonged ischaemia.',
      'id': u'DOID:5844',
      'label': u'myocardial infarction'},
     {'desc': '', 'id': u'HP:0001658', 'label': u'Myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10266',
      'label': u'subendocardial infarction acute myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10649',
      'label': u'acute inferolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:10651',
      'label': u'acute anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5849',
      'label': u'subendocardial myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5848',
      'label': u'apical myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5843',
      'label': u'posteroinferior myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5845',
      'label': u'anterolateral myocardial infarction'},
     {'desc': '',
      'id': u'DOID:5847',
      'label': u'posterior myocardial infarction'}]},
   {'query': 'Skoliosis', 'synonym_matches': [], 'top_matches': []}]},
 {'filename': 's0032_re.txt',
  'terms': [{'query': 'Dysrhythmia',
    'synonym_matches': [],
    'top_matches': [{'desc': u'A syndrome characterized by a unique combination of cardiac arrhythmias and intestinal pseudo-obstruction. It has material basis in the mutated SGOL1 protein. Distinctive clinical features include atrial dysrhythmias, sick sinus syndrome (SSS) and valve anomalies and chronic intestinal pseudo-obstruction (CIPO).',
      'id': u'DOID:0060339',
      'label': u'chronic atrial and intestinal dysrhythmia'}]},
   {'query': 'Atrial fibrillation',
    'synonym_matches': [],
    'top_matches': [{'desc': u"A heart conduction disease that is characterized by uncoordinated electrical activity in the heart's upper chambers (the atria), which causes the heartbeat to become fast and irregular and has symptoms palpitations, weakness, fatigue, lightheadedness, dizziness, confusion, shortness of breath and chest pain.",
      'id': u'DOID:0060224',
      'label': u'atrial fibrillation'},
     {'desc': '', 'id': u'HP:0005110', 'label': u'Atrial fibrillation'},
     {'desc': u'An atrial fibrillation that has_material_basis_in autosomal dominant inheritance of the familial atrial fibrillation (ATFB) genes.',
      'id': u'DOID:0050650',
      'label': u'familial atrial fibrillation'},
     {'desc': '',
      'id': u'HP:0004757',
      'label': u'Paroxysmal atrial fibrillation'},
     {'desc': '',
      'id': u'HP:0004754',
      'label': u'Permanent atrial fibrillation'},
     {'desc': '', 'id': u'HP:0001663', 'label': u'Ventricular fibrillation'},
     {'desc': '', 'id': u'HP:0010546', 'label': u'Muscle fibrillation'},
     {'desc': u'A visceral heterotaxy characterized by complete atrioventricular septal defect with a common atrium and univentricular AV connection, total anomalous pulmonary drainage, and transposition or malposition of the great arteries and may be associated with bilateral trilobed lungs, midline liver, asplenia and situs inversus affecting other organs that has_material_basis_in homozygous mutation in the GDF1 gene on chromosome 19p12.',
      'id': u'DOID:0060856',
      'label': u'right atrial isomerism'},
     {'desc': u'A heart septal defect located_in in the septum that separates the two atria of the heart.',
      'id': u'DOID:1882',
      'label': u'atrial heart septal defect'},
     {'desc': u'An atrial heart septal defect type 1 associated with variation in the region 5p.',
      'id': u'DOID:0110106',
      'label': u'atrial heart septal defect 1'}]},
   {'query': 'Obesity',
    'synonym_matches': [],
    'top_matches': [{'desc': '', 'id': u'DOID:9970', 'label': u'obesity'},
     {'desc': '', 'id': u'HP:0001513', 'label': u'Obesity'},
     {'desc': '', 'id': u'DOID:11981', 'label': u'morbid obesity'},
     {'desc': '', 'id': u'HP:0001956', 'label': u'Truncal obesity'},
     {'desc': '', 'id': u'HP:0012743', 'label': u'Abdominal obesity'},
     {'desc': '',
      'id': u'DOID:0060611',
      'label': u'abdominal obesity-metabolic syndrome'},
     {'desc': u'An abdominal obesity-metabolic syndrome that has_material_basis_in heterozygous mutation in the DYRK1B gene on chromosome 19q13.',
      'id': u'DOID:0060612',
      'label': u'abdominal obesity-metabolic syndrome 3'},
     {'desc': '',
      'id': u'HP:0008915',
      'label': u'Childhood-onset truncal obesity'},
     {'desc': '', 'id': u'DOID:14221', 'label': u'metabolic syndrome X'},
     {'desc': u'A syndromic X-linked intellectual disability characterized by intellectual disability, truncal obesity, gynecomastia, hypogonadism, dysmorphic facial features, and short stature  that has_material_basis_in hemizygous mutation in the LAS1L gene (300964) on chromosome Xq12.',
      'id': u'DOID:0060814',
      'label': u'Wilson-Turner syndrome'}]}]},
 {'filename': 's0033_re.txt',
  'terms': [{'query': 'Dysrhythmia',
    'synonym_matches': [],
    'top_matches': [{'desc': u'A syndrome characterized by a unique combination of cardiac arrhythmias and intestinal pseudo-obstruction. It has material basis in the mutated SGOL1 protein. Distinctive clinical features include atrial dysrhythmias, sick sinus syndrome (SSS) and valve anomalies and chronic intestinal pseudo-obstruction (CIPO).',
      'id': u'DOID:0060339',
      'label': u'chronic atrial and intestinal dysrhythmia'}]},
   {'query': 'Atrial fibrillation',
    'synonym_matches': [],
    'top_matches': [{'desc': u"A heart conduction disease that is characterized by uncoordinated electrical activity in the heart's upper chambers (the atria), which causes the heartbeat to become fast and irregular and has symptoms palpitations, weakness, fatigue, lightheadedness, dizziness, confusion, shortness of breath and chest pain.",
      'id': u'DOID:0060224',
      'label': u'atrial fibrillation'},
     {'desc': '', 'id': u'HP:0005110', 'label': u'Atrial fibrillation'},
     {'desc': u'An atrial fibrillation that has_material_basis_in autosomal dominant inheritance of the familial atrial fibrillation (ATFB) genes.',
      'id': u'DOID:0050650',
      'label': u'familial atrial fibrillation'},
     {'desc': '',
      'id': u'HP:0004757',
      'label': u'Paroxysmal atrial fibrillation'},
     {'desc': '',
      'id': u'HP:0004754',
      'label': u'Permanent atrial fibrillation'},
     {'desc': '', 'id': u'HP:0001663', 'label': u'Ventricular fibrillation'},
     {'desc': '', 'id': u'HP:0010546', 'label': u'Muscle fibrillation'},
     {'desc': u'A visceral heterotaxy characterized by complete atrioventricular septal defect with a common atrium and univentricular AV connection, total anomalous pulmonary drainage, and transposition or malposition of the great arteries and may be associated with bilateral trilobed lungs, midline liver, asplenia and situs inversus affecting other organs that has_material_basis_in homozygous mutation in the GDF1 gene on chromosome 19p12.',
      'id': u'DOID:0060856',
      'label': u'right atrial isomerism'},
     {'desc': u'A heart septal defect located_in in the septum that separates the two atria of the heart.',
      'id': u'DOID:1882',
      'label': u'atrial heart septal defect'},
     {'desc': u'An atrial heart septal defect type 1 associated with variation in the region 5p.',
      'id': u'DOID:0110106',
      'label': u'atrial heart septal defect 1'}]},
   {'query': 'Obesity',
    'synonym_matches': [],
    'top_matches': [{'desc': '', 'id': u'DOID:9970', 'label': u'obesity'},
     {'desc': '', 'id': u'HP:0001513', 'label': u'Obesity'},
     {'desc': '', 'id': u'DOID:11981', 'label': u'morbid obesity'},
     {'desc': '', 'id': u'HP:0001956', 'label': u'Truncal obesity'},
     {'desc': '', 'id': u'HP:0012743', 'label': u'Abdominal obesity'},
     {'desc': '',
      'id': u'DOID:0060611',
      'label': u'abdominal obesity-metabolic syndrome'},
     {'desc': u'An abdominal obesity-metabolic syndrome that has_material_basis_in heterozygous mutation in the DYRK1B gene on chromosome 19q13.',
      'id': u'DOID:0060612',
      'label': u'abdominal obesity-metabolic syndrome 3'},
     {'desc': '',
      'id': u'HP:0008915',
      'label': u'Childhood-onset truncal obesity'},
     {'desc': '', 'id': u'DOID:14221', 'label': u'metabolic syndrome X'},
     {'desc': u'A syndromic X-linked intellectual disability characterized by intellectual disability, truncal obesity, gynecomastia, hypogonadism, dysmorphic facial features, and short stature  that has_material_basis_in hemizygous mutation in the LAS1L gene (300964) on chromosome Xq12.',
      'id': u'DOID:0060814',
      'label': u'Wilson-Turner syndrome'}]}]}]

In [ ]:


In [52]:
next(iter(parsed))


Out[52]:
{'filename': 's0002_re.txt',
 'terms': [{'matches': [{'desc': '',
     'id': u'DOID:8805',
     'label': u'intermediate coronary syndrome'},
    {'desc': '', 'id': u'DOID:4558', 'label': u"Ludwig's angina"},
    {'desc': '', 'id': u'HP:0001681', 'label': u'Angina pectoris'},
    {'desc': '',
     'id': u'DOID:13924',
     'label': u'necrotizing ulcerative gingivitis'},
    {'desc': u'A viral infectious disease that results_in inflammation, located_in pharynx, has_material_basis_in Human herpesvirus 4 and has_symptom fever, has_symptom fatigue, has_symptom lymphadenopathy, and has_symptom splenomegaly.',
     'id': u'DOID:8568',
     'label': u'infectious mononucleosis'},
    {'desc': u'An eye disease that is characterized by an unstable or a sustained increase in the intraocular pressure which the eye cannot withstand without damage to its structure or impairment of its function.',
     'id': u'DOID:1686',
     'label': u'glaucoma'}],
   'query': 'Unstable angina'},
  {'matches': [{'desc': u'An artery disease characterized by chronic elevated blood pressure in the arteries.',
     'id': u'DOID:10763',
     'label': u'hypertension'},
    {'desc': '', 'id': u'HP:0000822', 'label': u'Hypertension'},
    {'desc': '', 'id': u'DOID:1073', 'label': u'renal hypertension'},
    {'desc': '', 'id': u'DOID:10824', 'label': u'malignant hypertension'},
    {'desc': u'A hypertension with no known cause. It is the most common type of hypertension.',
     'id': u'DOID:10825',
     'label': u'essential hypertension'},
    {'desc': '', 'id': u'DOID:10762', 'label': u'portal hypertension'},
    {'desc': '', 'id': u'DOID:1591', 'label': u'renovascular hypertension'},
    {'desc': u'An eye disease that is characterized by elevated intraocular pressure in the absence of optic nerve damage or visual field loss.',
     'id': u'DOID:9282',
     'label': u'ocular hypertension'},
    {'desc': u'A hypertension characterized by an increase of blood pressure in the pulmonary artery, pulmonary vein or pulmonary capillaries.',
     'id': u'DOID:6432',
     'label': u'pulmonary hypertension'},
    {'desc': '', 'id': u'DOID:9428', 'label': u'intracranial hypertension'}],
   'query': 'Arterial hypertension'},
  {'matches': [{'desc': u'A sleep disorder that involves recurring bouts of excessive amounts of sleepiness.',
     'id': u'DOID:8619',
     'label': u'recurrent hypersomnia'},
    {'desc': '', 'id': u'DOID:11030', 'label': u'corneal edema'},
    {'desc': '', 'id': u'DOID:3770', 'label': u'pulmonary fibrosis'},
    {'desc': '', 'id': u'DOID:13406', 'label': u'pulmonary sarcoidosis'},
    {'desc': '', 'id': u'DOID:9675', 'label': u'pulmonary emphysema'},
    {'desc': u"A lung disease with an unknown etiology affecting the lungs which results in bleeding from tiny alveolar capillaries. Examination of sputum and bronchoalveolar lavage fluid can disclose hemosiderin-laden alveolar macrophages (siderophages), and the lung biopsy shows numerous siderophages in the alveoli. Alveolar hemorrhage is characterized by hemoptysis, dyspnea, alveolar infiltrates on chest radiograph, and various degrees of anaemia. Following a bleeding episode, the alveolar macrophages convert the hemoglobin's iron into hemosiderin within 36-72h.",
     'id': u'DOID:12118',
     'label': u'pulmonary hemosiderosis'},
    {'desc': u'A tuberculosis that is a contagious disease located_in lungs. The infection has_symptom fever, has_symptom cough, has_symptom difficulty in breathing, has_symptom inflammatory infiltrations, has_symptom formation of tubercles, has_symptom caseation, has_symptom pleural effusion, and has_symptom fibrosis.',
     'id': u'DOID:2957',
     'label': u'pulmonary tuberculosis'},
    {'desc': u'An embryoma and malignant neoplasm of lung that derives_from tissues of the lung and derives_from pleura (a thin layer of tissue that covers the lungs and lines the interior wall of the chest cavity). It is most commonly effects children.',
     'id': u'DOID:4765',
     'label': u'pulmonary blastoma'},
    {'desc': '', 'id': u'DOID:11396', 'label': u'pulmonary edema'},
    {'desc': u'A hypertension characterized by an increase of blood pressure in the pulmonary artery, pulmonary vein or pulmonary capillaries.',
     'id': u'DOID:6432',
     'label': u'pulmonary hypertension'}],
   'query': 'Recurrent pulmonary oedema'},
  {'matches': [{'desc': u'A glucose metabolism disease characterized  by chronic hyperglycaemia with disturbances of carbohydrate, fat and protein metabolism resulting from defects in insulin secretion, insulin action, or both.',
     'id': u'DOID:9351',
     'label': u'diabetes mellitus'},
    {'desc': '', 'id': u'HP:0000819', 'label': u'Diabetes mellitus'},
    {'desc': u"A diabetes mellitus that results from the body's failure to produce insulin and has_material_basis_in autoimmune destruction of insulin-producing beta cells of the pancreas.",
     'id': u'DOID:9744',
     'label': u'type 1 diabetes mellitus'},
    {'desc': '', 'id': u'DOID:11717', 'label': u'neonatal diabetes mellitus'},
    {'desc': u'A neonatal diabetes mellitus that has_material_basis_in homozygous mutation in the glucokinase gene (GCK), heterozygous mutation in the KCNJ11 and INS genes, or by heterozygous or homozygous mutation in the ABCC8 gene.',
     'id': u'DOID:0060639',
     'label': u'permanent neonatal diabetes mellitus'},
    {'desc': u'A diabetes mellitus that involves high blood glucose resulting from cells fail to use insulin properly.',
     'id': u'DOID:9352',
     'label': u'type 2 diabetes mellitus'},
    {'desc': u'A neonatal diabetes mellitus characterized by hyperglycemia during the neonatal period that remits during infancy but recurs in later life in most patients.',
     'id': u'DOID:0060334',
     'label': u'transient neonatal diabetes mellitus'},
    {'desc': '', 'id': u'DOID:11714', 'label': u'gestational diabetes'},
    {'desc': '',
     'id': u'HP:0008255',
     'label': u'Transient neonatal diabetes mellitus'},
    {'desc': '', 'id': u'HP:0005978', 'label': u'Type II diabetes mellitus'}],
   'query': 'Diabetes mellitus'},
  {'matches': [{'desc': '',
     'id': u'HP:0010980',
     'label': u'Hyperlipoproteinemia'},
    {'desc': '', 'id': u'DOID:1172', 'label': u'hyperlipoproteinemia type IV'},
    {'desc': '', 'id': u'DOID:1171', 'label': u'hyperlipoproteinemia type V'},
    {'desc': '',
     'id': u'DOID:3145',
     'label': u'hyperlipoproteinemia type III'},
    {'desc': '', 'id': u'DOID:1168', 'label': u'familial hyperlipidemia'},
    {'desc': u'A familial hyperlipidemia characterized by very high levels of low-density lipoprotein (LDL) and early cardiovascular disease.',
     'id': u'DOID:13810',
     'label': u'familial hypercholesterolemia'},
    {'desc': '',
     'id': u'DOID:14118',
     'label': u'familial lipoprotein lipase deficiency'},
    {'desc': '',
     'id': u'DOID:13809',
     'label': u'familial combined hyperlipidemia'}],
   'query': 'Hyperlipoproteinemia'}]}