Skip to content

Commit

Permalink
Merge pull request #337 from kimshitong/branch-dg-change-1
Browse files Browse the repository at this point in the history
Update DG DeleteSpecialisation and List Appointment with minor update on UG, PPP
  • Loading branch information
mounilsankar authored Nov 14, 2023
2 parents 8315b41 + 2f5e6f1 commit 032cd99
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 44 deletions.
32 changes: 17 additions & 15 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ The following sequence diagram shows how the find doctor operation would work:

The sequence diagram for the find patient operation would be similar.

The following activity diagram summarizes what happens when a user wants to find a new doctor/patient:
The following activity diagram summarizes what happens when a user wants to find doctors/patients:

![FindCommandActivity](images/FindCommandActivityDiagram.png)

Expand All @@ -255,19 +255,19 @@ These operations are exposed in the Ui interface as `MainWindow#executeCommand(S

Given below is an example usage scenario and how the `ListDoctorCommand` mechanism behaves at each step.

**Step 1:** The user inputs `list_d`. The application will display the `FilteredDoctorList`.
**Step 1**: The user inputs `list_d`. The application will display the `FilteredDoctorList`.

* The `list_d` command calls `MediConnectParser#parseCommand(String)` which recognizes the command word as `list_d`.

* A new `ListDoctorCommand` instance will be created.

**Step 2:** The created `ListDoctorCommand` instance is returned to `LogicManager` and its execute method is called.
**Step 2**: The created `ListDoctorCommand` instance is returned to `LogicManager` and its execute method is called.

* `ListDoctorCommand#execute(Model)` then calls `Model#updateFilteredDoctorList(Predicate<Doctor>)` with the predicate `PREDICATE_SHOW_ALL_DOCTORS`.

* The `FilteredDoctorList` is updated to show all doctors by calling `ObservableList#setPredicate(Predicate<Doctor>)`.

**Step 3:** A `CommandResult` object is created with a message indicating success, and this result is returned to the UI to be displayed to the user.
**Step 3**: A `CommandResult` object is created with a message indicating success, and this result is returned to the UI to be displayed to the user.

The example usage scenario for the list patients mechanisms would be similar to the scenario above.

Expand All @@ -287,7 +287,7 @@ The following activity diagram summarizes what happens when a user wants to list

**Introduction**

This section describes the feature that allows users to list appointments in the MediConnect database. Users can either list all appointments or filter them based on the NRIC of doctors or patients.
This section describes the feature that allows users to list appointments in the MediConnect database. Users can either list all appointments or filter them based on the NRIC of the doctor or/and patient.

#### Implementation

Expand All @@ -302,22 +302,22 @@ Given below is an example usage scenario and how the `ListAppointmentCommand` me
**Step 1**: The user inputs `list_a` to list all appointments or `list_a pic\PATIENT_NRIC dic\DOCTOR_NRIC` to filter appointments.
* The `list_a` command triggers `MediConnectParser#parseCommand(String)`, which identifies the command word and calls `ListAppointmentCommandParser#parse(String)` to handle the arguments.

**Step 2**: The `ListAppointmentCommandParser#parse(String)` method checks for the presence of optional flags like `dic\` for doctor NRIC and `pic\` for patient NRIC. Based on these, it creates appropriate `Predicate` objects.
**Step 2**: The `ListAppointmentCommandParser#parse(String)` method checks for the presence of optional flags like `dic\` for doctor NRIC and `pic\` for patient NRIC.
* A new `ListAppointmentCommand` instance is then created with the predicate `AppointmentFilterByNricPredicate`.

**Step 3**: A new `ListAppointmentCommand` instance is created using the `Predicate` object(s).
**Step 3**: The created `ListAppointmentCommand` instance is returned to `LogicManager`, and its execute method is called.
* `ListAppointmentCommand#execute(Model)` then calls `Model#updateFilteredAppointmentList(Predicate)` with the predicate `AppointmentFilterByNricPredicate`.
* The `FilteredAppointmentList` is updated to show all doctors by calling `Model#updateFilteredAppointmentList(Predicate<Appointment>)`.

**Step 4**: The created `ListAppointmentCommand` instance is returned to `LogicManager`, and its execute method is called.
* `ListAppointmentCommand#execute(Model)` filters the list of appointments in `Model` using the specified predicate(s).

**Step 5**: The filtered list is displayed to the user through the UI.
**Step 4**: A `CommandResult` object is created with a message indicating success, and this result is returned to the UI to be displayed to the user.

**UML Diagrams**

The following sequence diagram shows how the list appointment operation would work:

![ListPatientSequence](images/ListAppointmentSequence.png)

