Skip to content

Commit

Permalink
Merge pull request AY2425S1-CS2103T-W10-2#137 from rxchell/update-use…
Browse files Browse the repository at this point in the history
…r-guide2

Update User Guide
  • Loading branch information
zaidansani authored Oct 24, 2024
2 parents 1332490 + 04b821c commit af42759
Showing 1 changed file with 89 additions and 46 deletions.
135 changes: 89 additions & 46 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ for your large medical files.
## Quick start

1. Ensure you have Java `17` or above installed in your computer.
- To install Java 17, download Java [here](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html).
- To install `Java 17`, download Java. Refer to the [guide for installing Java](https://docs.oracle.com/en/java/javase/17/install/overview-jdk-installation.html).
- Alternatively, download it from [here](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html).
- To check your Java version, refer [here](https://www.java.com/en/download/help/version_manual.html#).

2. Download our latest release file from [here](https://github.com/se-edu/addressbook-level3/releases). It is a `.jar` file.
Expand All @@ -35,10 +36,10 @@ For more information, see this:
- [How to run a JAR file](https://stackoverflow.com/questions/5774970/run-jar-file-in-command-prompt).


3. Copy the file to the folder you want to use as the _home folder_ for your DocTrack.
3. Copy the file to the folder you want to use as the _home folder_ for your DocTrack application.


4. Open a command terminal of your preference, and run the commands:
4. Open a [command terminal](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Understanding_client-side_tools/Command_line) of your preference, and run the commands:
```
cd HOME_FOLDER
java -jar DocTrack.jar
Expand All @@ -51,7 +52,8 @@ For more information, see this:
```


5. A GUI similar to the below should appear in a few seconds. Note how the app contains some sample data.<br>
5. A GUI similar to the one below should appear in a few seconds. Note how the DocTrack application contains some sample data.
<br>
![Ui](images/Ui.png)


Expand Down Expand Up @@ -114,6 +116,27 @@ The following sections describe the various commands available in the DocTrack p

<br>

### Summary of commands

| Action | Format | Examples |
|---------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|
| **[Add person](#adding-a-person-add-person)** | `add person n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS <br/><br/>[t/TAG]…​` | `add person n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 t/friend t/colleague` |
| **[List all persons](#listing-all-persons-list-person)** | `list person` <br/> | `list person` |
| **[Edit person](#editing-a-person-edit-person)** | `edit person INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [t/TAG]…​` | `edit person 2 n/James Lee e/jameslee@example.com` |
| **[Find person](#finding-persons-by-name-find-person)** | `find person KEYWORD [MORE_KEYWORDS]` | `find person James Jake` |
| **[Delete person](#deleting-a-person-delete-person)** | `delete person INDEX` | `delete person 3` |
| **[Clear all persons](#clearing-all-persons-clear-person)** | `clear person` | `clear person` |
| **[Add appointment](#adding-an-appointment-add-appt)** | `add appt i/PATIENT_ID d/DATE_TIME ty/APPOINTMENT_TYPE` `s/SICKNESS` `m/MEDICINE` <br/> <br/> | `add appt i/John Doe d/2024-12-01 09:30 ty/Consulation s/Diabetes m/Insulin` |
| **[List all appointments](#listing-all-appointments-list-appt)** | `list appt` | `list appt` |
| **[Edit appointment](#editing-an-appointment-edit-appt)** | `edit appt INDEX [i/PATIENT_ID] [d/DATE_TIME] [ty/APPOINTMENT_TYPE] [s/SICKNESS] [m/MEDICINE]` | `edit appt 3 d/2024-12-05 13:00 m/Panadol` |
| **[Find appointment](#finding-an-appointment-find-appt)** | `find appt KEYWORD [MORE_KEYWORDS]` | `find appt 2024-12-05` |
| **[Delete appointment](#deleting-an-appointment-delete-appt)** | `delete appt INDEX` | `delete appt 2` |
| **[Clear all appointments](#clearing-all-appointments-clear-appt)** | `clear appt` <br/> | `clear appt` |
| **[Help](#viewing-help-help)** | `help` | `help` |
| **[Exit](#exiting-the-program-exit)** | `exit` | `exit` |

<br>

---

<br>
Expand All @@ -128,14 +151,14 @@ A **person** is a patient with several fields: a name, a phone number, an email,

Adds a person to the address book.

Format: `add person n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…​`
**Format**: `add person n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…​`

<box type="tip" seamless>

**Tip:** A person can have any number of tags (including 0)
**Tip:** A person can have any number of tags (including 0). For example, `t/friend t/likes coding` has 2 tags and it is valid.
</box>

Examples:
**Examples**:

- `add person n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01`
- `add person n/Betsy Crowe t/friend e/betsycrowe@example.com a/Newgate Prison p/1234567 t/criminal`
Expand All @@ -146,15 +169,15 @@ Examples:

Shows a list of all persons in the address book.

Format: `list person`
**Format**: `list person`

<br>

##### Editing a person : `edit person`

Edits an existing person in the address book.

Format: `edit person INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [t/TAG]…​`
**Format**: `edit person INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [t/TAG]…​`

- Edits the person at the specified `INDEX`.
- At least one of the optional fields must be provided.
Expand All @@ -163,18 +186,18 @@ Format: `edit person INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [t/TAG]…
- You can remove all the person’s tags by typing `t/` without
specifying any tags after it.

Examples:
**Examples**:

- `edit person 1 p/91234567 e/johndoe@example.com` Edits the phone number and email address of the 1st person to be `91234567` and `johndoe@example.com` respectively.
- `edit person 2 n/Betsy Crower t/` Edits the name of the 2nd person to be `Betsy Crower` and clears all existing tags.

<br>

##### Locating persons by name: `find person`
##### Finding persons by name: `find person`

Finds persons whose names contain any of the given keywords.

Format: `find person KEYWORD [MORE_KEYWORDS]`
**Format**: `find person KEYWORD [MORE_KEYWORDS]`

- The search is case-insensitive. e.g `hans` will match `Hans`
- The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`
Expand All @@ -183,7 +206,7 @@ Format: `find person KEYWORD [MORE_KEYWORDS]`
- Persons matching at least one keyword will be returned (i.e. `OR` search).
e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`

Examples:
**Examples**:

- `find person John` returns `john` and `John Doe`
- `find person alex david` returns `Alex Yeoh`, `David Li`<br><br>
Expand All @@ -195,11 +218,17 @@ Examples:

Deletes the specified person from the address book.

Format: `delete person INDEX`
**Format**: `delete person INDEX`

- Deletes the person at the specified `INDEX`.

Examples:
<box type="warning" seamless style="border: 1px solid red; background-color: #ffdddd;">

**Warning:** This action is irreversible. Ensure you have selected the correct person before deleting.

</box>

**Examples**:

- `list` followed by `delete person 2` deletes the 2nd person in the address book.
- `find Betsy` followed by `delete person 1` deletes the 1st person in the results of the `find` command.
Expand All @@ -210,7 +239,14 @@ Examples:

Clears all entries from the address book after a validation check from the user.

Format: `clear person`
**Format**: `clear person`

<box type="warning" seamless style="border: 1px solid red; background-color: #ffdddd;">

**Warning:** This action is irreversible. Ensure you have a backup of the patient data before clearing.

</box>


<br>

Expand All @@ -229,9 +265,14 @@ Format: `clear person`

Adds an appointment to the DocTrack.

Format: `add appt i/PATIENT_ID d/DATE_TIME ty/APPOINTMENT_TYPE s/SICKNESS m/MEDICINE`
**Format**: `add appt i/PATIENT_ID d/DATE_TIME ty/APPOINTMENT_TYPE s/SICKNESS m/MEDICINE`

Examples:
<box type="tip" seamless>

**Note:** Format of `DATE_TIME` is `dd/MM/yyyy HH:mm:ss`. For example, `29/03/2025 10:30:00`.
</box>

**Examples**:

- `add appt i/John Doe d/2024-12-01 09:30 ty/Consulation s/Diabetes m/Insulin`
- `add appt i/Jo An d/30/01/2024-12-01 16:40:00 ty/Follow-up s/Asthma m/Inhaler`
Expand All @@ -242,21 +283,26 @@ Examples:

Shows a list of all appointments in DocTrack.

Format: `list appt`
**Format**: `list appt`

<br>

##### Editing an appointment : `edit appt`

Edits an existing appointment in DocTrack.

Format: `edit appt INDEX [i/PATIENT_ID] [d/DATE_TIME] [ty/APPOINTMENT_TYPE] [s/SICKNESS] [m/MEDICINE]`
**Format**: `edit appt INDEX [i/PATIENT_ID] [d/DATE_TIME] [ty/APPOINTMENT_TYPE] [s/SICKNESS] [m/MEDICINE]`

- Edits the appointment at the specified `INDEX`.
- At least one of the optional fields must be provided.
- Existing values will be updated to the input values.

Examples:
<box type="tip" seamless>

**Note:** Format of `DATE_TIME` is `dd/MM/yyyy HH:mm:ss`. For example, `29/03/2025 10:30:00`.
</box>

**Examples**:

- `edit appt 3 d/2024-12-05 13:00 m/Budesonide` Edits the date and time and the medicine to be `29/03/2025 10:30` and `Budesonide` respectively.

Expand All @@ -266,11 +312,17 @@ Examples:

Deletes the specified appointment from DocTrack.

Format: `delete appt INDEX`
**Format**: `delete appt INDEX`

- Deletes the appointment at the specified `INDEX`.

Examples:
<box type="warning" seamless style="border: 1px solid red; background-color: #ffdddd;">

**Warning:** This action is irreversible. Ensure you have selected the correct appointment before deleting.

</box>

**Examples**:

- `list appt` followed by `delete appt 2` deletes the 2nd appointment in DocTrack.

Expand All @@ -280,7 +332,13 @@ Examples:

Clears all entries from the appointment book after a validation check from the user.

Format: `clear appt`
**Format**: `clear appt`

<box type="warning" seamless style="border: 1px solid red; background-color: #ffdddd;">

**Warning:** This action is irreversible. Ensure you have a backup of the appointment data before clearing.

</box>

<br>

Expand All @@ -296,19 +354,19 @@ Format: `clear appt`

##### Viewing help : `help`

Shows a message explaning how to access the help page.
Shows a message explaining how to access the help page.

![help message](images/helpMessage.png)

Format: `help`
**Format**: `help`

<br>

##### Exiting the program : `exit`

Exits the program.

Format: `exit`
**Format**: `exit`

<br>

Expand Down Expand Up @@ -341,8 +399,10 @@ Furthermore, certain edits can cause the AddressBook to behave in unexpected way
**A**: The data is stored in [.json](https://www.json.org/json-en.html) files, located in the `data` folder. The details of patients are stored in the `addressbook.json` file, while the appointments are stored in the `appointmentbook.json` file.
Examples:

<img src="images/json/addressbook.png" alt="Address Book JSON" width="300" height="auto">
<img src="images/json/appointmentBook.png" alt="Appointment Book JSON" width="300" height="auto">
<img src="images/json/addressbook.png" alt="Address Book JSON" width="420">


<img src="images/json/appointmentBook.png" alt="Appointment Book JSON" width="390">

<br><br>

Expand All @@ -361,20 +421,3 @@ computer?<br>
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.
2. **If you minimize the Help Window** and then run the `help` command (or use the `Help` menu, or the keyboard shortcut `F1`) again, the original Help Window will remain minimized, and no new Help Window will appear. The remedy is to manually restore the minimized Help Window.

<br>

---

<br>

## Command summary

| Action | Format, Examples |
| ---------- |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Add** | `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…​` <br> e.g., `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 t/friend t/colleague` |
| **Clear** | `clear person`<br> `clear appt` |
| **Delete** | `delete INDEX`<br> e.g., `delete 3` |
| **Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [t/TAG]…​`<br> e.g.,`edit 2 n/James Lee e/jameslee@example.com` |
| **Find** | `find KEYWORD [MORE_KEYWORDS]`<br> e.g., `find James Jake` |
| **List** | `list` |
| **Help** | `help` |

0 comments on commit af42759

Please sign in to comment.