Let Patients Confirm Requested Appointments with Leyr

In some cases, Leyr will now prompt you to confirm an appointment that was requested (created via POST Appointments endpoint). You can now use our PATCH Appointments endpoint to confirm such appointments.

Why do I need to confirm appointments?

This is requested by some EHRs. We can see the most common scenario is patient-facing appointments booking (e.g. where booking an appointment is public and done by a patient, and not a practitioner).

Example of such EHR would be Anita Systems in Norway.

When do I need to confirm appointments?

Whenever you receive "status": "awaiting_confirmation" in the response from creating an appointment with Leyr

POST https://api.leyr.io/api/emrs/{emr}/appointments
{
  "id": "...",
  "start": "...",
  "end": "...",
  "status": "awaiting_confirmation",
  "comment": "...",
}

You don't have to worry about actual confirmation initiation - Leyr will do all the necessary steps and request your end-user with SMS or e-mail confirmation.

The only thing you have to do is to redirect your end-users to a confirmation page with an input field where they can enter a confirmation code.

Also, to clarify

You don't have to confirm appointments with PATCH endpoint if you receive "status": "booked" when creating an appointment. This simply means selected EHR allows direct bookings, without confirmation from the end-user.

How do I confirm appointments?

By making a following call to Leyr's PATCH Appointments endpoint

PATCH https://api.leyr.io/api/emrs/{emr}/appointments/{appointment_id}
{
    "confirmation": {
        "code": "{code}"
    }
}

, where:

  • appointment_id is an ID of appointment returned in response from POST Appointments
  • code is a confirmation code that was sent to the end user, and which they e.g. have entered on your confirmation page

What will happen after appointment is confirmed?

Once PATCH Appointments request is submitted with confirmation code, you will receive a normal response with "status": "booked", if confirmation was successful.

That's when you know the appointment was properly booked on the EHR side ๐Ÿ‘