# Halaxy

> Manage Halaxy patients and appointments, find free times, and read practitioners, clinics and invoices.

App · 19 actions. Web page: https://docs.lodol.com/docs/integrations/halaxy

## Actions

### Book an appointment

Book a clinic appointment for an existing patient.

**Inputs**

- Patient ID (`patient_id`, text, required): The patient to book. Create the patient first if new.
- Practitioner role (`practitioner_role_id`, text, required): The practitioner at a clinic to book with (PR-...). This sets the practitioner and location.
- Start (`start`, date and time, required): When the appointment starts.
- End (`end`, date and time, required): When the appointment ends.
- Appointment type (`appointment_type_id`, text): The appointment type.
- Status (`status`, text): The status to book it with (booked if blank). One of: `booked`, `pending`, `confirmed`.
- Fail on double booking (`fail_on_double_booking`, true/false): Refuse the booking if the practitioner already has an appointment then.

**Outputs**

- `data` (object): The response from Halaxy.

**Example output**

```json
{
  "data": {
    "created": "example",
    "description": "example",
    "end": "example",
    "id": "example",
    "meta": {
      "lastUpdated": "example"
    },
    "minutesDuration": 1,
    "participant": [],
    "resourceType": "example",
    "start": "example",
    "supportingInformation": []
  }
}
```

### Create a patient

Add a patient with their name, contact details and date of birth.

**Inputs**

- Given name (`given_name`, text): The patient's first name.
- Family name (`family_name`, text, required): The patient's last name.
- Email (`email`, text): The patient's email address.
- Mobile (`mobile`, text): The patient's mobile number, such as +61491570006.
- Birth date (`birth_date`, date): The patient's date of birth.
- Gender (`gender`, text): The patient's gender: male, female, other, or as the patient describes it.
- Organization (`organization_id`, text): The practice group or clinic the patient belongs to.

**Outputs**

- `data` (object): The response from Halaxy.

**Example output**

```json
{
  "data": {
    "active": false,
    "address": [],
    "birthDate": "example",
    "gender": "example",
    "id": "example",
    "managingOrganization": {
      "display": "example",
      "reference": "example",
      "type": "example"
    },
    "meta": {
      "lastUpdated": "example"
    },
    "name": [],
    "resourceType": "example",
    "telecom": []
  }
}
```

### Find available appointment times

Find free appointment times for a practitioner role or clinic.

**Inputs**

- Start (`start`, date and time, required): Look for free times from this moment.
- End (`end`, date and time, required): Look for free times up to this moment.
- Duration (`duration`, number, required): The appointment length in minutes. At least 1.
- Practitioner role (`practitioner_role_id`, text): The practitioner at a clinic (a practitioner role, PR-...).
- Organization (`organization_id`, text): Only times at this clinic.
- First available (`first_available`, text): Set to show only the first free time. One of: `first-available`.
- Sort (`sort`, text): Earliest (start) or latest (-start) first. One of: `start`, `-start`.

**Outputs**

- `data` (object): The response from Halaxy.

**Example output**

```json
{
  "data": {
    "entry": [],
    "link": [],
    "resourceType": "example",
    "total": 1
  }
}
```

### Get a patient

Get one patient's demographics and contact details.

**Inputs**

- Patient ID (`patient_id`, text, required): The patient's ID.

**Outputs**

- `data` (object): The response from Halaxy.

**Example output**

```json
{
  "data": {
    "active": false,
    "address": [],
    "birthDate": "example",
    "gender": "example",
    "id": "example",
    "managingOrganization": {
      "display": "example",
      "reference": "example",
      "type": "example"
    },
    "meta": {
      "lastUpdated": "example"
    },
    "name": [],
    "resourceType": "example",
    "telecom": []
  }
}
```

### Get a practitioner

Get one practitioner's details.

**Inputs**

- Practitioner (`practitioner_id`, text, required): The practitioner.

**Outputs**

- `data` (object): The response from Halaxy.

**Example output**

```json
{
  "data": {
    "active": false,
    "id": "example",
    "meta": {
      "lastUpdated": "example"
    },
    "name": [],
    "resourceType": "example",
    "telecom": []
  }
}
```

### Get a practitioner role

Get one practitioner role.

**Inputs**

- Practitioner role (`practitioner_role_id`, text, required): The practitioner at a clinic (a practitioner role, PR-...).

**Outputs**

- `data` (object): The response from Halaxy.

**Example output**