The following activity diagram summarizes what happens when a user wants to list a new appointment:
The following activity diagram summarizes what happens when a user wants to list appointment(s):

![ListCommandActivity](images/ListAppointmentCommandActivityDiagram.png)

Expand Down Expand Up @@ -471,7 +471,7 @@ The following activity diagram summarizes what happens when a user wants to add

![AddXYZTagActivityDiagram](images/AddXYZTagActivityDiagram.png)

### Delete Specialisation / Medical Condition / Prescription feature
### Delete Specialisation / Medical condition / Prescription feature

**Introduction**

Expand All @@ -494,14 +494,16 @@ A new `DeleteSpecialisationCommand` instance will be created.

**Step 3**: The created `DeleteSpecialisationCommand` instance is returned to `LogicManager` and its `execute` method is called.
`DeleteSpecialisationCommand#execute(Model)` then calls `Model#getFilteredDoctorList()` and retrieve the doctor with the given `Index`.
Then, the specialisation will be removed from the doctor if exists and replace the existing doctor in Model with the command of `Model#setDoctor(Doctor, Doctor)`.
Then, the specified specialisation will be removed from the doctor if exists and replace the existing doctor in Model with the command of `Model#setDoctor(Doctor, Doctor)`.

The example usage scenario for delete medical condition and delete prescriptions mechanisms would be similar to the scenario above.
The example usage scenario for delete medical condition and delete prescription mechanisms would be similar to the scenario above.

The following sequence diagram shows how the delete specialisation operation would work and will be similar to deletion of medical condition and prescription:

![DeleteSpecialisationSequenceDiagram](images/DeleteSpecialisationSequenceDiagram.png)

The following activity diagram summarizes what happens when a user wants to delete a specialisation/medical condition/prescription:

![DeleteXYZTagActivityDiagram](images/DeleteXYZTagActivityDiagram.png)

### View Appointment / Doctor / Patient feature
Expand Down
2 changes: 2 additions & 0 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ For medical conditions with more than 1 word, users can concatenate the words of
An "alphanumeric" character is a character that can be either a letter (A to Z, both uppercase and lowercase) or a number (0 to 9).
</div>

