Kodall
Exercises

Exercise 6: Dental Clinic

Rendering diagram...

Description

  • The property "name" in the table "appointment_state" can have the values: "Pending", "Processed", "Canceled".
  • In entity "appointment_state", name represents the state that will be displayed on the screen, label represents the value that programmer will use to filter the states, and the uuid represents a value to distinguish the states.
  • An appointment/consultation can have multiple services, a medic and a client.
  • Note: The value of the field "uuid" is generated automatically.

Tasks

  • client/medic/service/appointment_state/appointment/appointment_item /consultation/consultation_item: Add, Edit, Delete.
    • When the appointment is created, it will automatically become "Pending".
    • The field "Appointment state" from entity "appointment" will be read-only in edit view.
  • Create a catalog for entities: "appointment_state", "appointment", "medic", "client" and "service".
  • Check appointment record availability (filtering appointments).
  • Create event listeners for tables that needs validations (e.g., adding a client without a name, phone number, etc., should not be allowed).
  • In appointment and consultation, calculate the total value of services:
    • Add a new search view called "Cost of Services".
  • Add a new entity action at the appointment level "Cancel appointment”:
    • It will change the appointment status to "Canceled";
    • An appointment cannot be canceled if it is in the "Processed" state → validation message;
    • An appointment cannot be canceled if it is already in the "Canceled" state → validation message.
  • Add a new entity action at the medic level "Generate consultation":
    • Parameters: client, service.
      • If one or both of the parameters are empty → validation message.
  • Add a new entity action at the appointment level "Generate consultation":
    • First check if a consultation has already been generated from the same appointment;
    • After creating the consultation, the appointment will have the "Processed" state;
    • It can't be generated if it is "Canceled" → validation message.
  • Client report: consultation situation at client level (total number of consultations, service value).
  • Medic report: consultation situation at medic level (total number of consultations, service value).
  • Service report: consultation situation grouped by services (total number of consultations grouped by services, value).