Programming Challenge

API ROVaccinare

Description

In the context of the SARS-Cov-2 Romania pandemic, the vaccination process of the population begins. Your responsibility is to implement an API used by a Web application in which Romanian citizens will schedule for the vaccine. In addition to the Web application, the Ministry of Health will use the API to update the list of vaccination centers respectively, vaccine stocks.
Each citizen will identify himself in the application through CNP. A citizen can have only one vaccination schedule.
Each vial of vaccine (vial) contains 5 doses. 3 vials (15 doses) can be used parallel every hour (timeSlot) in any clinic.
There are 10 timeSlots that start at 8:00, 9:00, ..., 16:00, and 17:00. every day. Appointments can be made any day of the week, including Saturday and Sunday.

Assessment

  • the correctness of the answers in the serial regime of sending the requests
  • the correctness of the answers in the parallel regime of sending the requests

Notes

The requirements are simplified compared to the actual situation:
  • there is only one type of vaccine
  • the vaccine is a single dose
  • all vaccination centers have the same capacity: 3 vials (15 doses) per hour
  • he vaccination schedule is identical at all centers, 8:00 - 17:00, every day of the week
Focus on the requirements, don't try to generalize!

List of APIs to use for the Web application:

  • register
  • login
  • createAppoinment
  • logout

List of APIs to use for the Ministry of Health:

  • updateVaccinationClinic
  • updateVaccinationStock
  • displayVaccinationStock