# Add Biomarker Result

Use `addBiomarkerResults` to add one or more biomarker results to a user's lab test report.

### Available Arguments

| Argument                     | Type                    | Description                                                                                                                           |
| ---------------------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `labTestReportId`            | ID!                     | Id of lab test report.                                                                                                                |
| `biomarkers`                 | BiomarkerResultInput!   |                                                                                                                                       |
| `biomarkers.biomarkerId`     | ID!                     | Id of the biomarker                                                                                                                   |
| `biomarkers.date`            | datetime!               | Use the format: `YYYY-MM-DDT hh:mm:ssZ`                                                                                               |
| `biomarkers.result`          | BiomarkerValueInput!    |                                                                                                                                       |
| `biomarkers.result.type`     | BiomarkerValueDatatype! | **enum**: `BOOLEAN`, `NUMBER`, `STRING`                                                                                               |
| `biomarkers.result.value`    | GenericScalar!          | The `GenericScalar` scalar type represents a generic GraphQL scalar value that could be: String, Boolean, Int, Float, List or Object. |
| `biomarkers.biomarkerUnitId` | ID!                     | Id of biomarker unit.                                                                                                                 |
| `biomarkers.displayValue`    | String                  | Optional value to be displayed instead of `biomarkers.results`                                                                        |
| `alert`                      | Boolean                 | `True` if alert is active otherwise `False.`                                                                                          |
| `alertText`                  | String                  | Text shown in the alert.                                                                                                              |

### Available Fields

| Field Name | Type     | Description                                                                          |
| ---------- | -------- | ------------------------------------------------------------------------------------ |
| success    | Boolean! | **True** if the biomarker result has been created successfully. Otherwise, **False** |
| message    | String!  | Description of the result.                                                           |

### Example

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

```graphql
mutation addBiomarkerResults {
  addBiomarkerResults(input: {
    labTestReportId: "TGFiVGVzdFJlcG9ydDo4NA==", 
    biomarkers: [
      { 
        biomarkerId: "QmlvbWFya2VyOjE=",
        date: "2022-10-01T00:00:00", 
        result: { 
          type: NUMBER, 
          value: 10 
          }
        biomarkerUnitId:"QmlvbWFya2VyVW5pdDoxMTE" 
      }]
  }) 
  {
    success
    message
    errors { field messages }
  }
}

```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "addBiomarkerResults": {
      "success": true,
      "message": "Biomarker results saved",
      "errors": null
    }
  }
}
```

{% endtab %}
{% endtabs %}

### Example with Alert

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

```graphql
mutation addBiomarkerResults {
  addBiomarkerResults(input: {
    labTestReportId: "TGFiVGVzdFJlcG9ydDo4NA==",
    alert: true,
    alertText: "Sample Text", 
    biomarkers: [
      { 
        biomarkerId: "QmlvbWFya2VyOjE=",
        date: "2022-10-01T00:00:00", 
        result: { 
          type: NUMBER, 
          value: 10 
          } 
        biomarkerUnitId:"QmlvbWFya2VyVW5pdDoxMTE"
      }]
  }) 
  {
    success
    message
    errors { field messages }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "addBiomarkerResults": {
      "success": true,
      "message": "Biomarker results saved",
      "errors": null
    }
  }
}
```

{% endtab %}
{% endtabs %}

### Example of String Value

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

```graphql
mutation addBiomarkerResults {
  addBiomarkerResults(input: {
    labTestReportId: "TGFiVGVzdFJlcG9ydDo2NjEzOA==", 
    biomarkers: [
      { 
        biomarkerId: "QmlvbWFya2VyOjQwNQ==",
        date: "2022-11-02T00:00:00", 
        result: { 
          type: STRING, 
          value: "low" 
          }
        biomarkerUnitId:"QmlvbWFya2VyVW5pdDoxNTU=" 
      }]
  }) 
  {
    success
    message
    errors { field messages }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```json
{
    "data": {
        "addBiomarkerResults": {
            "success": true,
            "message": "Biomarker results saved",
            "errors": null
        }
    }
}
```

{% 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-result.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.
