> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rxscale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Doctors

> List doctors and view prescription statistics via the Management API

# Doctors

Retrieve a list of doctors in your organisation and view their prescription statistics over a given time period.

## List Doctors

```bash theme={null}
GET /v1/management/doctors
```

<ParamField query="page" type="integer" default="0">
  Page number (0-indexed)
</ParamField>

<ParamField query="limit" type="integer" default="50">
  Number of doctors per page
</ParamField>

**Required permission:** `doctor:read`

### Example Request

```bash theme={null}
curl -X GET "https://api.rxscale.com/v1/management/doctors?page=0&limit=25" \
  -H "X-API-Key: your-api-key-here"
```

### Response

```json theme={null}
{
  "doctors": [
    {
      "uid": "doc-abc123",
      "display_name": "Dr. Schmidt"
    },
    {
      "uid": "doc-def456",
      "display_name": "Dr. Meier"
    }
  ],
  "total": 15,
  "totalPages": 1
}
```

## Get Doctor Statistics

Retrieve prescription statistics for a specific doctor over a time period.

```bash theme={null}
GET /v1/management/doctors/{doctor_uid}/statistics
```

<ParamField path="doctor_uid" type="string" required>
  The doctor UID
</ParamField>

<ParamField query="from" type="integer" required>
  Start of time period (Unix timestamp in seconds)
</ParamField>

<ParamField query="to" type="integer" required>
  End of time period (Unix timestamp in seconds)
</ParamField>

**Required permission:** `doctor_statistics:read`

### Example Request

```bash theme={null}
curl -X GET "https://api.rxscale.com/v1/management/doctors/doc-abc123/statistics?from=1709251200&to=1711929600" \
  -H "X-API-Key: your-api-key-here"
```

### Response

```json theme={null}
{
  "uid": "doc-abc123",
  "display_name": "Dr. Schmidt",
  "prescription_statistics": {
    "signed": 42,
    "waiting_for_doctor": 3,
    "rejected": 1
  }
}
```

### Response Fields

| Field                     | Type   | Description                           |
| ------------------------- | ------ | ------------------------------------- |
| `uid`                     | string | Doctor UID                            |
| `display_name`            | string | Doctor display name                   |
| `prescription_statistics` | object | Prescription counts grouped by status |

### Error Responses

| Status Code | Description                                         |
| ----------- | --------------------------------------------------- |
| `400`       | Missing or invalid `from` / `to` parameters         |
| `404`       | Doctor not found or belongs to another organisation |
