Get Conditions

Overview

This API endpoint facilitates the searching of medical conditions. It allows for precise or broad matching of condition names, and now includes enhanced features for more flexible data retrieval and detailed information.


HTTP Request Details

  • Endpoint: GET https://www.britelink.io/api/v1/conditions

Required Headers

HeaderDescription
AuthorizationYour API key.

Query Parameters

ParameterTypeRequiredDefaultDescription
qStringNo-Text used to search conditions by name. Optional.
fuzzyBooleanNofalseEnables fuzzy search for approximate matches.
exactBooleanNofalseOnly includes exact matches to the query.
rBooleanNofalseInclude referenced drugs and indications if true.
cursorStringNo-Cursor for pagination control.

Note: The exact parameter cannot be used in conjunction with fuzzy. Doing so will result in a 400 Bad Request error. The r parameter, when set to true, enriches the response with detailed related information.

Pagination Support

  • This endpoint now supports cursor-based pagination, which is beneficial for handling extensive datasets. Default batch size is 10 conditions.

Example Usage

  • CURL Request:
    curl -L 'https://www.britelink.io/api/v1/conditions?q=Diabetes&r=true' \
    -H 'Authorization: Bearer myapikey'
    

Response Format

  • Response Structure: The response is in JSON format, comprising an array of objects. Each object represents a condition and contains the following fields:

    FieldTypeDescription
    idArrayId of the condition.
    nameStringName of the condition.
    severityStringSeverity degree of the condition.
    statusStringCondition status.
    drugIdStringId of the indicated drug for the condition.
    indicationsArrayArray of related indications (if r is true).
    drugObjectDetailed drug information (if r is true).
  • Sample Response:

    [
      {
        "id": "clqklnm4u001j49c9h2a0u05i",
        "name": "Mild to Moderate Pain, Fever",
        "severity": "All severities for pain and fever, as recommended",
        "status": "Active pain or fever",
        "stage": "Not specifically applicable",
        "drugId": "clqjl06p4000449l7qe6kop1g"
        // Additional fields if 'r' is true
      }
    ]
    

Error Handling

  • Common HTTP Status Codes:

    Status CodeMeaning
    400Bad Request – Parameter errors.
    401Unauthorized – API key issues.
    404Not Found – No matching conditions.
    500Internal Server Error.

Security and Compliance

  • API key must be transmitted securely.
  • Adheres to standard protocols for medical data privacy and security.

Notes for Developers

  • Ideal for user interfaces requiring quick search and retrieval of medical conditions.
  • Enhanced with flexible query parameters (q, r, cursor) for broad or specific searches and detailed data retrieval.
  • Supports pagination for efficient handling of large data sets.