# Assessment

| **API URL**     | {{url}}/spice-service/assessment/create |
| --------------- | --------------------------------------- |
| **Method**      | POST                                    |
| **Description** | Patient Assessment Creation             |

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

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

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

| **Field Name**                | **Type**         | **Mandatory** | **Example**                               |
| ----------------------------- | ---------------- | ------------- | ----------------------------------------- |
| Symptoms                      | String           | No            | Shortness of breath with usual activities |
| Compliances                   | String           | No            | Did not take any medication               |
| Height                        | Double-precision | Yes           | 182                                       |
| Weight                        | Double-precision | Yes           | 65                                        |
| Temperature                   | Double-precision | No            | 96                                        |
| Systolic                      | Integer          | Yes           | 103                                       |
| Diastolic                     | Integer          | Yes           | 102                                       |
| Pulse                         | Integer          | No            | 34                                        |
| glucoseUnit                   | String           | Yes           | mmol/L                                    |
| glucose                       | Integer          | No            | 20                                        |
| glucoseDateTime               | Timestamp        | Yes           | 2023-05-26T17:01:13+05:30                 |
| hba1cUnit                     | String           | No            | mmol/L                                    |
| glucoseType                   | String           | Yes           | rbs                                       |
| glucoseValue                  | Double-precision | No            | 20                                        |
| hba1c                         | Double-precision | No            | 22                                        |
| lastMealTime                  | Timestamp        | Yes           | 2023-05-26T09:30:00+05:30                 |
| Mental Health Questions(PHQ9) | Integer          | Yes           | 3                                         |

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

{ "lastName": "A", "gender": "Female", "isRegularSmoker": true, "cvdRiskScore": 3, "bpLog": { "avgSystolic": 88, "weight": 77, "avgDiastolic": 88, "avgBloodPressure": "88/88", "height": 188, "bpLogDetails": \[ { "diastolic": 88, "pulse": 88, "systolic": 88 }, { "diastolic": 88, "pulse": 88, "systolic": 88 }, { "diastolic": 88, "pulse": 88, "systolic": 88 } ], "bmi": 21.79 }, "phq4": { "phq4Score": 6, "phq4MentalHealth": \[ { "answerId": 67, "score": 3, "questionId": 6, "displayOrder": 4 }, { "answerId": 55, "score": 0, "questionId": 13, "displayOrder": 1 }, { "answerId": -1, "score": 2, "questionId": 9, "displayOrder": 3 }, { "answerId": 49, "score": 1, "questionId": 17, "displayOrder": 2 } ], "phq4RiskLevel": "Moderate" }, "compliances": \[ { "isChildExist": true, "complianceId": 1, "name": "Did not take any medication" }, { "complianceId": 2, "name": "Could not afford/pay for medication" } ], "symptoms": \[ { "name": "Shortness of breath with usual activities", "symptomId": 2, "type": "Hypertension" }, { "name": "Unplanned weight loss", "symptomId": 1, "type": "Diabetes" } ], "firstName": "AKSHATA", "cvdRiskLevel": "Low risk", "nationalId": "AKSH123", "unitMeasurement": "metric", "tenantId": 4, "cvdRiskScoreDisplay": "3% - Low risk", "siteId": 1, "provisionalDiagnosis": \[ "DM" ], "patientTrackId": 25, "glucoseLog": { "glucoseUnit": "mmol/L", "glucose": 22, "glucoseDateTime": "2023-05-26T17:07:24+05:30", "hba1cUnit": "mmol/L", "glucoseType": "rbs", "glucoseValue": 22, "hba1c": 22, "lastMealTime": "2023-05-26T09:30:00+05:30" }, "age": 26 }

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

