# Prescribed Details

| **API URL**     | {{url}}/spice-service/prescription-request/prescribed-details |
| --------------- | ------------------------------------------------------------- |
| **Method**      | POST                                                          |
| **Description** | Prescribed Details for the patient                            |

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

| **Field Name**         | **Type** | **Mandatory** | **Example**                                                                                                                             |
| ---------------------- | -------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| patientReference       | Bigint   | yes           | Patient Reference id                                                                                                                    |
| requestFrom            | String   | Yes           | SIERRA\_LEONE                                                                                                                           |
| Authorization (Header) | String   | Yes           | Bearer 1ba363a1edf54402b51f58060aa52b11d30f99a490295adec900fdabf2b472181c0bfb165be18f4f5c430c7218a244bd29b9300d3471acc08197ccfb996118f6 |
| client                 | String   | Yes           | mob                                                                                                                                     |

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

{\
"patientReference": "1",\
"requestFrom": "SIERRA\_LEONE"\
}

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

| **Field Name**            | **Type** | **Example**                                        |
| ------------------------- | -------- | -------------------------------------------------- |
| message                   | String   | Fetched Prescription history details Successfully. |
| encounterId               | String   | Encounter details of the patient                   |
| patientReference          | Bigint   | Patient Reference                                  |
| history                   | String   | History details of the patient                     |
| id                        | Bigint   | Encounter id                                       |
| date                      | Date     | Prescription history date                          |
| prescriptions             | String   | Prescriptions details                              |
| prescribedDays            | Bigint   | Prescribed Days                                    |
| medicationName            | String   | Medication Name                                    |
| medicationId              | Bigint   | Medication Id                                      |
| frequency                 | Bigint   | Medication Frequency                               |
| frequencyName             | String   | Medication Frequency Name                          |
| prescribedSince           | Date     | Prescribed Since                                   |
| endDate                   | Date     | End Date                                           |
| prescriptionId            | Bigint   | Prescription Id                                    |
| isActive                  | Boolean  | Active status check                                |
| isDeleted                 | Boolean  | Deleted check                                      |
| prescriptionRemainingDays | Bigint   | Prescription Remaining Days                        |
| dispenseRemainingDays     | Bigint   | Dispense Remaining Days                            |
| status                    | Boolean  | Response status                                    |

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

```
{
  "message": "Fetched Prescription history details Successfully.",
  "entity": {
    "encounterId": "1",
    "dateOfReview": "2025-01-22T06:14:46+00:00",
    "patientReference": "22",
    "history": [
      {
        "id": "11",
        "date": "2025-01-22T06:14:46+00:00"
      }
    ],
    "prescriptions": [
      {
        "prescribedDays": 5,
        "medicationName": "Paracetomol",
        "medicationId": "1",
        "frequency": 1,
        "frequencyName": "OD",
        "prescribedSince": "2025-01-22T06:14:45+00:00",
        "endDate": "2025-01-26T06:14:46+00:00",
        "prescriptionId": "1",
        "discontinuedReason": null,
        "discontinuedDate": null,
        "encounterId": "22",
        "isActive": true,
        "isDeleted": false,
        "codeDetails": null,
        "classificationName": null,
        "brandName": null,
        "dosageFrequencyName": null,
        "dosageUnitName": null,
        "dosageUnitValue": null,
        "instructionNote": null,
        "dosageFormName": null,
        "prescriptionRemainingDays": 5,
        "prescriptionFilledDays": 0,
        "dispenseRemainingDays": 5,
        "lastReFillDate": null,
        "reason": null
      }
    ]
  },
  "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/engineering/api-documentation/spice-service/prescription/prescribed-details.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.
