# Add Biomarker

Use mutation `addBiomarker` to create a new biomarker definition.

### Available Arguments

| Argument              | Type                    | Description                                                                                                                                                                                                                                                      |
| --------------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`                | String!                 | Name of biomarker.                                                                                                                                                                                                                                               |
| `category`            | ID                      | Id of the [biomarker category](/graphql/query/queries/lab-tests/biomarker-categories.md).                                                                                                                                                                        |
| `method`              | String                  | BIomarker method definition.                                                                                                                                                                                                                                     |
| `description`         | String                  | Biomarker Description.                                                                                                                                                                                                                                           |
| `order`               | Int                     | Sets view order, ascending. Default = 0.                                                                                                                                                                                                                         |
| `isVisible`           | Boolean                 | Visibility of biomarker for an end-user. Default = *True*.                                                                                                                                                                                                       |
| `range`               | range                   |                                                                                                                                                                                                                                                                  |
| `range.max`           | Float                   | Highest value to be considered as *normal*.                                                                                                                                                                                                                      |
| `range.min`           | Float                   | Lowest value to be considered as *normal*.                                                                                                                                                                                                                       |
| `optimalRange`        | optimalRange            |                                                                                                                                                                                                                                                                  |
| `optimalRange.max`    | Float                   | Highest value to be considered as *optimal*.                                                                                                                                                                                                                     |
| `optimalRange.min`    | Float                   | Lowest value to be considered as *optimal*.                                                                                                                                                                                                                      |
| `borderlineRange`     | borderlineRange         |                                                                                                                                                                                                                                                                  |
| `borderlineRange.max` | Float                   | Highest value to be considered as *borderline*.                                                                                                                                                                                                                  |
| `borderlineRange.min` | Float                   | Lowest value to be considered as *borderline*.                                                                                                                                                                                                                   |
| `units`               | \[ID!]                  | List of [biomarker unit IDs ](/graphql/query/queries/lab-tests/biomarker-units.md).                                                                                                                                                                              |
| `aliases`             | \[BiomarkerAliasInput!] |                                                                                                                                                                                                                                                                  |
| `aliases.name`        | String!                 | Name of the biomarker alias.                                                                                                                                                                                                                                     |
| `aliases.language`    | BiomarkerLanguage!      | **enum:** AFRIKAANS ALBANIAN ARABIC CATALAN CHINESE CROATIAN CZECH DANISH DUTCH ENGLISH ESTONIAN FRENCH GERMAN HEBREW HINDI INDONESIAN ITALIAN JAPANESE KOREAN POLISH PORTUGUESE ROMANIAN RUSSIAN SERBIAN SPANISH SWEDISH THAI TURKISH UKRAINIAN VIETNAMESE ZULU |

### Available Fields

| Field Name  | Type      | Description                                                                        |
| ----------- | --------- | ---------------------------------------------------------------------------------- |
| `success`   | Boolean!  | **True** if the biomarker has been created successfully. Otherwise, **False**      |
| `message`   | String!   | Description of the result.                                                         |
| `biomarker` | Biomarker | A structured version of biomarker information. It contains `id` and `name` fields. |

### Ranges

There are three types of ranges available:

* Normal: mandatory value that represents the normal range. Anything outside this range will be considered "out of range" unless the borderline range is also used.
* Optimal (optional): can be used as the optimal range for the biomarker, within the normal range.
* Borderline (optional): if used, this will represent the outmost range in the chart. You can consider it as the yellow color of the chart. Anything outside this range will be considered "out of range."

Essential considerations when working with ranges:

1. Ranges can be contained in each other. Examples below.
   1. Normal: 70-100, optimal: 75-85
   2. Normal: 70-100, optimal: 75-85, borderline: 60-110
2. For all ranges, the min value is handled as "greater than or equal to" and the max values are handled as "less than".

### Example

{% tabs %}
{% tab title="Request" %}

```graphql
mutation {
  addBiomarker(input: {
    name: "Diabetes Risk Index",
    category: "QmlvbWFya2VyQ2F0ZWdvcnk6NDg=",
    method: "Method for diabetes risk index",
    description: "Diabetes...",
    order: 0,
    isVisible: true,
    range: { max: 100, min: 50},
    optimalRange: { max: 80, min: 70 },
    borderlineRange: { max: 110, min: 40 },
    units: ["QmlvbWFya2VyVW5pdDox"],
    aliases: [{ name: "DRI", language: ENGLISH }]
  }) {
    success
    message
    errors { field messages }
    biomarker { 
      id name category { id name } range { min max } optimalRange { min max } 
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "addBiomarker": {
      "success": true,
      "message": "Biomarker saved",
      "errors": null,
      "biomarker": {
        "id": "QmlvbWFya2VyOjE=",
        "name": "Diabetes Risk Index",
        "category": {
          "id": "QmlvbWFya2VyQ2F0ZWdvcnk6NDg=",
          "name": "Adrenocortical hormones"
        },
        "range": {
          "min": 0,
          "max": 100
        },
        "optimalRange": {
          "min": 0,
          "max": 100
        }
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.suggestic.com/graphql/query/mutations/lab-tests/add-biomarker.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
