Appointments

An appointment is created when you want to book in a patient to have their blood taken at one of our network of phlebotomists

Appointments model

The Appointments model contains all the information about the Order.

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the Appointment.

  • Name
    type
    Type
    enum
    Description

    Type of Appointment.

  • Name
    test_location_id
    Type
    string
    Description

    Location ID.

  • Name
    starts_at
    Type
    string
    Description

    Date and time appointment starts in ISO-8601

  • Name
    ends_at
    Type
    string
    Description

    Date and time appointment ends in ISO-8601

  • Name
    patient_id
    Type
    string
    Description

    Unique identifier for the patient assigned to the Appointment.

  • Name
    confirmed
    Type
    boolean
    Description

    Flag if appointment is confirmed.

  • Name
    expires_at
    Type
    datetime
    Description

    Date and time of when provisional appointment request expires.

  • Name
    full_address
    Type
    string
    Description

    Formatted string of Test Location address.

  • Name
    point
    Type
    object
    Description
  • Name
    latitude
    Type
    float
    Description

    Test Location Latitude.

  • Name
    longitude
    Type
    float
    Description

    Test Location Longitude.


POST/api/appointment/

Create provisional Appointment

This endpoint allows you to create a new provisional Appointment. You will need to have had created a patient previously and know the slot_id of the time you wish to book from a previous test_location/slots call. Once you have provisionally made an appointment you have 15 minutes to confirm it, this gives you time to colllect payment and other details from the customer.

Attributes

  • Name
    patient_id
    Type
    string
    Description

    ID of previously created Patient

  • Name
    slot_id
    Type
    string
    Required
    REQUIRED
    Description

    The slot ID from the test__location_slots call

  • Name
    confirmed
    Type
    boolean
    Required
    REQUIRED
    Description

    False to create a provisional appointment. If you want to confirm it straight away, pass through true

Returns

Returns the Appointment object if successful.

Request

POST
/api/appointment/
curl --location 'https://api.londonmedicallaboratory.com/api/appointment/' \
--header 'Content-Type: text/plain' \
--header 'Authorization: Bearer {token}' \
--data-raw '{
    "slot_id": "fbd9c622-6d77-4b84-a2cd-bae0c0b76153",
    "patient_id": "b037047e-8763-471a-af80-90fae7c42d1e",
    "confirmed": false
}'

Response

    {
        "id": "d6fcc74b-3664-4d8d-954f-694a8714bf1e",
        "type": "brand_location",
        "test_location_id": "2532b9c5-0fa8-4f51-86e9-5ed663665333",
        "starts_at": "2024-03-11T09:00:00+00:00",
        "ends_at": "2024-03-11T09:15:00+00:00",
        "patient_id": "b4dcb08b-e7bd-4e88-b2ed-d67a6403d795",
        "confirmed": false,
        "expires_at": "2024-01-23T20:36:13+00:00",
        "full_address": "95 Walker Summit, Daniellemouth, HU8 8SH",
        "point": {
            "latitude": 53.082855,
            "longitude": -0.401372
    }

PATCH/api/appointment/{appointment_id}

Confirm Appointment

This endpoint allows you to confirm a provisional Appointment. Please note that any cancallations to a confirmed appointment might be subject to a cancellation charge.

Attributes

  • Name
    confirmed
    Type
    boolean
    Required
    REQUIRED
    Description

    Pass true to confirm the appointment.

Returns

Returns the Appointment object if successful.

Request

PATCH
/api/appointment/{appointment_id}
curl --location --request PATCH 'https://api.londonmedicallaboratory.com/api/appointment/{appointment_id}' \
--header 'Content-Type: text/plain' \
--header 'Authorization: Bearer {token}' \
--data-raw '{
    "confirmed": true
}'

Response

[
    {
        "id": "d6fcc74b-3664-4d8d-954f-694a8714bf1e",
        "type": "brand_location",
        "test_location_id": "2532b9c5-0fa8-4f51-86e9-5ed663665333",
        "starts_at": "2024-03-11T09:00:00+00:00",
        "ends_at": "2024-03-11T09:15:00+00:00",
        "patient_id": "b4dcb08b-e7bd-4e88-b2ed-d67a6403d795",
        "confirmed": true,
        "expires_at": "2024-01-23T20:36:13+00:00",
        "full_address": "95 Walker Summit, Daniellemouth, HU8 8SH",
        "point": {
            "latitude": 53.082855,
            "longitude": -0.401372
        }
    }
]

PATCH/api/appointment/{id}

Update existing Appointment

This endpoint allows you to assign a patient to an existing Appointment. You will need to have had created a patient previously and have the ID to use

Attributes

  • Name
    patient_id
    Type
    string
    Description

    ID of previously created Patient

Returns

Returns the Appointment object if successful.

Request

PATCH
/api/appointment/
curl --location --request PATCH 'https://api.londonmedicallaboratory.com/api/appointment/{id}' \
--header 'Content-Type: text/plain' \
--header 'Authorization: Bearer {token}' \
--data-raw '{
    "patient_id": "fbd9c622-6d77-4b84-a2cd-bae0c0b76153"
}'

Response

[
    {
        "id": "d6fcc74b-3664-4d8d-954f-694a8714bf1e",
        "type": "brand_location",
        "test_location_id": "2532b9c5-0fa8-4f51-86e9-5ed663665333",
        "starts_at": "2024-03-11T09:00:00+00:00",
        "ends_at": "2024-03-11T09:15:00+00:00",
        "patient_id": "fbd9c622-6d77-4b84-a2cd-bae0c0b76153",
        "confirmed": true,
        "expires_at": "2024-01-23T20:36:13+00:00",
        "full_address": "95 Walker Summit, Daniellemouth, HU8 8SH",
        "point": {
            "latitude": 53.082855,
            "longitude": -0.401372
        }
    }
]