No CREATE_APPOINTMENT action (from A029) after appointment cancelled (via A034)

Hi, when an appointment has been cancelled via Update Appointment (A034), the CREATE_APPOINTMENT action isn’t returned by Available Actions for User (A029), so the user cannot book a replacement appointment. However they can do so in the ERS Portal. Is this a bug in the API?

Hi Daniel,

Thanks for you query. This is actually expected functionality.

Once an appointment on the current shortlist entry has beeen cancelled, e-RS doesn’t allow a new appointment to be booked straight back onto that same shortlisted service via Available actions (A029)/ Book or Defer Appointment (A016). The referral needs to be re-shortlisted first before it becomes bookable again.

The reason it looks like you can rebook directly in the portal is that the “book a replacement” journey there actually performs a re-shortlist step behind the scenes as part of that single user action, it isnt booking onto the old, cancelled shortlist entry.

Therefore, to achieve the same result via api:

  1. Call Change shortlist (A031), reading the same service to the referral.
  2. Call Available Actions for user (A029) again , CREATE_APPOINTMENT will now be retuyrned for the newly shortlised service.
  3. Call book or defer appointment (A016) to create the replacement appointment.

Hope this helps.

George

That makes sense. Thanks George.