| **Field Name**    | **Type**         | **Comments**                                   |
| ----------------- | ---------------- | ---------------------------------------------- |
| `id`              | Integer          | Patient Table ID                               |
| `nationalId`      | String           | National ID                                    |
| `firstName`       | String           | Patient FirstName                              |
| `lastName`        | String           | Patient LastName                               |
| `gender`          | String           | Patient Gender                                 |
| `age`             | BigInt           | Patient Age                                    |
| `programId`       | Integer          | Program ID                                     |
| `emrNumber`       | Integer          | Patient EMR Number                             |
| `patientStatus`   | String           | Patient Status                                 |
| `siteName`        | String           | SiteName                                       |
| `glucoseType`     | String           | Type of Glucose                                |
| `glucoseValue`    | Number           | Glucose Value                                  |
| `glucoseUnit`     | String           | Glucose unit                                   |
| `avgSystolic`     | Integer          | Average Systolic                               |
| `avgDiastolic`    | Integer          | Average Diastolic                              |
| `bmi`             | Double-precision | Patient BMI                                    |
| `cvdRiskLevel`    | String           | CVD Risk Level                                 |
| `cvdRiskScore`    | Integer          | CVD Risk Score                                 |
| `phq4RiskLevel`   | String           | Phq4 Risk Level                                |
| `phq4Score`       | Integer          | Phq4 Risk Score                                |
| `id`              | Integer          | Patient Symptom Table ID                       |
| `symptomId`       | Integer          | Symptoms ID                                    |
| `name`            | String           | Symptoms Name                                  |
| `type`            | String           | Symptoms Type                                  |
| `otherSymptom`    | String           | Is patient suffering from any other symptoms   |
| `id`              | Integer          | Patient Compliance Table ID                    |
| `name`            | String           | MedicalCompliance Name                         |
| `complianceId`    | Integer          | MedicalCompliance ID                           |
| `otherCompliance` | String           | Is patient having any other medical compliance |
| `riskLevel`       | String           | Risk level                                     |
| `riskMessage`     | String           | Risk Message                                   |

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

```
  {
    "message": "Assessment created successfully for a patient.",
    "entity": {
        "patientDetails": {
            "id": 25,
            "nationalId": "AKSH123",
            "firstName": "AKSHATA",
            "lastName": "A",
            "gender": "Female",
            "age": 26,
            "programId": 24,
            "emrNumber": 0,
            "patientStatus": "ENROLLED",
            "siteName": "Medical Care"
        },
        "glucoseLog": {
            "createdBy": 5,
            "updatedBy": 5,
            "glucoseType": "rbs",
            "glucoseValue": 22,
            "glucoseUnit": "mmol/L",
            "updatedFromEnrollment": false,
            "latest": false,
            "deleted": false,
            "oldRecord": false
        },
        "bpLog": {
            "createdBy": 5,
            "updatedBy": 5,
            "avgSystolic": 88,
            "avgDiastolic": 88,
            "bmi": 21.79,
            "cvdRiskLevel": "Low risk",
            "cvdRiskScore": 3,
            "updatedFromEnrollment": false,
            "latest": false,
            "deleted": false,
            "oldRecord": false,
            "redRiskPatient": false
        },
        "phq4": {
            "createdBy": 5,
            "phq4RiskLevel": "Moderate",
            "phq4Score": 6
        },
        "symptoms": [
            {
                "id": 18,
                "symptomId": 2,
                "name": "Shortness of breath with usual activities",
                "type": "Hypertension",
                "otherSymptom": null
            },
            {
                "id": 19,
                "symptomId": 1,
                "name": "Unplanned weight loss",
                "type": "Diabetes",
                "otherSymptom": null
            }
        ],
        "medicalCompliance": [
            {
                "id": 15,
                "name": "Did not take any medication",
                "complianceId": 1,
                "otherCompliance": null
            },
            {
                "id": 16,
                "name": "Could not afford/pay for medication",
                "complianceId": 2,
                "otherCompliance": null
            }
        ],
        "riskLevel": null,
        "riskMessage": "Take your prescribed medication and come back in 3 days for a BP recheck. Your doctor may ask you to come for medical review",
        "confirmDiagnosis": [
            "Gestational Diabetes(GDM)",
            "Anxiety",
            "Pre-Hypertension"
        ]
    },
    "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/versions/spice-1.0/engineering/api-documentation/spice-services/assessment.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.
