PatientSync addresses a crucial gap in the current hospital systems by providing nurses with a comprehensive tool to manage patient information beyond administrative details.
In many hospitals, the existing systems typically offer basic administrative information such as patient names and contact details. However, they often lack the capacity to delve into the intimate details of patient care.
This app can help with personalised and effective care by:
Refer to the guide Setting up and getting started.
PatientSync is a brownfield Java Project based on the AB3 project template created by the SE-EDU initiative.
The Architecture Diagram given above explains the high-level design of the App.
Given below is a quick overview of main components and how they interact with each other.
2.1.1. Main components of the architecture
Main
(consisting of classes Main
and MainApp
) is in charge of the app launch and shut down.
The bulk of the app's work is done by the following four components:
UI
: The UI of the App.Logic
: The command executor.Model
: Holds the data of the App in memory.Storage
: Reads data from, and writes data to, the hard disk.Commons
represents a collection of classes used by multiple other components.
2.1.2. How the architecture components interact with each other
The Sequence Diagram below shows how the components interact with each other for the scenario where the user issues the command delete 1
.
Each of the four main components (also shown in the diagram above),
interface
with the same name as the Component.{Component Name}Manager
class (which follows the corresponding API interface
mentioned in the previous point.For example, the Logic
component defines its API in the Logic.java
interface and implements its functionality using the LogicManager.java
class which follows the Logic
interface. Other components interact with a given component through its interface rather than the concrete class (reason: to prevent outside component's being coupled to the implementation of a component), as illustrated in the (partial) class diagram below.
The sections below give more details of each component.
The API of this component is specified in Ui.java
The UI consists of a MainWindow
that is made up of parts e.g.CommandBox
, ResultDisplay
, PatientListPanel
, StatusBarFooter
etc. All these, including the MainWindow
, inherit from the abstract UiPart
class which captures the commonalities between classes that represent parts of the visible GUI.
The UI
component uses the JavaFx UI framework. The layout of these UI parts are defined in matching .fxml
files that are in the src/main/resources/view
folder. For example, the layout of the MainWindow
is specified in MainWindow.fxml
The UI
component,
Logic
component.Model
data so that the UI can be updated with the modified data.Logic
component, because the UI
relies on the Logic
to execute commands.Model
component, as it displays Patient
object residing in the Model
.API : Logic.java
Here's a (partial) class diagram of the Logic
component:
The sequence diagram below illustrates the interactions within the Logic
component, taking execute("delete 1")
API call as an example.
Note: The lifeline for DeleteCommandParser
and DeleteCommand
should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline continues till the end of diagram.
How the Logic
component works:
Logic
is called upon to execute a command, it is passed to an AddressBookParser
object which in turn creates a parser that matches the command (e.g., DeleteCommandParser
) and uses it to parse the command.Command
object (more precisely, an object of one of its subclasses e.g., DeleteCommand
) which is executed by the LogicManager
.Model
when it is executed (e.g. to delete a patient).Model
) to achieve.CommandResult
object which is returned back from Logic
.Here are the other classes in Logic
(omitted from the class diagram above) that are used for parsing a user command:
How the parsing works:
AddressBookParser
class creates an XYZCommandParser
(XYZ
is a placeholder for the specific command name e.g., AddCommandParser
) which uses the other classes shown above to parse the user command and create a XYZCommand
object (e.g., AddCommand
) which the AddressBookParser
returns back as a Command
object.XYZCommandParser
classes (e.g., AddCommandParser
, DeleteCommandParser
, ...) inherit from the Parser
interface so that they can be treated similarly where possible e.g, during testing.API : Model.java
The Model
component,
Patient
objects (which are contained in a UniquePatientList
object).Patient
objects (e.g., results of a search query) as a separate filtered list which is exposed to outsiders as an unmodifiable ObservableList<Patient>
that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.UserPref
object that represents the user’s preferences. This is exposed to the outside as a ReadOnlyUserPref
objects.Model
represents data entities of the domain, they should make sense on their own without depending on other components)Note: An alternative (arguably, a more OOP) model is given below. It has a Tag
list in the AddressBook
, which Patient
references. This allows AddressBook
to only require one Tag
object per unique tag, instead of each Patient
needing their own Tag
objects.
API : Storage.java
The Storage
component,
AddressBookStorage
and UserPrefStorage
, which means it can be treated as either one (if only the functionality of only one is needed).Model
component (because the Storage
component's job is to save/retrieve objects that belong to the Model
)Classes used by multiple components are in the seedu.address.commons
package.
This section describes some noteworthy details on how certain features are implemented.
The AddCommand
class is responsible for adding new patient's information in PatientSync.
AddCommand
class, contain parameters which consists of:
patientHospitalId
: String of non-negative numeric characters which uniquely identifies the patient,name
, preferredName
: String which contains alphanumeric characters and spaces,foodPreference
, familyCondition
, hobby
: String and all kinds of characters,tag
: String which are alphanumeric.tag
field is optional in the AddCommand and can be added later on using the AddTagsCommand
.f/FOOD_PREFERENCE
, c/FAMILY_CONDITION
and h/HOBBY
.patientHospitalId
, name
, preferredName
are repeated during the adding of patient, an error message will be thrown.The activity diagram below outlines the steps involved when a user initiates a Add command.
Given below is an example usage scenario and how the group creation mechanism behaves at each step.
Step 1: The user accesses the PatientSync application.
Step 2: The user executes the add id/ 12347 n/ Mary Jane p/ Mary f/ Korean c/ Lives with only daughter h/ Watch Drama
command to add a new Patient whose patient hospital ID is 12347
,
with the name Mary Jane
and preferred name Mary
, likes to eat Korean
food and current family condition is
Lives with only daughter
and likes to Watch drama
.
Step 3: The AddCommandParser
will be called to validate the input, ensuring that the fields are valid with correct
data types and no duplicates of fields.
Patient
instance.Step 4: The newly added Patient will be added to the end of list, shown in the UI.
The following UML sequence diagram illustrates how the Add operation works.
Note: The lifeline for AddCommandParser
and AddCommand
should end at the destroy marker (X) but
due to a limitation of PlantUML, the lifeline reaches the end of diagram.
Aspect: Handle Duplicated Fields
AddCommand
once again instead of the specific field.
Aspect: Choice of PatientHospitalId field
PatientHospitalId
.
Aspect: Handle Existing Patient
patientHospitalId
name
.
name
will be easier to be remembered.Aspect: Handle Multiple Inputs for the Same Field
,
to the specific field
The AddTagsCommand
class is responsible for adding one or more tags to a patient in PatientSync.
Tag
class, are alphanumeric characters with or without spaces, and repeated tags in the command are added as a single tag.The activity diagram below outlines the steps involved when a user initiates an Add Tags command.
Given below is an example usage scenario and how the tag addition process behaves at each step:
Step 1: The user accesses the PatientSync application.
Step 2: The user executes the addt 1 t/christian
command to add the tag christian
to patient 1 in the displayed patient list. The AddTagsCommandParser
will be called to validate the input, ensuring that the index is valid and at least one tag is provided. Upon successful validation, it creates an AddTagsCommand
instance.
The following sequence diagram shows how the Add Tags operation works:
Note: The lifeline for AddTagsCommandParser
and AddTagsCommand
should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram.
Aspect: Skip duplicate Tags in command
Aspect: Cumulative Tag Addition
Aspect: Logic handling for pre-existing tags
The DeleteTagsCommand
class enables the removal of one or more tags from a patient in PatientSync.
Tag
class, are alphanumeric characters with or without spaces, and repeated tags in the command are added as a single tag.t/friend t/friend
will be considered as a single friend
tag for deletion.The activity diagram below outlines the steps involved when a user initiates a Delete Tags command.
Below is an example scenario of how the tag deletion process works within the PatientSync application:
Step 1: The user accesses the PatientSync application.
Step 2: The user executes the deletet 1 t/christian
command to delete the christian
tag from patient 1 in the displayed patient list. The DeleteTagsCommandParser
validates the input, ensuring that the index is valid and at least one tag is provided. Upon successful validation, an DeleteTagsCommand
instance is created.
The following sequence diagram shows how the Delete Tags operation works:
Note: The lifeline for DeleteTagsCommandParser
and DeleteTagsCommand
should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram.
Aspect: Bulk Tag Deletion
Aspect: Handling Missing Tags
Aspect: Feedback for Deletion Operation
The AddEventCommand
class is responsible for adding an Event to a patient in PatientSync.
Events, as defined by the Event
class, contain both the Name of the Event that falls on that date, as well as the Date of the Event and optionally, the Time Period for which the Event is happening.
The addition of Event is cumulative, and new Events will be added to the existing set of Events for the patient, preserving the previously assigned Events.
If the patient already has a particular Event, it will not be added again.
The activity diagram below outlines the steps involved when a user initiates a Add Event command.
Given below is an example usage scenario and how the group creation mechanism behaves at each step.
Step 1: The user accesses the PatientSync application.
Step 2: The user executes the adde 1 n/Birthday d/20-01-2022
command to add the Event, Birthday, which falls on the 20th January.
AddEventsCommand
instance.Note: Only 1 Event can be added at a time per command
Note: The lifeline for AddEventCommandParser
and AddEventCommand
should end at the destroy marker (X) but
due to a limitation of PlantUML, the lifeline reaches the end of diagram.
Aspect: Handling Repeated Events
Aspect: Cumulative Event Addition
Aspect: Error Handling for Duplicate Events
The EditCommand
class is responsible for editing current patient's information in PatientSync.
EditCommand
class, contain parameters which consists of:
INDEX
: Positive integer, indicating the index of patient in the PatientSync list,patientHospitalId
: String of non-negative numeric characters which uniquely identifies the patient,name
, preferredName
: String which contains alphanumeric characters and spaces,foodPreference
, familyCondition
, hobby
, tag
: String which are alphanumeric.INDEX
.foodPreference
, familyCondition
, hobby
and tag
can be repeated for multiple inputs.patientHospitalId
, name
and preferredName
are repeated during the editing of patient, error message will be thrown.The activity diagram below outlines the steps involved when a user initiates a Edit command.
Given below is an example usage scenario and how the group creation mechanism behaves at each step.
Step 1: The user accesses the PatientSync application.
Step 2: The user executes the edit 2 f/Aglio-olio t/depression
command to edit an existing Patient whose index in
the PatientSync is 2
, with changes on preferred food to be Aglio-olio
and added a tag depression
.
Step 3: The EditCommandParser
will be called to validate the input, ensuring that the fields are valid with correct
data types and no duplicates of fields.
Patient
instance.Step 4: The Patient with specified index will be updated in the list, shown in the UI.
The following UML sequence diagram illustrates how the Edit operation works.
Note: The lifeline for EditCommandParser
and EditCommand
should end at the destroy marker (X) but
due to a limitation of PlantUML, the lifeline reaches the end of diagram.
Aspect: Usage of Identifier
INDEX
index of the Patient in the PatientSync.
patientHospitalId
of a Patient.
patientHospitalId
.Aspect: Bulk Edit for Certain Field
The DeleteEventCommand
class is responsible for deleting an Event from a patient in PatientSync.
DeleteEventCommand takes in two parameters: PATIENT_INDEX
and EVENT_INDEX
which are Indexes of patients
shown on the UI after using the list
or find
command and Indexes of the specified Patient's events as defined in
the Index
class.
Deletion of Event can only happen for a single patient, and a single event at any given time.
The activity diagram below outlines the steps involved when a user initiates a Delete Event command.
Given below is an example usage scenario and how the group creation mechanism behaves at each step.
Step 1: The user accesses the PatientSync application.
Step 2: The user executes the adde 1 n/ Birthday d/ 20-01-2022
command to add the Event, Birthday,
which falls on the 20th January.
AddEventsCommand
instance.Step 3: The user executes deletee 1 e/1
to delete the Event as the event is over.
DeleteEventCommand
instance is created.The following UML sequence diagram illustrates how the Delete Event operation works.
Note: The lifeline for DeleteEventCommandParser
and DeleteEventCommand
should end at the destroy marker (X) but
due to a limitation of PlantUML, the lifeline reaches the end of diagram.
Aspect: Choice of COMMAND_WORD
deletee
adde
command to add new Event.deleteID
adde
command, further confusing user.Aspect: Syntax to choose event to delete
EVENT_INDEX
. Syntax: prefix e/
followed by EVENT_INDEX
EVENT_INDEX
of the patient.
EVENT_NAME
. Syntax: prefix e/
followed by EVENT_NAME
EVENT_NAME
is very long.The EditEventCommand
class is responsible for editing a specific Event for a patient in PatientSync.
EditEventCommand
takes in four parameters: PATIENT_INDEX
, EVENT_INDEX
, NAME_OF_EVENT
and DATE_OR_DATETIME_OF_EVENT
. All parameters are compulsory. You may exclude TIME
in the
DATE_OR_DATETIME_OF_EVENT
parameter.TIME
, an example of the DATE_OR_DATETIME_OF_EVENT
is 20-12-2025, 12:00 - 15:00
.TIME
, an example of the DATE_OR_DATETIME_OF_EVENT
is 20-12-2025
.EVENT_INDEX
with a new event for the selected PATIENT_INDEX
.The activity diagram below outlines the steps involved when a user initiates an Edit Event command.
Given below is an example usage scenario and how the group creation mechanism behaves at each step.
Step 1: The user accesses the PatientSync application.
Step 2: The user executes the adde 1 n/Birthday d/20-12-2024
command to add the Event, Birthday,
which falls on the 20th December.
AddEventCommand
instance.Step 3: The user executes edite 1 e/1 n/New Birthday d/20-12-2025
to edit the Event.
EditEventCommand
instance is created.The following UML sequence diagram illustrates how the Edit Event operations works.
Note: The lifeline for EditEventCommandParser
and EditEventCommand
should end at the destroy marker (X) but
due to a limitation of PlantUML, the lifeline reaches the end of diagram.
Aspect: Choice of COMMAND_WORD
edite
adde
and deletee
commands.editID
adde
and deletee
commands.The DeleteCommand
is responsible for deleting a patient in PatientSync.
The activity diagram below outlines the steps involved when a user initiates a Delete command.
Given below is an example usage scenario and how the group creation mechanism behaves at each step.
Step 1: The user accesses the PatientSync application.
Step 2: The user see all the patients in PatientSync.
Step 3: The user decide to remove the first patient in PatientSync.
Step 4: The user executes the delete 1
command to remove the first patient in PatientSync.
The following UML sequence diagram illustrates how the Delete operations works.
Note: The lifeline for DeleteCommandParser
and DeleteCommand
should end at the destroy marker (X) but
due to a limitation of PlantUML, the lifeline reaches the end of diagram.
Aspect: Choice of Index
find
, findt
, sort
and list
.
PATIENT_HOSPITAL_ID
of a Patient.
PATIENT_HOSPITAL_ID
as it is not shown on the GUI.The ListCommand
is responsible for listing all patients in PatientSync.
Predicate
that always evaluates to true.Predicate
is passed as an argument to Model#updateFilteredPersonList(),
causing the UI to only show all patients.list
command.Note: The lifeline for ListCommand
should end at the destroy marker (X) but
due to a limitation of PlantUML, the lifeline reaches the end of diagram.
The FindCommand
class is responsible for finding the patients by the name in the patient list
using keyword(s).
FindCommand
takes in one or more keywords to find patients in the patient list.FindCommand
will update the patient list with patients whose name matches the keyword(s).The activity diagram below outlines the steps involved when a user initiates a Find command.
Given below is an example usage scenario and how the group creation mechanism behaves at each step.
Step 1: The user accesses the PatientSync application.
Step 2: The user executes find Alex
to search for patients whose name is Alex.
Alex
will be listed in the patient list.The following UML sequence diagram illustrates how the Find operations works.
Note: The lifeline for FindCommandParser
and FindCommand
should end at the destroy marker (X) but
due to a limitation of PlantUML, the lifeline reaches the end of diagram.
Aspect: Choice of keyword
PATIENT_NAME
as the keyword
PATIENT_HOSPITAL_ID
as the keyword
PATIENT_HOSPITAL_ID
.The FindTagsCommand
class is responsible for finding the patients by their tag in the patient list
using keyword(s).
FindTagsCommand
takes in one or more keywords to find patients using tag in the patient list.FindTagsCommand
will update the patient list with patients whose tag(s) matches the keyword(s).The activity diagram below outlines the steps involved when a user initiates a Find Tags command.
Given below is an example usage scenario and how the group creation mechanism behaves at each step.
Step 1: The user accesses the PatientSync application.
Step 2: The user executes findt diabetes
to search for patients whose tag is diabetes.
diabetes
will be listed in the patient list.The following UML sequence diagram illustrates how the Find Tags operations works.
Note: The lifeline for FindTagsCommandParser
and FindTagsCommand
should end at the destroy marker
(X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram.
Aspect: Choice of Command Structure
findt KEYWORD [MORE_KEYWORD]…
find
command.addt
and deletet
.
findt t/KEYWORD [t/MORE_KEYWORD]…
addt
and deletet
.The SortCommand
class is responsible for sorting the patients by the specified attribute.
SortCommand
takes in zero or one attribute to sort the patient list.SortCommand
will update the patient list with the sorted patient list and the display the sorted patient list.The activity diagram below outlines the steps involved when a user initiates a Delete Event command.
Given below is an example usage scenario and how the group creation mechanism behaves at each step.
Step 1: The user accesses the PatientSync application.
Step 2: The user executes sort p
to sort patient list by patient's preferred name.
The following UML sequence diagram illustrates how the Sort operations works.
Note: The lifeline for SortCommandParser
and SortCommand
should end at the destroy marker
(X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram.
Aspect: Choice of Command Structure
sort [ATTRIBUTE]
sort [PREFIX]
Aspect: ATTRIBUTE specification
Aspect: Sorting Algorithm
Collections.sort
method with custom Comparator
Aspect: Method to update the model after sorting
updatePatientList
method in Model
The ClearCommand
class is responsible for clearing all data in PatientSync.
ClearCommand
requires no attributes or parameters.ClearCommand
will delete all data and display an empty patient list.Given below is an example usage scenario.
Step 1: The user accesses the PatientSync application.
Step 2: The user executes clear
to clear all data in PatientSync.
The ExitCommand
class is responsible for exiting and closing PatientSync.
ExitCommand
requires no attributes or parameters.Given below is an example usage scenario.
Step 1: The user accesses the PatientSync application.
Step 2: The user executes exit
to exit PatientSync.
The HelpCommand
class is responsible for opening a separate window to a link to the User Guide of PatientSync.
HelpCommand
requires no attributes or parameters.Given below is an example usage scenario.
Step 1: The user accesses the PatientSync application.
Step 2: The user executes help
to view PatientSync's User Guide.
Team size: 5
Presently, the handling of potentially invalid inputs and the inability to detect incorrect flags for tags, such as when a user enters /addtag
instead of the correct /addt
or incorrect tag formats (e.g., using tag/TAG
instead of t/TAG
) are limited. This can lead to errors and confusion for users, especially for new users.
To mitigate this, we are planning enhancements to include robust input validation, warnings for potential errors, and improved error messages. When an invalid input is detected, the system will provide even clearer feedback to the user, indicating the specific issue and suggesting corrective actions. This would include errors arising from missing index, and clearer distinctions between non-negative indexes and out of bounds indexes.
Additionally, an interactive command assistance feature will be introduced, offering real-time suggestions. These enhancements aim to improve the user experience, enhance system reliability, and bolster command comprehension within the PatientSync application.
Currently, the process of modifying patient tags in the PatientSync application can be cumbersome, requiring users to delete and re-add tags individually. This can lead to potential errors, especially when handling a large number of tags or making multiple changes.
To address this, we plan to introduce the EditTagsCommand feature, providing users with a more flexible and efficient way to manage patient tags. The planned EditTagsCommand feature is designed to enhance user productivity, reduce the likelihood of errors, and improve overall usability within PatientSync.
Presently, the Date and Datetime for Events, referred to as DATE_OR_DATETIME_OF_EVENT
, do not have sufficient input validation for the validity of the DATE_OR_DATETIME_OF_EVENT
. It currently uses LocalDate.parse()
and LocalTime.parse()
along with the pattern format, but these methods are not strict by default. For example, the user is currently able to input 30-02-2024, 24:00 - 24:00
. However, 30-02-2024
is not a valid Date and 24:00
is not a valid time.
This can lead to potential errors if the user has accidentally mistyped the date and/or time when inputting the command, leading to confusion further down the line.
To address this, we plan to make our input validation for the DATE_OR_DATETIME_OF_EVENT
field stricter, to ensure the validity of the values, and not just the format. Specifically, we intend to perform the following validations:
00:00
to 23:59
, inclusiveUpon identification of such invalid DATE_OR_DATETIME_OF_EVENT
field values, PatientSync should then output a custom error message, i.e.,Invalid DATE_OR_DATETIME_OF_EVENT!
Note that 24:00
is accepted as it refers to the midnight corresponding to the instant at the end of the calendar day. This also results in a specific error evaluating whether the end time of the Event is before or equal to the start time of the Event as 24:00
evaluates to 00:00
when using LocalTime.parse()
. Thus, an example Event with DATE_OR_DATETIME_OF_EVENT
of 30-02-2024, 24:00 - 12:00
is accepted as valid. This error will also be resolved if 24:00
is not accepted in PatientSync.
Presently, we do not restrict the user from adding events at any date. As such, the user is able to add Events for a Patient on unrealistic dates, i.e., 4000 years into the Future or Past. Adding such Events is more likely to be a typographical error and thus, we should warn the user (similar to how we warn the user for past events). We choose to warn the user rather than error on the command as it is possible, albeit rare, for a Person to live more than a 100 years.
To address this, we plan to introduce an Upper and Lower Bound for the Event Date, of approximately +- 100 years from the present year. Upon identification of DATE_OR_DATETIME_OF_EVENT
with years outside of this range, PatientSync should then warn the user with a message to the effect of Warning: This Event occurs more than a 100 years in the future / past
Presently, duplicate checks for Events are done via checking the Event Name (NAME_OF_EVENT
), as well as Date / Datetime (DATE_OR_DATETIME_OF_EVENT
). However, the duplicate check does not account for differences in case sensitivity of the NAME_OF_EVENT
. For example, given the same DATE_OR_DATETIME_OF_EVENT
, the Event Birthday
and birthday
would still be seen as two separate events. The user would potentially be able to thus create multiple duplicate events, which would clutter the UI and confuse the User.
To address this, we plan to make the Duplicate Check for Events case sensitive, such that we detect these scenarios. PatientSync would then also return a Success Result, albeit with the special Duplicate Message, to the user.
Presently, the name of patient, referred to as NAME
, do not have sufficient input validation for the validity of the NAME
.
PatientSync currently uses regex expression [\\p{Alnum}][\\p{Alnum} ]*
to check that the user input for NAME
, which is a String that consists of only alphanumeric characters and spaces, to validate the input for patient's name.
For example, the user is currently able to input John Doe
. However, input such as Abraham s/o Dahmil
or Kenneth-David
is not a valid Name.
This can lead to potential troubles where user is not able to input patient's full name when necessary, but need to ignore the special characters during the Name insertion.
To address this, we plan to make our input validation for the NAME
field stricter, to ensure the validity of the NAME and cater all kinds of names.
Specifically, we intend to perform the following validations with special characters:
NAME
field accepts special character /
with specific string such as s/o
, d/o
and w/o
NAME
field accepts special character -
NAME
field accepts special character '
Upon identification of such invalid NAME
field values, PatientSync should then output a custom error message, i.e.,Invalid NAME format!
Presently, the patient's hospital ID referred to as PATIENT_HOSPITAL_ID
, is implemented as String.
PatientSync currently uses regex expression ^[0-9]+$
to check that the user input for PATIENT_HOSPITAL_ID
, which is a String that consists only numeric characters to validate the input for patient's hospital ID.
For example, the user is currently able to input patient's hospital ID 22452
. However, input such as 000000
or overflow input 1234567898765456783434343
are allowed.
This can lead to potential errors such as unlimited size of the input and input with all zeros.
To address this, we plan to make our input validation for the PATIENT_HOSPITAL_ID
field stricter by changing it to Integer, ensuring the validity of the patient's hospital ID.
Specifically, we intend to perform the following validations:
PATIENT_HOSPITAL_ID
field does not contain only zeros.PATIENT_HOSPITAL_ID
field have specific bound and length, such as having ID as numeric value ranging from 3 to 10 digits in length.Upon identification of such invalid PATIENT_HOSPITAL_ID
field values, PatientSync should then output a custom error message, i.e.,Invalid PATIENT_HOSPITAL_ID!
Presently, we do not display PATIENT_HOSPITAL_ID
field in the PatientSync UI. This is because the team do not want to clutter the UI with too much information as the PATIENT_HOSPITAL_ID
is mainly used to check for duplicate patients.
However, user might find it confusing as PATIENT_HOSPITAL_ID
is required upon adding new patient and allowed for editing, but not be able to see what is being inputted or edited.
To address this, we intend to introduce a new field in the PatientSync UI display, named Patient Hospital ID
, to allow user to view patient's hospital ID.
Hence, this would be easier for user to check if there is any duplicated patient added/ edited to the PatientSync list.
Presently, when attempting run commands which requires an index value to be passed in, 2 possible error message are thrown:
Invalid Command Format! ...
, when the index value provided is smaller than or equal to 0... index provided is invalid
, when the index value provided is greater than the total number stored in PatientSyncThis may cause confusion, especially in the first scenario, as the user may mistakenly believe that the command they had inputted was erroneous due to the format, rather than the value.
To address this, we plan to adjust the validation checks currently in PatientSync, to ensure that the error message thrown is standardised for all Index Out of Bounds related errors. Specifically, we intent to standardise the error message to be that of ... index provided is invalid
, so that the user is better able to quickly identify and resolve the issue upon such an error occurring.
Presently, when an invalid sort attribute is provided by the user input, the error message will be:
Invalid Command Format! ...
This may cause confusion as the user may mistakenly believe that the command they had inputted was erroneous due to the format, rather than the invalid sort attribute.
To address this, we plan to implement a specific error message for invalid attribute input by the user. Upon identification of invalid sort attribute, PatientSync should then output a custom error message, i.e Invalid Sort Attribute! Please use sort attribute n or p only!
This allows the user to understand that the sort attribute that they input was invalid and not the command format, preventing any confusion.
Target user profile:
Value proposition:
PatientSync is meticulously crafted for nurses who prioritize the well-being of their patients above all else. It allows nurses to input intimate details about their patients, such as food preferences and family conditions. This personalized approach enables nurses to deliver tailored care that meets the unique needs of each individual.
Priorities: High (must have) - * * *
, Medium (nice to have) - * *
, Low (unlikely to have) - *
Priority | As a … | I want to … | So that I can… |
---|---|---|---|
*** | Nurse | easily view the user guide | learn more about the product and how to use whenever I need to |
*** | Nurse | add patient's information | add new patients and easily remember their preferences to make a personalized connection |
*** | Nurse | delete patient's information | remove patients who have been discharged |
*** | Nurse | list all patient's information | easily find the details of my patients |
*** | Nurse | add event for my patients | keep track of my patients' appointments and see my overall schedule |
*** | Nurse | delete event for my patients | delete my patients' appointments if they are canceled |
*** | Nurse | add tags to my patients | group the patients into categories |
*** | Nurse | find patient with a specific tag | quickly locate individuals with similar conditions, treatments, or requirements without having to scroll through the entire patient list |
*** | Nurse | save all previously added patients | ensure details of the patient would not be lost |
** | Nurse | edit patient's information | have the most updated information of my patients at all times |
** | Nurse | edit event for my patients | edit my patients' appointments if they are changed |
** | Nurse | delete tags from my patients | delete the tag if it no longer applies |
** | Nurse | edit tags from my patients | edit mistyped tags |
** | Nurse | sort the patients by patient name | be flexible in how I want to view my patient list |
** | Nurse | clear all data | start from a clean PatientSync |
** | Nurse | close PatientSync using commands | fully interact with PatientSync from start to end using only commands |
(For all use cases below, the System is PatientSync
and the Actor is the Nurse
, unless specified otherwise)
Use case: UC01 - Add a patient
MSS
Nurse requests to add a patient.
PatientSync adds the patient and display success message.
Use case ends.
Extensions
1a. Nurse's input is invalid command format.
1a1. PatientSync shows an error message.
Use case ends.
1b. Nurse's input contains invalid parameters value.
1b1. PatientSync shows an error message.
Use case ends.
1c. Nurse's input contains duplicate patient hospital Id.
1c1. PatientSync shows an error message.
Use case ends.
Use case: UC02 - Delete a patient
MSS
Nurse requests to list patients.
PatientSync shows a list of patients.
Nurse requests to delete a specific patient in the list.
PatientSync deletes the patient and displays success message.
Use case ends.
Extensions
2a. The list is empty.
Use case ends.
3a. Nurse's input is invalid command format.
3a1. PatientSync shows an error message.
Use case resumes at step 2.
3b. Nurse's input contains invalid patient Id.
3b1. PatientSync shows an error message.
Use case resumes at step 2.
3c. The specified patient does not exist in the patient list.
3c1. PatientSync shows an error message.
Use case resumes at step 2.
Use case: UC03 - Edit a patient's information
MSS
Nurse requests to list patients.
PatientSync shows a list of patients.
Nurse requests to edit a specific patient's information in the list.
PatientSync edits the patient information and displays success message.
Use case ends.
Extensions
2a. The list is empty.
Use case ends.
3a. Nurse's input is invalid command format.
3a1. PatientSync shows an error message.
Use case resumes at step 2.
3b. Nurse's input contains invalid patient Id.
3b1. PatientSync shows an error message.
Use case resumes at step 2.
3c. The patient specified does not exist in the patient list.
3c1. PatientSync shows an error message.
Use case resumes at step 2.
3d. Nurse's input contains invalid parameters value.
3d1. PatientSync shows an error message.
Use case resumes at step 2.
Use case: UC04 - List all patients
MSS
Nurse requests to list all existing patients.
PatientSync shows a list of all existing patients and displays success message.
Use case ends.
Extensions
1a. The list is empty.
Use case ends.
Use case: UC05 - Add event for a patient
MSS
Nurse requests to list patients.
PatientSync shows a list of patients.
Nurse requests to add an event for a specific patient in the list.
PatientSync adds an event for the patient and displays success message.
Use case ends.
Extensions
2a. The list is empty.
Use case ends.
3a. Nurse input is invalid command format.
3a1. PatientSync shows an error message.
Use case resumes at step 2.
3b. The nurse input invalid patient index or invalid date time format for event.
3b1. PatientSync shows an error message.
Use case resumes at step 2.
3c. The patient specified does not exist in the patient list.
3c1. PatientSync shows an error message.
Use case resumes at step 2.
Use case: UC06 - Delete an event for a patient
MSS
Nurse requests to list patients.
PatientSync shows a list of patients.
Nurse requests to delete an event for a specific patient in the list.
PatientSync deletes an event the patient and displays success message.
Use case ends.
Extensions
2a. The list is empty.
Use case ends.
3a. Nurse's input is invalid command format.
3a1. PatientSync shows an error message.
Use case resumes at step 2.
3b. Nurse's input contains invalid patient index or invalid event index.
3b1. PatientSync shows an error message.
Use case resumes at step 2.
3c. The patient specified does not exist in the patient list.
3c1. PatientSync shows an error message.
Use case resumes at step 2.
3d. The patient selected does not contain specified event.
3d1. PatientSync shows an error message.
Use case resumes at step 2.
Use case: UC07 - Edit an event for a patient
MSS
Nurse requests to list patients.
PatientSync shows a list of patients.
Nurse requests to edit an event for a specific patient in the list.
PatientSync edits an event for the patient and displays success message.
Use case ends.
Extensions
2a. The list is empty.
Use case ends.
3a. Nurse's input is invalid command format.
3a1. PatientSync shows an error message.
Use case resumes at step 2.
3b. Nurse's input contains invalid patient index or event index.
3b1. PatientSync shows an error message.
Use case resumes at step 2.
3c. The patient specified does not exist in the patient list.
3c1. PatientSync shows an error message.
Use case resumes at step 2.
3d. Nurse's input contains invalid event name.
3d1. PatientSync shows an error message.
Use case resumes at step 2.
3e. Nurse's input contains invalid date or datetime format.
3e1. PatientSync shows an error message.
Use case resumes at step 2.
3f. Nurse's input contains duplicate event.
3f1. PatientSync shows an error message.
Use case resumes at step 2.
Use case: UC08 - Add tag(s) to a patient
MSS
Nurse requests to list patients.
PatientSync shows a list of patients.
Nurse requests to add one or more tags to a specific patient in the list.
PatientSync adds the specified tag(s) to the patient and displays success message.
Use case ends.
Extensions
2a. The list is empty.
Use case ends.
3a. Nurse's input is invalid command format.
3a1. PatientSync shows an error message.
Use case resumes at step 2.
3b. Nurse's input contains invalid patient index.
3b1. PatientSync shows an error message.
Use case resumes at step 2.
3c. The patient specified does not exist in the patient list.
3c1. PatientSync shows an error message.
Use case resumes at step 2.
Use case: UC09 - Delete tag(s) from a patient
MSS
Nurse requests to list patients.
PatientSync shows a list of patients.
Nurse requests to delete one or more tags from a specific patient in the list.
PatientSync deletes the specified tag(s) from the patient and displays success message.
Use case ends.
Extensions
2a. The list is empty.
Use case ends.
3a. Nurse's input is invalid command format.
3a1. PatientSync shows an error message.
Use case resumes at step 2.
3b. Nurse's input contains invalid patient index.
3b1. PatientSync shows an error message.
Use case resumes at step 2.
3c. The patient specified does not exist in the patient list.
3c1. PatientSync shows an error message.
Use case resumes at step 2.
3d. Nurse's input contains invalid tags.
3d1. PatientSync shows an error message.
Use case resumes at step 2.
3e. The patient selected does not contain specified tag.
3e1. PatientSync shows an error message.
Use case resumes at step 2.
Use case: UC10 - Find patients by tag(s)
MSS
Nurse requests to list patients.
PatientSync shows a list of patients.
Nurse requests to find patients with a specific tag(s) in the list.
PatientSync finds patients with the specified tag(s) and displays success message.
Use case ends.
Extensions
2a. The list is empty.
Use case ends.
3a. Nurse's input is invalid command format.
3a1. PatientSync shows an error message.
Use case resumes at step 2.
Use case: UC11 - Find patients by name
MSS
Nurse requests to list patients.
PatientSync shows a list of patients.
Nurse requests to find patients with the specific name(s) in the list.
PatientSync finds patients with the specified name(s) and displays success message.
Use case ends.
Extensions
2a. The list is empty.
Use case ends.
3a. Nurse's input is invalid command format.
3a1. PatientSync shows an error message.
Use case resumes at step 2.
Use case: UC12 - Sort all existing patients
MSS
Nurse requests to sort patients by specified attribute.
PatientSync sorts all existing patients.
PatientSync displays the sorted patient list and displays success message.
Use case ends.
Extensions
1a. The nurse input invalid command format.
1a1. PatientSync shows an error message.
Use case ends.
1b. The nurse input for sort attribute is invalid.
1b1. PatientSync shows an error message.
Use case ends.
Use case: UC13 - Request for help
MSS
Nurse requests for help.
PatientSync shows pop up window with link to user guide and displays success message.
Nurse copies link from pop up window and access user guide with external browser.
Use case ends.
Use case: UC14 - Clearing all patients
MSS
Nurse requests to clear all patients from the list.
PatientSync deletes all patients from the list and displays success message.
Use case ends.
Use case: UC15 - Closing PatientSync
MSS
Nurse requests to exit PatientSync.
PatientSync closes.
Use case ends.
11
or above installed.Given below are instructions to test the app manually.
Note: These instructions only provide a starting point for testers to work on; testers are expected to do more exploratory testing.
Initial launch
Put the JAR file in an empty folder in which the app is allowed to create files (i.e., do not use a write-protected folder).
Open a command window. Run the java -version command to ensure you are using Java 11. Do this again even if you did this before, as your OS might have auto-updated the default Java version to a newer version.
Launch the jar file using the java -jar
command rather than double-clicking (reason: to ensure the jar file is using the same java version that you verified above). Use double-clicking as a last resort.
Saving window preferences
Resize the window to an optimum size. Move the window to a different location. Close the window.
Re-launch the app by double-clicking the jar file.
Expected: The most recent window size and location is retained.
Add a patient while all patients are being shown
Prerequisites: List all patients using the list
command. Multiple patients in the list.
Test case: add id/ 54321 n/ John Doe p/ John f/ Curry chicken c/ Stable h/ Singing karaoke t/ amnesia
Expected: New patient is added to the list. Status message shows details of the new patient.
Other incorrect add commands to try: add
, add id/ 54321 h/ Singing karaoke
Expected: Error message displayed.
Deleting a patient while all patients are being shown
Prerequisites: List all patients using the list
command. Patient List should not be empty.
Test case: delete 1
Expected: First contact is deleted from the list. Details of the deleted contact shown in the status message.
Other incorrect delete commands to try: delete
, delete x
(where x is larger than the list size)
Expected: Error message displayed.
Listing all patients
list
Editing a patient while all patients are being shown
Prerequisites: List all patients using the list
command. Patient List should not be empty.
Test case: edit 1 p/Alex f/Fried rice
Expected: The preferred name of the first patient is changed to Alex, food preference is changed to Fried rice.
Other incorrect edit commands to try: edit
, edit 1 n/
Expected: Error message displayed.
Finding a patient by name
Prerequisites: List all patients using the list
command. Patient List should not be empty.
Test case: find Alex
Expected: All patients with the name Alex are shown in the list.
Other incorrect find commands to try: find
Expected: Error message displayed.
Adding tags to a patient
Prerequisites: List all patients using the list
command. Patient List should not be empty.
Test case: addt 1 t/depression
Expected: The tag depression is added to the first patient.
Other incorrect add tag commands to try: addt 0
, addt 1 t/
Expected: Error message displayed.
Deleting tags from a patient
Prerequisites: List all patients using the list
command. Patient List should not be empty. The patient that is chosen should have tags.
Test case: deletet 1 t/diabetes
Expected: The tag depression is deleted from the first patient.
Other incorrect delete tag commands to try: deletet 0
, deletet 1 t/
Expected: Error message displayed.
Finding patients by tag
Prerequisites: List all patients using the list
command. Patient List should not be empty. Chosen Tag should exist in at least one patient.
Test case: findt diabetes
Expected: All patients with the tag diabetes are shown in the list.
Other incorrect find tag command to try: findt
Expected: Error message displayed.
Adding an event to a patient
Prerequisites: List all patients using the list
command. Patient List should not be empty.
Test case: adde 1 n/Family Visit d/30-09-2024, 12:00 - 15:00
Expected: The event Family Visit is added to the first patient.
Other incorrect add event commands to try: adde 0
, adde 1 n/Discharge d/20-02-2024, 11:00
Expected: Error message displayed.
Deleting an event from a patient
Prerequisites: List all patients using the list
command. Patient List should not be empty. The patient that is chosen should have events.
Test case: deletee 1 e/1
Expected: The first event of the first patient is deleted.
Other incorrect delete event commands to try: deletee 0
, deletee 1 e/
Expected: Error message displayed.
Editing an event for a patient
Prerequisites: List all patients using the list
command. Patient List should not be empty. The patient that is chosen should have events.
Test case: edite 1 e/1 n/Papa Birthday Celebration d/20-01-2025
Expected: The first event of the first patient is edited to Papa Birthday Celebration.
Other incorrect edit event commands to try: edite 0
, edite 1 e/
Expected: Error message displayed.
Sorting the patient list
Prerequisites: Patient List should not be empty.
Test case: sort p
Expected: The patient list is sorted by patient's preferred name.
Other incorrect sort command to try: sort name
, sort 1
Expected: Error message displayed.