/query/disnetConceptList

  • Description

    Retrieve DISNET Concept list for a given source and snapshot. Search by disease: exact name or not, other vocabulary code, excluding or forcing semantic types. It also adds an option to show or not the codes associated with the disease and to show the number of times the DISNET Concept has been found in the disease texts.

  • URL (PATH)

    /query/disnetConceptList?source=:source&version=:version&diseaseName=:diseaseName&diseaseCode=:diseaseCode&typeCode=:typeCode&excludeSemanticTypes=:excludeSemanticTypes&forceSemanticTypes=:forceSemanticTypes&matchExactName=:matchExactName&detectionInformation=:detectionInformation&includeCode=:includeCode&token=:token

  • Method

    GET

  • Auth required

    Yes (token)

  • Request parameters
    Parameter Description
    source *required
    [alphanumeric]
    example: source=wikipedia
    Name of the information source.
    version *required
    [alphanumeric with format “aaaa-mm-dd”]
    example: token=eyJhbGciOiJI...
    Date of information source extraction, in "yyyy-mm-dd" format.
    diseaseName
    [alphanumeric]
    example: diseaseName=Cancer
    Name of the disease.
    diseaseCode
    [alphanumeric]
    example: diseaseCode=117.7
    Code of the disease in a source external to DISNET.
    typeCode
    [alphanumeric]
    example: typeCode=ICD-9-CM
    Type of disease code of the source external to DISNET specified in the diseaseCode parameter.
    excludeSemanticTypes
    [alphanumeric]
    example: excludeSemanticTypes=dsyn,sosy
    Excludes the semantic type or types defined. If there are more than one, they are separated by commas (,).
    forceSemanticTypes
    [alphanumeric]
    example: forceSemanticTypes=dsyn,sosy
    It forces the semantic type or types defined. If there are more than one, they are separated by commas (,).
    matchExactName
    [boolean] by default always is false
    example: matchExactName=true
    If it is true it allows to consult by the exact name of disease, if it is false it recovers the diseases in whose name the value specified in the parameter diseaseName is found.
    detectionInformation
    [boolean] by default always is false
    example: detectionInformation=true
    Shows the number of times the DISNET Concept has been found in the disease texts.
    includeCode
    [boolean] by default always is false
    example: includeCode=true
    Shows the disease codes in sources external to DISNET.
    token *required
    [alphanumeric]
    example: token=eyJhbGciOiJI...
    Access key that allows the query to be executed.
  • Important

    The diseaseName parameter and the parameter pair diseaseCode and typeCode are optional, but it is necessary to specify at least one of them (diseaseName or (diseaseCode and typeCode)), in order to make a correct request. For example, if the request is made using diseaseName, it is not allowed to make the request using diseaseCode and typeCode and vice versa the same rule applies.

    The matchExactName parameter can only be used if you are using the diseaseName parameter, otherwise you will not get results.

    A correct request can only be made if the excludeSemanticTypes=true parameter and the forceSemanticTypes=false parameter are used, both cannot have the true value.

  • Example request
                                         
                                             GET http://disnet.ctb.upm.es/api/disnet/query/disnetConceptList?source=wikipedia&version=2018-09-15&diseaseName=Cancer&matchExactName=true&diseaseCode=&typeCode=&forceSemanticTypes=&token=eyJhbGciOiJI...
                                         
                                    
  • Success response (application/json)
                                        
                                            {
                                                "token": "eyJhbGciOiJI...",
                                                "authorized": true,
                                                "authorizationMessage": "Authorized!",
                                                "responseCode": "200",
                                                "responseMessage": "OK",
                                                "errorsFound": [],
                                                "diseaseCount": 1,
                                                "diseaseList": [
                                                    {
                                                        "diseaseId": "DIS004014",
                                                        "name": "Cancer",
                                                        "url": "http://en.wikipedia.org/wiki/Cancer",
                                                        "disnetConceptsCount": 24,
                                                        "disnetConceptList": [
                                                            {
                                                                "cui": "C0028754",
                                                                "name": "Obesity",
                                                                "semanticTypes": [
                                                                    "dsyn"
                                                                ]
                                                            },
                                                            {
                                                                "cui": "C3714514",
                                                                "name": "Infection",
                                                                "semanticTypes": [
                                                                    "patf"
                                                                ]
                                                            },
                                                            {
                                                                "cui": "C0016059",
                                                                "name": "Fibrosis",
                                                                "semanticTypes": [
                                                                    "patf"
                                                                ]
                                                            },
                                                            {
                                                                "cui": "C0021368",
                                                                "name": "Inflammation",
                                                                "semanticTypes": [
                                                                    "patf"
                                                                ]
                                                            },
                                                            {
                                                                "cui": "C0004364",
                                                                "name": "Autoimmune disease NOS",
                                                                "semanticTypes": [
                                                                    "dsyn"
                                                                ]
                                                            },
                                                            {
                                                                "cui": "C0018941",
                                                                "name": "Blood test",
                                                                "semanticTypes": [
                                                                    "lbpr"
                                                                ]
                                                            },
                                                            {
                                                                "cui": "C0005558",
                                                                "name": "Biopsy",
                                                                "semanticTypes": [
                                                                    "diap"
                                                                ]
                                                            },
                                                            {
                                                                "cui": "C0041582",
                                                                "name": "Ulcer",
                                                                "semanticTypes": [
                                                                    "dsyn"
                                                                ]
                                                            },
                                                            {
                                                                "cui": "C0003467",
                                                                "name": "Anxiety",
                                                                "semanticTypes": [
                                                                    "mobd"
                                                                ]
                                                            },
                                                            {
                                                                "cui": "C0344315",
                                                                "name": "Depressed mood",
                                                                "semanticTypes": [
                                                                    "fndg"
                                                                ]
                                                            },
                                                            {
                                                                "cui": "C0002871",
                                                                "name": "Anemia",
                                                                "semanticTypes": [
                                                                    "dsyn"
                                                                ]
                                                            },
                                                            {
                                                                "cui": "C0010200",
                                                                "name": "Coughing",
                                                                "semanticTypes": [
                                                                    "sosy"
                                                                ]
                                                            },
                                                            {
                                                                "cui": "C0013604",
                                                                "name": "Edema",
                                                                "semanticTypes": [
                                                                    "fndg"
                                                                ]
                                                            },
                                                            {
                                                                "cui": "C0019080",
                                                                "name": "Hemorrhage",
                                                                "semanticTypes": [
                                                                    "patf"
                                                                ]
                                                            },
                                                            {
                                                                "cui": "C0030193",
                                                                "name": "Pain",
                                                                "semanticTypes": [
                                                                    "sosy"
                                                                ]
                                                            },
                                                            {
                                                                "cui": "C0032285",
                                                                "name": "Pneumonia",
                                                                "semanticTypes": [
                                                                    "dsyn"
                                                                ]
                                                            },
                                                            {
                                                                "cui": "C0267596",
                                                                "name": "Rectal hemorrhage",
                                                                "semanticTypes": [
                                                                    "patf"
                                                                ]
                                                            },
                                                            {
                                                                "cui": "C2979982",
                                                                "name": "Vaginal hemorrhage",
                                                                "semanticTypes": [
                                                                    "dsyn"
                                                                ]
                                                            },
                                                            {
                                                                "cui": "C0015672",
                                                                "name": "Fatigue",
                                                                "semanticTypes": [
                                                                    "sosy"
                                                                ]
                                                            },
                                                            {
                                                                "cui": "C0159028",
                                                                "name": "General symptom",
                                                                "semanticTypes": [
                                                                    "sosy"
                                                                ]
                                                            },
                                                            {
                                                                "cui": "C2363736",
                                                                "name": "Unintentional weight loss",
                                                                "semanticTypes": [
                                                                    "fndg"
                                                                ]
                                                            },
                                                            {
                                                                "cui": "C0019209",
                                                                "name": "Hepatomegaly",
                                                                "semanticTypes": [
                                                                    "sosy"
                                                                ]
                                                            },
                                                            {
                                                                "cui": "C0038002",
                                                                "name": "Splenomegaly",
                                                                "semanticTypes": [
                                                                    "fndg"
                                                                ]
                                                            },
                                                            {
                                                                "cui": "C0497156",
                                                                "name": "Lymphadenopathy",
                                                                "semanticTypes": [
                                                                    "fndg"
                                                                ]
                                                            }
                                                        ]
                                                    }
                                                ]
                                            }
                                        
                                    
  • Error response (application/json)

    Common errors

    Error in parameters diseaseName, diseaseCode and typeCode

                                            
                                                {
                                                    "token": "eyJhbGciOiJI...",
                                                    "authorized": true,
                                                    "authorizationMessage": "Authorized!",
                                                    "responseCode": "400",
                                                    "responseMessage": "A required parameter for this API operation is invalid or has not been provided",
                                                    "errorsFound": [
                                                        {
                                                            "errorCode": "400",
                                                            "errorStatus": "INVALID_PARAMETERS",
                                                            "message": "A required parameter for this API operation is invalid or has not been provided. It is necessary to select only one search parameter, not both.",
                                                            "parameters": [
                                                                {
                                                                    "name": "diseaseName",
                                                                    "required": true,
                                                                    "defaultValue": false,
                                                                    "value": "Cancer"
                                                                },
                                                                {
                                                                    "name": "diseaseCode",
                                                                    "required": false,
                                                                    "defaultValue": false,
                                                                    "value": "117.7"
                                                                },
                                                                {
                                                                    "name": "typeCode",
                                                                    "required": false,
                                                                    "defaultValue": false,
                                                                    "value": "ICD-9-CM"
                                                                }
                                                            ]
                                                        }
                                                    ]
                                                }
                                            
                                        

    Invalid or not found disease code or code type

                                            
                                                {
                                                    "token": "eyJhbGciOiJI...",
                                                    "authorized": true,
                                                    "authorizationMessage": "Authorized!",
                                                    "responseCode": "400",
                                                    "responseMessage": "A required parameter for this API operation is invalid or has not been provided",
                                                    "errorsFound": [
                                                        {
                                                            "errorCode": "404",
                                                            "errorStatus": "RESOURCE_NOT_FOUND",
                                                            "message": "Could not find resource. Disease code not found or does not exist. Verify the disease code in the DISNET disease list.",
                                                            "parameter": {
                                                                "name": "diseaseCode",
                                                                "required": true,
                                                                "defaultValue": false,
                                                                "value": "117.7"
                                                            }
                                                        },
                                                        {
                                                            "errorCode": "404",
                                                            "errorStatus": "RESOURCE_NOT_FOUND",
                                                            "message": "Could not find resource. Type code not found or does not exist. Verify the disease type code in the DISNET disease list.",
                                                            "parameter": {
                                                                "name": "typeCode",
                                                                "required": true,
                                                                "defaultValue": false,
                                                                "value": "ICD-9-CM_M"
                                                            }
                                                        }
                                                    ]
                                                }