> For the complete documentation index, see [llms.txt](https://docs.suggestic.com/graphql/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.suggestic.com/graphql/query/mutations/lab-tests/add-biomarker-result.md).

# 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 %}
