Prescriptions

Prescriptions are a core part of the Quincy platform — they represent the digital prescriptions issued by healthcare providers for their patients. On this page, we'll explore the various prescription endpoints you can use to manage prescriptions programmatically. We'll cover how to submit prescriptions and retrieve the status of them.

POST/v1/prescriptions

Submit a prescription

This endpoint allows you to create a new prescription in the Quincy system with a single request. You must either reference an existing patient (patient_id), include new patient details (new_patient), or include a patient object (patient). You will also provide at least one prescription line item, the delivery option, and (optionally) a prescriber fee, and repeat options.

Required attributes

  • Name
    patient_id
    Type
    string
    Description

    Unique identifier for an existing patient; if you do not provide patient_id, you must include new_patient or patient.

  • Name
    lines
    Type
    array
    Description

    Array of prescription line items, each containing medication details (e.g., drug_id or custom_drug_name, quantity , instructions, and optionally notes_to_pharmacist).

  • Name
    delivery_option
    Type
    string
    Description

    The selected delivery option for the prescription (e.g. deliver_customer, deliver_clinic, issue_token).

  • Name
    payee
    Type
    string
    Description

    Who will pay for the prescription. Must be either patient or clinic.


    Note: When payee is clinic, delivery_option cannot be issue_token.

Optional attributes

  • Name
    new_patient
    Type
    object
    Description

    Object containing new patient details if patient_id is not provided.


    Required fields for a new patient typically include: firstname, lastname, dob, sex, email, phone, address_line1, city, postcode.

  • Name
    patient
    Type
    object
    Description

    Object containing patient details for upsert operation based on source_id. If a patient with the provided source_id exists, their details will be updated; otherwise, a new patient will be created.


    Required fields typically include: firstname, lastname, dob, sex, email, phone, address_line1, city, postcode, source_id.

  • Name
    repeat_option
    Type
    string
    Description

    The repeat option for the prescription. Valid values may include no_repeats, allow_repeats (plus an integer count), or allow_repeat_requests (plus an interval). The default is no_repeats.


    Note: When repeat_option is allow_repeats, delivery_option cannot be issue_token.


    Note: When repeat_option is allow_repeats, payee cannot be clinic.

  • Name
    allow_repeats_count
    Type
    integer
    Description

    Required when repeat_option is allow_repeats. Specifies the number of repeat prescriptions allowed.

  • Name
    allow_repeat_requests_frequency
    Type
    integer
    Description

    Required when repeat_option is allow_repeat_requests. Specifies the frequency in weeks between repeat requests.

  • Name
    prescriber_fee
    Type
    number
    Description

    The fee charged by the prescriber for this prescription.

  • Name
    provider_code
    Type
    string
    Description

    If you've been given a provider code, you can include it here.

Request

POST
/v1/prescriptions
curl https://app.quincy.health/api/v1/prescriptions \
  -H "Authorization: Bearer {token}" \
  -d '{
    "patient_id": "PAT12345",
    "lines": [
      {
        "drug_id": "123e4567-e89b-12d3-a456-426614174000",
        "quantity": 30,
        "instructions": "Take one tablet daily"
      }
    ],
    "delivery_option": "deliver_customer",
    "prescriber_fee": 20.00,
    "payee": "patient"
  }'

GET/v1/prescriptions/:id

Retrieve a prescription status

This endpoint allows you to retrieve a prescription status by providing the prescription id. It returns detailed information about the prescription, including patient details, medication information, and delivery options.

Request

GET
/v1/prescriptions/PRES67890
curl https://app.quincy.health/api/v1/prescriptions/PRES67890 \
  -H "Authorization: Bearer {token}"

The prescription model

The prescription model contains all the information about a prescription issued through the Quincy platform. This includes patient details, medication information, delivery options, and more.

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the prescription.

  • Name
    patient_id
    Type
    string
    Description

    Unique identifier for the patient receiving the prescription.

  • Name
    token
    Type
    string
    Description

    Unique token generated when delivery_option is issue_token.

  • Name
    status
    Type
    string
    Description

    Current status of the prescription (e.g., "Awaiting Payment", "Cancelled", "Dispatched").

  • Name
    created_at
    Type
    timestamp
    Description

    Timestamp of when the prescription was created.

  • Name
    updated_at
    Type
    timestamp
    Description

    Timestamp of when the prescription was last updated.

  • Name
    delivery_option
    Type
    string
    Description

    The selected delivery option for the prescription.

  • Name
    payee
    Type
    string
    Description

    Who will pay for the prescription. Either patient or clinic.

  • Name
    repeat_option
    Type
    string
    Description

    The repeat option for the prescription.

  • Name
    allow_repeats_count
    Type
    integer
    Description

    The number of repeat prescriptions allowed when repeat_option is allow_repeats.

  • Name
    allow_repeat_requests_frequency
    Type
    integer
    Description

    The frequency in weeks between repeat requests when repeat_option is allow_repeat_requests.

  • Name
    prescriber_fee
    Type
    number
    Description

    The fee charged by the prescriber for the prescription.

  • Name
    provider_code
    Type
    string
    Description

    The provider code for the prescription.