forked from nus-cs2103-AY2324S2/tp
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Developer Guide to include Help Command #57
Merged
iamtr
merged 4 commits into
AY2324S2-CS2103T-F10-1:master
from
ejnan:update-developerguide
Apr 2, 2024
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
--- | ||
layout: page | ||
title: User Guide | ||
nav_order : 2 | ||
--- | ||
Nursing Address Book (NAB) is a desktop application tailored for ward nurses, optimizing patient contact management via a Command Line Interface (CLI) while incorporating a Graphical User Interface (GUI) for ease of use. | ||
# Nursing Address Book (NAB) | ||
Nursing Address Book (NAB) is a desktop application tailored for ward nurses, optimizing patient contact management via a Command Line Interface (CLI) while incorporating a Graphical User Interface (GUI) for ease of use. | ||
Designed for efficiency, NAB enables quick access to patient records, streamlined contact management, and simplified logging of care details, proving to be a valuable tool for fast typists and those who prefer the precision of CLI operations. | ||
|
||
## Table of Contents | ||
* Quick Start | ||
* Features | ||
* Adding a Patient | ||
* Viewing Patients | ||
* Editing a Patient's details | ||
* Finding a Patient | ||
* Deleting a Patient | ||
* Clearing all Entries | ||
* Exiting the Application | ||
* FAQ | ||
* Command Summary | ||
* [Quick Start](#quick-start) | ||
* [Features](#features) | ||
* [Adding a Patient](#adding-a-patient-add) | ||
* [Viewing Patients](#listing-all-patients--list) | ||
* [Editing a Patient](#editing-a-patient--edit) | ||
* [Finding a Patient](#locating-patients-by-name-find) | ||
* [Deleting a Patient](#deleting-a-patient--delete) | ||
* [Viewing Help](#viewing-help--help) | ||
* [Clearing all Entries](#clearing-all-entries--clear) | ||
* [Exiting the Application](#exiting-the-program--exit) | ||
* [FAQ](#faq) | ||
* [Command Summary](#command-summary) | ||
* [Troubleshooting](#troubleshooting) | ||
|
||
-------------------------------------------------------------------------------------------------------------------- | ||
|
||
|
@@ -28,7 +32,7 @@ Designed for efficiency, NAB enables quick access to patient records, streamline | |
|
||
3. Copy the file to the folder you want to use as the _home folder_ for your AddressBook. | ||
|
||
4. Open a command terminal, For Windows users, search for `cmd` in the Start menu and run it as an administrator if necessary. Use the `cd` command to navigate to the folder where you placed the jar file. Run the application by executing `java -jar addressbook`.jar.<br> | ||
4. Open a command terminal, For Windows users, search for `cmd` in the Start menu and run it as an administrator if necessary. Use the `cd` command to navigate to the folder where you placed the jar file. Run the application by executing `java -jar nab.jar`.<br> | ||
Shortly, a GUI resembling the following should display, including some sample input to get you started:<br> | ||
![Ui](images/Ui.png) | ||
<br> | ||
|
@@ -72,7 +76,7 @@ Designed for efficiency, NAB enables quick access to patient records, streamline | |
* If you are using a PDF version of this document, be careful when copying and pasting commands that span multiple lines as space characters surrounding line-breaks may be omitted when copied over to the application. | ||
</div> | ||
|
||
### Adding a person: `add` | ||
### Adding a patient: `add` | ||
|
||
Adds a new patient's information to the address book. | ||
|
||
|
@@ -106,15 +110,15 @@ Tags: FallRisk, Diabetes | |
You now have 1 patient(s) in your address book. | ||
``` | ||
|
||
### Listing all persons : `list` | ||
### Listing all patients : `list` | ||
|
||
Displays a list of all registered patients. | ||
|
||
Format: `list`, `list INDEX` | ||
|
||
* INDEX: Must be a positive integer not larger than the number of patients in the list. | ||
|
||
Example command: | ||
Example command: | ||
|
||
`list` | ||
``` | ||
|
@@ -124,7 +128,7 @@ Here are the details of the 2 patients in your contact book: | |
2. Jane Doe | ||
``` | ||
|
||
Example command: | ||
Example command: | ||
|
||
`list 2` | ||
``` | ||
|
@@ -138,9 +142,9 @@ Ward: B3 | |
Tags: SevereAllergies | ||
``` | ||
|
||
### Editing a person : `edit` | ||
### Editing a patient : `edit` | ||
|
||
Edits an existing person in the address book. | ||
Edits an existing patient's details in the address book. | ||
|
||
Format: `edit INDEX [n\NAME] [ic\IC_NUMBER] [dob\DATE_OF_BIRTH] [ad\ADMISSION_DATE] [w\WARD] [t\TAG]…` | ||
|
||
|
@@ -168,7 +172,7 @@ Ward: A1 | |
Tags: | ||
``` | ||
|
||
### Locating persons by name: `find` | ||
### Locating patients by name: `find` | ||
|
||
Finds patients whose names contain any of the given keywords. | ||
|
||
|
@@ -185,7 +189,7 @@ Examples: | |
* `find John` returns `john` and `John Doe` | ||
* `find alex david` returns `Alex Yeoh`, `David Li`<br> | ||
|
||
### Deleting a person : `delete` | ||
### Deleting a patient : `delete` | ||
|
||
Deletes the specified patient from the address book. | ||
|
||
|
@@ -208,6 +212,40 @@ Tags: SevereAllergies | |
|
||
You now have 1 patient(s) in your contact book. | ||
``` | ||
### Viewing help : `help` | ||
|
||
Shows a message explaining the available commands and their usage. | ||
|
||
Format: `help` | ||
|
||
Output: | ||
|
||
``` | ||
Here are the list of available commands: | ||
|
||
Add: add n\NAME ic\IC_NUMBER dob\DATE_OF_BIRTH ad\ADMISSION_DATE w\WARD [t\TAG]... | ||
Example: add n\John Doe ic\T1234567P dob\01/01/2000 ad\25/03/2024 w\A1 t\Diabetes t\FallRisk | ||
|
||
Clear: clear | ||
Clears all entries from the address book. | ||
|
||
Delete: delete INDEX | ||
Example: delete 3 | ||
|
||
Edit: edit INDEX [n\NAME] [ic\IC_NUMBER] [dob\DATE_OF_BIRTH] [ad\ADMISSION_DATE] [w\WARD] [t\TAG]... | ||
Example: edit 1 ic\T0123456P t\ | ||
|
||
Find: find KEYWORD [MORE_KEYWORDS] | ||
Example: find John | ||
|
||
List: list | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps can include [t\TAG_KEYWORDS], [w\WARD_KEYWORD] for list as well! |
||
Lists all patients. | ||
|
||
Exit: exit | ||
Exits the application. | ||
|
||
For more detailed information on each command, please refer to the User Guide. | ||
``` | ||
|
||
### Clearing all entries : `clear` | ||
|
||
|
@@ -265,3 +303,10 @@ Action | Format, Examples | |
**Edit** | `edit INDEX [n\NAME] [ic\IC_NUMBER] [dob\DATE_OF_BIRTH] [ad\ADMISSION_DATE] [w\WARD] [t\TAG]…`<br> e.g.,`edit 2 n\James Lee w\A2` | ||
**Find** | `find KEYWORD [MORE_KEYWORDS]`<br> e.g., `find James Jake` | ||
**List** | `list` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly, can update the optional parameters here too. Thank you! |
||
**Help** | `help` | ||
|
||
-------------------------------------------------------------------------------------------------------------------- | ||
|
||
## Troubleshooting | ||
|
||
1. **When using multiple screens**, if you move the application to a secondary screen, and later switch to using only the primary screen, the GUI will open off-screen. The remedy is to delete the `preferences.json` file created by the application before running the application again. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam arrowThickness 1.1 | ||
skinparam arrowColor LOGIC_COLOR | ||
skinparam classBackgroundColor LOGIC_COLOR | ||
|
||
Package Logic as LogicPackage <<Rectangle>>{ | ||
Class "<<interface>>\nCommand" as Command | ||
Class "<<interface>>\nParser" as Parser | ||
Class "<<interface>>\nLogic" as Logic | ||
Class LogicManager | ||
Class HelpCommand | ||
Class CommandResult | ||
|
||
Logic -down-> Parser | ||
Logic -down-> Command | ||
Logic -right-> CommandResult | ||
LogicManager .up.|> Logic | ||
LogicManager -down-> Parser | ||
LogicManager -down-> Command | ||
|
||
HelpCommand .up.|> Command | ||
HelpCommand -right-> CommandResult | ||
|
||
Parser -[hidden]down-> HelpCommand | ||
} | ||
|
||
Class HiddenOutside #FFFFFF | ||
HiddenOutside .down.> Logic | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR | ||
participant "h:HelpCommand" as HelpCommand LOGIC_COLOR | ||
participant "r:CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
box UI UI_COLOR_T1 | ||
participant ":MainWindow" as MainWindow UI_COLOR | ||
participant ":ResultDisplay" as ResultDisplay UI_COLOR | ||
end box | ||
|
||
[-> LogicManager : execute("help") | ||
activate LogicManager | ||
|
||
LogicManager -> AddressBookParser : parseCommand("help") | ||
activate AddressBookParser | ||
|
||
create HelpCommand | ||
AddressBookParser -> HelpCommand | ||
activate HelpCommand | ||
|
||
HelpCommand --> AddressBookParser | ||
deactivate HelpCommand | ||
|
||
AddressBookParser --> LogicManager : h | ||
deactivate AddressBookParser | ||
|
||
LogicManager -> HelpCommand : execute() | ||
activate HelpCommand | ||
|
||
create CommandResult | ||
HelpCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> HelpCommand | ||
deactivate CommandResult | ||
|
||
HelpCommand --> LogicManager : r | ||
deactivate HelpCommand | ||
|
||
LogicManager -> MainWindow : executeCommand("help") | ||
activate MainWindow | ||
|
||
MainWindow -> MainWindow : handleHelp() | ||
activate MainWindow | ||
|
||
MainWindow -> ResultDisplay : setFeedbackToUser(HelpCommand.SHOWING_HELP_MESSAGE) | ||
activate ResultDisplay | ||
|
||
ResultDisplay --> MainWindow | ||
deactivate ResultDisplay | ||
|
||
MainWindow --> MainWindow | ||
deactivate MainWindow | ||
|
||
MainWindow --> LogicManager : r | ||
deactivate MainWindow | ||
|
||
[<--LogicManager | ||
deactivate LogicManager | ||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May need to update this to reflect ShaoWei's find update as well