Skip to content
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 UG #253

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,11 @@ The following sequence diagram shows how the add patient works:
### Delete Patient/Doctor Feature

This feature allows users to delete the desired patient or doctor based on the
nric provided.
NRIC provided.

#### Implementation

Implementation of the delete feature is similar to the original delete command, except that it is done with Ic instead
Implementation of the delete feature is similar to the original delete command, except that it is done with nric instead
of Index.

Given below is an example usage scenario and how the delete mechanism behaves at each step.
Expand All @@ -306,14 +306,16 @@ address book state.
Step 2. The user populates the AddressBook with patients and doctors using the appropriate commands, if not already
done.

Step 3. The user types `delete` as the command, with the appropriate nric of the patient/doctor to be deleted, for
Step 3. The user types `delete` as the command, with the appropriate NRIC of the patient/doctor to be deleted, for
example `delete S9567312G`.

Step 4. The `deleteCommandParser` parses the delete command and creates a `deleteCommand` with the target Ic.

Step 5. The PatientCard / DoctorCard then processes the deletion and The UI should display the updated list without the
deleted Doctor/Patient.

![DeleteSequenceDiagram](images/DeleteSequenceDiagram.png)

### Create New Appointment Feature

This feature allows users to create a new appointment between patients and doctors. The patient and doctor for whom the
Expand Down Expand Up @@ -748,6 +750,8 @@ MediLink Contacts adapted from the AB3 to use the Patient and Doctor classes to

Some changes were also made to such that the two classes have their own attributes on top of the original Person attributes and inherit from the common class Person. There are now 2 instead of just 1 entity that has to be handled. This translates to more Parsers, attribute classes and input validations to support these two classes.

We also decided that Patient and Doctor tags should provide meaning in the context of our app and thus, we decided to create restrictions. The biggest challenge here was the parsing of the tags as it had to be changed throughout multiple commands and in the EditCommand, the initial parsing does not check if the person is a Patient or Doctor, which meant we had to carefully check later on that valid tags were indeed edited.

Additionally, we moved away from using Index for most of our operations. Instead, we perform all operations using the NRIC. This also means more changes to the existing command such as Edit/Find/Delete commands.

### Appointment class
Expand All @@ -756,7 +760,8 @@ This is a newly created class that represents a relationship between the Doctor
Storing the appointment was a challenge too. We store each appointment in the involved doctor and patient such that we can search for their appointments more easily as well as a separate list in the model, that has all the appointments. We had to create new JsonAdaptedAppointment class for this purpose.

### Undo and Redo
As we wanted to allow our users to revert back some mistakes, we implemented the undo and redo functions, which are fairly new compared to the existing functions that are mainly CRUD related. These changes had to be tied to each individual commands as we had to store the different states of the system before and after each operation is performed. Hence, the code changes were across many files and had to be linked well for it to work.
As we wanted to allow our users to revert back some mistakes, we implemented the undo and redo functions, which are fairly new compared to the existing functions that are mainly CRUD related. These changes had to be tied to each individual commands as we had to store the different states of the system before and after each operation is performed. Hence, the code changes were across many files and had to be linked well for it to work. Additionally, we faced a challenge coming up with the best possible implementation, as there were multiple ways for us to revert the data files. We eventually decided on
storing an ArrayList of AddressBooks and faced a challenge figuring out how to update the UI, which we eventually managed to resolve through extensive searching and fixing.

## **Appendix: Instructions for manual testing**

Expand Down
22 changes: 11 additions & 11 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ title: User Guide
MediLink Contacts (MLC) is a **desktop application** for **medical administrative assistants** to manage patients and
doctors details within clinics.

Hereʼs an overview of how MediLink Contacts can help you streamline your hospital management
Hereʼs an overview of how MediLink Contacts can help you streamline your clinic management
processes:

* Store and edit information about your patients and doctors.
Expand Down Expand Up @@ -39,7 +39,7 @@ hospital management tasks done faster than current GUI apps in the industry.

4. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar MediLink.jar` command
to run the application.<br>
A GUI similar to the below should appear in a few seconds. Note how the app contains some sample data.<br>
A GUI similar to the one below should appear in a few seconds. Note how the app contains some sample data.<br>
![quickview](images/quickorientation.png)

5. Type the command in the command box and press Enter to execute it. e.g. typing **`help`** and pressing Enter will
Expand All @@ -51,7 +51,7 @@ hospital management tasks done faster than current GUI apps in the industry.
* `add-doctor n/John Doe ic/S9851386G g/M p/98765432 e/johnd@example.com a/John street, block 123, #01-01` : Adds a
doctor named `John Doe` to MediLink Contacts.

