Overview
Prescription tools manage prescription orders and pharmacy selection.
get_prescriptions
Get the user’s prescription history from Arlo Health.
Parameters
None required.
Returns
{
"prescriptions": [
{
"prescriptionOrderId": "rx_abc123",
"status": "SIGNED",
"timestamp": "2024-01-15T14:30:00Z",
"prescriptions": [
{
"prescriptionId": "prx_001",
"drug": {
"name": "Amoxicillin",
"din": "02242315",
"strength": "500mg",
"form": "Capsule"
},
"quantity": 21,
"instructions": "Take 1 capsule 3 times daily for 7 days",
"hasRefill": false,
"refillQuantity": 0
}
],
"targetPharmacy": null
}
]
}
Prescription Statuses
| Status | Description |
|---|
UNSIGNED | Prescription created but not yet signed by provider |
SIGNED | Signed by provider, ready for pharmacy selection |
SENT | Sent to selected pharmacy |
SUCCEEDED | Successfully received by pharmacy |
FAILED | Failed to send to pharmacy |
CANCELED | Prescription was canceled |
Use this to check on existing prescriptions before searching for pharmacies or selecting one.
get_prescription
Get details of a specific prescription order.
Parameters
| Parameter | Type | Required | Description |
|---|
prescriptionOrderId | string | Yes | The prescription order ID |
Returns
{
"prescriptionOrderId": "rx_abc123",
"status": "SIGNED",
"timestamp": "2024-01-15T14:30:00Z",
"provider": {
"name": "Dr. Sarah Johnson, NP",
"licenseNumber": "12345"
},
"prescriptions": [
{
"prescriptionId": "prx_001",
"drug": {
"name": "Amoxicillin",
"din": "02242315",
"strength": "500mg",
"form": "Capsule"
},
"quantity": 21,
"instructions": "Take 1 capsule 3 times daily for 7 days",
"hasRefill": false,
"refillQuantity": 0
}
],
"targetPharmacy": {
"companyName": "Shoppers Drug Mart",
"address": "123 Main St",
"city": "Toronto",
"phone": "416-555-1234"
}
}
search_pharmacies
Search for pharmacies by name. Optionally provide coordinates to incorporate proximity into search results.
Parameters
| Parameter | Type | Required | Description |
|---|
search | string | Yes | Search term (pharmacy name) |
latitude | number | No | User’s latitude for proximity search |
longitude | number | No | User’s longitude for proximity search |
Provide a search term. Optionally add coordinates to incorporate proximity into search results.
Returns
{
"pharmacies": [
{
"accreditationNumber": "ACC123456",
"companyName": "Shoppers Drug Mart",
"address": "123 Main St",
"city": "Toronto",
"zip": "M5V 2K1",
"phone": "416-555-1234",
"fax": "416-555-1235",
"distanceKm": 0.5
},
{
"accreditationNumber": "ACC789012",
"companyName": "Rexall Pharmacy",
"address": "456 Queen St",
"city": "Toronto",
"zip": "M5V 3A8",
"phone": "416-555-5678",
"fax": "416-555-5679",
"distanceKm": 1.2
}
]
}
Example: Search by Name
{
"search": "Shoppers Drug Mart"
}
Example: Search Nearby
{
"latitude": 43.6532,
"longitude": -79.3832
}
select_pharmacy
Select a pharmacy for a prescription order.
This action may not be reversible. Confirm with the user before selecting a pharmacy.
Parameters
| Parameter | Type | Required | Description |
|---|
prescriptionOrderId | string | Yes | The prescription order ID |
pharmacy | object | Yes | Pharmacy object from search_pharmacies |
Pharmacy Object
{
"accreditationNumber": "ACC123456",
"companyName": "Shoppers Drug Mart",
"address": "123 Main St",
"city": "Toronto",
"zip": "M5V 2K1",
"phone": "416-555-1234",
"fax": "416-555-1235"
}
Returns
{
"success": true,
"status": "SENT",
"message": "Prescription sent to Shoppers Drug Mart"
}
Workflow
Prescription signed
Provider signs the prescription after consultation
Search pharmacies
Call search_pharmacies with location or pharmacy name
User selects pharmacy
Present options and get user confirmation
Call select_pharmacy
Send the prescription to the selected pharmacy
Prescription sent
Pharmacy receives the prescription and prepares medication
Example
// 1. Get prescription details
const rx = await getPrescription({ prescriptionOrderId: "rx_abc123" });
// 2. Search for nearby pharmacies
const { pharmacies } = await searchPharmacies({
latitude: 43.6532,
longitude: -79.3832
});
// 3. Present options to user and get selection
const selectedPharmacy = pharmacies[0];
// 4. Confirm with user
// "Send prescription to Shoppers Drug Mart at 123 Main St?"
// 5. Select pharmacy
await selectPharmacy({
prescriptionOrderId: "rx_abc123",
pharmacy: selectedPharmacy
});