Skip to content

/annotation

Find all the medical concepts in a text

The endpoing /annotation will return all the medical concepts found in the phrase or text. You can learn more about the result format here.

Request

Endpoint Method Headers Body
https://api.iomed.es/tagger/annotation POST apikey {"text": "no refiere dolor"}

Sample response

Example of processing 'no refiere dolor'
curl https://api.iomed.es/tagger/annotation\
    -H "apikey: $IOMED_MEL_KEY"\
    -d '{"text": "no refiere dolor"}'
{
  "annotations": [
    {
      "code": {
        "umls": "C0205543",
        "loinc": [
          "LA10393-9"
        ]
      },
      "type": {
        "umls": "Functional Concept"
      },
      "characteristics": {
        "negative": {
          "trigger": {
            "begin": 0,
            "found_as": "no",
            "text": "no",
            "preferred_term": "",
            "end": 2
          }
        }
      },
      "match": {
        "begin": 3,
        "found_as": "refiere",
        "text": "refiere",
        "preferred_term": "Referring",
        "end": 10
      },
      "id": 1
    },
    {
      "head": 1,
      "code": {
        "umls": "C0030193",
        "icd9_cm": [
          "338-338.99"
        ],
        "loinc": [
          "LA17107-6",
          "LA27491-2",
          "LA7460-4",
          "MTHU021175",
          "MTHU029813"
        ],
        "snomed_ct": [
          "22253000"
        ],
        "icd10_cm": [
          "R52"
        ]
      },
      "type": {
        "umls": "Sign or Symptom",
        "iomed": "Finding"
      },
      "characteristics": {
        "negative": {
          "trigger": {
            "begin": 0,
            "found_as": "no",
            "text": "no",
            "preferred_term": "",
            "end": 2
          }
        }
      },
      "match": {
        "begin": 11,
        "found_as": "dolor",
        "text": "dolor",
        "preferred_term": "dolor (hallazgo)",
        "end": 16
      },
      "id": 2
    }
  ],
  "version": "v0.7.5"
}

Request parameters

The body of request must be a json dictionary. The keys that this dictionary must contain are detailed below.

text

The entry "text" contains the medical text to be processed. Its value must be a string.

Info

  • Content: the medical text to be processed.
  • Value type: string
  • Mandatory
  • Value example: "refiere dolor de cabeza"

config (optional)

The entry "config" contains configuration for the API, which will influence the way the text will be parsed. The type must be a dictionary.

The config and all its entries are optional. If some configuration parameter is not present, defaults will apply.

Info

  • Content: configuration for the API, affecting only this request.
  • Value type: dict
  • Optional
config.text_datetime

Under "config", the entry "text_datetime" defines the date in which the text was written. This influences the way dates are parsed. If this entry does not exist, the API will assume the date in which the text was produced is the current date.

Info

  • Content: date in which the text was written, in format "%Y-%m-%dT%H:%M:%S"
  • Value type: string
  • Optional
  • Value example: "2017-08-23T15:45:59"

Tip

If dates are important for your use case, make sure you set this parameter. It will improve the way dates are parsed when they are not fully-specified dates, as in "hace 3 días", or "el 3 de junio".