```json
{
  "data": {
    "active": false,
    "healthcareService": [],
    "id": "example",
    "location": [],
    "meta": {
      "lastUpdated": "example"
    },
    "organization": {
      "display": "example",
      "reference": "example",
      "type": "example"
    },
    "practitioner": {
      "display": "example",
      "reference": "example",
      "type": "example"
    },
    "resourceType": "example"
  }
}
```

### Get an appointment

Get one appointment.

**Inputs**

- Appointment ID (`appointment_id`, text, required): The appointment's ID.

**Outputs**

- `data` (object): The response from Halaxy.

**Example output**

```json
{
  "data": {
    "created": "example",
    "description": "example",
    "end": "example",
    "id": "example",
    "meta": {
      "lastUpdated": "example"
    },
    "minutesDuration": 1,
    "participant": [],
    "resourceType": "example",
    "start": "example",
    "supportingInformation": []
  }
}
```

### Get an appointment type

Get one appointment type.

**Inputs**

- Appointment type (`appointment_type_id`, text, required): The appointment type.

**Outputs**

- `data` (object): The response from Halaxy.

**Example output**

```json
{
  "data": {
    "active": false,
    "comment": "example",
    "id": "example",
    "meta": {
      "lastUpdated": "example"
    },
    "name": "example",
    "resourceType": "example"
  }
}
```

### Get an invoice

Get one invoice with its totals.

**Inputs**

- Invoice ID (`invoice_id`, text, required): The invoice's ID.

**Outputs**

- `data` (object): The response from Halaxy.

**Example output**

```json
{
  "data": {
    "date": "example",
    "id": "example",
    "meta": {
      "lastUpdated": "example"
    },
    "recipient": {
      "display": "example",
      "reference": "example",
      "type": "example"
    },
    "resourceType": "example",
    "status": "example",
    "totalGross": {
      "currency": "example",
      "value": 1.0
    },
    "totalNet": {
      "currency": "example",
      "value": 1.0
    }
  }
}
```

### Get an organization

Get one practice group's or clinic's details.

**Inputs**

- Organization (`organization_id`, text, required): The practice group or clinic.

**Outputs**

- `data` (object): The response from Halaxy.

**Example output**

```json
{
  "data": {
    "active": false,
    "address": [],
    "id": "example",
    "meta": {
      "lastUpdated": "example"
    },
    "name": "example",
    "resourceType": "example",
    "telecom": []
  }
}
```

### List appointment types

List the appointment types set up in Halaxy.

**Inputs**

- Name (`name`, text): Part of the appointment type's name.
- Active (`active`, true/false): Only appointment types in use (true) or not (false).
- Page (`page`, number): Page to return, starting at 1. At least 1.
- Count (`count`, number): Records per page (30 if blank). From 1 to 100.

**Outputs**

- `data` (object): The response from Halaxy.

**Example output**

```json
{
  "data": {
    "entry": [],
    "link": [],
    "resourceType": "example",
    "total": 1
  }
}
```

### List appointments

List appointments for a patient, practitioner, clinic or day.

**Inputs**

- Patient ID (`patient_id`, text): Only this patient's appointments.
- Practitioner role (`practitioner_role_id`, text): The practitioner at a clinic (a practitioner role, PR-...).
- Organization (`organization_id`, text): Only appointments at this clinic (CL-...).
- Date (`date`, date): Only appointments on this day.
- Created within days (`created_within_days`, number): Only appointments booked in this many past days. From 1 to 365.
- Updated within days (`updated_within_days`, number): Only appointments changed in this many past days. From 1 to 365.
- Sort (`sort`, text): Sort by appointment time, earliest (date) or latest (-date) first. One of: `date`, `-date`.
- Page (`page`, number): Page to return, starting at 1. At least 1.
- Count (`count`, number): Records per page (30 if blank). From 1 to 100.

**Outputs**

- `data` (object): The response from Halaxy.

**Example output**

```json
{
  "data": {
    "entry": [],
    "link": [],
    "resourceType": "example",
    "total": 1
  }
}
```

### List invoices

List invoices, such as one patient's.

**Inputs**

- Patient ID (`patient_id`, text): Only this patient's invoices.
- Status (`status`, text): Only invoices with this status.
- Created within days (`created_within_days`, number): Only invoices created in this many past days. From 1 to 365.
- Page (`page`, number): Page to return, starting at 1. At least 1.
- Count (`count`, number): Records per page (30 if blank). From 1 to 100.

**Outputs**

- `data` (object): The response from Halaxy.

**Example output**

```json
{
  "data": {
    "entry": [],
    "link": [],
    "resourceType": "example",
    "total": 1
  }
}
```

### List organizations

List the practice group and its clinics.

**Inputs**