* `delete S9851386G` : Deletes the person with ic S9851386G.
* `delete S9851386G` : Deletes the person with NRIC S9851386G.

* `clear` : Deletes all contacts.

Expand All @@ -64,7 +64,7 @@ hospital management tasks done faster than current GUI apps in the industry.

The list below contains the parameters that are used in various commands as well as their various constraints. Failing to input valid parameters will lead to errors when entering commands. Users should follow these constraints for all commands, unless otherwise stated.

**Note**: Certain commands may have special requirements for parameter inputs (eg. `find`) so do please follow them when necessary!
**Note**: Certain commands may have special requirements for parameter inputs (eg. `find`) so please do follow them when necessary!

| Parameter | Constraints | Valid Examples | Invalid Examples |
|:--------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------|:-----------------------------------|
Expand Down Expand Up @@ -134,9 +134,9 @@ A doctor can have any number of tags (including 0). Duplicate tags, however, are

- A doctor **MUST** have all fields non-empty except TAG.
Failure to include these details may result in an error.
- The order is not important (i.e, IC can come before NAME). What matters is that all the mandatory fields are declared,
- The order is not important (i.e, NRIC can come before NAME). What matters is that all the mandatory fields are declared,
and the format for each field is adhered to.
- A person can either be a doctor or a patient, but not both. Hence if the doctor's IC is already in the app
- A person can either be a doctor or a patient, but not both. Hence, if the doctor's NRIC is already in the app
as a patient, it may result in an error.

</div>
Expand Down Expand Up @@ -191,7 +191,7 @@ Format: `new-appt pic/NRIC dic/NRIC time/yyyy-MM-dd HH:mm`
- All fields are Required.
- NRIC for pic/ must contain the valid NRIC of a Patient in MediLink Contacts.
- NRIC for dic/ must contain the valid NRIC of a Doctor in MediLink Contacts.
- There must not be conflicting Appointments. (eg. the doctor already has an appointment with another patient at the same time) However, the duration of each appointment is flexible and up to the users. As long as appointments are not at the exact same time, users can add it in.
- There must not be conflicting Appointments (eg. the doctor already has an appointment with another patient at the same time). However, the duration of each appointment is flexible and up to the users. As long as appointments are not at the exact same time, users can add it in.

</div>

Expand Down Expand Up @@ -245,7 +245,7 @@ Format: `list`

### Editing a person : `edit`

Edits an existing person in the MediLink Contacts.
Edits an existing person in MediLink Contacts.

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

Expand All @@ -259,12 +259,12 @@ Format: `edit NRIC [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [t/TAG]…​`
However, if it is different, there will be an error.
* Must edit appropriate fields based on whether the person is a patient or doctor (e.g. can't update condition, blood type or
emergency contact of a doctor).
* Existing values will be updated to the input values.g
* Existing values will be updated to the input values.
* When editing tags, the existing tags of the person will be removed i.e adding of tags is not cumulative.
* You can remove all the person’s tags by typing `t/` without
specifying any tags after it.
* If extraneous parameters are provided, it may lead to an error.
* Note: In our app, the Remark Section will be left blank by default. The edit Command can be used to add any miscellaneous info not captured by other fields such as possible allergies, medical history, etc.
* Note: In our app, the Remark Section will be left blank by default. The Edit Command can be used to add any miscellaneous info not captured by other fields such as possible allergies, medical history, etc.

</div>

Expand Down Expand Up @@ -487,7 +487,7 @@ the data of your previous MediLink Contacts home folder.
| **Redo** | `redo` |
| **Delete** | `delete NRIC`<br> e.g., `delete T0666485G` |
| **Edit** | `edit NRIC [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [t/TAG]…​`<br> e.g.,`edit S9760431H n/James Lee e/jameslee@example.com` |
| **Find** | `find KEYWORD [MORE_KEYWORDS]`<br> e.g., `find James Jake` |
| **Find** | `find KEYWORD [MORE_KEYWORDS]`<br> e.g., `find James Jake`<br> `find GENDER`<br> e.g., `find M`, `find F`<br> `find NRIC`<br> e.g., `find T0137689Y` |
| **List** | `list` |
| **Help** | `help` |
| **Exit** | `exit` |
Expand Down
Loading