Search K
External Rx Management
The below actions are what we would expect a gold standard external pharmacy/home delivery integration to perform as part of their integration.
Create Prescriptions
How should a partner create a prescription in ezyVet?
- Through the
v1/externalprescriptionendpoint.
WARNING
The v1/prescription endpoint should not be used.
When should a partner create a prescription in ezyVet?
When a vet user has created a prescription in the partner’s portal AND has been approved
When a vet user has approved a pet-parent’s prescription request AND it has been paid for.
What products should be included in a prescription?
Any products that require a prescription
Any OTC items that are prescribed by a vet
Where should the prescription be linked?
- To the animal/patient record
INFO
The partner must provide the ability to select a clinical record for that patient (if applicable)
Where can the partner provide additional information about the prescription? (e.g. order status)
In the link.
The link should direct the vet users to the partner’s portal where order status, delivery information and anything else can be viewed.
A button is displayed on the right side of the prescription record. Clicking this button (or double-clicking on the prescription record) will open a new browser tab at the link that the partner provides.
ezyVet products and external prescriptions.
- When a prescriptions is created via the
v1/externalprescriptionendpoint, a product group will be generated under than name of the API Partner that is the external prescription integration. Each product that is included in a prescription will have an ezyVet product created for it and assigned to the product group.
Example
The below JSON is sent to the v1/externalprescription endpoint by an integration named HappyDogeVet.
json
{
"animal_id": 6,
"consult_id": 15,
"contact_id": 5,
"prescribing_vet_user_id": 10,
"date_of_prescription": 1720488651,
"external_reference": "Test-reference5",
"total_price": 20.00,
"external_prescription_item_list": [
{
"external_product_name": "Test Product",
"external_product_reference": "TestProd",
"external_link": "https://www.ezyvet.com",
"instructions": "Take one daily on an empty stomach",
"price": 20.00,
"qty": 3,
"remaining": 0
}
]
}This appears in the UI like below as a prescription/medication:

As you can see, there is a PENDING status associated with the prescription. This is because the medication was prescribed but not dispensed (no date_of_lastdispense field was included in the item list array). When this field is included in a POST or PATCH, the status will change to CURRENT.
Other statuses and their meanings are below.
PENDING: Medication has been prescribed and waiting for the first dispense.CURRENT(No status): Medication has been prescribed and dispensed at least once.CANCELLED_DR: The medication has previously been dispensed and was discontinued by the DVM.DECLINED_DR: The medication was prescribed but not dispensed and was declined by the DVM.CANCELLED_CLIENT: The medication has previously been dispensed and was discontinued by the pet parent.DECLINED_CLIENT: The medication was prescribed but not dispensed and was declined by the pet parent.
By clicking on the product (or by navigating to ADMIN > Products and searching) you can see this prescribed item has been created as an ezyVet product and assigned to the product group HappyDogeVet (the name of the API partner record that created the prescription record).


These products are by default not billable or sellable so will not impact financial record or inventory counts. They should not be used or edited by clinics as they are required for the integration to function correctly.
Other considerations.
- Ensure the correct timezone is being used for the date of prescription
Update Prescriptions
When should a partner update a prescription?
- If a refill is dispensed.
What fields should be updated?
qty: Quantity that has been dispensed for rx.remaining: Quantity remaining for the rx.date_of_lastdispense: The Epoch date of the last time medication was dispensed for this rx (ensure the correct timezone is being used).status: The status of the rx (see above for the possible statuses and meanings).status_date: The date that the status last changed.
Other considerations.
- The status of the order/delivery information should be updated on the partner’s portal when the status changes
- External Rx records can be updated while referencing a disabled user IF the Rx is not being changed from an active user to a disabled user
- External Rx records that reference a disabled user can be updated to reference an active user.
Disabling/Deleting Prescriptions
When should a partner disable or delete a prescription?
If the prescription was cancelled before any medication was dispensed
If a prescription is returned that wasn’t consumed and the prescription record has ben disabled on the partner’s platform.
Get ezyVet Users
Why does the partner need to get users?
- A user needs to be referenced when creating a prescription.
What users does the partner need to pay attention to?
- Vet users
WARNING
Partners should NOT be referencing a dedicated/generic user record for writing prescriptions.