Tan Zheng Fu Justin - Project Portfolio

Overview

Hospital Administrative Management System (HAMS) is a CLI-based medical facility administration system that is used for maintaining medical records. It is written in Java.

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.

For 3. Command Format, I ensured that the commands and examples are up to date. I also included in visual hints (pictures) that can be useful for Users.

3. Command Format

Words enclosed within angle brackets [] are the parameters to be supplied by the user. Other keywords stated are compulsory and they should be included.

For example, in adda \date [date] \time [time] \pid [patient id], adda is the command keyword that adds an Appointment record.

\date and \time are compulsory labels to denoting what field the subsequent information belongs to. [date] is the date of the appointment to be supplied by you. [time] represents the time of the appointment to be supplied by you.

A valid input would be adda \date 22/05/2020 \time 1200 \pid 1.

 


For the below UG snippet, I placed moved all command examples to table form, as well as providing a “Before” and “After” list for the user to reference.

Example List (Before)

Examples of usage:

Please refer to the above “Before” list to compare the changes.

OK? Usage Outcome & After
OK editp \index 2 \name Lam \phone 83487846
OK editp \age 99 \address Bedok \phone 89993999 \name Justin \index 3
NOT OK editp \index a \address Paris Ris \phone 93489678

Final List

 


The below parts are not in the User Guide but are some additional features and designs I would like to propose

Handling of duplicate fields

Current implementation:

Proposed implementation:

Context: The user has typed a lot of stuff, and realizes that somewhere at the front he had a typo. So instead of retyping the commands, he can simply duplicate the header with the correct information.

{Explain how and why the user might want to take advantage of this feature}

 


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 provided the write up for the introduction part of the Developer Guide as shown below

1. Introduction

1.1. Purpose

This document specifies the architecture and software designs for Hospital Administrative Management System (HAMS).

1.2. Product Scope

1.2.1. Target User Profile

The intended audience of this documentation are the developers, designers, software testers, operators and maintenance engineers. The below table summarizes the purposes of reading for each audience.

Role Purpose
Developers & Designers To understand the architecture and follow the design to build the system
Software testers To understand the internals of the system so as to test more effectively
Operators To improve productivity while using the system on a daily basis
Maintenance Engineers To understand how the system was built in order to perform enhancement or re-engineering work

 


I developed the Parser module, listing out the main purpose and steps in input interpretation. At the end of the section, I provided design considerations while implementing this module.

2.2.5 Parser module

This section describes the implementation of Parser class, as well as the design considerations and rational behind the current implementation.

The main purpose of the Parser class is as below.

  1. To interpret user inputs so that the correct command can be executed
  2. Functions as the first line to sanitize user input

As such, the Parser class only has one publicly callable method and that returns the command object for execution. To assist the public method, Parser class has multiple private helper methods, as well as access to the Exception handler to ensure that the user input is formatted correctly. This way, purpose 1 and 2 is satisfied.

2.2.5.1 Object creation and steps in input interpretation
  1. The Parser object is first created in Duke class and subsequently used until program termination.
  2. User input is received and handed over to Parser object for interpretation.
  3. In the Parser object, the type of command is first determined via helper method getCommand(userInput).
    • Example: addp \age 23 \name Justin, the addp command will be determined.
  4. The remaining fields will be recorded in a hashMap through either fillPatientFields(userInput) or fillAppointmentFields(userInput) depending on the command type in Step 3.
    • The type of category of the command can be determined based on the last alphabet of the first word.
    • The command addp has the last alphabet is p, fillPatientFields() will be called. Likewise, if it ise adda, it will be fillAppointmentFields().
    • Example: addp \name Sam \age 18, the method fillPatientFields(userInput) will be called. The hashMap will contain age -> 23, name -> Sam.
  5. At the end of the execution, a reference to the command object will be returned.

Sequence Diagram when parseCommand(userInput) is initially called

Sequence Diagram for addp

Sequence Diagram for editp

Sequence Diagram for deletep

Sequence Diagram for adda

Sequence Diagram for edita

Sequence Diagram for deletea

Sequence Diagram when it is an unknown command

Sequence Diagram for the creation of the command Object

Sequence Diagram for error checking when DukeExpcetion is called

Sequence Diagram for calling an enum

Sequence Diagram for error checking when DukeExpcetion is called

Enum PatientFieldKeys AppointmentFieldKeys
. INDEX INDEX
. NAME DATE
. AGE TIME
. ADDRESS .
. CONTACT_NUMBER .

DukeExceptions checkFieldEmpty checkIndexValidity
. Based on the above enum table, checks that at least 1 field is provided.

Throws NoFieldCommandException if all fields are empty
Check that the index provided is valid.

If it is less than 0 or not an integer, throw InvalidIndex and IndexNotInteger respectively.
2.2.5.2 Design considerations
Aspect: Symbol for delimiter
Aspect: Symbol for delimiter