# Patient update

| **API URL**     | {{url}}[/spice-service/patient/update](http://3.6.82.154:8762/spice-service/patient/update) |
| --------------- | ------------------------------------------------------------------------------------------- |
| **Method**      | PUT                                                                                         |
| **Description** | Patient update                                                                              |

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

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

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

| **Field Name**        | **Type** | **Mandatory** | **Example**   |
| --------------------- | -------- | ------------- | ------------- |
| firstName             | String   | Yes           | Kavya         |
| lastName              | String   | Yes           | Shree         |
| occupation            | String   | Yes           | Self Employed |
| phoneNumberCategory   | String   | Yes           | Personal      |
| phoneNumber           | String   | Yes           | 678518562     |
| healthInsuranceStatus | Boolean  | No            | No            |

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

{     "lastName": "Shree",     "firstName": "Kavya",     "occupation": "Self Employed",     "phoneNumber": "678518562",     "insuranceStatus": false,     "insuranceType": "",     "id": 10,     "phoneNumberCategory": "Personal",     "patientTrackId": 11 }

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

| **Field Name**     | **Type** | **Comments**         |
| ------------------ | -------- | -------------------- |
| `id`               | Integer  | User ID              |
| `nationalId`       | String   | Patient national id  |
| `firstName`        | String   | Patient first name   |
| `lastName`         | String   | Patient last name    |
| `gender`           | String   | Gender               |
| `age`              | BigInt   | Patient age          |
| `isPregnant`       | Boolean  | Is pregnant          |
| `phoneNumber`      | String   | Patient phone number |
| `countryId`        | Bigint   | Country id           |
| `countyId`         | Bigint   | County id            |
| `subCountyId`      | Bigint   | Sub county id        |
| `siteId`           | Bigint   | Site id              |
| `occupation`       | String   | Patient occupation   |
| `levelOfEducation` | String   | Level of education   |
| `isRegularSmoker`  | Boolean  | Is regular smoker    |
| `programId`        | Bigint   | Program id           |
| `virtualId`        | Bigint   | Virtual id           |

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

```
{
    "message": "Patient updated successfully.",
    "entity": {
        "id": 10,
        "nationalId": "KAVISHREE",
        "firstName": "KAVYA",
        "lastName": "SHREE",
        "gender": "Female",
        "age": 32,
        "isPregnant": true,
        "phoneNumber": "678518562",
        "phoneNumberCategory": "Personal",
        "countryId": 1,
        "countyId": 1,
        "subCountyId": 2,
        "siteId": 1,
        "occupation": "Self Employed",
        "levelOfEducation": "Secondary School Completed",
        "insuranceStatus": false,
        "insuranceType": "",
        "isRegularSmoker": true,
        "programId": 2,
        "initial": "G",
        "emrNumber": 0,
        "patientStatus": "false",
        "virtualId": 10
    },
    "status": true,
    "entityList": null,
    "responseCode": 200,
    "totalCount": null
}
```
