Skip to content

Relations

We cannot unveil the meaning of the text by only looking at individual medical concepts. Rather, we have to understand how these concepts are related among them. In a sentence like "LDL 64 mg/dl", it is of little use to find "LDL" and "64 mg/dl" if you are not able to understand that the latter is a quantifier of the former.

relations

How relations are shown

When you send a text to the API, the JSON response contains three entries:

  • annotations: the concepts found in the text.
  • relations: relations between concepts.
  • version: the version of the API.

Following are the complete results of two requests:

Sample of response from the API
{
  "annotations": [
    {
      "code": {
        "umls": "C0026591",
        "snomed_ct": [
          "72705000"
        ],
        "loinc": [
          "LA10417-6",
          "LP6983-3"
        ]
      },
      "type": {
        "umls": "Family Group",
        "iomed": "Group"
      },
      "match": {
        "begin": 0,
        "end": 5,
        "text": "madre",
        "found_as": "madre",
        "preferred_term": "maternal"
      },
      "characteristics": {},
      "id": 0
    },
    {
      "code": {
        "umls": "C0002395",
        "snomed_ct": [
          "26929004"
        ],
        "icd9_cm": [
          "331.0"
        ],
        "icd10_cm": [
          "G30",
          "G30.9"
        ],
        "loinc": [
          "LA22313-3",
          "MTHU020798"
        ]
      },
      "type": {
        "umls": "Disease or Syndrome",
        "iomed": "Disease or Syndrome"
      },
      "match": {
        "begin": 10,
        "end": 19,
        "text": "alzheimer",
        "found_as": "alzheimer",
        "preferred_term": "enfermedad de Alzheimer (trastorno)"
      },
      "characteristics": {
        "family_member": {
          "match": {
            "begin": 0,
            "end": 5,
            "text": "madre",
            "found_as": "madre",
            "preferred_term": "maternal"
          },
          "code": {
            "umls": "C0026591",
            "snomed_ct": [
              "72705000"
            ],
            "loinc": [
              "LA10417-6",
              "LP6983-3"
            ]
          }
        }
      },
      "id": 1,
      "head": 0
    }
  ],
  "relations": [
    {
      "from": 1,
      "to": 0,
      "rel": "has_experiencer"
    }
  ],
  "version": "v0.9.0-rc1"
}
{
  "annotations": [
    {
      "code": {
        "umls": "C0023823",
        "snomed_ct": [
          "22244007"
        ],
        "loinc": [
          "MTHU005011",
          "LP15709-6",
          "LP99391-2",
          "LP97901-0"
        ]
      },
      "type": {
        "umls": "Biologically Active Substance",
        "iomed": "Substance"
      },
      "match": {
        "begin": 0,
        "end": 3,
        "text": "ldl",
        "found_as": "ldl",
        "preferred_term": "Lipoproteínas LDL"
      },
      "characteristics": {
        "quantifier": {
          "match": {
            "begin": 4,
            "end": 13,
            "text": "200 mg/dl",
            "found_as": "200 mg/dl",
            "preferred_term": ""
          },
          "code": {
            "umls": "C0439294",
            "snomed_ct": [
              "258794004",
              "396153000",
              "258798001"
            ]
          },
          "units": "milligram / deciliter",
          "magnitude": 200,
          "base_units": "kilogram / meter ** 3",
          "magnitude_base_units": 2
        }
      },
      "id": 0,
      "head": 1
    },
    {
      "code": {
        "umls": "C0439294",
        "snomed_ct": [
          "258794004",
          "396153000",
          "258798001"
        ]
      },
      "type": {
        "iomed": "Quantitative Concept"
      },
      "match": {
        "begin": 4,
        "end": 13,
        "text": "200 mg/dl",
        "found_as": "200 mg/dl",
        "preferred_term": ""
      },
      "characteristics": {
        "quantity": {
          "units": "milligram / deciliter",
          "magnitude": 200,
          "base_units": "kilogram / meter ** 3",
          "magnitude_base_units": 2,
          "code": {
            "umls": "C0439294",
            "snomed_ct": [
              "258794004",
              "396153000",
              "258798001"
            ]
          }
        }
      },
      "id": 1
    }
  ],
  "relations": [
    {
      "from": 0,
      "to": 1,
      "rel": "has_quantifier"
    }
  ],
  "version": "v0.9.0-rc1"
}

In the first request, we have the sentence "madre con alzheimer". The API returns two concepts:

  • madre (concept id 0)
  • alzheimer (concept id 1)

The relation between the concepts is stated in the entry relations. This is a list where each entry represents the relation among two concepts. In this case it contains a single entry:

{
  ...
  "relations": [
    {
      "from": 1,
      "to": 0,
      "rel": "has_experiencer"
    }
  ]
}

Each relation is composed by three entries:

  • from: id of the "source" concept.
  • to: id of the "target" concept.
  • rel: type of the relationship.

In this example, the relation can be translated into (alzheimer)-[has_experiencer]->(madre).

Type of relations

rel description example
has_experiencer to whom the source concept refers ("disease")-[has_experiencer]->("mother").
has_quantifier concept is quantified by other concept ("cholesterol")-[has_quantifier]->("200 mg/dl").
has_qualifier concept is qualified by other concept ("cardiac frequency")-[has_qualifier]->("normal").
has_anatomical_location concept is related to a anatomical location ("pain")-[has_anatomical_location]->("left arm").