Overview
ClinicIO is a clinic management application developed during the course of the Software Engineering module CS2103T. The application targets clinic receptionists and doctors. It provides a streamlined set of operations users can carry out with ease and efficiency. Said operations range from the ability to effortlessly manage queues to accessing clinic statistics. A unique feature that separates ClinicIO from other clinic software is that it relies on command inputs to execute tasks.
In the project, I was responsible for maintaining a consistent and good standard of code quality. This meant reviewing every individual team member’s code contributions.
Additionally, I was also in charge of the 'Model' component of the software. It required a clear and thorough understanding of the component. I ensured that any code implementations regarding the 'Model' component gelled well with one another to create an overall cohesive component.
This portfolio contains a compilation of my contributions throughout the ClinicIO project.
Summary of contributions
-
Major enhancement: added the ability to create/cancel appointments
-
What it does: This feature provides users the ability to manage appointments with ease.
-
Justification: This feature greatly improves the product as it meets the necessary demands a receptionist faces on a day-to-day basis, i.e. Booking appointments.
-
Highlights: Appointments, in reality, rely heavily on different components such as patients and assigned doctors to be booked. The challenge in implementing this feature was creating functional appointments that worked as independently as possible from patients and doctors in order to work within coding principles.
-
Code snippet for cancelling an appointment:
model.cancelAppointment(targetAppointment);
-
-
Code contributed
-
The following link contains all the code contributed throughout the entire project: all code
-
-
Documentation:
-
Code reviewed:
-
Checked code quality: 3
-
Contributions to the User Guide
Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users. |
Appointment Commands
Adding appointments: addappt
Adds an appointment to the appointment schedule.
Format: addappt d/DATE tm/TIME tp/[followup/new] n/NAME ic/NRIC p/PHONE e/EMAIL a/ADDRESS t/TAGS
Date is in dd mm yyyy format and time is hh mm in military time. |
Tags are optional. |
Examples:
-
addappt d/03 04 2018 tm/16 45 tp/followup n/John Doe ic/S1111111G p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 t/fever
Adds a follow-up appointment scheduled on 3 April 2018 at 4.45pm for John Doe with IC S1111111G. -
addappt d/12 12 2013 tm/1300 tp/new id/100 n/Sally Bower ic/G3333333H p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25
Adds a new appointment scheduled on 12 December 2013 at 1.00pm for Sally Bower with IC G3333333H.
Listing Appointments by Day: listappt
Shows a list of all the appointments for the specified day.
Format: listappt d/DATE
Date, like in addappt, is in dd mm yyyy format. |
Examples:
-
listappt 02 03 2017
Lists all appointments on 2 March 2017. -
listappt 01 01 2000
Lists all appointments on 1 January 2000.
Listing All Appointments: listallappt
Shows a list of all appointments.
Format: listallappt
Cancelling Appointments: cancelappt
Cancels an appointment from the appointment schedule.
Format: cancelappt INDEX
Examples:
-
listappt d/03 04 2018
cancelappt 1
Cancels the 1st appointment in the list. -
listappt d/12 12 2018
cancelappt 4
Cancels the 4th appointment in the list.
Contributions to the Developer Guide
Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project. |
Appointment feature
The Appointment feature provides users the ability to schedule future appointments, view daily appointment schedules and to cancel them.
Current Implementation
The Appointment feature contains multiple operations to indirectly manipulate the UniqueAppointmentList
.
The implemented operations include:
-
addappt
Command - Adds appointments to the appointment schedule. -
listappt
Command - Lists the appointment schedule of the date specified. -
`listallappt`Command - Lists all appointments.
-
cancelappt
Command - Cancels appointments found within the appointment schedule.
The class diagram below illustrates the interactions between the Appointment class and associated classes.
Each Appointment
object consists of a Date
, Time
, Patient
and Optional<Staff>
.Patient
contains an
Optional<Staff>#preferredDoctor
and is assigned to the Appointment
object. The
UniqueAppointmentList
contains 0 or more Appointment
s.
The current implementation of Appointment
has the Patient
object as a separate entity from the Patient
s in
UniquePatientList
. This means that the Patient
object only exists within the context of the Appointment
object,
or according to the diagram, would be destroyed if the Appointment
object is destroyed (composition). Likewise, the
Optional<Staff>
would be destroyed if the Appointment
object is destroyed too.
In future implementations, i.e. v2.0, the Patient
object will be checked if it exists within the Model#UniquePatientList
before constructing the Appointment
object. This ensures that the Patient
is registered before making an
appointment.
addappt
Command
The addappt
command behaves similarly to the add
command used for Patient
and Doctor
. The command takes in the
parameters required to construct Date
, Time
and takes in Patient
details. Patient parameters will be simplified
upon the complete implementation of the Patient
class in v2.0. The image below shows how the Appointment
object is
constructed.
The image does not include the method calls to construct a Patient object.
|
After the construction of the appointment, the appointment is added into the UniqueAppointmentList
found in the
ClinicIo
class. The changes done to the list are then 'saved' via the commitClinicIo
method.
This means that this command can be undone or redone.
listappt
Command
The listappt
command searches for appointments that land on the date that was entered by the user.
The filtered appointments are found in ModelManager
. The list is instantiated by filtering the UniqueAppointmentList
using AppointmentContainsDatePredicate
which is created from the Date
argument supplied by the user.
listallappt
Command
The listallappt
behaves similarly to listappt
with the exception that it does not take in any arguments.
Instead, it automatically executes ListAllApptCommand
with the predicate SHOW_ALL_FILTERED_APPOINTMENTS
.
updateFilteredAppointmentList()
is called and the entire list of appointments is shown to the user.
cancelappt
Command
cancelappt
simply takes in the index of the target appointment to cancel according to the displayed appointment list.
The index is parsed using the parseIndex()
and is used in execute()
. A filtered
appointment list (lastShownList
) is retrieved and the index is used to get the targetAppointment
.
The cancelAppointment()
method, under Model
, is then called on the targetAppointment
. The process of cancellation
has two parts, cancelAppointment
and removeAppointment
. ClinicIO#cancelAppointment
simply changes the status of the appointment and
adds it to the Patient
s AppointmentHistory
(not shown). ClinicIO#removeAppointment
actually removes the appointment from the
UniqueAppointmentList
.
Due to the current composition relationship between the Appointment class and Patient class, the additional tasks
of changing appointment status and addition into the patient’s appointment history seems redundant. In v2.0, the usage of
pre-existing patients to make appointments will make these additional tasks more useful.
|
Design Considerations
Aspect: How to store Date and Time fields
-
Alternative 1 (current choice): Store as integers
-
Pros: Makes it easier to calculate timings and clashes between multiple dates and times.
-
Cons: Requires additional code to store and interact with other common methods that rely on Strings.
-
-
Alternative 2: Store as Strings
-
Pros: Makes it easier to implement.
-
Cons: Requires additional code to convert into integers when carrying out calculating methods.
-
Aspect: How to cancel appointments
-
Alternative 1 (current choice): Differentiate between cancellation and deletion
-
Pros: Reduces the occurrences of directly manipulating a Patient’s history. It also upholds the Separation of Concerns Principle.
-
Cons: Violates Don’t Repeat Yourself Principle.
-
-
Alternative 2: Lump deletion into cancellation
-
Pros: Makes it easier to implement and prevents redundancy in code.
-
Cons: Violates Separation of Concerns Principle.
-
Aspect: How to display appointments
-
Alternative 1 (current choice): Display appointments in a tab
-
Pros: Creates an intuitive and easily navigable screen to access appointments.
-
Cons: Decreases the efficiency of CLI by having to use GUI inputs.
-
-
Alternative 2: Have appointments appear when using an appointment command
-
Pros: Keeps the onscreen clutter at a minimum and stays in line with the CLI concept.
-
Cons: Increases difficulty in freely accessing appointments.
-