diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md
index d99525df258..01f7745de4a 100644
--- a/docs/DeveloperGuide.md
+++ b/docs/DeveloperGuide.md
@@ -102,7 +102,7 @@ The sequence diagram below illustrates the interactions within the `Logic` compo
How the `Logic` component works:
-1. When `Logic` is called upon to execute a command, it is passed to an `AddressBookParser` object which in turn creates a parser that matches the command (e.g., `DeleteCommandParser`) and uses it to parse the command.
+1. When `Logic` is called upon to execute a command, it is passed to an `ClinicParser` object which in turn creates a parser that matches the command (e.g., `DeleteCommandParser`) and uses it to parse the command.
1. This results in a `Command` object (more precisely, an object of one of its subclasses e.g., `DeleteCommand`) which is executed by the `LogicManager`.
1. The command can communicate with the `Model` when it is executed (e.g. to delete a person).
Note that although this is shown as a single step in the diagram above (for simplicity), in the code it can take several interactions (between the command object and the `Model`) to achieve.
@@ -113,7 +113,7 @@ Here are the other classes in `Logic` (omitted from the class diagram above) tha
How the parsing works:
-* When called upon to parse a user command, the `AddressBookParser` class creates an `XYZCommandParser` (`XYZ` is a placeholder for the specific command name e.g., `AddCommandParser`) which uses the other classes shown above to parse the user command and create a `XYZCommand` object (e.g., `AddCommand`) which the `AddressBookParser` returns back as a `Command` object.
+* When called upon to parse a user command, the `ClinicParser` class creates an `XYZCommandParser` (`XYZ` is a placeholder for the specific command name e.g., `AddCommandParser`) which uses the other classes shown above to parse the user command and create a `XYZCommand` object (e.g., `AddCommand`) which the `ClinicParser` returns back as a `Command` object.
* All `XYZCommandParser` classes (e.g., `AddCommandParser`, `DeleteCommandParser`, ...) inherit from the `Parser` interface so that they can be treated similarly where possible e.g, during testing.
### Model component
@@ -121,7 +121,6 @@ How the parsing works:
-
The `Model` component,
* stores the address book data i.e., all `Person` objects (which are contained in a `UniquePersonList` object).
@@ -137,8 +136,8 @@ The `Model` component,
The `Storage` component,
-* can save both address book data and user preference data in JSON format, and read them back into corresponding objects.
-* inherits from both `AddressBookStorage` and `UserPrefStorage`, which means it can be treated as either one (if only the functionality of only one is needed).
+* can save both clinic data and user preference data in JSON format, and read them back into corresponding objects.
+* inherits from both `ClinicStorage` and `UserPrefStorage`, 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 the `Storage` component's job is to save/retrieve objects that belong to the `Model`)
### Common classes
@@ -330,113 +329,128 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (good
(For all use cases below, the **System** is the `vitalconnect` and the **Actor** is the `user`, unless specified otherwise)
**Use case: UC1 - Add a patient**
+
**MSS**
1. User requests to add a patient by specifying the patient's name and NRIC.
2. vitalconnect adds the patient with name and NRIC.
3. vitalconnect displays the updated patient list with the new patient added.
-Use case ends.
+Use case ends.
+
**Extensions**
* 1a. The NRIC already exists in the system.
- * 1a1. vitalconnect displays warning message and the existing patient's information.
- Use case ends.
+ * 1a1. vitalconnect displays warning message and the existing patient's information.
+ Use case ends.
* 1b. The NRIC or name entered is invalid.
- * 1b1. vitalconnect shows an error message.
- Use case ends.
+ * 1b1. vitalconnect shows an error message.
+ Use case ends.
**Use case: UC2 - Delete a patient**
+
**MSS**
1. User requests to delete a patient by specifying the index of the patient in the patient list.
2. vitalconnect deletes the patient from patient list.
3. vitalconnect displays the updated patient list with the patient removed.
-Use case ends.
+Use case ends.
+
**Extensions**
* 1a. The patient doesn't exist in the system.
- * 1a1. vitalconnect displays an error message.
- Use case ends.
+ * 1a1. vitalconnect displays an error message.
+ Use case ends.
**Use case: UC3 - Add an appointment**
**MSS**
1. User requests to add an appointment for a patient by providing the patient's NRIC, appointment start time, and duration.
2. vitalconnect add the appointment to the appointment list under this patient's NRIC.
3. vitalconnect displays the updated appointment list with the new appointment added.
-Use case ends.
+Use case ends.
+
**Extensions**
* 1a. Critical information (start time and duration) missing or in invalid format in the add appointment command.
- * 1a1. vitalconnect displays a warning message.
- Use case ends.
+ * 1a1. vitalconnect displays a warning message.
+ Use case ends.
* 1b. The assigned patient doesn't exist in the database.
- * 1b1. vitalconnect displays a warning message.
- Use case ends.
+ * 1b1. vitalconnect displays a warning message.
+ Use case ends.
* 1c. The appointment time overlaps with existing appointment time.
- * 1c1. vitalconnect displays a warning message and shows all the appointments with overlapping time.
- Use case ends.
+ * 1c1. vitalconnect displays a warning message and shows all the appointments with overlapping time.
+ Use case ends.
**Use case: UC4 - Delete an appointment**
+
**MSS**
1. User requests to delete an appointment for a patient by specifying the index of the appointment in the appointment list.
2. vitalconnect removes the appointment from the appointment list.
3. vitalconnect displays the updated appointment list with the appointment removed.
-Use case ends.
+Use case ends.
+
**Extensions**
* 1a. The appointment doesn't exist in the database.
- * 1a1. vitalconnect displays a warning message.
- Use case ends.
+ * 1a1. vitalconnect displays a warning message.
+ Use case ends.
**Use case: UC5 - Modify an appointment**
+
**MSS**
1. User requests to modify an appointment for a patient by specifying the index of the appointment in the appointment list.
2. vitalconnect saves the new appointment information.
3. vitalconnect displays the updated detail of the appointment modified.
-Use case ends.
+Use case ends.
+
**Extensions**
* 1a. The appointment referred by the index doesn't exist in the database.
- * 1a1. vitalconnect displays an error message.
- Use case ends.
+ * 1a1. vitalconnect displays an error message.
+ Use case ends.
* 1b. The id is not a valid number.
- * 1b1. vitalconnect displays an error message.
- Use case ends.
+ * 1b1. vitalconnect displays an error message.
+ Use case ends.
* 1c. The new information is in invalid form.
- * 1c1. vitalconnect displays an error message.
- Use case ends.
+ * 1c1. vitalconnect displays an error message.
+ Use case ends.
* 1d. The modified appointment time overlaps with existing appointment time.
- * 1d1. vitalconnect displays an error message and shows all the conflicting appointments.
- Use case ends.
+ * 1d1. vitalconnect displays an error message and shows all the conflicting appointments.
+ Use case ends.
**Use case: UC6 - Add specific information (contact/medical information) for a patient**
+
**MSS**
1. User requests to add specific information for a patient by specifying the patient's NRIC and the information to be added.
2. vitalconnect save the specific information to the database.
-Use case ends.
+Use case ends.
+
**Extensions**
* 1a. The patient doesn't exist in the database.
- * 1a1. vitalconnect displays a warning message.
- Use case ends.
+ * 1a1. vitalconnect displays a warning message.
+ Use case ends.
* 1b. The information is invalid.
- * 1b1. vitalconnect displays a warning message.
- Use case ends.
+ * 1b1. vitalconnect displays a warning message.
+ Use case ends.
**Use case: UC7 - Delete specific information (contact/medical information) for a patient**
+
**MSS**
-1. User requests to delete specific information for a patient by specifying the patient's NRIC.
-2. vitalconnect remove the specific information to the database.
-Use case ends.
+1. User requests to delete specific information for a patient by specifying the patient's NRIC.
+2. vitalconnect remove the specific information to the database.
+Use case ends.
+
**Extensions**
* 1a. The patient or specific information doesn't exist in the database.
- * 1a1. vitalconnect displays a warning message.
- Use case ends.
+ * 1a1. vitalconnect displays a warning message.
+ Use case ends.
**Use case: UC8 - Modify specific information**
+
**MSS**
1. User requests to modify specific information for a patient by specifying the patient's NRIC and new information.
2. vitalconnect displays the updated specific information of the patient.
-Use case ends.
+Use case ends.
+
**Extensions**
* 1a. The patient or specific information doesn't exist in the database.
- * 1a1. vitalconnect displays a warning message.
- Use case ends.
+ * 1a1. vitalconnect displays a warning message.
+ Use case ends.
* 1b. The specific information is invalid.
- * 1b1. vitalconnect displays a warning message.
- Use case ends.
+ * 1b1. vitalconnect displays a warning message.
+ Use case ends.
### Non-Functional Requirements
@@ -472,7 +486,6 @@ Use case ends.
* **ID (Identification Number)**: A unique identifier associated with a specific appointment, used to distinguish and reference individual appointments.
* **Warning Message**: An alert displayed by the vitalconnect system to notify the user of a potential issue or discrepancy.
* **Error Message**: A notification displayed by the vitalconnect system to inform the user about a critical issue or mistake.
-* **Crashing Time**: A situation where the proposed time for an appointment conflicts with an existing appointment time in the system.
* **Invalid Data Entry**: Information entered by the user that does not meet the required format or criteria.
* **Valid Data Entry**: Information entered by the user that meets the required format or criteria.
* **Tooltip**: A common graphical user interface element in which, when hovering over a screen element or component, a text box displays information about that element.
diff --git a/docs/UserGuide.md b/docs/UserGuide.md
index d57dfd24108..212e83b7202 100644
--- a/docs/UserGuide.md
+++ b/docs/UserGuide.md
@@ -82,7 +82,10 @@ For first time users, you can first go through the steps listed under [Installat
5. Type `cd` followed by the location of the folder that you are putting the `vitalconnect.jar` file in. Find out more [here](https://www.wikihow.com/Change-Directories-in-Command-Prompt)
-6. Type `java -jar vitalConnect.jar` and press Enter to launch java and run the application. A GUI should appear in a few seconds.
+6. Type `java -jar vitalConnect.jar` and press Enter to launch java and run the application. A GUI should appear in a few seconds. The calendar view will only be shown if the right panel is large enough. You can resize the panel by dragging the divider between the two panels. More instructions can be found in the `Timetable` section. (Note that your application might contain different initial placeholder datas.)
+
+
+
7. Type any command in the command box and press Enter to execute it. e.g. typing `help` and pressing Enter will open the help window.
Some example commands you can try:
@@ -223,7 +226,8 @@ Items in square brackets are optional.
* The NRIC must be a NRIC of an already existing patient.
* At least one of the optional fields must be provided.
-* Phone number should be of 3 to 15 digits long.
+* If a prefix (i.e. `p/`, `e/`, `a/`) is included in the command, the value following it should not be empty. If user does not want to add a specific field, do not include its prefix in the command. Otherwise an error message will be shown as empty values for these fields are not allowed.
+* Phone numbers should only contain numeric value without any other characters, and it should be 3 to 15 digits long.
* Emails should be of the format local-part@domain and adhere to the following constraints:
1. The local-part should only contain alphanumeric characters and these special characters, excluding the parentheses, (+_.-). The local-part may not start or end with any special characters, and the special characters should not be adjacent to each other.
2. This is followed by a '@' and then a domain name. The domain name is made up of domain labels separated by periods.
@@ -258,6 +262,15 @@ Items in square brackets are optional.
* To delete an `optional field`, leave the `VALUE` part empty.
* If the `VALUE` part is not empty, the corresponding patient contact's field will either be updated or added with the new value.
* If all three fields of contact information (phone, email, and address) become empty, the contact information of the patient will be considered deleted. If one want to add a new contact information, please use `addc` command.
+* Phone numbers should only contain numeric value without any other characters, and it should be 3 to 15 digits long.
+* Emails should be of the format local-part@domain and adhere to the following constraints:
+ 1. The local-part should only contain alphanumeric characters and these special characters, excluding the parentheses, (+_.-). The local-part may not start or end with any special characters, and the special characters should not be adjacent to each other.
+ 2. This is followed by a '@' and then a domain name. The domain name is made up of domain labels separated by periods.
+ The domain name must:
+ - end with a domain label at least 2 characters long
+ - have each domain label start and end with alphanumeric characters
+ - have each domain label consist of alphanumeric characters, separated only by hyphens, if any.
+* Address has a max length of 50 characters, and it should not be empty upon adding. Although in particular cases, the address can be larger than the current limit, 50 characters is able to suffice the needs in most situations. For long addresses that exceeds the 50 character limit, the compromise is to use shorforms, such as b123 instead of block 123.
Examples:
* `editc ic/S1234567D p/91234567` will result in the phone number of the patient with NRIC `S1234567D` being updated to `91234567`.
@@ -572,11 +585,15 @@ Incorrect or certain edits can cause the Clinic to behave in unexpected ways (e.
--------------------------------------------------------------------------------------------------------------------
## Timetable
+
+
This feature allows the user to visualise the appointment throughout the day.
-The timetable has an auto adjustment feature, if window size is larger enough(larger than 700 pixel), the timetable will show an extra calendar view with agenda on the left side of the timetable.
+The right part of the timetable (marked by green box) is a visual representation of the appointment for today. Each appointment is represented by a blue box with patient's name and nric. If the box is large enough, it will also display the appointment's start time. The height of the box represents the time length of the appointment.
-The three buttons on the top left of the timetable allows user to adjust which day to look at using mouse.
+The left part of the timetable (marked by purple box) is a calendar view with agendas for the current day. The complete information for the apopintment can be found in the agenda view, including the patient's name, nric, and the start time and end time of the appointments.
+
+The three buttons on the top left of the timetable (marked by yellow box) allows user to adjust which day to look at using mouse.
1. `Today` button will show the timetable of the current day.
2. `<` button will show the timetable of the previous day.
3. `>` button will show the timetable of the next day.
@@ -586,6 +603,14 @@ The timetable also support changing the view using keyboard shortcuts.
2. `Ctrl + N` will show the timetable of the next day.
3. `Ctrl + T` will show the timetable of the today.
+It is worth noting that the left calendar view (marked by purple box in the above image) is only shown when the left panel size is large enough (i.e. larger than 700 pixels). If the calendar is not currently showing, users can resize the panel by dragging the divider in the middle of the application. The divider is highlighted in **green color** in the following two images below.
+
+
+
+After dragging the divider to the left, the calendar view will be shown.
+
+
+
[Back to table of contents](#toc)
--------------------------------------------------------------------------------------------------------------------
diff --git a/docs/diagrams/ArchitectureSequenceDiagram.puml b/docs/diagrams/ArchitectureSequenceDiagram.puml
index 48b6cc4333c..77c8a3ee096 100644
--- a/docs/diagrams/ArchitectureSequenceDiagram.puml
+++ b/docs/diagrams/ArchitectureSequenceDiagram.puml
@@ -20,7 +20,7 @@ activate model MODEL_COLOR
model -[MODEL_COLOR]-> logic
deactivate model
-logic -[LOGIC_COLOR]> storage : saveAddressBook(addressBook)
+logic -[LOGIC_COLOR]> storage : saveClinic(clinic)
activate storage STORAGE_COLOR
storage -[STORAGE_COLOR]> storage : Save to file
diff --git a/docs/diagrams/ModelClassDiagram.puml b/docs/diagrams/ModelClassDiagram.puml
index 035b9e6bbf8..84ca542174d 100644
--- a/docs/diagrams/ModelClassDiagram.puml
+++ b/docs/diagrams/ModelClassDiagram.puml
@@ -28,9 +28,6 @@ Class Allergy
Class UniqueAppointmentList
Class Appointment
-Class Doctor
-Class Patient
-Class Time
Class I #FFFFFF
}
@@ -70,9 +67,6 @@ Address -[hidden]right-> Email
Clinic *--> "1" UniqueAppointmentList
UniqueAppointmentList --> "~* all" Appointment
-Appointment *--> Doctor
-Appointment *--> Patient
-Appointment *--> Time
ModelManager --> "~* filtered" Person
ModelManager --> "~* filtered" Appointment
diff --git a/docs/images/ArchitectureSequenceDiagram.png b/docs/images/ArchitectureSequenceDiagram.png
index 37ad06a2803..d0d9ee5d647 100644
Binary files a/docs/images/ArchitectureSequenceDiagram.png and b/docs/images/ArchitectureSequenceDiagram.png differ
diff --git a/docs/images/ModelClassDiagram.png b/docs/images/ModelClassDiagram.png
index aa6e713260d..651dd9ab30b 100644
Binary files a/docs/images/ModelClassDiagram.png and b/docs/images/ModelClassDiagram.png differ
diff --git a/docs/images/launch_1.png b/docs/images/launch_1.png
new file mode 100644
index 00000000000..5ccef586886
Binary files /dev/null and b/docs/images/launch_1.png differ
diff --git a/docs/images/launch_2.png b/docs/images/launch_2.png
new file mode 100644
index 00000000000..7edcd2d5c74
Binary files /dev/null and b/docs/images/launch_2.png differ
diff --git a/docs/images/timetable1.png b/docs/images/timetable1.png
new file mode 100644
index 00000000000..825d7f3ad96
Binary files /dev/null and b/docs/images/timetable1.png differ
diff --git a/docs/images/timetable2.png b/docs/images/timetable2.png
new file mode 100644
index 00000000000..8d22fa3abbb
Binary files /dev/null and b/docs/images/timetable2.png differ
diff --git a/docs/images/timetable3.png b/docs/images/timetable3.png
new file mode 100644
index 00000000000..8e6c6d398fc
Binary files /dev/null and b/docs/images/timetable3.png differ