- Name (`name`, text): Part of the organization's name.
- Page (`page`, number): Page to return, starting at 1. At least 1.
- Count (`count`, number): Records per page (30 if blank). From 1 to 100.

**Outputs**

- `data` (object): The response from Halaxy.

**Example output**

```json
{
  "data": {
    "entry": [],
    "link": [],
    "resourceType": "example",
    "total": 1
  }
}
```

### List patients

Find patients by name, contact details, date of birth or when they were added or changed.

**Inputs**

- Name (`name`, text): Part of the patient's family, given or preferred name.
- Family name (`family_name`, text): Part of the patient's family (last) name.
- Given name (`given_name`, text): Part of the patient's given (first) name.
- Email (`email`, text): The patient's email address.
- Phone (`phone`, text): The patient's phone number, local or international.
- Birth date (`birth_date`, date): The patient's date of birth.
- Created within days (`created_within_days`, number): Only patients added in this many past days. From 1 to 365.
- Updated within days (`updated_within_days`, number): Only patients changed in this many past days. From 1 to 365.
- Sort (`sort`, text): Sort order. A leading minus sorts newest or Z first. One of: `-created`, `created`, `-_lastUpdated` (- lastupdated), `_lastUpdated` (lastupdated), `name`, `-name`.
- Page (`page`, number): Page to return, starting at 1. At least 1.
- Count (`count`, number): Records per page (30 if blank). From 1 to 100.

**Outputs**

- `data` (object): The response from Halaxy.

**Example output**

```json
{
  "data": {
    "entry": [],
    "link": [],
    "resourceType": "example",
    "total": 1
  }
}
```

### List practitioner roles

List practitioner roles: each practitioner at each clinic where they take appointments.

**Inputs**

- Practitioner (`practitioner_id`, text): Only roles of this practitioner.
- Organization (`organization_id`, text): Only roles at this clinic or practice.
- Page (`page`, number): Page to return, starting at 1. At least 1.
- Count (`count`, number): Records per page (30 if blank). From 1 to 100.

**Outputs**

- `data` (object): The response from Halaxy.

**Example output**

```json
{
  "data": {
    "entry": [],
    "link": [],
    "resourceType": "example",
    "total": 1
  }
}
```

### List practitioners

List the practitioners and administrators in the practice group.

**Inputs**

- Name (`name`, text): Part of the practitioner's name.
- Email (`email`, text): The practitioner's email address.
- Active (`active`, true/false): Only active (true) or inactive (false) practitioners.
- Page (`page`, number): Page to return, starting at 1. At least 1.
- Count (`count`, number): Records per page (30 if blank). From 1 to 100.

**Outputs**

- `data` (object): The response from Halaxy.

**Example output**

```json
{
  "data": {
    "entry": [],
    "link": [],
    "resourceType": "example",
    "total": 1
  }
}
```

### Update a patient

Change a patient's name, contact details, date of birth or gender. Blank fields are left as they are. A new email or mobile replaces the patient's contact list.

**Inputs**

- Patient ID (`patient_id`, text, required): The patient to change.
- Given name (`given_name`, text): The patient's first name.
- Family name (`family_name`, text): The patient's last name.
- Email (`email`, text): The patient's email address.
- Mobile (`mobile`, text): The patient's mobile number, such as +61491570006.
- Birth date (`birth_date`, date): The patient's date of birth.
- Gender (`gender`, text): The patient's gender: male, female, other, or as the patient describes it.

**Outputs**

- `data` (object): The response from Halaxy.

**Example output**

```json
{
  "data": {
    "active": false,
    "address": [],
    "birthDate": "example",
    "gender": "example",
    "id": "example",
    "managingOrganization": {
      "display": "example",
      "reference": "example",
      "type": "example"
    },
    "meta": {
      "lastUpdated": "example"
    },
    "name": [],
    "resourceType": "example",
    "telecom": []
  }
}
```

### Update an appointment's status

Set the patient's status for an appointment, such as arrived, did not attend or cancelled.

**Inputs**

- Appointment ID (`appointment_id`, text, required): The appointment to change.
- Status (`status`, text, required): The patient's new status for this appointment. One of: `booked`, `pending`, `confirmed`, `arrived`, `attended`, `did not attend`, `check response`, `declined`, `rejected`, `rescheduled`, and 3 more.

**Outputs**

- `data` (object): The response from Halaxy.

**Example output**

```json
{
  "data": {
    "created": "example",
    "description": "example",
    "end": "example",
    "id": "example",
    "meta": {
      "lastUpdated": "example"
    },
    "minutesDuration": 1,
    "participant": [],
    "resourceType": "example",
    "start": "example",
    "supportingInformation": []
  }
}
```
