Brandon Chong - Project Portfolio Page


Overview

Project: Hospital Management System v2.0

Hospital Administrative Management System - HAMS is a CLI-based medical facility administration system that assists in the maintenance of various medical records.

HAMS is designed for administrative assistants in medical facilities, like hospitals or polyclinics, that prefer using CLI to keep track of various medical records and can type fast.

Summary of Contributions

 

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.

I provided the writeup for the Introduction section, which includes the Quick Start guide for HAMS.

In the Features secction, I also elaborated on key features of the product that would help to assist the user in their tasks.

1. Introduction

This document serves as a user guide for HAMS. It teaches the user how to install HAMS, describes the features of HAMS, explains how HAMS can be used and finally answer some frequently asked questions about HAMS.

HAMS is a CLI-based medical facility administration system that assists in the maintenance of various medical records.

HAMS is designed for administrative assistants in medical facilities, like hospitals or polyclinics, that prefer using CLI to keep track of various medical records and can type fast.


1.1 Starting HAMS

  1. Ensure you have JDK 11 installed on your computer. You can download the installer for your OS from here.
  2. Download the latest .jar file release for HAMS from GitHub.
  3. Move the .jar to an empty folder.
  4. Open Command Prompt.
  5. In Command Prompt, change your current working directory to the folder containing the .jar using $ cd <Path of folder containing .jar>
  6. Run the .jar using $ java -jar (latest version).jar

 


2. Features

Keep track of different record types

HAMS provides you with an easy-to-use system that helps manage and keep track of two types of medical records: Patients and Appointments.

View all your tasks

The lista or listp command that HAMS provides can display all the Appointment or Patient records within the system in a readable format.

Auto-save and store these records

HAMS has an auto-save feature which stores Patient and Appointments every time you add or modify them. With this feature, your tasks will be saved every time you leave the application and can be easily retrieved when you reopen the application subsequently.

 


Contributions to the Developer Guide

 Provided below are sections I contributed to the Developer Guide. They demonstrate my ability to communicate my 
 technical contributions to the project and rationale for technical implementation.

I developed the Storage module, listing out the main purpose and steps in input interpretation.

2.2.3 Storage module

The Storage module consists of 3 different classes. The PatientList and AppointmentList classes act as data structures to store the records of Patient and Appointment objects respectively. They function as ADTs, where various commands from Command objects can manipulate the records within.

The Storage class manages the load and save operations involving the PatientList and PatientList class. These operations are usually invoked on startup, whenever changes are made to the ADTs and before exiting the program. Additionally, it also works with PatientIdManager class to load pre-existing Patient-PatientId mappings. The class diagram for the storage module is as seen below:

 

2.2.3.1 Process of Object Creation

On startup, Duke invokes the loadSavedAppointment() and loadSavedPatient() methods in Storage. This allows the program to retrieve previously stored data from a .txt file and convert it into the static AppointmentList and PatientList objects for use within the program.

For Appointments, the Storage object creates a Scanner object that will parse individual lines in the .txt file, convert them into new Appointments, and then add them to an ArrayList of Appointments called appointmentListToReturn. This appointmentListToReturn will be passed back to Duke to construct the static AppointmentList.

For Patients, the process is the same as above. The difference is that lines in the .txt files are converted to Patient objects instead. They are added to an ArrayList of Patients called patientListToReturn. patientListToReturn is then passed back to Duke to construct the static PatientList.

The sequence diagrams for both loadSavedAppointment() and loadSavedPatient() are shown below:

When the static AppointmentList or PatientList has changes, or the program is exiting, saveAppointmentList() or savePatientList() is invoked respectively. This allows the Storage object to back up existing records to a local .txt file.

For Appointments, the Storage object will create a FileWriter object called fwAppointmentSave. The command will then iterate through the existing AppointmentList and parse each Appointment within, converting it to a string. fwAppointmentSave then writes this string to the .txt file appointments.txt.

For Patients, the process is the same as above. The difference is that Storage object creates a FileWriter object called fwPatientSave instead. fwPatientSave writes Patient strings to the file patients.txt.

The sequence diagram for saveAppointmentList() and savePatientList() is shown below:

I developed the FindPatientCommand and FindAppointmentCommand classes, listing out the main purpose and steps in input interpretation.

Additionally, I also provided design considerations while implementing this module.

2.2.4.14 FindAppointmentCommand Class

To search the AppointmentList by keyword, the FindAppointmentCommand class is used. For this class, it serves as a facade class for the Main, AppointmentList, Ui and the Storage class to interact with one another.

  1. The FindAppointmentCommand class is processed by Parser

  2. When the Main calls execute(Ui ui, Storage storage), it creates searchResults, a new List to hold Appointment objects.

  3. The FindAppointmentCommand class gets the existing list of Appointment objects from AppointmentList using the method getAppointmentList().

  4. After which, the FindAppointmentCommand object will iterate through Appointment objects within the list. According to the format of the input, this class searches specific fields: * if input was dd/mm/yyyy, it searches date fields of each Appointment only. * if input was hh:mm (am/pm), it searches time fields of each Appointment only.

  5. If an Appointment object does contain the search keyword, it will be added to searchResults.

  6. searchResults then invokes the ui method printAppointmentSearchResults() to print the matching Appointment results to the console. (if searchResults is non-empty). Otherwise, the method outputs a message saying no search results were found.

Below shows the sequence diagram for FindAppointmentCommand class.

2.2.4.14.1 Design Considerations
Aspect: Format of Search Input

2.2.4.15 FindPatientCommand Class

To search the PatientList by keyword, the FindPatientCommand class is used. For this class, it serves as a facade class for the Main, PatientList, Ui and the Storage class to interact with one another.

  1. The FindPatientCommand class is processed by Parser

  2. When the Main calls execute(Ui ui, Storage storage), it creates searchResults, a new List to hold Patient objects.

  3. The FindPatientCommand class gets the existing list of Patient objects from PatientList using the method getPatientList().

  4. After which, the FindPatientCommand object will iterate through Patient objects within the list. This class searches through every field in the Patient object for the search keyword.

  5. If a Patient object does contain the search keyword, it will be added to searchResults.

  6. searchResults then invokes the ui method printPatientSearchResults() to print the matching Patient results to the console. (if searchResults is non-empty). Otherwise, the method outputs a message saying no search results were found.

Below shows the sequence diagram for FindPatientCommand class.

2.2.4.15.1 Design Considerations
Aspect: Format of Search Input