# Create Investigation

| **API URL**     | {{url}}/spice-service/investigation/create |
| --------------- | ------------------------------------------ |
| **Method**      | POST                                       |
| **Description** | Create lab test investigation for patient  |

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

| **Field Name**         | **Type** | **Mandatory** | **Example**                                                                                                                             |
| ---------------------- | -------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| testName               | String   | Yes           | Test Name                                                                                                                               |
| codeDetails            | String   | Yes           | Code details of the test                                                                                                                |
| code                   | String   | Yes           | Code for test                                                                                                                           |
| url                    | String   | Yes           | URL for the test                                                                                                                        |
| patientId              | Integer  | Yes           | Patient Id                                                                                                                              |
| patientReference       | Bigint   | Yes           | Patient Reference                                                                                                                       |
| memberId               | Bigint   | Yes           | Member Id                                                                                                                               |
| requestFrom            | String   | Yes           | SIERRA\_LEONE                                                                                                                           |
| Authorization (Header) | String   | Yes           | Bearer 1ba363a1edf54402b51f58060aa52b11d30f99a490295adec900fdabf2b472181c0bfb165be18f4f5c430c7218a244bd29b9300d3471acc08197ccfb996118f6 |
| client                 | String   | Yes           | mob                                                                                                                                     |

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

{\
"labTests": \[\
{\
"id": null,\
"testName": "Blood pressure",\
"testedOn": null,\
"recommendedBy": "11",\
"recommendedName": "Leon",\
"recommendedOn": "2025-01-20T06:49:34+00:00",\
"patientId": null,\
"labTestResults": null,\
"codeDetails": {\
"code": "75367002\_",\
"url": "/"\
},\
"labTestCustomization": null,\
"comments": null,\
"roleName": null,\
"isReview": null,\
"resultUpdatedBy": null\
}\
],\
"labTest": null,\
"encounter": {\
"id": null,\
"patientVisitId": null,\
"patientReference": "1",\
"referred": false,\
"patientId": "11",\
"patientStatus": null,\
"memberId": "1",\
"startTime": null,\
"endTime": null,\
"householdId": null,\
"provenance": {\
"userId": "1",\
"spiceUserId": 11,\
"organizationId": "9",\
"modifiedDate": "2025-01-20T06:50:21+00:00"\
},\
"latitude": null,\
"longitude": null,\
"visitNumber": 0,\
"visitId": null\
},\
"type": null,\
"requestFrom": "SIERRA\_LEONE"\
}

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

| **Field Name**   | **Type** | **Comments**                               |
| ---------------- | -------- | ------------------------------------------ |
| message          | String   | Investigation created/updated Successfully |
| patientReference | Bigint   | Patient Reference id                       |
| encounterId      | Bigint   | Encounter ID for the bundle                |
| status           | Boolean  | Response status                            |

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

```
{
  "message": "Investigation created/updated Successfully.",
  "entity": {
    "patientReference": "333333317130010",
    "encounterId": "766"
  },
  "status": true,
  "entityList": null,
  "responseCode": 201,
  "totalCount": null
}
```
