> For the complete documentation index, see [llms.txt](https://spice.docs.medtroniclabs.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://spice.docs.medtroniclabs.org/engineering/api-documentation/spice-service/calculate-wgs.md).

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