Skip to content

Commit

Permalink
Merge pull request #66 from AY2324S1-CS2103T-T12-4/branch-user-guide
Browse files Browse the repository at this point in the history
Update UG
  • Loading branch information
Clin-lyx authored Oct 25, 2023
2 parents b9df459 + c0817de commit a8bc0b5
Showing 1 changed file with 96 additions and 82 deletions.
178 changes: 96 additions & 82 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,56 @@
pageNav: 3
---

# MedBook User Guide
# User Guide

Medbook is a **desktop app for managing patient details and medical records, optimized for use via a Command Line Interface** (CLI) while still having the benefits of a Graphical User Interface (GUI). If you can type fast, MedBook can get your contact management tasks done faster than traditional GUI apps.
Medbook is a **desktop application** crafted specifically for **doctors** and **medical administrative assistants** to manage patient details and medical records.

Our address book offers a streamlined interface for tracking patient details and medical records, ensuring that vital information is organized, accessible, and secure at all times.

<!-- * Table of Contents -->
<page-nav-print />

---

## How to Navigate the User Guide

This user guide serves to provide clear instructions and insights, empowering users to effectively utilize all features and functionalities with confidence and ease.

The table of contents can be used at the side to seamlessly jump between sections.

## Quick start

1. Ensure you have Java `11` or above installed in your Computer.
- [How do I check my version of Java?](#faq)
1. Download the latest jar file (`medbook.jar`) from [here](https://github.com/AY2324S1-CS2103T-T12-4/tp/releases).

1. Move the file to the folder you want to use as the _home folder_ for your MedBook.

1. Download the latest `medbook.jar` from [here](https://github.com/AY2324S1-CS2103T-T12-4/tp/releases).
1. Open a command terminal
- For Windows Users:
- Press the Windows icon and search for and open up`Powershell`
- For Mac Users:
- Open a new Terminal window (Command + Space > type Terminal > Enter).

1. Copy the file to the folder you want to use as the _home folder_ for your MedBook.
Navigate to the folder you put the jar file in using `cd` and use the `java -jar medbook.jar` command to run the application.

1. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar medbook.jar` command to run the application.<br>
A GUI same as the below should appear in a few seconds. Note that the app contains some sample data.<br>
![Ui](images/MedBookUi.png)
The application should open up similar to the image below.
![Ui](images/MedBookUi.png)

1. Type the command in the command box and press Enter to execute it. e.g. typing **`help`** and pressing Enter will open the help window.<br>
5. Type the command in the command box and press Enter to execute it. e.g. typing **`help`** and pressing Enter will open the help window.<br>
Some example commands you can try:

- `list` : Lists all contacts.
- `list` : Lists all patients.

- `addpatient n/John Doe e/[email protected] p/12345678 g/M a/26 bt/AB+ al/Penicillin` : Adds a new patient named John Doe with basic information about the patient
- `addpatient n/John Doe e/[email protected] p/12345678 g/M a/26 bt/AB+ al/Penicillin` : Adds a new patient named John Doe with basic information about the patient

- `delete 3` : Deletes the 3rd contact shown in the current list.
- `delete 3` : Deletes the 3rd patient shown in the current list.

- `clear` : Deletes all contacts.
- `clear` : Deletes all patient.

- `exit` : Exits the app.

1. Refer to the [Features](#features) below for details of each command.
6. Refer to the [Features](#features) below for details of each command.

---

Expand All @@ -52,10 +67,10 @@ Medbook is a **desktop app for managing patient details and medical records, opt
e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`.

- Items in square brackets are optional.<br>
e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`.
e.g `n/NAME [al/ALLERGIES]` can be used as `n/John Doe al/Pencillin` or as `n/John Doe`.

- Items with ``​ after them can be used multiple times including zero times.<br>
e.g. `[t/TAG]…​` can be used as ` ` (i.e. 0 times), `t/friend`, `t/friend t/family` etc.
e.g. `[al/ALLERGIES]…​` can be used as ` ` (i.e. 0 times), `al/Pencillin`, `al/Pollen al/Dust` etc.

- Parameters can be in any order.<br>
e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable.
Expand All @@ -65,54 +80,55 @@ Medbook is a **desktop app for managing patient details and medical records, opt

- `PATIENTID` refers to the unique patient ID shown in the displayed patient list. The ID **must be a positive integer** 1, 2, 3, …​

- 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.
</box>

### Viewing help : `help`

Shows a message explaning how to access the help page.

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

Format: `help`

### Adding a patient: `addpatient`

Adds a patient's contact and medical details.

Format: `addpatient n/NAME e/EMAIL p/PHONE g/GENDER a/AGE bt/BLOODTYPE al/ALLERGIES`
Format: `addpatient n/NAME e/EMAIL p/PHONE g/GENDER a/AGE bt/BLOODTYPE [al/ALLERGIES]...`

- Adds a patient with information including: `NAME`, `EMAIL`, `GENDER`, `PHONE`, `AGE`, `BLOODTYPE`, `ALLERGIES`

Constraints
- `NAME`: Must have first and last name, a space in between the names
- `EMAIL`: Must adhere to the following format: `[email protected]`
- `GENDER`: Must be one of `M` or `F`
- `PHONE`: Must be 8 digits in length
- `AGE`: Must be an integer greater than or equal to 1

- `NAME`: Up to 256 alphanumeric characters
- `EMAIL`: Valid email format: `[email protected]`
- `GENDER`: Either `M` or `F`
- `PHONE`: Must be 8 digits
- `AGE`: Must be a positive integer
- `BLOODTYPE`: Must be one of `A-`, `A+`, `B-`, `B+`, `AB-`, `AB+`, `O-`, `O+`
- `ALLERGIES`: Must be alphanumeric characters
- `ALLERGIES`: Up to 256 alphanumeric characters

Examples:

- `addpatient n/John Doe e/[email protected] p/12345678 g/M a/26 bt/AB+ al/Penicillin`
adds a patient named John Doe who is a male, 26 years old, has AB+ blood type, and allergic to penicillin.
`addpatient n/John Doe e/[email protected] p/12345678 g/M a/26 bt/AB+ al/Penicillin`
Adds a patient named John Doe who is a Male, 26 years old, has AB+ Blood Type, and is allergic to Penicillin.
His email and phone number is [email protected] and 12345678, respectively.

### Adding Medical Records : `addrecord`

Adds a new patient's medical record to the app.
Adds a patient's medical record.

Format: `addrecord PATIENTID d/DATETIME c/CONDITIONS... [m/MEDICATION]...`

Format: `addrecord PATIENTID d/DATETIME c/CONDITIONS`
- Adds a medical record to the patient with the `PATIENTID`
- Adds a medical record to the patient with the corresponding `PATIENTID`

Constraints
- `DATETIME`: Must adhere to the `DD-MM-YY HHMM` format
- `CONDITION`: Can have up to 256 alphanumeric characters

- `DATETIME`: Valid Date and Time format: `DD-MM-YYYY HHMM`
- `CONDITION`: Up to 256 alphanumeric characters
- `MEDICATION`: Up to 256 alphanumeric characters

Examples:
- `addrecord 3 d/18-09-2023 1800 c/Fever`
adds a record to the patient who has the `PATIENTID` of `3`.
The record says that the patient visited the clinic on September 18th, 2023 at 6PM due to fever.

- `addrecord 3 d/18-09-2023 1800 c/Fever m/Paracetamol`
Adds a record to the patient with the `PATIENTID` of `3`.
The record says that the patient visited the clinic on September 18th, 2023 at 6PM with a Fever and was prescribed Paracetamol.

### Listing all persons : `list`

Expand All @@ -128,28 +144,29 @@ Examples:

### View patient records : `view`

Displays the medical records of the specified patient in the **RECORD** list
Displays the medical records of the specified patient in the **RECORDS** list

Format: `view PATIENTID`

- The medical records of the viewed patient will be displayed on screen in the **RECORD** list.
- The medical records of the patient with the corresponding `PATIENTID` will be displayed on screen in the **RECORD** list.
- Information about the patient will be displayed in the **PATIENT BEING VIEWED** section.

Examples:
- `view 2` views the medical records of the patient with the `PATIENTID` of `2`. The displayed records will be in the `RECORDS` list and patient information will be in the `PATIENT BEING VIEWED` section.

- `view 2` displays the medical records of the patient with the `PATIENTID` of `2`. The displayed records will be in the `RECORDS` list and patient information will be in the `PATIENT BEING VIEWED` section.

### Editing detail of a patient : `editdetail`

Edits an existing person in MedBook.
Edits an existing patient.

Format: `editdetail [patient ID/detail field/updated patient details]`

- Edits the person at the specified `patient ID`. The index refers to the index number shown in the displayed person list. The index **must be a positive integer** 1, 2, 3, …​
- The `detail field` must be provided.
- Accepted `detail field` : **name**, **email**, **phone**, **gender**, **age**, **blood**, **allergy**.
- Existing values in the `detail field` will be updated to the `updated patient details` input.
- **Name**: Text (up to 256 characters)
- **Email**: Valid email format
- **Name**: Up to 256 alphanumeric characters
- **Email**: Valid email format example@
- **Phone**: Number (up to 15 digits)
- **Gender**: M/F
- **Age**: Number (0-120)
Expand All @@ -164,32 +181,30 @@ Examples:

### Locating persons by keywords: `search`

In MedBook, the Search functionality streamlines the process of finding patients based on specific keywords. Simply enter the keyword, and MedBook will display a list of patients matching your search criteria. If no matches are found, the system will provide feedback, allowing you to refine your search for better results.
Searches the patient with the corresponding `KEYWORD`

Format: `search [Keyword]`
Format: `search KEYWORD...`

- The search is case-insensitive. e.g `Penicillin` will match `penicillin`
- A patient's name and details will be searched.
- Persons matching at least one keyword will be returned (i.e. `OR` search).
e.g. `arm fracture` will return `burnt arm`, `leg fracture`
- Patients matching at least one keyword will be returned.
e.g. `arm fracture` will return patients with `burnt arm` and `leg fracture`

Examples:

- `search Penicillin` returns `Penicillin`
- `search Penicillin` returns a list of patients with `Penicillin` in their details.

### Deleting a patient : `delete`

Deletes the specified patient from the medbook.
Deletes the specified patient.

Format: `delete [patientId]`
Format: `delete PATIENTID`

- Deletes the patient at the specified `patientId`.
- The patientId refers to the unique patient id shown in the displayed patient list.
- The id **must be a positive integer** 1, 2, 3, …​
- Deletes the patient at the specified `PATIENTID`.

Examples:

- `delete 2` deletes the patient with the id of `2` in the medbook.
- `delete 2` deletes the patient with the `PATIENTID` of `2` from the app.

### Pinning a Patient : `pin`

Expand Down Expand Up @@ -217,20 +232,20 @@ Examples:

### Adding an Appointment : `addappointment`

Adds an appointment to the application.
Adds an appointment.

Format: `addappointment PATIENTID n/APPOINTMENTNAME d/DATETIME`

- Adds an appointment with the corresponding patient with the `PATIENTID` to the **Appointments** list and `APPOINTMENTNAME` and `DATETIME`.
- Adds an appointment with patient with the corresponding `PATIENTID` to the **Appointments** list.

Constraints:

- `DATETIME`: Must adhere to `DD-MM-YY HHMM` format
- `APPOINTMENTNAME`: Can have up to 256 alphanumeric characters
- `DATETIME`: Must adhere to `DD-MM-YYYY HHMM` format
- `APPOINTMENTNAME`: Up to 256 alphanumeric characters

Examples:

- `addappointment 2 n/Eye Examination d/10-10-2023 1800` adds an Eye Examination for the patient with the `PATIENTID` of `2`. The appointment is set for 10th October 2023 at 6:00pm and will be added to the **Appointments** list.
- `addappointment 2 n/Eye Examination d/10-10-2023 1800` adds an Eye Examination for the patient with the `PATIENTID` of `2`. The appointment is set for 10th October 2023 at 6:00pm.

### Clearing all entries : `clear`

Expand All @@ -246,28 +261,24 @@ Format: `exit`

### Saving the data

MedBook data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually.
MedBook data is securely encrypted and saved to the hard disk automatically after any command that changes the data. This ensures the privacy and safety of your data. When MedBook is restarted, the data is decrypted and loaded back into the application.

### Editing the data file

MedBook data are saved automatically as a JSON file `[JAR file location]/data/medbook.json`. Advanced users are welcome to update data directly by editing that data file.
MedBook data are saved automatically as a JSON file [JAR file location]/data/medbook.json. As the data is encrypted, users will not be able edit this files to directly make changes to the data files. This also prevents unauthorised access of the system.

<box type="warning" seamless>

**Caution:**
If your changes to the data file makes its format invalid, MedBook will discard all data and start with an empty data file at the next run. Hence, it is recommended to take a backup of the file before editing it.
Caution:
Do not make changes to the data file.
</box>

### Archiving data files `[coming in v2.0]`

_Details coming soon ..._

---

## FAQ

**Q**: How do I check my java version?<br>
**A**: Open a command prompt and type `java -version`. If you do not have Java installed, you can download it [here](https://www.oracle.com/java/technologies/downloads/#java11).

**Q**: How do I transfer my data to another Computer?<br>
**A**: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous MedBook home folder.
**A**: Install the app in the other computer and copy the data folder over to the same location in the other computer.

---

Expand All @@ -279,14 +290,17 @@ _Details coming soon ..._

## Command summary

| Action | Format, Examples |
|-----------------|----------------------------------------------------------------------------------------------------------------------------------------|
| **Add Patient** | `addpatient n/NAME e/EMAIL p/PHONE …​` <br> e.g., `addpatient n/John Doe e/[email protected] p/12345678 g/M a/26 bt/AB+ al/Penicillin` |
| **List** | `list` |
| **View** | `view PATIENTID`<br> e.g., `view 2` |
| **Edit** | `editdetail [patient ID/detail field/updated patient details]`<br> e.g.,`editdetail 1/email/[email protected]` |
| **search** | `search [KEYWORDS]`<br> e.g., `find James Jake` |
| **Delete** | `delete PATIENTID`<br> e.g., `delete 3` |
| **Pin** | `pin PATIENTID`<br> e.g., `pin 2` |
| **Clear** | `clear` |
| **exit** | `exit` |
| Action | Format, Examples |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| **Add Patient** | `addpatient n/NAME e/EMAIL p/PHONE …​` <br> e.g., `addpatient n/John Doe e/[email protected] p/12345678 g/M a/26 bt/AB+ al/Penicillin` |
| **Add Record** | `addrecord PATIENTID c/CONDITION... d/DATETIME [m/MEDICATION]...`<br> e.g., `addrecord 2 c/Fever d/10-10-2020 1900 m/Painkiller` |
| **Add Appointment** | `addappointment PATIENTID n/APPOINTMENTNAME d/DATETIME`<br> e.g., `addappointment 2 n/Eye Exam d/10-10-2020 1900` |
| **List** | `list` |
| **View** | `view PATIENTID`<br> e.g., `view 2` |
| **Edit** | `editdetail [patient ID/detail field/updated patient details]`<br> e.g.,`editdetail 1/email/[email protected]` |
| **Search** | `search [KEYWORDS]`<br> e.g., `find James Jake` |
| **Delete** | `delete PATIENTID`<br> e.g., `delete 3` |
| **Pin** | `pin PATIENTID`<br> e.g., `pin 2` |
| **Unpin** | `unpin PATIENTID`<br> e.g. `unpin 2` |
| **Clear** | `clear` |
| **Exit** | `exit` |

0 comments on commit a8bc0b5

Please sign in to comment.