Back to [Table of Contents](#table-of-contents).

<div style="page-break-after: always;"></div>

## Patient Management Features
Expand Down
15 changes: 8 additions & 7 deletions docs/diagrams/FindDoctorSequence.puml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":MediConnectParser" as MediConnectParser LOGIC_COLOR
participant ":FindDoctorCommandParser" as FindDoctorCommandParser LOGIC_COLOR
participant "d:FindDoctorCommand" as FindDoctorCommand LOGIC_COLOR
participant ":NameContainsKeywordsDoctorPredicate" as NameContainsKeywordsDoctorPredicate LOGIC_COLOR
participant "d:FindDoctorCommand" as FindDoctorCommand LOGIC_COLOR
participant "result:CommandResult" as CommandResult LOGIC_COLOR
end box

Expand All @@ -32,15 +32,16 @@ deactivate FindDoctorCommandParser
MediConnectParser -> FindDoctorCommandParser : parse("John")
activate FindDoctorCommandParser

create NameContainsKeywordsDoctorPredicate
FindDoctorCommandParser -> NameContainsKeywordsDoctorPredicate
activate NameContainsKeywordsDoctorPredicate
NameContainsKeywordsDoctorPredicate --> FindDoctorCommandParser : predicate
deactivate NameContainsKeywordsDoctorPredicate

create FindDoctorCommand
FindDoctorCommandParser -> FindDoctorCommand :
activate FindDoctorCommand

create NameContainsKeywordsDoctorPredicate
FindDoctorCommand -> NameContainsKeywordsDoctorPredicate
activate NameContainsKeywordsDoctorPredicate
NameContainsKeywordsDoctorPredicate --> FindDoctorCommand : predicate
deactivate NameContainsKeywordsDoctorPredicate


FindDoctorCommand --> FindDoctorCommandParser : d
Expand All @@ -58,7 +59,7 @@ deactivate MediConnectParser
LogicManager -> FindDoctorCommand : execute()
activate FindDoctorCommand

FindDoctorCommand -> Model : getFilteredDoctorList(predicate)
FindDoctorCommand -> Model : updateFilteredDoctorList(predicate)
activate Model

Model --> FindDoctorCommand
Expand Down
13 changes: 7 additions & 6 deletions docs/diagrams/ListAppointmentSequence.puml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":MediConnectParser" as MediConnectParser LOGIC_COLOR
participant ":ListAppointmentCommandParser" as ListAppointmentCommandParser LOGIC_COLOR
participant "a:ListAppointmentCommand" as ListAppointmentCommand LOGIC_COLOR
participant ":AppointmentFilterByNricPredicate" as AppointmentFilterByNricPredicate LOGIC_COLOR
participant "a:ListAppointmentCommand" as ListAppointmentCommand LOGIC_COLOR
participant "result:CommandResult" as CommandResult LOGIC_COLOR
end box

Expand All @@ -32,16 +32,17 @@ deactivate ListAppointmentCommandParser
MediConnectParser -> ListAppointmentCommandParser : parse("pic\S9912343G \ndic\S0548254G")
activate ListAppointmentCommandParser

create AppointmentFilterByNricPredicate
ListAppointmentCommandParser -> AppointmentFilterByNricPredicate
activate AppointmentFilterByNricPredicate
AppointmentFilterByNricPredicate --> ListAppointmentCommandParser : predicate
deactivate AppointmentFilterByNricPredicate

create ListAppointmentCommand
ListAppointmentCommandParser -> ListAppointmentCommand :
activate ListAppointmentCommand


create AppointmentFilterByNricPredicate
ListAppointmentCommand -> AppointmentFilterByNricPredicate
activate AppointmentFilterByNricPredicate
AppointmentFilterByNricPredicate --> ListAppointmentCommand : predicate
deactivate AppointmentFilterByNricPredicate


ListAppointmentCommand --> ListAppointmentCommandParser : a
Expand Down
Binary file modified docs/images/FindDoctorSequence.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/ListAppointmentSequence.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 12 additions & 16 deletions docs/team/kimshitong.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,30 +51,26 @@ Given below are my contributions to the project.
* Justification: you are able to see all the existing doctors along with their name and nric
* Highlights: All doctors will be shown in a list of box form along with the name and nric.


* **Code contributed**: ~4kLOC [RepoSense link](https://nus-cs2103-ay2324s1.github.io/tp-dashboard/?search=kimshitong&breakdown=true)
* Test Code : 2126 LOC
* Functional Code : 1046 LOC
* Docs : 725 LOC

* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2324s1.github.io/tp-dashboard/?search=kimshitong&breakdown=true)

* **Project management**:
* Version control
* Documentation Management
* Team Communication


* **Documentation**:
* User Guide:
* Document New Features
* Updated Command Summary
* Updated Parameter Table
* Documented Features for Add Doctor's Specialisation [#189](https://github.com/AY2324S1-CS2103T-T08-1/tp/pull/189)
* Documented Features for Delete Doctor's Specialisation [#189](https://github.com/AY2324S1-CS2103T-T08-1/tp/pull/189)
* Documented Edit Doctor's Remark [#189](https://github.com/AY2324S1-CS2103T-T08-1/tp/pull/189)
* Updated Command Summary [#189](https://github.com/AY2324S1-CS2103T-T08-1/tp/pull/189) [#245](https://github.com/AY2324S1-CS2103T-T08-1/tp/pull/245)
* Updated Parameter Table [#248](https://github.com/AY2324S1-CS2103T-T08-1/tp/pull/248)
* Developer Guide:
* User Stories
* Document Features for List Patient/Doctor/Appointments with Activity/Sequence UML Diagram
* Document Features for Delete Specialisation/Medical Conditions/Prescriptions with Activity/Sequence UML Diagram
* Added User Stories [#57](https://github.com/AY2324S1-CS2103T-T08-1/tp/pull/57)
* Documented Features for Find Patient/Doctor/Appointment with Activity/Sequence Diagram [#156](https://github.com/AY2324S1-CS2103T-T08-1/tp/pull/156)
* Documented Features for List Patient/Doctor/Appointment with Activity/Sequence Diagram [#156](https://github.com/AY2324S1-CS2103T-T08-1/tp/pull/156)
* Documented Features for Delete Specialisation/MedicalCondition/Prescription with Activity/Sequence Diagram [#264](https://github.com/AY2324S1-CS2103T-T08-1/tp/pull/264)
* Improved and Standardised Features' Activity/Sequence Diagram [#327](https://github.com/AY2324S1-CS2103T-T08-1/tp/pull/327)

* **Community**:
* PRs reviewed (with non-trivial review comments)
* Contributed to forum discussions
* PRs reviewed (with non-trivial review comments) [#298](https://github.com/AY2324S1-CS2103T-T08-1/tp/pull/298) [#290](https://github.com/AY2324S1-CS2103T-T08-1/tp/pull/290) [#287](https://github.com/AY2324S1-CS2103T-T08-1/tp/pull/287) [#192](https://github.com/AY2324S1-CS2103T-T08-1/tp/pull/192) [#119](https://github.com/AY2324S1-CS2103T-T08-1/tp/pull/118)
* Reported bugs and suggestions for other teams in the class

0 comments on commit 032cd99

Please sign in to comment.