> For the complete documentation index, see [llms.txt](https://spice.docs.medtroniclabs.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://spice.docs.medtroniclabs.org/versions/spice-1.0/engineering/api-documentation/spice-services/refill-prescription-history.md).

# Refill Prescription History

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

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

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

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

| **Field Name** | **Type** | **Mandatory** | **Example**       |
| -------------- | -------- | ------------- | ----------------- |
| username       | String   | Yes           | <spice@spice.mdt> |
| password       | String   | Yes           | Spice123          |

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

{ "lastRefillVisitId": "1", "patientTrackId": 1, "tenantId": 4 }

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

| **Field Name**              | **Type**  | **Comments**                          |
| --------------------------- | --------- | ------------------------------------- |
| `id`                        | Boolean   | Medication ID                         |
| `medicationName`            | String    | Medication Name                       |
| `dosageUnitName`            | String    | Medication Dosage unit                |
| `dosageUnitValue`           | Integer   | Medication Dosage unit value          |
| `dosageUnitId`              | Integer   | Dosage unit id                        |
| `dosageFormName`            | String    | Medication Dosage form                |
| `dosageFrequencyName`       | String    | Frequency name                        |
| `dosageFrequencyId`         | Integer   | Dosage frequency id                   |
| `instructionNote`           | String    | Medication frequency instruction note |
| `endDate`                   | Timestamp | Medication end date                   |
| `classificationName`        | String    | Medication classification name        |
| `brandName`                 | String    | Medication brand name                 |
| `signature`                 | String    | Prescriber signature                  |
| `remainingPrescriptionDays` | Integer   | Prescription remaining days           |
| `prescriptionFilledDays`    | Integer   | Prescription filled days              |
| `reason`                    | String    | Refill prescription reason            |
| `lastRefillDate`            | Timestamp | Last refill date                      |

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

```
{
  "message": "Got Refill prescription history.",
  "entity": null,
  "status": true,
  "entityList": [
    {
      "createdBy": 5,
      "id": 5,
      "updatedBy": 13,
      "createdAt": "2023-05-24T07:34:44+00:00",
      "updatedAt": "2023-05-24T07:34:44+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": 1,
      "prescriptionFilledDays": 2,
      "reason": "Extra Stock with Patient",
      "lastRefillDate": "2023-05-24T13:04:44+05:30",
      "active": true,
      "deleted": false
    }
  ],
  "responseCode": 200,
  "totalCount": 1
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/refill-prescription-history.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.
