Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/FlasheyEstudi/Oasis-Liquido/llms.txt

Use this file to discover all available pages before exploring further.

Every prescription on Oasis Liquido begins as a structured record a doctor creates during or after a consultation. The platform immediately generates a unique QR code and attaches it to the prescription. The patient carries this QR code in the app and presents it at any Oasis-linked pharmacy. The pharmacist scans it, sees the exact medicines and quantities authorised, and records fulfillment line by line. Nothing changes hands without a verifiable digital trail.

Full prescription lifecycle

1

Doctor creates the prescription

The doctor submits a CreatePrescriptionRequest specifying the patient, clinic, expiration date, and one or more medicine lines. Only users with the doctor role can create prescriptions.
2

QR code is generated

The backend generates a unique qr_code_data value and stores it against the prescription record. The patient can view and share the QR from within the app immediately.
3

Patient presents QR at the pharmacy

At the counter, the patient opens the prescription detail screen and shows the QR code. No printout is needed.
4

Pharmacist validates the QR

The pharmacist submits a ValidatePrescriptionRequest with the scanned qr_data. The API returns the full prescription — patient identity, medicines, quantities, and expiration date — for the pharmacist to review.
5

Pharmacist fulfills the prescription

The pharmacist submits a FulfillPrescriptionRequest for each line they are dispensing. Partial dispensing is supported: a line can be fulfilled over multiple visits until quantity_fulfilled reaches quantity.

Prescription status

The status advances automatically as lines are fulfilled, and expires independently of dispensing if the expiration_date passes.
StatusMeaning
activeValid and not yet dispensed
partially_fulfilledAt least one line has been partially dispensed
fulfilledAll lines fully dispensed
expiredThe expiration date has passed without full dispensing
export type PrescriptionStatus =
  | 'active'
  | 'partially_fulfilled'
  | 'fulfilled'
  | 'expired';

Creating a prescription

Send a POST request to /api/v1/prescriptions. Only doctors can call this endpoint.
export interface CreatePrescriptionRequest {
  patient_id: string;         // UUID of the patient receiving the prescription
  clinic_id: string;          // UUID of the issuing clinic
  expiration_date: string;    // ISO date string, e.g. "2025-08-15"
  notes?: string;             // Optional doctor notes visible to pharmacist
  lines: CreatePrescriptionLineRequest[];
}

export interface CreatePrescriptionLineRequest {
  medicine_id: string;          // UUID of the prescribed medicine
  quantity: number;             // Total units authorised
  dosage_instructions?: string; // e.g. "1 tablet every 8 hours with food"
}
Example request
{
  "patient_id": "clx2j4k0e0000abcd1234efgh",
  "clinic_id": "clx2j4k0e0001abcd5678ijkl",
  "expiration_date": "2025-08-15",
  "notes": "Take with plenty of water. Avoid alcohol.",
  "lines": [
    {
      "medicine_id": "clx2j4k0e0002abcdmnop",
      "quantity": 30,
      "dosage_instructions": "1 tablet every 8 hours"
    },
    {
      "medicine_id": "clx2j4k0e0003abcdqrst",
      "quantity": 10,
      "dosage_instructions": "1 capsule at night before sleep"
    }
  ]
}

Fulfillment types

Validate a QR code

Before dispensing, the pharmacist calls POST /api/v1/prescriptions/validate to authenticate the code and retrieve the prescription record.
export interface ValidatePrescriptionRequest {
  qr_data: string; // Raw QR payload scanned from the patient's screen
}

Fulfill a prescription

Once validated, submit a POST request to /api/v1/prescriptions/{id}/fulfill with the items being dispensed in this visit.
export interface FulfillPrescriptionRequest {
  pharmacy_id: string;         // UUID of the pharmacy processing the dispensing
  items: FulfillItemRequest[];
}

export interface FulfillItemRequest {
  prescription_line_id: string; // UUID of the specific line being fulfilled
  quantity_fulfilled: number;   // Units dispensed in this transaction
}
The quantity_fulfilled value is cumulative per line. The system rejects fulfillment that would cause quantity_fulfilled to exceed the authorised quantity. Partial dispensing across multiple visits is supported and will set the status to partially_fulfilled.

Prescription line fields

Each line in the lines array corresponds to one medicine in the prescription. After partial or full dispensing the line reflects how much has been given.
FieldTypeDescription
medicine_idstringUUID of the medicine
quantitynumberTotal units the doctor authorised
quantity_fulfillednumberUnits dispensed so far (updated by pharmacy)
dosage_instructionsstringFree-text instructions for the patient

Listing prescriptions

Send a GET request to /api/v1/prescriptions. Role-based scoping is applied automatically.
Query parameterTypeDescription
patient_idstringFilter by patient
doctor_idstringFilter by issuing doctor
statusPrescriptionStatusFilter by current status
date_fromstring (ISO date)Prescriptions issued on or after this date
pagenumberPage number (default: 1)
limitnumberResults per page (default: 20)
Patients see only their own prescriptions. Doctors see only the prescriptions they issued. Pharmacy managers see prescriptions fulfilled at their pharmacy. Admins see all.

Prescriptions API

Full endpoint reference for prescription creation, validation, and fulfillment

Pharmacist role

How pharmacy managers operate the Kardex, POS, and QR scanner

Build docs developers (and LLMs) love