Room Service Functions


  1. Food Orders
    1. Add an order: used when a new order is placed.
      • Input:
        • the room number that places the order.
        • the time and date when the order was placed (could be automatically generated by the system actually.)
        • the time and date when the service is going to be delivered.
        • the service item number or the name of the service (eg. wake-up call, food, etc.)
        • the number of items ordered
        • the employee who accepted the order (employee ID )
        • extra field for comments.

          Order number should also be included.

      • Output:
        • a new record to be added (internal)
        • a message box stating the command is successful (external to user)
        • if the item number is not given (and the name of the service is given,) the system should search for the corresponding item number.
      • Error:
        • Generated when any field above in the input is missing.
        • Syntax errors of the input data (eg: time is not in specified format)
        • Generated when the data entered violates the integrity of the database: eg. : number of dishes is not positive integer, the item number doesn't exist, the room number doesn't exist etc.
        • Record already exists.

      ******* Note: from now on, we will understand that missing input, and syntax errors will actually can happen anywhere that requires input and error message of some sort will be generated as we will leave out those two obvious errors in our "Error" section.

    2. Delete an order: used when some people want to cancel their orders, or when a customer leaves early and the staff wants to cancel all the orders
      • Input:
        • the room number
        • item number or item name (optional)
        • time and date to be delivered (needed because one room can have many orders at different time) (optional)
      • Output:
        • internally : deletion of the record
        • to user: command success message.
        • If only room number were given, a list of all the orders for that room should be generated and allow user to choose which one to delete. Along with that list, an option is given so the staff can choose to delete all orders if needed to.
      • Error:
        • no such room number, item-number, delivering date & time !
        • invalid combination between the room number/item number/date & time to be delivered.
    3. Modify an order: used when people change their minds about certain things.
      • Input:
        • the room number
        • item number or item name (optional)
        • time and date to be delivered (optional)
        • new value of whatever field needed to be change (including one of those fields of inputs)
      • Output:
        • the record gets updated
        • if the updated record somehow matches an entry in the table, the number of items ordered field will get added and the former record gets deleted.
        • if those two optional inputs were not given, a list of possible records whose room number matches the room number in the input should be generated. The user then can choose what record to modify.
      • Error:
        • Again, combination of the room number/item number/ date&time to delivered doesn't match any record.
    4. Query based on delivery-time: used by staff to prepare the service and for service section to deliver the service.
      • Input:
        • a date
        • a time
      • Output:
        • list of what rooms, what type of services and how many of them are to be delivered.
      • Error:
        • Besides syntax errors and the like (such as time is not between 0-23 for example,) no other error.
    5. Search for service to be delivered to a certain room: (used in b, c as well as a response to a request from user.)
      • Input:
        • a room number
        • a date
      • Output:
        • all the information regarding that room's orders that are placed before the input date. For each order we will have: the item number (and item name), the date & time the order was placed, the date&time the order is going to be delivered, the employee name who took the orders, and the number of items ordered .
      • Error:
        • room number doesn't exist.
        • the date is in future.
    6. Future considerations: should we intergrate this, say with the kitchen system, we may want to make a query on the number of dishes of a certain type of food so we can pass that on to the kitchen staff so they know what to do early.
    7. Query based on employee name and date: used when the manager wants to check out who handled what orders on a certain date. Since it's not the employee herself who is doing the request, it's more convenient that the employee name used instead of the employee ID.
      • Input:
        • employee name
        • date
      • Output:
        • The list of all orders handled by the employee on that date. In particular for each order there will be a room number, time ordered, time to deliver, item number and item name, number of items ordered, extra comments.
      • Error:
        • There is no such employee name
        • The date doesn't exist (either in future or before the system was built)

    Return to Index