# List

| **API URL**     | {{url}}/admin-service/medication/list |
| --------------- | ------------------------------------- |
| **Method**      | POST                                  |
| **Description** | Get medication list                   |

#### **Input 1:** <a href="#medication-list-input1" id="medication-list-input1"></a>

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

#### **Sample Input 1:** <a href="#medication-list-sampleinput1" id="medication-list-sampleinput1"></a>

{\
"countryId": 4,\
"searchTerm": "",\
"tenantId": 156,\
"sortField": "medication\_name",\
"sortOrder": -1,\
"limit": 10\
}

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

| **Field Name**       | **Type** | **Comments**                     |
| -------------------- | -------- | -------------------------------- |
| `id`                 | Number   | Medication id                    |
| `countryId`          | Number   | Country id for medication        |
| `tenantId`           | Number   | Country tenant id                |
| `medicationName`     | String   | Medication name                  |
| `classificationId`   | Number   | Classification id for medication |
| `dosageFormId`       | Number   | Dosage form id for medication    |
| `brandId`            | Number   | Brand name id                    |
| `classificationName` | String   | Classification name              |
| `brandName`          | String   | Brand name                       |

#### **Sample Output 1:** <a href="#medication-list-sampleoutput1" id="medication-list-sampleoutput1"></a>

```
{
    "message": "Got All Medications.",
    "entity": null,
    "status": true,
    "entityList": [
     {
            "id": 288,
            "countryId": 4,
            "tenantId": 156,
            "medicationName": "Vildagliptin + Metformin",
            "classificationId": 3,
            "dosageFormId": 2,
            "dosageFormName": "Tablet",
            "brandId": 147,
            "classificationName": "Dual Therapy",
            "brandName": "Other"
        },
        {
            "id": 117,           
            "countryId": 4,           
            "tenantId": 156,
            "medicationName": "Vildagliptin + Metformin",
            "classificationId": 3,
            "dosageFormId": 2,
            "dosageFormName": "Tablet",
            "brandId": 135,
            "classificationName": "Aldosterone Antagonist",
            "brandName": "Other"
        }
    ],
    "responseCode": 200,
    "totalCount": 420
}
```

#### **Sample Input 2:** <a href="#medication-list-sampleinput2" id="medication-list-sampleinput2"></a>

{\
"tenantId": 5,\
"countryId": 3,\
"limit": 10,\
"sortField": "medication\_name",\
"sortOrder": 1,\
"searchTerm": "Cetrizen"\
}

#### **Sample Output 2:** <a href="#medication-list-sampleoutput2" id="medication-list-sampleoutput2"></a>

```
{
    "message": "Got All Medications.",
    "entity": null,
    "status": true,
    "entityList": [
        {
            "id": 76,
            "patientTrackId": null,
            "countryId": 4,
            "roleNames": null,
            "searchTerm": null,
            "patientVisitId": null,
            "tenantId": 6,
            "medicationName": "Cetrizen",
            "classificationId": 135,
            "dosageFormId": 1,
            "dosageFormName": "Tablet",
            "dosageUnitName": "mg",
            "dosageUnitValue": "2",
            "brandId": 148,
            "dosageUnitId": 14,
            "classificationName": "Other",
            "brandName": "Other",
            "displayOrder": 0,
            "type": null,
            "status": false
        }
    ],
    "responseCode": 200,
    "totalCount": 1
}
```


---

# 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/versions/spice-1.0/engineering/api-documentation/admin-services/medication/list.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.
