# Prescription History List

| **API URL**     | {{url}}/spice-service/prescription-history/list |
| --------------- | ----------------------------------------------- |
| **Method**      | POST                                            |
| **Description** | Prescription history list                       |

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

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

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

{ "latestRequired": false, "patientTrackId": 1, "patientVisitId": 1, "tenantId": 4 }

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

| **Field Name**              | **Type**  | **Comments**                          |
| --------------------------- | --------- | ------------------------------------- |
| `prescriptionId`            | Bigint    | Prescription ID                       |
| `medicationName`            | String    | Name of the medication                |
| `medicationId`              | Bigint    | Medication ID                         |
| `brandName`                 | String    | Medication Brand name                 |
| `classificationName`        | String    | Medication Classification name        |
| `dosageFormName`            | String    | Medication dosage form name           |
| `dosageUnitName`            | String    | Medication dosage unit name           |
| `dosageUnitValue`           | String    | Medication dosage unit value          |
| `dosageUnitId`              | Integer   | Medication dosage unit id             |
| `dosageFrequencyName`       | String    | Medication frequency name             |
| `dosageFrequencyId`         | Integer   | Medication dosage frequency ID        |
| `prescribedDays`            | Integer   | Medication prescribed days            |
| `endDate`                   | Timestamp | Medication prescribed End date        |
| `instructionNote`           | String    | Medication instruction note           |
| `remainingPrescriptionDays` | Integer   | Prescription remaining days           |
| `prescriptionFilledDays`    | Integer   | Prescription filled days              |
| `reason`                    | String    | Reason for not filling the medication |
| `lastRefillDate`            | Timestamp | Last medication refilled date         |

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

```
  {
    "message": "Got prescription histories.",
    "entity": {
        "patientPrescription": [
            {
                "createdBy": 5,
                "id": 1,
                "updatedBy": 5,
                "createdAt": "2023-05-24T06:24:58+00:00",
                "updatedAt": "2023-05-24T06:24:58+00:00",
                "tenantId": 4,
                "prescriptionId": 1,
                "patientTrackId": 1,
                "patientVisitId": 1,
                "medicationName": "Dolophime",
                "medicationId": 3,
                "brandName": "Antibiotics",
                "classificationName": "Diuretic",
                "dosageFormName": "Tablet",
                "dosageUnitName": "µg",
                "dosageUnitValue": "5",
                "dosageUnitId": 2,
                "dosageFrequencyName": "OM",
                "dosageFrequencyId": 2,
                "prescribedDays": 6,
                "endDate": "2023-05-29T11:54:58+05:30",
                "instructionNote": "In the morning",
                "signature": "/Prescription_Signatures/1_1_20230524062458387_prescsign.jpeg",
                "remainingPrescriptionDays": 6,
                "prescriptionFilledDays": 0,
                "reason": null,
                "lastRefillDate": null,
                "active": true,
                "deleted": false
            },
            {
                "createdBy": 5,
                "id": 2,
                "updatedBy": 5,
                "createdAt": "2023-05-24T06:25:21+00:00",
                "updatedAt": "2023-05-24T06:25:21+00:00",
                "tenantId": 4,
                "prescriptionId": 2,
                "patientTrackId": 1,
                "patientVisitId": 1,
                "medicationName": "Dolo",
                "medicationId": 6,
                "brandName": "Antibiotics",
                "classificationName": "Diuretic",
                "dosageFormName": "Liquid",
                "dosageUnitName": "µg",
                "dosageUnitValue": "6",
                "dosageUnitId": 2,
                "dosageFrequencyName": "TDS",
                "dosageFrequencyId": 1,
                "prescribedDays": 3,
                "endDate": "2023-05-26T11:55:21+05:30",
                "instructionNote": "Three times a day",
                "signature": "/Prescription_Signatures/1_1_20230524062521586_prescsign.jpeg",
                "remainingPrescriptionDays": 3,
                "prescriptionFilledDays": 0,
                "reason": null,
                "lastRefillDate": null,
                "active": true,
                "deleted": false
            },
            {
                "createdBy": 5,
                "id": 3,
                "updatedBy": 5,
                "createdAt": "2023-05-24T06:26:29+00:00",
                "updatedAt": "2023-05-24T06:26:29+00:00",
                "tenantId": 4,
                "prescriptionId": 3,
                "patientTrackId": 1,
                "patientVisitId": 1,
                "medicationName": "Acetolophime",
                "medicationId": 2,
                "brandName": "Biomet",
                "classificationName": "ACE inhibitor",
                "dosageFormName": "Liquid",
                "dosageUnitName": "µg",
                "dosageUnitValue": "9",
                "dosageUnitId": 2,
                "dosageFrequencyName": "TDS",
                "dosageFrequencyId": 1,
                "prescribedDays": 8,
                "endDate": "2023-05-31T11:56:29+05:30",
                "instructionNote": "Three times a day",
                "signature": "/Prescription_Signatures/1_1_20230524062629806_prescsign.jpeg",
                "remainingPrescriptionDays": 8,
                "prescriptionFilledDays": 0,
                "reason": null,
                "lastRefillDate": null,
                "active": true,
                "deleted": false
            }
        ],
        "prescriptionHistoryDates": []
    },
    "status": true,
    "entityList": null,
    "responseCode": 200,
    "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/prescription-history-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.
