# Lifestyle Create

| **API URL**     | {{url}}/spice-service/patient-lifestyle/create |
| --------------- | ---------------------------------------------- |
| **Method**      | POST                                           |
| **Description** | Patient Lifestyle Create                       |

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

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

#### **Input:** <a href="#lifestylecreate-input-.1" id="lifestylecreate-input-.1"></a>

| **Field Name**    | **Type** | **Mandatory** | **Example**                       |
| ----------------- | -------- | ------------- | --------------------------------- |
| clinicianNote     | String   | No            | notes                             |
| cultureValue      | String   | No            | Nutrition, Hypertension Education |
| referredFor       | String   | No            | Nutrition, Hypertension Education |
| referredByDisplay | String   | No            | KavyaProvider                     |

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

#### { <a href="#lifestylecreate" id="lifestylecreate"></a>

&#x20; "clinicianNote": "notes",

&#x20; "cultureValue": "Nutrition, Hypertension Education",

&#x20; "isExpanded": false,

&#x20; "lifestyle": \[

&#x20;   1,

&#x20;   2

&#x20; ],

&#x20; "nutritionist": false,

&#x20; "patientTrackId": 25,

&#x20; "patientVisitId": 33,

&#x20; "referredBy": 5,

&#x20; "referredByDisplay": "KavyaProvider",

&#x20; "referredDate": "2023-05-26T17:25:49+05:30",

&#x20; "referredFor": "Nutrition, Hypertension Education",

&#x20; "roleName": "PROVIDER"

}

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

| **Field Name**  | **Type**  | **Comments**              |
| --------------- | --------- | ------------------------- |
| `id`            | Integer   | User ID                   |
| `name`          | String    | Lifestyle name            |
| `displayOrder`  | Integer   | Lifestyle display order   |
| `referredBy`    | Integer   | Lifestyle Referred User   |
| `referredDate`  | Timestamp | Lifestyle Referred Date   |
| `clinicianNote` | String    | Lifestyle Clinician Notes |
| `otherNote`     | String    | Lifestyle Other Notes     |
| `assessedBy`    | Integer   | Lifestyle Assessed User   |

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

```
 {
  "message": "Patient Nutrition Lifestyle created successfully.",
  "entity": {
    "createdBy": 5,
    "id": 6,
    "updatedBy": 5,
    "createdAt": "2023-05-26T11:56:02+00:00",
    "updatedAt": "2023-05-26T11:56:02+00:00",
    "tenantId": 4,
    "lifestyles": [
      {
        "createdBy": 1,
        "id": 1,
        "updatedBy": 1,
        "createdAt": "2023-05-23T12:15:19+00:00",
        "updatedAt": "2023-05-23T12:15:19+00:00",
        "name": "Nutrition",
        "displayOrder": 1,
        "cultureValue": null,
        "active": true,
        "deleted": false
      },
      {
        "createdBy": 1,
        "id": 2,
        "updatedBy": 1,
        "createdAt": "2023-05-23T12:15:19+00:00",
        "updatedAt": "2023-05-23T12:15:19+00:00",
        "name": "Hypertension Education",
        "displayOrder": 3,
        "cultureValue": null,
        "active": true,
        "deleted": false
      }
    ],
    "lifestyleAssessment": null,
    "patientTrackId": 25,
    "patientVisitId": 33,
    "referredBy": 5,
    "referredDate": "2023-05-26T17:25:49+05:30",
    "assessedBy": null,
    "assessedDate": null,
    "clinicianNote": "notes",
    "otherNote": null,
    "viewed": false,
    "active": true,
    "deleted": false
  },
  "status": true,
  "entityList": null,
  "responseCode": 201,
  "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/spice-docs/engineering/api-documentation/spice-services/lifestyle-create.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.
