Skip to main content

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

StatusDescription
UNSIGNEDPrescription created but not yet signed by provider
SIGNEDSigned by provider, ready for pharmacy selection
SENTSent to selected pharmacy
SUCCEEDEDSuccessfully received by pharmacy
FAILEDFailed to send to pharmacy
CANCELEDPrescription 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

ParameterTypeRequiredDescription
prescriptionOrderIdstringYesThe 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

ParameterTypeRequiredDescription
searchstringYesSearch term (pharmacy name)
latitudenumberNoUser’s latitude for proximity search
longitudenumberNoUser’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

ParameterTypeRequiredDescription
prescriptionOrderIdstringYesThe prescription order ID
pharmacyobjectYesPharmacy 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

1

Prescription signed

Provider signs the prescription after consultation
2

Search pharmacies

Call search_pharmacies with location or pharmacy name
3

User selects pharmacy

Present options and get user confirmation
4

Call select_pharmacy

Send the prescription to the selected pharmacy
5

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
});