# Calculate WGS

| **API URL**     | {{url}}/spice-service/patient/calculate-wgs |
| --------------- | ------------------------------------------- |
| **Method**      | POST                                        |
| **Description** | Calculate the wgs data                      |

#### **Sample Input:** <a href="#calculatewgs-v2-sampleinput" id="calculatewgs-v2-sampleinput"></a>

| **Field Name**         | **Type** | **Mandatory** | **Example**                                                                                                                             |
| ---------------------- | -------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| ageInMonths            | Integer  | Yes           | Patient age in months                                                                                                                   |
| gender                 | String   | Yes           | Male or Female                                                                                                                          |
| height                 | Long     | Yes           | Height of patient                                                                                                                       |
| weight                 | Integer  | Yes           | Patient weight                                                                                                                          |
| Authorization (Header) | String   | Yes           | Bearer 1ba363a1edf54402b51f58060aa52b11d30f99a490295adec900fdabf2b472181c0bfb165be18f4f5c430c7218a244bd29b9300d3471acc08197ccfb996118f6 |
| client                 | String   | Yes           | mob                                                                                                                                     |

{\
"ageInMonths": "11",\
"gender": "male",\
"height": "49",\
"weight": "44"\
}

#### **Output:** <a href="#calculatewgs-v2-output" id="calculatewgs-v2-output"></a>

| **Field Name** | **Type** | **Comments**                           |
| -------------- | -------- | -------------------------------------- |
| message        | String   | Patient WGS Data fetched successfully. |
| wfa            | Long     | Weight for age of patient              |
| wfh            | long     | Weight for height of patient           |
| status         | String   | Status of response                     |

#### **Sample Output:** <a href="#calculatewgs-v2-sampleoutput" id="calculatewgs-v2-sampleoutput"></a>

```
{
  "message": "Patient WGS Data fetched successfully.",
  "entity": {
    "wfa": 26.5,
    "wfh": 106.71
  },
  "status": true,
  "entityList": null,
  "responseCode": 200,
  "totalCount": null
}
```


---

# 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://spice.docs.medtroniclabs.org/engineering/api-documentation/spice-service/calculate-wgs.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.
