Skip to content

Commit

Permalink
Final Updates to UGDG (#215)
Browse files Browse the repository at this point in the history
* Final Updates to UGDG

docs: fix @Wingedevil link to PPP in About Us
docs: Added Manual Testing Appendix to DG
docs: Updated Ui image to reflect latest build
docs: Standardised image sizes in UG
small fix: made label focus untraversable in CommandBox
  • Loading branch information
gachia authored Nov 11, 2019
1 parent 071731e commit 678f5a3
Show file tree
Hide file tree
Showing 5 changed files with 199 additions and 34 deletions.
2 changes: 1 addition & 1 deletion docs/AboutUs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Responsibilities: Documentation, Concept Artist, in charge of `UI` component

=== Jerrold Tan
image::wingedevil.png[width="150", align="left"]
{empty}[http://github.com/Wingedevil[github]] [<<jerroldtan#, portfolio>>]
{empty}[http://github.com/Wingedevil[github]] [<<wingedevil#, portfolio>>]

Role: Developer +
Responsibilities: Git Expert, In charge of `Alias` Component
Expand Down
178 changes: 170 additions & 8 deletions docs/DeveloperGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -922,22 +922,184 @@ These instructions only provide a starting point for testers to work on; testers

.. Download the jar file and copy into an empty folder
.. Double-click the jar file +
Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum.
Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum.

. Saving window preferences

.. Resize the window to an optimum size. Move the window to a different location. Close the window.
.. Re-launch the app by double-clicking the jar file. +
Expected: The most recent window size and location is retained.
Expected: The most recent window size and location is retained.

=== Deleting a person
=== User Interface

. Deleting a person while all persons are listed
. Typing Commands

.. Prerequisites: List all persons using the `list` command. Multiple persons in the list.
.. Click on the Command Box with the text “How may I help you?”
.. Type in any Command (i.e. Adding a person)
.. Hit Enter on the keyboard
Expected: The command should have been successfully entered and the application responds appropriately.

. Using Help

.. Press the F1 key on your keyboard; Alternatively, click on the Help menu bar at the top of the application and select the Help menu item. +
Expected: The Help Window should appear as a new window.

=== Adding a patient

. Adding a patient to the list

.. Test case: `add n/Sam Strand p/90811019 e/[email protected] a/Blk 09 Piccadilly Road #14-137 t/fatigue` +
Expected: A patient named Sam Strand should be added into the list with his phone number, email and address. He should
also have a tag that says fatigue in the list.

=== Deleting a patient

. Deleting a patient while all patients are listed

.. Prerequisites: List all patients using the `list` command. Multiple patients in the list.
.. Test case: `delete 1` +
Expected: First contact is deleted from the list. Details of the deleted contact shown in the status message. Timestamp in the status bar is updated.
Expected: First patient is deleted from the list. Details of the deleted patient shown in the status message. Timestamp in the status bar is updated.
.. Test case: `delete 0` +
Expected: No person is deleted. Error details shown in the status message. Status bar remains the same.
Expected: No patient is deleted. Error details shown in the status message. Status bar remains the same.
.. Other incorrect delete commands to try: `delete`, `delete x` (where x is larger than the list size) +
Expected: Similar to previous.
Expected: Similar to previous.

=== Adding a visit report

. Adding a visit report to a person while all persons are listed

.. Prerequisites: List all persons using the `list` command. Multiple persons in the list.
.. Test case: `addvisit 1` +
Expected: Empty form displayed. After saving the form by pressing the Save button or F2, successful save with person details shown in status message. If the person has no previous records or has a Most recent visit date displayed earlier than the current date, Most recent visit date will be updated to current date in the Person card.
.. Test case: `addvisit 1 v/12/12/2012` +
Expected: Similar to previous
.. Test case: `addvisit 1 v/invalid` +
Expected: Error message displayed
.. Other incorrect addvisit commands to try: `addvisit`, `addvisit x` (where x is larger than the list size), `addvisit x v/dd/mm/yyyy` (where x is valid person index and dd/mm/yyyy is an invalid date e.g 30/02/2019 or date with valid day and month but with year not conforming to 19xx or 2xxx format) +
Expected: Similar to previous.

=== Editing a visit report

. Editing a person’s visit reports for chosen person are listed

.. Prerequisites: List all reports using the `editvist [PERSON_INDEX]` command.
.. Test case: `editvisit 1 i/1` +
Expected: Form pops up. After saving the form by pressing the Save button or F2, successful save with person details shown in status message.
.. Test case: `editvisit 1 i/0` +
Expected: No form pops up. Error details shown in the status message. Status bar remains the same.
.. Other incorrect delete commands to try: `editvisit`, `editvisit x` (where x is larger than the person list size) `editvisit x i/y`(where x is is valid person index and y is an invalid report index) +
Expected: Similar to previous.

=== Deleting a visit report

. Deleting a report while all visit reports for chosen person are listed

.. Prerequisites: List all reports using the `deletevisit [PERSON_INDEX]` command.
.. Test case: `deletevisit 1 d/1` +
Expected: First report is deleted from the list. List of reports updates. If the patient has no more reports after deleting, list of reports closes and window prompt of patient having no past records shows.
.. Test case: `delete 1 d/0` +
Expected: No report is deleted. Error details shown in the status message.
.. Other incorrect delete commands to try: `deletevisit`, `deletevisit x` (where x is larger than the list size), `deletevisit x i/y` (where x is is valid person index and y is an invalid report index) +
Expected: Similar to previous.

=== Viewing and Exporting a Patient’s Profile

. Opening the ProfileWindow

.. Prerequisites: List all persons using the `list` command. Multiple persons in the list.
.. Test case: `profile 1` +
Expected: Profile panel for the first Patient is shown on the screen. Details of the Patient should be accurately displayed as well, with all attributes (Name, Phone, Address, etc.), as well as Visit Reports shown.
.. Test case: `profile 0` +
Expected: No profile panel is shown. Error message detailing an invalid command.
.. Other incorrect profile commands to try: `profile`, `profile x` (where x is larger than the list size) +
Expected: Similar to previous.

. Generating a Patient’s Profile in a .txt file

.. Prerequisites: A ProfileWindow detailing a valid user is currently shown and in focus.
.. Press `p` or the _Generate Profile File_ button
.. Expected: A success message is shown next to the _Generate Profile File_ button and the patient’s file is generated in the _generated_profiles_ folder of VISITapp.jar. The filename should be according to the following format: “NAME_PHONE_DATE TIME.txt”.

=== Appointment System

. Adding a Reminder

.. Test case: `reminder Test` +
Expected: A new reminder with the description “Test” is created with 7 days remaining. Appointments panel is updated to reflect the new reminder.
.. Test case: `reminder Test d/3` +
Expected: A new reminder with the description “Test” is created with 3 days remaining. Appointments panel is updated to reflect the new reminder.
.. Test case: `reminder` +
Expected: No reminder is created. Error details shown in the status message.
.. Test case: `reminder Test d/-1` +
Expected: No reminder is created. Error details shown in the status message.

. Adding a Follow-up

.. Prerequisites: List all persons using the `list` command. Multiple persons in the list.

.. Test case: `followup 1` +
Expected: A new follow-up with the patient in Index 1 is created for 7 days’ time. Appointments panel is updated to reflect the new follow-up.
.. Test case: `followup 1 d/3` +
Expected: A new follow-up with the patient in Index 1 is created for 3 days’ time. Appointments panel is updated to reflect the new follow-up.
.. Test case: `followup` +
Expected: No follow-up is created. Error details shown in the status message.
.. Test case: `followup 1 d/-1` +
Expected: No follow-up is created. Error details shown in the status message.

. Sorting Appointments

.. Prerequisites: Multiple appointments in the list.

.. Test case: `sort` +
Expected: Appointments in the list are sorted according to type, then days, then text.

. Removing Appointments

.. Prerequisites: Reminder named “Test” and Follow-up named “Satya Nadella” in the list.

.. Test case: `removeappt Test` +
Expected: Reminder “Test” is removed. Appointment panel is updated to reflect the deletion.
.. Test case: `removeappt Satya Nadella` +
Expected: Follow-up “Satya Nadella” is removed. Appointment panel is updated to reflect the deletion.

. Show Message of the Day

.. Prerequisites: Multiple appointments in the list.

.. Test case: `show` +
Expected: Message of the Day panel appears with Appointment list.

=== Creating, deleting, listing and using aliases

. Creating an alias

.. Test case: `alias l/ls v/list` +
Expected: A new alias is created, mapping `ls` to `list`.
.. Test case: `alias l/a v/list` +
Expected: A new alias is created, mapping `a` to `list`, overriding the existing default mapping of `a` to `add`.
.. Other incorrect alias commands to try: `alias potato`, `alias l/x v/alias` (where x is an existing non-aliased command) +
Expected: No alias is created. Error details shown in the status message. Status bar remains the same.

. Deleting an alias

.. Prerequisites: Have an existing alias mapping of `a` to `add`, but no mapping of `potato` to anything.
.. Test case: `unalias a` +
Expected: The existing mapping of `a` to `add` will be deleted.
.. Test case: `unalias potato` +
Expected: No alias is deleted as there is no existing alias with the name `potato`.

. Using alias

.. Prerequisites: Have an existing alias mapping `follow` to `followup 1`, mapping `follow14` to `followup 1 d/14` and list at least one person using the `list` or `find` command.
.. Test case: `follow` +
Expected: A new follow up is created for the first person in the list with the default days of 7 days. The appointments panel will also be updated with the new appointment.
.. Test case: `follow14` +
Expected: A new follow up is created for the first person in the list with the specified input of 14 days. The appointments panel will also be updated with the new appointment.
.. Test case: `follow d/30` +
Expected: A new follow up is created for the first person in the list with the specified input of 30 days. The appointments panel will also be updated with the new appointment.

. Listing aliases

.. Prerequisites: Only have an existing alias mapping of `a` to `add`.
.. Test case: `aliaslist` +
Expected: List of aliases panel is shown on the screen. All existing user-defined aliases are shown.
48 changes: 26 additions & 22 deletions docs/UserGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -257,30 +257,30 @@ To enter the details of the report into VISIT:
1. Type `addvisit 1 v/03/01/2019` into the command box and press kbd:[Enter] to execute it.
+
[.text-center]
image::UGAddVisit0.png[width="790"]
image::UGAddVisit0.png[width="500"]
+
* Date must be in the "dd/MM/yyyy" format (e.g. `v/19/10/2019`). The valid range of dates starts from the year 1900 and ends at year 2999 (inclusive).
[TIP]
If no date is specified and the command is used without the prefix 'v/' (for example `addvisit 1`), the report will default to the current local date of the computer.
2. Key in the details in the respective fields of the pop-up form that appears.
+
[.text-center]
image::UGAddVisit1.png[width="790"]
image::UGAddVisit1.png[width="500"]
+
* Press kbd:[CTRL] + kbd:[Tab] to navigate to the next field (down)
* Press kbd:[SHIFT] + kbd:[Tab] to navigate to the previous field (up)
3. Click the kbd:[Save] button or press kbd:[F2] to save your entry.
4. The pop-up form closes and the display box will display a message indicating a successful entry.
+
[.text-center]
image::UGAddVisit2.png[width="790"]
image::UGAddVisit2.png[width="500"]
+

[NOTE]
While `addvisit 1` is valid, typing in `addvisit 1 v/` without a valid date will give an error.

[.text-center]
image::UGAddVisit3.png[width="790"]
image::UGAddVisit3.png[width="500"]
==== Editing the particulars of a visitation report : `editvisit`

Opens a pop-up panel that enables the editing of an existing visitation report of a particular patient. +
Expand All @@ -290,7 +290,7 @@ Format: `editvisit INDEX [i/REPORT_INDEX]`
If no report index is specified, `editvisit INDEX` or `editvisit INDEX i/` will open a panel showing the reports of that patient and the relevant indexes of the reports. To edit the visit report, simply re-enter the command with the desired report index.

[.text-center]
image::UGEditVisit0.png[width="790"]
image::UGEditVisit0.png[width="500"]

*Example*:

Expand All @@ -299,26 +299,26 @@ Let's say you want to edit the 2nd visit report of a patient and the patient is
1. Type `editvisit 3 i/2` into the command box and press kbd:[Enter] to execute it.
+
[.text-center]
image::UGEditVisit1.png[width="790"]
image::UGEditVisit1.png[width="500"]
+
2. Key in the details in the respective fields of the pop-up form(which is pre-filled with the existing information of the report) that appears.
+
[.text-center]
image::UGEditVisit2.png[width="790"]
image::UGEditVisit2.png[width="500"]
+
* Press kbd:[CTRL] + kbd:[Tab] to navigate to the next field (down)
* Press kbd:[SHIFT] + kbd:[Tab] to navigate to the previous field (up)
3. Click the kbd:[Save] button or press kbd:[F2] to save your edits.
4. The pop-up form closes and the display box will display a message indicating a successful entry.

[.text-center]
image::UGEditVisit3.png[width="790"]
image::UGEditVisit3.png[width="500"]

[NOTE]
An error will be thrown if the report with the given report index does not exist or the index given is not a number.

[.text-center]
image::UGEditVisit4.png[width="790"]
image::UGEditVisit4.png[width="500"]

==== Deleting a visitation report : `deletevisit`

Expand All @@ -329,7 +329,7 @@ Format: `deletevisit INDEX [d/REPORT_INDEX]`
If no report index is specified, `deletevisit INDEX` or `deletevisit INDEX d/` will open a panel showing the reports of that patient and their relevant indexes of the reports. To delete the visit, simply re-enter the command with the desired report index.

[.text-center]
image::UGDeleteVisit0.png[width="790"]
image::UGDeleteVisit0.png[width="500"]

*Example*:

Expand All @@ -338,23 +338,23 @@ Let's say you want to delete the 1st visit report of a patient and the patient i
1. Type `deletevisit 2 d/1` into the command box and press kbd:[Enter] to execute it.
+
[.text-center]
image::UGDeleteVisit1.png[width="790"]
image::UGDeleteVisit1.png[width="500"]
+
2. A panel showing the list of reports will be shown, now without the deleted report and the display box will display a message indicating a successful deletion.

[.text-center]
image::UGDeleteVisit2.png[width="790"]
image::UGDeleteVisit2.png[width="500"]

[NOTE]
An error will be thrown if the report with the given report index does not exist or the index given is not a number.

[.text-center]
image::UGDeleteVisit3.png[width="790"]
image::UGDeleteVisit3.png[width="500"]

For both `deletevisit` and `editvisit` commands if the patient has no past records, a pop up with the message "Patient has no past records" will be shown instead of a list of reports when `editvisit [INDEX]` or `deletevisit [INDEX]` is run. Note that an error will be raised if the report index is provided to a patient with no past records, for example `editvisit [INDEX] i/1` or `deletevisit [INDEX] d/1`.

[.text-center]
image::UGNoRecords.png[width="790"]
image::UGNoRecords.png[width="500"]
// end::visitreports[]
[[appointmentsImplementation]]
// tag::appointments[]
Expand Down Expand Up @@ -386,7 +386,7 @@ Creates a follow-up entry on patient with index 9 for 10 days later.
Creates a follow-up entry on patient with index 1 for 7 days later.

[.text-center]
image::UGApptFollowUps.png[width="790"]
image::UGApptFollowUps.png[width="500"]

==== Creating a generic reminder : `reminder`

Expand All @@ -404,7 +404,7 @@ Creates a reminder "Two Point Hospital closed" that will display for the next 10
Creates a reminder "Losartan recall" that will display for the next 7 days.

[.text-center]
image::UGApptReminders.png[width="790"]
image::UGApptReminders.png[width="500"]

==== Removing an Appointment : `removeappt`

Expand All @@ -422,15 +422,15 @@ Removes any appointment which description is "Two Point Hospital closed".
Removes any appointments with the patient whose name is Satya Nadella.

[.text-center]
image::UGApptRemoveAppt.png[width="790"]
image::UGApptRemoveAppt.png[width="500"]

==== Show Appointments "Message of the Day" box : `show`

Shows a pop-up containing the appointments. This is useful if you want to keep a small window just containing the appointments on the screen, separate from the main window. +
Format: `show`

[.text-center]
image::UGApptShow.png[width="790"]
image::UGApptShow.png[width="500"]

==== Sort Appointments : `sort`

Expand All @@ -456,7 +456,8 @@ Typing `ls` now works equivalently as typing `list`.
* `alias l/display all patients v/list` +
Typing `display all patients` now works equivalently as typing `list`.

image::UGAddAlias.png[width="800"]
[.text-center]
image::UGAddAlias.png[width="500"]

[NOTE]
The `alias` command will override any previous alias mapping if any. +
Expand All @@ -472,7 +473,8 @@ Format: `unalias SHORTHAND`
* `unalias ls` +
Typing `ls` will no longer be equivalent to typing `list`.

image::UGUnalias.png[width="800"]
[.text-center]
image::UGUnalias.png[width="500"]

==== Showing all existing shorthand commands / aliases : `aliaslist`

Expand All @@ -484,15 +486,17 @@ Examples:
* `aliaslist` +
Shows all the existing aliases.

image::UGAliasList.png[width="800"]
[.text-center]
image::UGAliasList.png[width="500"]

==== Using aliases
To use a user-defined alias, you just have to type the alias you defined. Additional optional parameters can also be specified if the aliased command takes in additional arguments. +
Format: `SHORTHAND [additional arguments]`

Examples:

image::UGApplyAlias.png[width="800"]
[.text-center]
image::UGApplyAlias.png[width="500"]

[NOTE]
Matching of aliases uses the longest substring match. (i.e. if there exists an alias _follow 7_ and _follow_, typing _follow 7_ will always match with _follow 7_ instead of _follow_.)
Expand Down
Binary file modified docs/images/Ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 678f5a3

Please sign in to comment.