Developer Guide
Welcome to our UniNurse Developer Guide. UniNurse is a desktop app targeted at private nurses to help them manage their patients in a more organized manner.
If you are a developer, this guide provides you with comprehensive documentation about the design and implementation details of UniNurse to help you get started, should you choose to build on its existing features.
- Acknowledgements
- Setting up, getting started
- Design
- Implementation
- Documentation, logging, testing, configuration, dev-ops
- Appendix: Requirements
-
Appendix: Instructions for manual testing
- Launch and shutdown
- Modifying patient contact details
- Modifying tags
- Modifying tasks
- Modifying medical conidtions
- Modifying medications
- Modifying remarks
- Viewing details of a patient
- Finding patients
- Viewing all tasks for a particular day
- Viewing all tasks of a patient
- Viewing all tasks of all patients
- Undoing previous command
- Reversing undo command
- Clearing all patients
- Saving data
Acknowledgements
- This project is based on the AddressBook Level 3 (AB3) project created by the SE-EDU initiative.
- Libraries used: JavaFX, Jackson, JUnit5.
- Font used: OpenSans. The Apache license can be found here.
Setting up, getting started
Refer to the guide Setting up and getting started.
Design
.puml
files used to create diagrams in this document can be found in the diagrams folder. Refer to the PlantUML Tutorial at se-edu/guides to learn how to create and edit diagrams.
Architecture
The Architecture Diagram given above explains the high-level design of UniNurse.
Given below is a quick overview of the main components and how they interact with each other.
Main components of the architecture
Main
has two classes called Main
and MainApp
. It is responsible for,
- At app launch: Initializes the components in the correct sequence, and connects them up with each other.
- At shut down: Shuts down the components and invokes cleanup methods where necessary.
Commons
represents a collection of classes used by multiple other components.
The rest of UniNurse consists of four components.
-
UI
: The UI of UniNurse. -
Logic
: The command executor. -
Model
: Holds the data of UniNurse in memory. -
Storage
: Reads data from, and writes data to, the hard disk.
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 -p 1
.
Each of the four main components (also shown in the diagram above),
- defines its API in an
interface
with the same name as the Component. - implements its functionality using a concrete
{Component Name}Manager
class (which follows the corresponding APIinterface
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.
UI component
API : Ui.java
Description
The UI
component manages the user interface of the application so that it responds appropriately to all commands (valid or invalid) that a user inputs.
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
Components
Here’s a (partial) class diagram of the UI
component:
The UI consists of a MainWindow
that is made up of 4 crucial parts:
PersonListPanel |
Displays a list of TruncatedPatientListCard s that represent Patient objects |
OutputPanel |
Displays an output view based on the command executed |
ResultDisplay |
Displays the feedback of a command to the user |
CommandBox |
A input field for the user to enter commands into |
Other miscellaneous parts (such as StatusBarFooter
, HelpWindow
) are also included in the MainWindow
.
All these, including the MainWindow
, inherit from the abstract UiPart
class which captures the commonalities between classes that represent parts of the visible GUI.
Additionally, the structure of OutputPanel
(simplified in class diagram above) is shown below:
OutputPanel
is a UI part that loads the appropriate view based on the command result. Similar to MainWindow
, all views and the OutputPanel
inherit from the abstract UiPart
class. The OutputPanel
supports the following views:
UpdatedPatientCard |
Displays details of a Patient
|
TaskListPanel |
Displays the list of tasks of a Patient , omitting other Patient detail |
TruncatedTaskListPanel |
A Truncated view of the list of tasks of all Patient s |
ScheduleListPanel |
A Schedule detailing the tasks of the given day and their respective Patient s |
UpdatedPersonListPanel |
Displays a list of UpdatedPatientCard s after using a find command |
UndoCard , RedoCard , ModifiedPatientCard
|
Displays the outcome of an undo /redo command |
Functionality
The UI
component,
- executes user commands using the
Logic
component. - listens for changes to
Model
data so that the UI can be updated with the modified data. - keeps a reference to the
Logic
component, because theUI
relies on theLogic
to execute commands. - depends on some classes in the
Model
component, as it displaysPerson
orPatient
object residing in theModel
.
Logic component
API : Logic.java
Description
The Logic
component handles the execution of the user input. It manages the parsing of the user input to decide the type of command to be executed.
Components
Here’s a (partial) class diagram of the Logic
component:
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:
- When called upon to parse a user command, the
UninurseBookParser
class creates anXYZCommandParser
, which uses the other classes shown above to parse the user command and create aXYZCommand
object which theUninurseBookParser
returns back as aCommand
object. - All
XYZCommandParser
classes inherit from theParser
interface so that they can be treated similarly where possible e.g, during testing.
XYZ
is a placeholder for the specific command name (e.g., AddPatientCommandParser
, AddPatientCommand
, etc.)
Functionality
How the Logic
component works:
- When
Logic
is called upon to execute a command, it uses theUninurseBookParser
class to parse the user command. - This results in a
Command
object (more precisely, an object of one of its subclasses e.g.,AddPatientCommand
) which is executed by theLogicManager
. - The command can communicate with the
Model
when it is executed (e.g. to add a person). - The result of the command execution is encapsulated as a
CommandResult
object which is returned back fromLogic
.
The Sequence Diagram below illustrates the interactions within the Logic
component for the execute("delete -p 1")
API call.
DeleteGenericCommandParser
and DeletePatientCommandParser
should end at the destroy marker (X) but due to a limitation of PlantUML, the lifelines reaches the end of diagram.
Model component
API : Model.java
Description
The Model
component stores and handles the UniNurse data. The data in this component is represented by objects that simulate real-life entities and the associations between these entities.
Components
Here’s a (partial) class diagram of the Model
component:
The Model
component,
- stores the UniNurse book data i.e., all
Person
objects (which are contained in aUniquePersonList
object) and all of its saved versions. - stores the currently ‘selected’
Person
objects (e.g., results of a search query) as a separate filtered list which is exposed to outsiders as an unmodifiableObservableList<Person>
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. - stores a
UserPref
object that represents the user’s preferences. This is exposed to the outside as aReadOnlyUserPref
objects. - depends on the other three components in the following manner:
UninurseBookSnapshot
stores a copy of theCommandResult
after a snapshot is made, to be retrieved by theUi
component when anundo
/redo
command is executed. - each patient has a
TaskList
, which holdsTask
which can be NonRecurringTasks or RecurringTasks. The below Class diagram illustrates their relationship.
Storage component
API : Storage.java
Description
The Storage
component saves and stores UniNurse data in a JSON file format. It also reads the stored data back into UniNurse.
Components
The Storage
component,
- can save both Uninurse book data and user preference data in JSON format, and read them back into corresponding objects.
- inherits from both
UninurseBookStorage
andUserPrefStorage
, which means it can be treated as either one (if only the functionality of only one is needed). - depends on some classes in the
Model
component (because theStorage
component’s job is to save/retrieve objects that belong to theModel
)
Common classes
Classes used by multiple components are in the seedu.uninurse.commons
package.
Implementation
This section describes some noteworthy details on how certain features are implemented.
Task viewing feature
Implementation
The viewing of tasks that are associated with patients can be achieved using the following 2 commands.
-
listTask
to list all tasks associated to all patients. -
viewTask PATIENT_INDEX
to list task associated to the patient at the specifiedPATIENT_INDEX
.
The listTask
command is executed when the user enters the command into the UI which is handled by ListTaskCommand
. Note that the command does not accept any arguments, hence there is no need for a ListTaskCommandParser
to be created.
The change is reflected in the UI by calling Model#updateFilteredPersonList()
with the predicate that returns true if a patient in the list has associated tasks. This currently only updates the patient list panel to display patients that have associated tasks and does not update the output panel. (Future implementations would update the output panel to display all tasks associated with all patients.)
The following sequence diagram illustrates the interactions between the Logic
and Model
component when the command is being executed.
The viewTask
command is executed when the user enters the command into the UI which is handled by ViewTaskCommand
. Since the command requires an argument PATIENT_INDEX
, a ViewTaskCommandParser
is created to determine the validity of the arguments provided. Given that valid arguments are provided, the command is then executed in the following manner.
- The
Patient
at the specifiedPATIENT_INDEX
is retrieved from thelastShownList
obtained from theModel
component. - The
Model
component updates its current list withModel#updateFilteredPersonList()
to display only the specifiedPatient
. - The
UI
component updates its result display by displaying the feedback message fromViewTaskCommand
. - The
UI
component updates its output panel by displaying aTaskListPanel
.
Note that TaskListPanel
only displays the complete list of tasks of the specified patient and essential information such as the patient name and tags.
The following sequence diagrams illustrate the interactions between the UI
, Logic
and Model
component when the command is being executed.
Viewing tasks on a particular day feature
Implementation
The view
command when no flags are present, parses the user input and generates a TasksOnCommand
object which has a DateTime
object containing the date the user wants the tasks for.
When the command is executed, it sets the model to show only the tasks on the day of interest.
The Sequence diagram below shows the execution of a view command with no flags.
Multi-valued attributes feature
A multi-valued attribute is a patient details that consists of a list of values. A patient’s multi-valued attributes includes tags, tasks, medical conditions, medications and remarks.
Multi-valued attributes are represented by the Tag
, Task
, Condition
, Medication
and Remark
classes respectively.
Users can add a multi-valued attribute to a particular patient by providing the following details:
- The patient’s index number shown in the displayed patient list.
- The attribute to be added.
There are two ways a user can add a multi-valued attribute:
- Add multiple attributes at one go when the user first creates a patient.
- Add one attribute at a time to an existing patient.
Implementation
A multi-valued attribute is represented by XYZ
, and multiple attributes are stored internally as a XYZList
.
XYZList
facilitates the add/edit/delete multi-valued attribute mechanism, and each patient only has one associated XYZList
.
XYZList
mainly implements the following operations:
-
XYZList#add()
: adds a multi-valued attribute to the patient’s list of attributes. -
XYZList#edit()
: edits a multi-valued attribute in the patient’s list of attributes. -
XYZList#delete()
: removes a multi-valued attribute from the patient’s list of attributes.
All XYZList
classes inherit from the GenericList
interface so that they can be treated similarly where possible e.g. during testing.
XYZ
is a placeholder for the specific multi-valued attribute type (e.g., ConditionList
, Condition
, etc.)
The activity diagram below summarises the flow of events when a user executes an edit attribute command on a specified patient:
Interactions
Add multi-valued attribute
-
The user executes the
add -p 1 c/Diabetes
command to add a condition to the first patient in the displayed patient list. -
UninurseBookParser#parseCommand()
parses the command wordadd
, and then creates a correspondingAddGenericCommandParser
object. -
AddGenericCommandParser#parse()
parses flag and option-p 1
, and then creates a correspondingAddConditionCommandParser
object. -
AddConditionCommandParser#parse()
parses the patient index1
and the conditionDiabetes
provided, and then creates anAddConditionCommand
object. -
The
AddConditionCommand
object interacts with theModel
to add a condition to the specified patient’s condition list. -
Logic
returns aCommandResult
object, which encapsulates the result of the execution of the add condition command.
The sequence diagram below shows the interactions within the Logic component than happen when a user executes the add condition operation:
Edit multi-valued attribute
Given below is an example usage scenario and how the edit condition mechanism behaves at each step.
-
The user executes the
edit -p 2 -c 1 c/Hypertension
command to edit the first condition of the second patient in the displayed patient list. -
UninurseBookParser#parseCommand()
parses the command wordedit
, and then creates a correspondingEditGenericCommandParser
object. -
EditGenericCommandParser#parse()
parses flags and options-p 2 -c 1
, and then creates a correspondingEditConditionCommandParser
object. -
EditConditionCommandParser#parse()
parses the patient index2
, the condition index1
and the conditionHypertension
provided, and then creates anEditConditionCommand
object. -
The
EditConditionCommand
object interacts with theModel
to replace the desired condition with the newly edited one in the specified patient’s condition list. -
Logic
returns aCommandResult
object, which encapsulates the result of the execution of the edit condition command.
The sequence diagram below shows the interactions within the Logic component than happen when a user executes the edit condition operation:
Delete multi-valued attribute
Given below is an example usage scenario and how the delete condition mechanism behaves at each step.
-
The user executes the
delete -p 2 -c 1
command to delete the first condition of the second patient in the displayed patient list. -
UninurseBookParser#parseCommand()
parses the command worddelete
, and then creates a correspondingDeleteGenericCommandParser
object. -
DeleteGenericCommandParser#parse()
parses flags and options-p 2 -c 1
, and then creates a correspondingDeleteConditionCommandParser
object. -
DeleteConditionCommandParser#parse()
parses the patient index2
and the condition index1
provided, and then creates aDeleteConditionCommand
object. -
The
DeleteConditionCommand
object interacts with theModel
to delete the condition from the specified patient’s condition list. -
Logic
returns aCommandResult
object, which encapsulates the result of the execution of the delete condition command.
The sequence diagram below shows the interactions within the Logic component than happen when a user executes the delete condition operation:
Undo/redo feature
Implementation
The undo/redo mechanism is facilitated by PersistentUninurseBook
. It consists of a list of UninurseBookSnapshot
, which itself consists of a UninurseBook
and a CommandResult
. PersistentUninurseBook
stores the saved versions of all UninurseBook
s, stored internally as:
-
workingCopy
, which is the current (possibly unsaved) version ofUninurseBook
. -
uninurseBookVersions
andcurrentVersion
, which are the saved versions ofUninurseBook
s and which version we last replacedworkingCopy
with.
Additionally, it implements the following operations:
-
PersistentUninurseBook#makeSnapshot(CommandResult)
— Saves the current Uninurse book state (i.e.workingCopy
) in its history, along with the command result message. -
PersistentUninurseBook#undo()
— Restores the previous Uninurse book state from its history. -
PersistentUninurseBook#redo()
— Restores a previously undone Uninurse book state from its history.
These operations are exposed in the Model
interface as Model#makeSnapshot(CommandResult)
, Model#undo()
and Model#redo()
respectively.
Given below is an example usage scenario and how the undo/redo mechanism behaves at each step.
Step 1. The user launches the application for the first time. The PersistentUninurseBook
will be initialized with the initial Uninurse book state, and the currentVersion
pointing to that single Uninurse book state.
Step 2. The user executes delete -p 5
command to delete the 5th person in the Uninurse book. The delete
command calls Model#makeSnapshot(CommandResult)
, causing the modified state of the Uninurse book after the delete -p 5
command executes to be saved in the uninurseBookVersions
along with the CommandResult
of the delete
command, and the currentVersion
is shifted to the newly inserted Uninurse book state.
Step 3. The user executes add n/David …
to add a new person. The add
command also calls Model#makeSnapshot(CommandResult)
, causing another modified Uninurse book state and the CommandResult
of the add
command to be saved into the uninurseBookVersions
.
Model#makeSnapshot(CommandResult)
, so the Uninurse book state will not be saved into the uninurseBookVersions
.
Step 4. The user now decides that adding the person was a mistake, and decides to undo that action by executing the undo
command. The undo
command will call Model#undo()
, which will shift the currentVersion
once to the left, pointing it to the previous Uninurse book state, and restores the Uninurse book to that state.
currentVersion
is at index 0, pointing to the initial UninurseBook state, then there are no previous UninurseBook states to restore. The undo
command uses Model#canundo()
to check if this is the case.
The following sequence diagram shows how the undo operation works:
UndoCommand
should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram.
The redo
command does the opposite — it calls Model#redo()
, which shifts the currentVersion
once to the right, pointing to the previously undone state, and restores the Uninurse book to that state.
currentVersion
is at index uninurseBookVersions.size() - 1
, pointing to the latest Uninurse book state, then there are no undone UninurseBook states to restore. The redo
command uses Model#canredo()
to check if this is the case.
Step 5. The user then decides to execute the command list
. Commands that do not modify the Uninurse book, such as list
, will usually not call Model#makeSnapshot(CommandResult)
, Model#undo()
or Model#redo()
. Thus, the uninurseBookVersions
remains unchanged.
Step 6. The user executes clear
, which calls Model#makeSnapshot(CommandResult)
. Since the currentVersion
is not pointing at the end of the uninurseBookVersions
, all Uninurse book states after the currentVersion
will be purged. Reason: It no longer makes sense to redo the add n/David …
command. This is the behavior that most modern desktop applications follow.
The following activity diagram summarizes what happens when a user executes a new command:
Design considerations
Aspect: How undo & redo executes:
-
Alternative 1 (current implementation): Saves the entire Uninurse book.
- Pros: Easy to implement.
- Cons: May have performance issues in terms of memory usage.
-
Alternative 2: Individual command knows how to undo/redo by itself.
- Pros: Will use less memory (e.g. for
delete
, just save the person being deleted). - Cons: We must ensure that the implementation of each individual command are correct.
- Pros: Will use less memory (e.g. for
Display added/edited/deleted patient feature
Implementation
Adding/editing/deleting a patient would have a UpdatedPersonCard
with the patient’s details appear in the OutputPanel
of the UI
. The possible commands to achieve this are:
- add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [d/TASK_DESCRIPTION]… [t/TAG]…
- edit -p PATIENT_INDEX
- delete -p PATIENT_INDEX
When the user enters any of the above 3 inputs, UninurseBookParser
parses the inputs and returns the appropriate Command
(i.e. AddPatientCommand
, EditPatientCommand
, or DeletePatientCommand
) to LogicManager
. Once the Command
is executed, the patient is then set as the patientOfInterest
in the Model
by calling the Model#setPatientOfInterest()
method.
Below is a sequence diagram to show the interaction between the Logic
and Model
components for adding a patient (sequence is similar for editing and deleting a patient):
After that, MainWindow
would call LogicManager#getPatientOfInterest()
to retrieve the required patient. Thereafter, assuming a patient is added, MainWindow
calls OutputPanel#handleAddPatient()
with the patient as a parameter, which would then create a UpdatedPersonCard
with the patient’s details which appears in the OutputPanel
.
Below is the sequence diagram which shows the entire interaction between the UI
, Logic
, and Model
components for adding a patient (sequence is similar for editing and deleting a patient):
Documentation, logging, testing, configuration, dev-ops
Appendix: Requirements
Product scope
Target user profile:
- Private nurse
- Has to manage a significant number of patient contacts
- Wants to be able to view a patient’s needs at a glance
- Prefers to have quick access to the contact details of patients and their needs
- Prefer desktop apps over other types
- Can type fast
- Prefers typing to mouse interactions
- Is reasonably comfortable using CLI apps
Value proposition: Allows private nurses to manage different detail-sensitive tasks for specific patients in a more organized manner.
User stories
Priorities: High (must have) - * * *
, Medium (nice to have) - * *
, Low (unlikely to have) - *
Priority | As a … | I want to … | So that I can… |
---|---|---|---|
* * * |
user | add a person | |
* * * |
user | delete a person | remove entries that I no longer need |
* * * |
private nurse | be able to edit a patient’s details | update their information if there are any changes |
* * * |
private nurse with many patients | search a patient by name | locate a patient easily |
* * * |
user | add a task to a patient | know what task I need to do for the patient |
* * * |
private nurse | delete a task associated with a patient | remove tasks that I no longer need |
* * * |
private nurse | edit a task associated with a patient | update the task if there are any changes |
* * * |
private nurse | know what tasks I need to do | prepare for them beforehand |
* * * |
private nurse | view all tasks associated with a patient | |
* * |
user | see my list of patients for the day | know my schedule |
* * |
private nurse with many patients and tasks | search a patient by name and task | locate a patient with a specific task or name easily |
* * |
private nurse with many patients | view all tasks for a particular day | easily see the more urgent tasks I have for the day |
* * |
private nurse with many patients and tasks | search patients or tasks by a characteristic | locate patients or tasks more easily |
* * |
busy nurse with short attention span | customise what information I can see at a glance | waste less time looking through long chunks of text to find what I want |
* * |
private nurse | know the exact location of my patient (i.e floor no and room no) | quickly navigate to their side when needed |
* * |
private nurse | know the type of ward (i.e. contagious, non-contagious) | know if I need to don PPE before attending to them |
* * |
member of the hospital | update the room location of the patient | know if the patient is moved for any reasons, everyone involved will be aware of the change |
* * |
private nurse | add a recurring task associated with a patient | keep track of tasks that I have to do repeatedly (e.g. weekly visits) |
* * |
private nurse | delete a recurring task associated with a patient | remove any tasks that I no longer need |
* * |
private nurse | edit a recurring task associated with a patient | update the task to reflect any changes |
* * |
private nurse | know the specific requirements for my patients (if any) | take special precaution |
* * |
doctor | key in additional notes about the patients | let anyone attending to them know more about the patients |
* * |
private nurse | know additional notes the doctor made about the patient | better care for the patients |
* * |
private nurse | delete a note about a patient | remove notes that I no longer need |
* * |
private nurse | edit a note about a patient | update it to reflect any changes |
* * |
private nurse | view all notes about a patient | |
* * |
private nurse | add a medical condition to a patient | take note of the conditions they have |
* * |
private nurse | delete a medical condition from a patient | remove conditions a patient may have recovered from |
* * |
private nurse | edit a medical condition of a patient | update any changes (e.g. severity of condition, etc.) |
* * |
private nurse | view all medical conditions of a patient | have better overview of the needs and type of care the patient needs |
* * |
doctor | update the medication type and dosage | progressively monitor the patient and update the info accordingly |
* * |
doctor | key in medication types and dosage | let nurses administer the appropriate type and amount |
* * |
doctor | delete the medication type and dosage | remove medication that the patient no longer needs |
* * |
private nurse | know what medication my patient needs | prepare the dosages accordingly |
* * |
private nurse | know what type of medication my patient is allergic to | avoid any potential mistake administering medication |
* * |
private nurse | be able to undo/redo recent commands I made in case of a mistake | |
* * |
user | navigate through my command history | easily reuse a past command |
* * |
private nurse with many patients and tasks | search patients or tasks by name and delete them | easily clear patients I am no longer assigned to |
* |
private nurse | know the patient’s family member’s details | contact them in case of emergency |
* |
private nurse | know which doctors are assigned to my patients | report any irregularities to them |
* |
private nurse | know the doctors (and their contact) assigned to the patients | know who to contact in case of emergency |
* |
private nurse | archive former patient details (e.g., patient is cured) | more easily keep track of only active patients and also still able to recall a patient’s details if needed in the future (e.g., patient gets another disease, don’t have to ask them for contact details again) |
* |
doctor in charge of the patient, | control who has edit or read access | ensure no unqualified person can change the patients medicine requirements |
* |
user | know what apparatus I need for my tasks | retrieve them beforehand |
* |
user | be able to add customised command syntax to tailor to my typing preferences | manage my patients even faster |
Use cases
(For all use cases below, the System is the UniNurse
application and the Actor is the user
,
unless specified otherwise)
Use case: UC01 - View the list of all patients
MSS
- User requests to list patients.
-
UniNurse shows a list of patients.
Use case ends.
Extensions
-
2a. The list is empty.
Use case ends.
Use case: UC02 - Add a patient
MSS
- User adds a patient to patient list with patient details.
-
UniNurse shows the list of patients with the newly added patient.
Use case ends.
Extensions
-
1a. The given details are invalid.
-
1a1. UniNurse shows an error message.
Use case resumes at step 1.
-
Use case: UC03 - Edit a patient
MSS
- User requests to view the list of patients (UC01).
- User requests to edit a patient profile with the information that they want to change.
-
UniNurse edits the patient.
Use case ends.
Extensions
-
2a. The given index is invalid.
-
2a1. UniNurse shows an error message.
Use case resumes at step 2.
-
-
2b. The given details to edit are invalid.
-
2b1. UniNurse shows an error message.
Use case resumes at step 2.
-
-
2c. The new details to be updated are invalid.
-
2b1. UniNurse shows an error message.
Use case resumes at step 2.
-
Use case: UC04 - Delete a patient
MSS
- User requests to view the list of patients (UC01).
- User requests to delete a specific patient in the list.
-
UniNurse deletes the patient.
Use case ends.
Extensions
-
2a. The given index is invalid.
-
2a1. UniNurse shows an error message.
Use case resumes at step 2.
-
Use case: UC05 - Find patients with keywords
MSS
- User requests to find patients whose details contain specified keywords.
-
UniNurse shows a list of patients whose details contain the specified keywords.
Use case ends.
Extensions
-
1a. No keywords are given.
-
1a1. UniNurse shows an error message.
Use case ends.
-
Use case: UC06 - Add a task to a specified patient
MSS
- User requests to view the list of patients (UC01).
- User requests to add a task with its description to a specific patient.
-
UniNurse adds the task to a patient.
Use case ends.
Extensions
-
2a. The given patient index is invalid.
-
2a1. UniNurse shows an error message.
Use case resumes at step 2.
-
-
2b. The given task details is invalid.
-
2b1. UniNurse shows an error message.
Use case resumes at step 2.
-
Use case: UC07 - Edit a task associated with a specified patient
MSS
- User requests to view the list of patients (UC01).
- User requests to edit a task with its description they want to change, by specifying the specific patient and specific task.
-
UniNurse edits the task description of the chosen task of the specified patient.
Use case ends.
Extensions
-
2a. The given patient index is invalid.
-
2a1. UniNurse shows an error message.
Use case resumes at step 2.
-
-
2b. The given task index of the specified patient is invalid.
-
2b1. UniNurse shows an error message.
Use case resumes at step 2.
-
-
2c. The given task details is invalid.
-
2c1. UniNurse shows an error message.
Use case resumes at step 2.
-
Use case: UC08 - Delete a task associated with a specified patient
MSS
- User requests to view the list of patients (UC01).
- User requests to delete a task by specifying the specific patient and specific task.
-
UniNurse deletes the task of the specified patient.
Use case ends.
Extensions
-
2a. The given patient index is invalid.
-
2a1. UniNurse shows an error message.
Use case resumes at step 2.
-
-
2b. The given task index of the specified patient is invalid.
-
2b1. UniNurse shows an error message.
Use case resumes at step 2.
-
Use case: UC09 - See the list of tasks to be completed
MSS
- User requests to list tasks.
-
UniNurse shows a list of tasks together with patient name.
Use case ends.
Extensions
-
2a. The list is empty.
Use case ends.
Use case: UC10 - See the list of tasks associated with a specific patient
MSS
- User requests to list tasks for patient at a specified index.
-
UniNurse shows a list of tasks for the specified patient.
Use case ends.
Extensions
-
1a. The given index is invalid or out of range.
-
1a1. UniNurse shows an error message.
Use case ends.
-
-
2a. The list is empty.
Use case ends.
Use case: UC11 - See the list of patients with tasks on current day
MSS
- User requests to list patients with tasks for the current day.
-
UniNurse shows a list of patients with tasks for that day.
Use case ends.
Extensions
-
2a. The list is empty.
Use case ends.
Use case: UC12 - See the list of tasks on a particular day
MSS
- User requests to list tasks on a particular day.
-
UniNurse shows the list of tasks on that particular day.
Use case ends.
Extensions
-
1a. The given date is invalid or wrong format.
-
1a1. UniNurse shows an error message.
Use case ends.
-
-
2a. The list is empty.
Use case ends.
Use case: UC13 - Undo a modification command
MSS
- User requests to undo the last command which modifies the patient or task list, excluding undo or redo commands.
-
UniNurse reverts the patient and task list to the version before the last modification command.
Use case ends.
Extensions
-
1a. There are no more commands to undo.
-
1a1. UniNurse shows an error message.
Use case ends.
-
-
1b. The undo limit has been reached.
-
1b1. UniNurse shows an error message.
Use case ends.
-
Use case: UC14 - Reverse an undo command
MSS
- User requests to reverse the last undo command.
-
UniNurse reverts the patient and task list to the version before the last undo command.
Use case ends.
Extensions
-
1a. The previous command is not an undo command.
-
1a1. UniNurse shows an error message.
Use case ends.
-
Use case: UC15 - Add a medical condition to a specified patient
MSS
- User requests to view the list of patients (UC01).
- User requests to add a medical condition with its details to a specific patient.
-
UniNurse adds the medical condition to a patient.
Use case ends.
Extensions
-
2a. The given patient index is invalid.
-
2a1. UniNurse shows an error message.
Use case resumes at step 2.
-
-
2b. The given medical condition details are invalid.
-
2b1. UniNurse shows an error message.
Use case resumes at step 2.
-
Use case: UC16 - Edit a medical condition associated with a specified patient
MSS
- User requests to view the list of patients (UC01).
- User requests to edit a medical condition with the details they want to change, by specifying the patient and medical condition.
-
UniNurse edits the details of the chosen condition of the specified patient.
Use case ends.
Extensions
-
2a. The given patient index is invalid.
-
2a1. UniNurse shows an error message.
Use case resumes at step 2.
-
-
2b. The given medical condition index of the specified patient is invalid.
-
2b1. UniNurse shows an error message.
Use case resumes at step 2.
-
-
2c. The given medical condition details are invalid.
-
2c1. UniNurse shows an error message.
Use case resumes at step 2.
-
Use case: UC17 - Delete a medical condition associated with a specified patient
MSS
- User requests to view the list of patients (UC01).
- User requests to delete a medical condition by specifying the patient and medical condition.
-
UniNurse deletes the medical condition of the specified patient.
Use case ends.
Extensions
-
2a. The given patient index is invalid.
-
2a1. UniNurse shows an error message.
Use case resumes at step 2.
-
-
2b. The given medical condition index of the specified patient is invalid.
-
2b1. UniNurse shows an error message.
Use case resumes at step 2.
-
Use case: UC18 - Add a tag to a specified patient
MSS
- User requests to view the list of patients (UC01).
- User requests to add a tag with its details to a specific patient.
-
UniNurse adds the tag to a patient.
Use case ends.
Extensions
-
2a. The given patient index is invalid.
-
2a1. UniNurse shows an error message.
Use case resumes at step 2.
-
-
2b. The given tag details are invalid.
-
2b1. UniNurse shows an error message.
Use case resumes at step 2.
-
Use case: UC19 - Edit a tag associated with a specified patient
MSS
- User requests to view the list of patients (UC01).
- User requests to edit a tag with the details they want to change, by specifying the patient and tag.
-
UniNurse edits the details of the chosen tag of the specified patient.
Use case ends.
Extensions
-
2a. The given patient index is invalid.
-
2a1. UniNurse shows an error message.
Use case resumes at step 2.
-
-
2b. The given tag index of the specified patient is invalid.
-
2b1. UniNurse shows an error message.
Use case resumes at step 2.
-
-
2c. The given tag details are invalid.
-
2c1. UniNurse shows an error message.
Use case resumes at step 2.
-
Use case: UC20 - Delete a tag associated with a specified patient
MSS
- User requests to view the list of patients (UC01).
- User requests to delete a tag by specifying the patient and tag.
-
UniNurse deletes the tag of the specified patient.
Use case ends.
Extensions
-
2a. The given patient index is invalid.
-
2a1. UniNurse shows an error message.
Use case resumes at step 2.
-
-
2b. The given tag index of the specified patient is invalid.
-
2b1. UniNurse shows an error message.
Use case resumes at step 2.
-
Use case: UC21 - Add a medication to a specified patient
MSS
- User requests to view the list of patients (UC01).
- User requests to add a medication with its details to a specific patient.
-
UniNurse adds the medication to a patient.
Use case ends.
Extensions
-
2a. The given patient index is invalid.
-
2a1. UniNurse shows an error message.
Use case resumes at step 2.
-
-
2b. The given medication details are invalid.
-
2b1. UniNurse shows an error message.
Use case resumes at step 2.
-
Use case: UC22 - Edit a medication associated with a specified patient
MSS
- User requests to view the list of patients (UC01).
- User requests to edit a medication with the details they want to change, by specifying the patient and medication.
-
UniNurse edits the details of the chosen medication of the specified patient.
Use case ends.
Extensions
-
2a. The given patient index is invalid.
-
2a1. UniNurse shows an error message.
Use case resumes at step 2.
-
-
2b. The given medication index of the specified patient is invalid.
-
2b1. UniNurse shows an error message.
Use case resumes at step 2.
-
-
2c. The given medication details are invalid.
-
2c1. UniNurse shows an error message.
Use case resumes at step 2.
-
Use case: UC23 - Delete a medication associated with a specified patient
MSS
- User requests to view the list of patients (UC01).
- User requests to delete a medication by specifying the patient and medication.
-
UniNurse deletes the medication of the specified patient.
Use case ends.
Extensions
-
2a. The given patient index is invalid.
-
2a1. UniNurse shows an error message.
Use case resumes at step 2.
-
-
2b. The given medication index of the specified patient is invalid.
-
2b1. UniNurse shows an error message.
Use case resumes at step 2.
-
Use case: UC24 - Add a remark to a specified patient
MSS
- User requests to view the list of patients (UC01).
- User requests to add a remark with its details to a specific patient.
-
UniNurse adds the remark to a patient.
Use case ends.
Extensions
-
2a. The given patient index is invalid.
-
2a1. UniNurse shows an error message.
Use case resumes at step 2.
-
-
2b. The given remark details are invalid.
-
2b1. UniNurse shows an error message.
Use case resumes at step 2.
-
Use case: UC25 - Edit a remark associated with a specified patient
MSS
- User requests to view the list of patients (UC01).
- User requests to edit a remark with the details they want to change, by specifying the patient and remark.
-
UniNurse edits the details of the chosen remark of the specified patient.
Use case ends.
Extensions
-
2a. The given patient index is invalid.
-
2a1. UniNurse shows an error message.
Use case resumes at step 2.
-
-
2b. The given remark index of the specified patient is invalid.
-
2b1. UniNurse shows an error message.
Use case resumes at step 2.
-
-
2c. The given remark details are invalid.
-
2c1. UniNurse shows an error message.
Use case resumes at step 2.
-
Use case: UC26 - Delete a remark associated with a specified patient
MSS
- User requests to view the list of patients (UC01).
- User requests to delete a remark by specifying the patient and remark.
-
UniNurse deletes the remark of the specified patient.
Use case ends.
Extensions
-
2a. The given patient index is invalid.
-
2a1. UniNurse shows an error message.
Use case resumes at step 2.
-
-
2b. The given remark index of the specified patient is invalid.
-
2b1. UniNurse shows an error message.
Use case resumes at step 2.
-
Non-Functional Requirements
- Should work on any mainstream OS as long as it has Java
11
or above installed. - Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage.
- A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse.
- Any user action should produce a result within 1 second.
- Each person should be able to hold up to 50 tasks without a noticeable sluggishness in performance for typical usage.
- A user should be able to easily access tasks associated with a patient.
- The product is not required to handle data between multiple users.
- Does not require internet connection.
- The code should be open source.
Glossary
- Private Nurse: A private duty nurse who is self-employed or works for a home health care organization and provides nursing care to patients with restricted mobility or ability for self-care
- PPE: Personal Protective Equipment is equipment worn to minimize exposure to hazards that cause serious workplace injuries and illnesses
- Mainstream OS: Windows, Linux, Unix, OS-X
- Private contact detail: A contact detail that is not meant to be shared with others
Appendix: Instructions for manual testing
Given below are instructions to test the app manually.
Launch and shutdown
-
Initial launch
-
Download the jar file and copy into an empty folder
-
Double-click the jar file Expected: Shows the GUI with a set of sample patients. The window size may not be optimum.
-
-
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.
-
Modifying patient contact details
-
Adding a new patient to the patient list.
-
Prerequisites: The new patient does not already exist in the patient list.
-
Test case:
add n/John Doe p/91235678 e/johnd@gmail.com a/312 Rivervale Street SG 416875 t/elderly r/Allergic to paracetemol m/Cough syrup | 5ml a day c/Cough
Expected: The patient John Doe is added to the patient list. Details of the added patient shown in the status message and output panel. -
Test case:
add n/John Doe p/91235678 e/johnd@gmail.com a/312 Rivervale Street SG 416875 t/elderly r/Allergic to paracetemol m/Cough syrup | 5ml a day c/Cough
(duplicate patient)
Expected: No patient is added to the list. Error details shown in the status message. -
Other incorrect add commands to try:
add
,add n/Mike Ho p/91283045
(missing field)
Expected: Similar to previous.
-
-
Editing a patient’s contact details in the patient list.
-
Prerequisites: There is at least 1 patient in the displayed patient list.
-
Test case:
edit -p 1 n/Michelle Ho
Expected: The name of the first patient displayed in the patient list is changed toMichelle Ho
. Details of the edited patient shown in the status message and output panel. -
Test case:
edit -p 0 p/98776566
Expected: No patient is edited. Error details shown in the status message. -
Other incorrect edit commands to try:
edit
,edit -p 1
(missing field),edit -p x n/Edna
,...
(where x is larger than the displayed patient list size)).
Expected: Similar to previous.
-
-
Deleting a patient from the patient list.
-
Prerequisites: There is at least 1 patient in the displayed patient list.
-
Test case:
delete- p 1
Expected: First patient in the displayed list is deleted. Details of the deleted patient is shown in the status message and the output panel. -
Test case:
delete -p 0
Expected: No patient is deleted. Error details shown in the status message. -
Other incorrect delete commands to try:
delete
(missing field),delete -p x
,...
(where x is larger than the displayed list size)
Expected: Similar to previous.
-
Modifying tags
-
Adding a tag to a patient in the patient list.
-
Prerequisites: There is at least 1 patient in the displayed patient list. The new tag is not already in the patient’s list of tags.
-
Test case:
add -p 1 t/elderly
Expected: Theelderly
tag is added to the first patient in the displayed list. Details of the added tag is shown in the status message and the output panel. -
Test case:
add -p 1 t/elderly
(duplicate tag)
Expected: No tag is added. Error details shown in the status message. -
Other incorrect adding tags commands to try:
add -p 1 t/
(missing field),add -p 0 t/critical
,add -p x t/wheelchair
,...
(where x is larger than the displayed list size)
Expected: Similar to previous.
-
-
Editing a patient’s tag.
-
Prerequisites: There is at least 1 patient in the displayed patient list. The patient has at least 2 tags.
-
Test case:
edit -p 1 -t 1 t/infant
Expected: The first tag of the first patient in the displayed list is changed toinfant
. Details of the new tag is shown in the status message and the output panel. -
Test case:
edit -p 1 -t 2 t/infant
(duplicate tag)
Expected: No tag is edited. Error details shown in the status message. -
Other incorrect editing tag commands to try:
edit -p 1 -t
(missing field),edit -p 1 -t 0
,edit -p 1 -t x t/bedridden
,...
(where x is larger than the number of patient’s tags)
Expected: Similar to previous.
-
-
Deleting a patient’s tag.
-
Prerequisites: There is at least 1 patient in the displayed patient list. The patient has at least 1 tag.
-
Test case:
delete -p 1 -t 1
Expected: The first tag from the first patient in the displayed list is deleted. Details of the deleted tag is shown in the status message and the patient’s details is shown in the output panel. -
Test case:
delete -p 1 -t 0
Expected: No tag is deleted. Error details are shown in the status message. -
Other incorrect deleting tag commands to try:
delete -p 1 -t
(missing field),delete -p 1 -t x
,...
(where x is larger than the number of patient’s tags)
Expected: Similar to previous.
-
Modifying tasks
-
Adding a new non-recurring task to a patient’s task list.
-
Prerequisites: There is at least 1 patient in the displayed patient list. The new non-recurring task is not already in the patient’s task list.
-
Test case:
add -p 1 d/Change dressing | 6-10-23 0900
Expected: The non-recurring taskChange dressing
is added to the first patient in the displayed list. Details of the new task is shown in the status message and the output panel. -
Test case:
add -p 1 d/Change dressing | 6-10-23 0900
(duplicate task)
Expected: No task is added. Error details are shown in the status message. -
Other incorrect adding task commands to try:
add -p 1 d/
(missing field),add -p 1 d/Take blood sample | 14-14-2022
(invalid date)
Expected: Similar to previous.
-
-
Adding a new recurring task to a patient’s task list.
-
Prerequisites: There is at least 1 patient in the displayed patient list. The new recurring task is not already in the patient’s task list.
-
Test case:
add -p 1 d/Take urine sample | 6-10-23 0900 | 1 week
Expected: The recurring taskTake urine sample
is added to the first patient in the displayed list. Details of the new task is shown in the status message and the output panel. -
Test case:
add -p 1 d/Take hair sample | 7-11-23 0900 | 10 hours
(invalid recurrence)
Expected: No task is added. Error details are shown in the status message. -
Other incorrect adding task commands to try:
add -p 1 d/Escort to X-ray | 8-10-23 0900 | 10
(incomplete recurrence)
Expected: Similar to previous.
-
-
Editing a task in a patient’s task list.
-
Prerequisites: There is at least 1 patient in the displayed patient list. The patient has at least 2 tasks in his/her task list.
-
Test case:
edit -p 1 -d 1 d/|5-10-22 0800
Expected: The date and time of the first task of the first patient of the displayed list is changed to5-10-22 0800
. Details of the new task is shown in the status message and output panel. -
Test case:
edit -p 1 -d 1 d/Conduct physiotherapy | 6-10-22 0900
Expected: The first task of the first patient of the displayed list is changed toConduct physiotherapy
with the date and time of6-10-22 0900
. Details of the new task is shown in the status message and output panel. -
Test case:
edit -p 1 -d 2 d/Conduct physiotherapy | 6-10-22 0900
(duplicate task)
Expected: No task is edited. Error details are shown in the status message. -
Other incorrect editing task commands to try:
edit -p 1 -d 1 d/
,edit -p 1 -d 1
(missing fields)
Expected: Similar to previous.
-
-
Deleting a task in a patient’s task list.
-
Prerequisites: There is at least 1 patient in the displayed patient list. The patient has at least 1 task in his/her task list.
-
Test case:
delete -p 1 -d 1
Expected: The first task of the first patient of the displayed list is deleted. Details of the deleted task is shown in the status message. The patient’s new task list is shown in the output panel. -
Test case:
delete -p 1 -d 0
Expected: No task is deleted. Error details are shown in the status message. -
Other incorrect deleting task commands to try:
delete -p 1 -d
(missing field),delete -p 1 -d x
,...
(where x is larger than the number of patient’s tasks)
Expected: Similar to previous.
-
Modifying medical conidtions
-
Adding a new medical condition to a patient.
-
Prerequisites: There is at least 1 patient in the displayed patient list. The new medical condition is not already in the patient’s list of conditions.
-
Test case:
add -p 1 c/Asthma
Expected: The medical conditionAsthma
is added to the first patient of the displayed list. Details of the new condition is shown in the status message and the output panel. -
Test case:
add -p 1 c/Asthma
(duplicate condition)
Expected: No condition is added. Error details are shown in the status message. -
Other incorrect adding medical condition commands to try:
add -p 1 c/
(missing field)
Expected: Similar to previous.
-
-
Editing a medical condition in a patient’s list of conditions.
-
Prerequisites: There is at least 1 patient in the displayed patient list. The patient has at least 2 conditions added.
-
Test case:
edit -p 1 -c 1 c/Cough
Expected: The first condition of the first patient in the displayed list is changed toCough
. Details of the new condition is shown in the status message and the output panel. -
Test case:
edit -p 1 -c 2 c/Cough
(duplicate condition)
Expected: No condition is edited. Error details are shown in the status message. -
Other incorrect editing medical condition commands to try:
edit -p 1 -c 0 c/Covid
(invalid index),edit -p 1 -c 1 c/
(missing field)
Expected: Similar to previous.
-
-
Deleting a medical condition from a patient’s list of conditions.
-
Prerequisites: There is at least 1 patient in the displayed patient list. The patient has at least 1 medical condition.
-
Test case:
delete -p 1 -c 1
Expected: The first condition of the first patient in the displayed list is deleted. Details of the deleted task is shown in the status message. The patient’s new details is shown in the output panel. -
Test case:
delete -p 1 -c 0
Expected: No task is deleted. Error details are shown in the status message. -
Other incorrect deleting task commands to try:
delete -p 1 -c
(missing field),delete -p 1 -c x
,...
(where x is larger than the number of patient’s conditions)
Expected: Similar to previous.
-
Modifying medications
-
Adding a new medication to a patient’s list of medication.
-
Prerequisites: There is at least 1 patient in the displayed patient list. The new medication is not already in the patient’s list of medication.
-
Test case:
add -p 1 m/Cough syrup | 5ml a day
Expected: The medicationCough syrup
with dosage5ml a day
is added to the first patient in the displayed list. Details of the new medication is shown in the status message and the output panel. -
Test case:
add -p 1 m/Cough syrup | 5ml a day
(duplicate medication)
Expected: No medication is added. Error details are shown in the status message. -
Other incorrect adding medication commands to try:
add -p 1 m/
(missing fields),add -p 1 m/pills
(missing dosage)
Expected: Similar to previous.
-
-
Editing a medication in a patient’s list of medications.
-
Prerequisites: There is at least 1 patient in the displayed patient list. The patient has at least 2 medications.
-
Test case:
edit -p 1 -m 1 m/Sleeping pills | 1 before sleeping
Expected: The first medication of the first patient in the displayed list is changed toSleeping pills
with dosage1 before sleeping
. Details of the new medication is shown in the status message and the output panel. -
Test case:
edit -p 1 -m 2 m/Sleeping pills | 1 before sleeping
(duplicate medication)
Expected: No medication is edited. Error details are shown in the status message. -
Other incorrect editing medication commands to try:
edit -p 1 -m 0 m/pills | once a day
(invalid index),edit -p 1 -m 1 m/
(missing fields)
Expected: Similar to previous.
-
-
Deleting a medication from a patient’s list of medications.
-
Prerequisites: There is at least 1 patient in the displayed patient list. The patient has at least 1 medication.
-
Test case:
delete -p 1 -m 1
Expected: The first medication of the first patient in the displayed list is deleted. Details of the deleted medication is shown in the status message. The patient’s new details is shown in the output panel. -
Test case:
delete -p 1 -m 0
(invalid index)
Expected: No task is deleted. Error details are shown in the status message. -
Other incorrect deleting task commands to try:
delete -p 1 -m
(missing field),delete -p 1 -m x
,...
(where x is larger than the number of patient’s medications)
Expected: Similar to previous.
-
Modifying remarks
-
Adding a new remark to a patient.
-
Prerequisites: There is at least 1 patient in the displayed patient list. The new remark is not already in the patient’s list of remark.
-
Test case:
add -p 1 r/Allergic to cough syrup
Expected: The remarkAllergic to cough syrup
is added to the first patient in the displayed list. Details of the new remark is shown in the status message and the output panel. -
Test case:
add -p 1 r/Allergic to cough syrup
(duplicate remarks)
Expected: No remark is added. Error details are shown in the status message. -
Other incorrect adding remark commands to try:
add -p 1 r/
(missing field)
Expected: Similar to previous.
-
-
Editing a remark in a patient’s list of remarks.
-
Prerequisites: There is at least 1 patient in the displayed patient list. The patient has at least 2 remarks.
-
Test case:
edit -p 1 -r 1 r/Allergic to dust
Expected: The first remark of the first patient in the displayed list is changed toAllergic to dust
. Details of the new remark is shown in the status message and the output panel. -
Test case:
edit -p 1 -r 2 r/Allergic to dust
(duplicate remark)
Expected: No remark is edited. Error details are shown in the status message. -
Other incorrect editing remark commands to try:
edit -p 1 -r 0 r/Cardiac arrest
(invalid index),edit -p 1 -r 1 r/
(missing fields)
Expected: Similar to previous.
-
-
Deleting a remark from a patient’s list of remarks.
-
Prerequisites: There is at least 1 patient in the displayed patient list. The patient has at least 1 remark.
-
Test case:
delete -p 1 -r 1
Expected: The first remark of the first patient in the displayed list is deleted. Details of the deleted remark is shown in the status message. The patient’s new details is shown in the output panel. -
Test case:
delete -p 1 -r 0
Expected: No remark is deleted. Error details are shown in the status message. -
Other incorrect deleting remark commands to try:
delete -p 1 -r
(missing field),delete -p 1 -r x
,...
(where x is larger than the number of patient’s remarks)
Expected: Similar to previous.
-
Viewing details of a patient
-
View details of a specific patient.
-
Prerequisites: There is at least 1 patient in the displayed patient list.
-
Test case:
focus -p 1
Expected: The details of the first patient in the displayed list is shown in the output panel. -
Test case:
focus -p 0
(invalid index)
Expected: No patient is displayed in the output panel. Error details are shown in the status message. -
Other incorrect viewing commands:
focus -p
,focus 1
(missing fields)
Expected: Similar to previous.
-
Finding patients
-
Finding patients with specific keywords.
-
Prerequisites: None.
-
Test case:
find Alex Yeoh
Expected: A list of patients whose details contain the keywordsAlex Yeoh
are shown in the displayed patient list and output panel. -
Test case:
find cough syrup
Expected: A list of patients whose details contain the keywordscough syrup
are shown in the displayed patient list and output panel. -
Test case:
find
(missing keyword)
Expected: No patients are shown in the output panel. Error details are shown in the status message.
-
Viewing all tasks for a particular day
-
Viewing all tasks for today.
-
Prerequisites: None.
-
Test case:
view --today
Expected: All tasks whose date is the current day are shown in the output panel.
-
-
Viewing all tasks for a particular day.
-
Prerequisites: None.
-
Test case:
view 10-10-22
Expected: All tasks with the date10-10-22
are shown in the output panel. -
Test case:
view 10-10-2022
(invalid date format)
Expected: No tasks are shown in the output panel. Error details are shown in the status message. -
Other incorrect viewing commands:
view 15-15-22
(invalid date),view
(missing date)
Expected: Similar to previous.
-
Viewing all tasks of a patient
-
Viewing all tasks of a patient.
-
Prerequisites: There is at least 1 patient in the displayed patient list.
-
Test case:
view -p 1
Expected: The task list of the first patient in the displayed list is shown in the output panel. -
Test case:
view -p 0
(invalid index)
Expected: No task list is shown in the output panel. Error details are shown in the status message. -
Other incorrect task viewing commands to try:
view -p
(missing field),view -p x
,...
(where x is larger than the size of the patient list)
Expected: Similar to previous.
-
Viewing all tasks of all patients
-
Viewing all tasks of all patients.
-
Prerequisites: None.
-
Test case:
view -p --all
Expected: All tasks of all patients in the patient list are shown in the output panel.
-
Undoing previous command
-
Undoing a previous add/edit/delete command.
-
Prerequisites: At least 1 add/edit/delete command was executed.
-
Test case:
undo
Expected: Previous command is undone. Details of the undone command is shown in the status message and output panel.
-
Reversing undo command
-
Reversing an undo command.
-
Prerequisites: An undo command was executed successfully.
-
Test case:
redo
Expected: Previous undo command is reversed. Details of the redone command is shown in the status message and output panel.
-
Clearing all patients
-
Delete all patients in the displayed patient list.
-
Prerequisites: There is at least 1 patient in the displayed patient list.
-
Test case:
clear
Expected: All patients in the displayed list are deleted. Details of the clear command is shown in the status message.
-
Saving data
-
Dealing with missing/corrupted data files.
-
Run UniNurse without
uninursebook.json
inside the data folder.
Expected: UniNurse will createuninursebook.json
containing the sample patient data and run. -
Run UniNurse with a corrupted
uninursebook.json
. (data stored in the wrong format, random text added into the file, etc.)
Expected: UniNurse will run with an emptyuninursebook.json
. -
Run UniNurse without the
data
folder inside the root directory.
Expected: UniNurse will create thedata
folder withuninusebook.json
containing the sample patient data and run.
-