# Mental Health Create

| **API URL**     | {{url}}/spice-service/mentalhealth/create |
| --------------- | ----------------------------------------- |
| **Method**      | POST                                      |
| **Description** | Mental health create                      |

**Input:**

| **Field Name**        | **Type** | **Mandatory** | **Example**                                                                                                                                     |
| --------------------- | -------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| Authorization(Header) | String   | Yes           | Bearer eyJlbmMiOiJBMTI4R0NNIiwiYWxnIjoiUlNBLU9BRVAtMjU2In0.MCm0mJDfpfjlr10Uok79-kTF7fv9Tn7cI5m2WsRDGUd9VS7iRmfbszjuc1-w5D-PYt9CdVxRMGBQlzYauhnI |

#### **Input** <a href="#mentalhealthcreate-input" id="mentalhealthcreate-input"></a>

| **Field Name**                | **Type** | **Mandatory** | **Example** |
| ----------------------------- | -------- | ------------- | ----------- |
| Mental Health Questions(PHQ9) | Integer  | No            | 2           |

**Sample Input:**

{ "phq9MentalHealth": \[ { "answerId": 36, "score": 2, "questionId": 19, "displayOrder": 2 }, { "answerId": 46, "score": 2, "questionId": 1, "displayOrder": 3 }, { "answerId": 1, "score": 2, "questionId": 2, "displayOrder": 9 }, { "answerId": 50, "score": 1, "questionId": 15, "displayOrder": 6 }, { "answerId": 584, "score": 2, "questionId": 20, "displayOrder": 4 }, { "answerId": 37, "score": 2, "questionId": 11, "displayOrder": 8 }, { "answerId": 30, "score": 1, "questionId": 7, "displayOrder": 1 }, { "answerId": 18, "score": 1, "questionId": 14, "displayOrder": 5 }, { "answerId": 19, "score": 1, "questionId": 4, "displayOrder": 7 } ], "tenantId": 4, "patientTrackId": 25, "phq9Score": 14, "phq9RiskLevel": "Severe" }

#### **Output** <a href="#mentalhealthcreate-output" id="mentalhealthcreate-output"></a>

| **Field Name**    | **Type** | **Comments**         |
| ----------------- | -------- | -------------------- |
| `id`              | String   | User ID              |
| `phq9RiskLevel`   | String   | Risk level of phq9   |
| `phq9Score`       | Integer  | Score of phq9        |
| `phq4RiskLevel`   | String   | Risk level of phq4   |
| `phq4Score`       | Integer  | Score of phq4        |
| `phq4FirstScore`  | Integer  | First score of phq4  |
| `phq4SecondScore` | Integer  | Second score of phq4 |

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

```
  Response :
{
  "message": "Mental Health of patient saved successfully.",
  "entity": {
    "id": 33,
    "createdBy": 5,
    "tenantId": 4,
    "phq9RiskLevel": "Severe",
    "phq9Score": 14,
    "phq4RiskLevel": "Moderate",
    "phq4Score": 6,
    "phq4FirstScore": 0,
    "phq4SecondScore": 0,
    "patientTrackId": 25,
    "phq9MentalHealth": [
      {
        "questionId": 19,
        "answerId": 36,
        "displayOrder": 2,
        "score": 2
      },
      {
        "questionId": 1,
        "answerId": 46,
        "displayOrder": 3,
        "score": 2
      },
      {
        "questionId": 2,
        "answerId": 1,
        "displayOrder": 9,
        "score": 2
      },
      {
        "questionId": 15,
        "answerId": 50,
        "displayOrder": 6,
        "score": 1
      },
      {
        "questionId": 20,
        "answerId": 584,
        "displayOrder": 4,
        "score": 2
      },
      {
        "questionId": 11,
        "answerId": 37,
        "displayOrder": 8,
        "score": 2
      },
      {
        "questionId": 7,
        "answerId": 30,
        "displayOrder": 1,
        "score": 1
      },
      {
        "questionId": 14,
        "answerId": 18,
        "displayOrder": 5,
        "score": 1
      },
      {
        "questionId": 4,
        "answerId": 19,
        "displayOrder": 7,
        "score": 1
      }
    ],
    "phq4MentalHealth": [
      {
        "questionId": 6,
        "answerId": 64,
        "displayOrder": 4,
        "score": 2
      },
      {
        "questionId": 13,
        "answerId": 23,
        "displayOrder": 1,
        "score": 1
      },
      {
        "questionId": 9,
        "answerId": -1,
        "displayOrder": 3,
        "score": 1
      },
      {
        "questionId": 17,
        "answerId": 63,
        "displayOrder": 2,
        "score": 2
      }
    ],
    "assessmentTenantId": 4
  },
  "status": true,
  "entityList": null,
  "responseCode": 201,
  "totalCount": null
}





```
