serenity-health / roadmap

Public roadmap for development of Serenity's apps reported by our community of users
0 stars 1 forks source link

bugfix/prevent overbooking for slots #6

Closed chris-dare closed 2 years ago

chris-dare commented 2 years ago

Describe the bug Comment from Dr. Darko: Please alert the team to not book 2 or more people for the same time. Can the time slot be selected only once? This is causing problems at the waiting areas

To Reproduce Steps to reproduce the behavior:

  1. Start a visit for a patient and choose a time slot
  2. Start a visit for another patient and choose the same time slot (that should not allowed)

Expected behavior Once a patient visit is started, the slot assigned to them should not be avaialble to others unless the patient cancels the bill before their encounter is due

Screenshots/Screencast N/A

Desktop (please complete the following information):

Additional context N/A

chris-dare commented 2 years ago

Hi @seddie62, let's use the solution you proposed. If the slot status is not free then it should be disabled for selection

seddie62 commented 2 years ago

@dexios1 https://gitlab.com/serenity-cic/emr-web/-/merge_requests/173. Merged into develop

chris-dare commented 2 years ago

Just tested. Looks awesome <3. Thanks @seddie62

chris-dare commented 2 years ago

Hey Frank and Ansbert. You'll notice now that slots that have been booked can no longer be selected as seen in the screenshot below for 12:45pm

image

seddie62 commented 2 years ago

@dexios1 what's the way forward here

chris-dare commented 2 years ago

@dexios1 what's the way forward here

Sorry, I somehow missed this.

@seddie62 I need you to run a check at the point of creating the visit to confirm that the slot has not been booked.

@TuyizereBapt, we're going to have to make some modifications to encounter.models.Encounter.create such that an encounter cannot be created unless the slot is free. This is already there but there needs to be a tweak. Let's discuss that at 10am tomorrow. Can you send me a calendar invite?