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

[CS2103-W10-3] ToothTracker #61

Open
wants to merge 929 commits into
base: master
Choose a base branch
from
Open
Changes from 15 commits
Commits
Show all changes
929 commits
Select commit Hold shift + click to select a range
f67e985
Remove unused headers
SynapseProgramming Nov 6, 2023
10fd97e
Add in field checks for duplicate prefixes
SynapseProgramming Nov 6, 2023
fb2240b
Change names to ignore case
SynapseProgramming Nov 6, 2023
cffd6e3
Add in duplicate checks for AddTreatmentCommandParser
SynapseProgramming Nov 6, 2023
38b9e53
Remove uppercase name test
SynapseProgramming Nov 6, 2023
ad37e07
Fix the way error messages are shown in filter-appointment
Nov 6, 2023
f9b1530
Fix punctuation error.
SynapseProgramming Nov 6, 2023
6ffa4bf
Fix minor bug in filter-appointment
Nov 6, 2023
6392042
Add tests for AddressBookParser
Nov 6, 2023
b129328
Remove `Service` class
Nov 6, 2023
cda68f5
Remove mentions of `Service`
Nov 6, 2023
4d932aa
set initial id to 1 when clear command has been entered
SynapseProgramming Nov 7, 2023
fda3a68
Fix bugs #202, #195, #181, #167, #162 targeted at `Dentist`
freddychenyouren2 Nov 7, 2023
3dd76ec
Merge pull request #203 from ruth-lim/add-test-classes
SynapseProgramming Nov 7, 2023
b3b063b
Fix edit patient and edit dentist tests
SynapseProgramming Nov 7, 2023
2a8b4bf
Add in .get() function call for Descriptor equals function
SynapseProgramming Nov 7, 2023
45027cd
Add unit tests for AttributeContainsKeywordsPredicate used in filter …
Nov 7, 2023
2c76bec
Fix edge case bug on Years of Experience for multiple 0 inputs.
freddychenyouren2 Nov 7, 2023
e2b673b
Merge pull request #205 from SynapseProgramming/command_duplicate_fixes
ruth-lim Nov 7, 2023
ce352d2
Fix failing test
Nov 7, 2023
8070e2d
Merge branch 'master' of https://github.com/qyaner/tp into appt-test
Nov 7, 2023
9e34b8f
Merge pull request #208 from ruth-lim/master
ruth-lim Nov 7, 2023
5a7944a
Merge branch 'AY2324S1-CS2103T-W10-3:master' into appt-test
qyaner Nov 7, 2023
6f68a16
Add in duplicate checks in AddAppointmentCommandParser
Nov 7, 2023
fd76690
Merge pull request #206 from SynapseProgramming/edit-test-case-fix
ruth-lim Nov 7, 2023
161edb1
Merge branch 'master' into branch-FixPED
ruth-lim Nov 7, 2023
5791c82
Add unit tests for DentistAttributeContainsKeywordsPredicate used in …
Nov 7, 2023
b7e7449
Update UG for add-appointment
Nov 7, 2023
a3e59cd
Merge branch 'AY2324S1-CS2103T-W10-3:master' into appt-test
qyaner Nov 7, 2023
0f314da
Merge branch 'branch-FixPED' into branch-dentist-test
freddychenyouren2 Nov 7, 2023
413d061
Add test cases for AddDentistCommandParserTest.java
freddychenyouren2 Nov 7, 2023
63e3aaf
Add unit tests for SearchDentistCommandParser
Nov 7, 2023
7aea775
Add test cases for DentistTest.java
freddychenyouren2 Nov 7, 2023
5a821d3
Add unit tests for SearchPatientCommandParser
Nov 7, 2023
95aa8e7
Merge branch 'master' of https://github.com/techjay-c/tp into add-mor…
Nov 7, 2023
3ba132e
Change "Layout" to "Getting familiar to ToothTracker's interface"
Nov 7, 2023
351f2e1
Add in add-patient stuff into dg
SynapseProgramming Nov 7, 2023
90e972e
Improve installation instructions section
Nov 7, 2023
53a853b
Add troubleshooting section
Nov 7, 2023
1646100
Merge pull request #210 from qyaner/appt-test
qyaner Nov 8, 2023
59dcb91
Add in Search Patient Activity diagram
SynapseProgramming Nov 8, 2023
7016dd2
Add in delete patient section
SynapseProgramming Nov 8, 2023
6131692
Add in SearchPatientSequenceDiagram
SynapseProgramming Nov 8, 2023
17e6ff2
Add in FilterPatientActivityDiagram
SynapseProgramming Nov 8, 2023
d000350
Merge pull request #207 from freddychenyouren2/branch-FixPED
freddychenyouren2 Nov 8, 2023
12ca1fa
Add in FilterPatientSequenceDiagram
SynapseProgramming Nov 8, 2023
b36497f
Revert isSameDentist() to check only for same name, rather than same …
freddychenyouren2 Nov 8, 2023
0991a4d
Add in search and filter sections into DG
SynapseProgramming Nov 8, 2023
c7765ee
Merge branch 'master' into branch-dentist-test
freddychenyouren2 Nov 8, 2023
012fb8c
Update SearchPatientCommandTest to check for equality
Nov 8, 2023
09cae95
Update SearchDentistCommandTest to check for equality
Nov 8, 2023
8a17c46
Merge pull request #209 from techjay-c/add-more-unit-tests
techjay-c Nov 8, 2023
947f0a5
Refactor Quick Start section to separate MarkDown file
Nov 8, 2023
3f79837
Update SearchDentistActivityDiagram in DG
Nov 8, 2023
795b6c0
Update FilterDentistActivityDiagram in DG
Nov 8, 2023
0643918
Update "Trying out first command" section
Nov 8, 2023
82fd9f9
Add "Using ToothTracker's CLI" section
Nov 8, 2023
1c5b77f
Add logo to `site-title`
Nov 8, 2023
e5bb17e
Add in Add patient activity diagram
SynapseProgramming Nov 8, 2023
1e9714f
Add in add treatment activity diagram
SynapseProgramming Nov 8, 2023
866fed3
Add diagrams for AddDentist in DG and Update diagrams for DeleteDentist
Nov 8, 2023
6a56294
Add in delete treatment sequence diagram
SynapseProgramming Nov 8, 2023
b5a7e5a
shift DeleteTreatmentSequenceDiagram to image folder
SynapseProgramming Nov 8, 2023
068d76b
Add diagrams for SearchPatientCommand in DG
Nov 8, 2023
1e60d22
Add diagrams for FilterPatient and FilterDentist commands
Nov 8, 2023
0686b3a
Add in treatment section into dg
SynapseProgramming Nov 8, 2023
1ff0662
Change introduction to be user-centric
Nov 9, 2023
671f5d9
Fix bug on invalid dates and future dates on Birthday field of a patient
freddychenyouren2 Nov 9, 2023
56638ec
Merge branch 'branch-FixPED' of https://github.com/freddychenyouren2/…
freddychenyouren2 Nov 9, 2023
af1f8ec
Add FilterAppointmentCommandTest
Nov 9, 2023
62f2d3d
Update AddDentistSequenceDiagram in DG
Nov 9, 2023
7e8ade1
Fix checkstyle
Nov 9, 2023
33005cf
Add FilterAppointmentCommandParserTest
Nov 9, 2023
210ef99
Fix checkstyle
Nov 9, 2023
07d79b7
Add AddAppointmentParserTest
Nov 9, 2023
2f26a16
Fix checkstyle
Nov 9, 2023
da80ff0
Remove address book delete commands
Nov 9, 2023
d98a8ec
Add JsonAdaptedAppointmentTest
Nov 9, 2023
685d6c4
Fix checkstyle
Nov 9, 2023
ed1c0e2
Update AddAppointmentActivityDiagram
Nov 9, 2023
5ceef04
Update AddAppointmentActivityDiagram
Nov 9, 2023
9b1740a
Add AddAppointmentSequenceDiagram
Nov 9, 2023
99fb2df
Update AddAppointmentSequenceDiagram
Nov 9, 2023
57562f0
Add in AddAppointmentSequenceDiagram.png
Nov 9, 2023
4238f78
Add delete-appointment and filter-appointment activity diagrams
Nov 9, 2023
980a560
Merge pull request #212 from freddychenyouren2/branch-dentist-test
ruth-lim Nov 9, 2023
cc90a5d
Merge pull request #216 from qyaner/filter-appt-test
ruth-lim Nov 9, 2023
1a47eaa
Add unit testing for UniquePatientList
Nov 9, 2023
4d311e2
Add unit testing for JsonSerializableAddressBook
Nov 9, 2023
a52dad3
Merge branch 'master' into branch-update-dg
Nov 9, 2023
df64aee
Add appointment-related commands into Manual Testing section
Nov 9, 2023
01bf78c
Merge branch 'master' into branch-FixPED
freddychenyouren2 Nov 10, 2023
d64df37
Merge pull request #214 from techjay-c/add-DG-updates
SynapseProgramming Nov 10, 2023
0b5007a
Sync with master
SynapseProgramming Nov 10, 2023
b8c9f3f
Add in add patient sequence diagram
SynapseProgramming Nov 10, 2023
86720a3
Add in DeletePatientActivityDiagram
SynapseProgramming Nov 10, 2023
9e7db40
Standardize colour scheme for activity diagrams
SynapseProgramming Nov 10, 2023
032fdf2
Add in add treatment sequence diagram
SynapseProgramming Nov 10, 2023
6fbce9b
Add in delete treatment activity diagram
SynapseProgramming Nov 10, 2023
7da71b9
Update patient features in DG
Nov 10, 2023
7ea24b6
Merge branch 'master' of https://github.com/techjay-c/tp into add-DG-…
Nov 10, 2023
1a4c8a4
Merge branch 'master' into branch-DG-ManualTesting
freddychenyouren2 Nov 10, 2023
f123bc4
Add manual testing descriptions for add-patient in DG
freddychenyouren2 Nov 10, 2023
ab8bb1b
Add manual testing descriptions for list-patient
freddychenyouren2 Nov 10, 2023
a0a54f1
Add manual testing description for edit-patient.
freddychenyouren2 Nov 10, 2023
36d0f07
Add manual testing descriptions for search-patient
freddychenyouren2 Nov 10, 2023
01ba117
Update PPP
Nov 10, 2023
b7ce91f
Add treatment-related commands into Manual Testing section
Nov 10, 2023
2eeec59
Merge branch 'master' of https://github.com/qyaner/tp into dg
Nov 10, 2023
2ed22be
Increase margins for headers and alert
Nov 10, 2023
227ea95
Add in Patient MSS
SynapseProgramming Nov 10, 2023
d20e078
Fix dentist typos
SynapseProgramming Nov 10, 2023
9ddfcd9
Merge pull request #220 from ruth-lim/branch-update-dg
SynapseProgramming Nov 10, 2023
3e040c1
Merge branch 'master' into patient-DG
SynapseProgramming Nov 10, 2023
18531b6
Add appointment features into DG
Nov 10, 2023
6239033
Add sequence diagram for filter-appointment
Nov 10, 2023
173ce42
Merge branch 'master' of https://github.com/qyaner/tp into dg
Nov 10, 2023
fcc2d65
Add use cases for appointment features
Nov 10, 2023
bb5720a
Merge pull request #213 from SynapseProgramming/patient-DG
qyaner Nov 10, 2023
73701ee
Merge branch 'master' of https://github.com/qyaner/tp into dg
Nov 10, 2023
ef096ff
Add newline at end of file
Nov 10, 2023
1a8fa36
Merge pull request #217 from ruth-lim/branch-unit-testing
ruth-lim Nov 10, 2023
fbe416c
Merge pull request #221 from qyaner/dg
SynapseProgramming Nov 10, 2023
347682e
Merge pull request #218 from freddychenyouren2/branch-FixPED
SynapseProgramming Nov 10, 2023
97e8a52
remove full stop
SynapseProgramming Nov 10, 2023
35c3a6d
Add manual testing descriptions for filter-patient.
freddychenyouren2 Nov 10, 2023
975d2a1
Add in GenderTest
SynapseProgramming Nov 10, 2023
43abcdb
Add in BirthdateTest
SynapseProgramming Nov 10, 2023
9b2bd16
Update Introduction and How to use User Guide sections
Nov 10, 2023
f02ef98
Remove "." from the numberings
Nov 10, 2023
299bc5d
Change example images in "Trying out your first commands" section
Nov 10, 2023
df32f49
Merge branch 'master' into branch-update-ug
Nov 10, 2023
0800dbb
Fix error for unordered list
Nov 10, 2023
f17cdea
Increase line height for alerts
Nov 10, 2023
12798be
Update PPP
Nov 10, 2023
d09db89
Merge pull request #223 from ruth-lim/branch-update-ppp
ruth-lim Nov 10, 2023
85bfb1b
Add in SpecializationTest
SynapseProgramming Nov 11, 2023
f132c7f
Add in Yoe Test
SynapseProgramming Nov 11, 2023
c0d72a1
Add more manual testing descriptions
freddychenyouren2 Nov 11, 2023
27ff81b
Merge branch 'master' into branch-DG-ManualTesting
freddychenyouren2 Nov 11, 2023
f536810
Update formatting of numbering for manual testing
freddychenyouren2 Nov 11, 2023
e4a94ac
Fix some typo and format errors.
freddychenyouren2 Nov 11, 2023
54accd1
Merge branch 'branch-DG-ManualTesting' into branch-DG-Storage
freddychenyouren2 Nov 11, 2023
254faf2
Merge branch 'master' into branch-ppp-freddy
freddychenyouren2 Nov 11, 2023
5779b4f
Merge pull request #224 from freddychenyouren2/branch-DG-ManualTesting
SynapseProgramming Nov 11, 2023
9ad07d2
Merge branch 'master' into ug-updates
SynapseProgramming Nov 11, 2023
c573fd0
Update unit tests for removal of full stop.
SynapseProgramming Nov 11, 2023
f8fb5cf
Add Quick Notes section
Nov 11, 2023
130739b
Update PPP (11 Nov 2023)
freddychenyouren2 Nov 11, 2023
c45a86b
Fix test case issues
SynapseProgramming Nov 11, 2023
9e96a2f
Merge pull request #225 from SynapseProgramming/ug-updates
SynapseProgramming Nov 11, 2023
9ef870a
Update Quick Notes section
Nov 11, 2023
adf0244
Add reuse credits
Nov 11, 2023
45227d5
Merge branch 'branch-update-ug' into master
Nov 11, 2023
53ebcbb
Merge branch 'master' of https://github.com/techjay-c/tp into add-DG-…
Nov 11, 2023
e458590
Update DeletePatientActivityDiagram
Nov 11, 2023
0e6ac08
Update DeletePatientSequenceDiagram
Nov 11, 2023
b96c57e
Update some diagrams in DG
Nov 11, 2023
e041e20
Update PPP
Nov 11, 2023
1dc1856
Update DG to include Future Enhancements
Nov 11, 2023
1ca2726
Merge pull request #227 from techjay-c/add-DG-updates
techjay-c Nov 12, 2023
0608907
Fix incorrect names
SynapseProgramming Nov 12, 2023
522dfce
Remove tags
SynapseProgramming Nov 12, 2023
4c26d13
Add in quick notes and list treatment feature enhancements
SynapseProgramming Nov 12, 2023
559cb46
Add in appointment related enhancements
SynapseProgramming Nov 12, 2023
52ff5e6
Update UG
Nov 12, 2023
9c4cd51
Add acknowledgement for `CalendarFX` library used
Nov 12, 2023
aa4dd61
Update internal link
Nov 12, 2023
1674e7e
Merge pull request #226 from ruth-lim/branch-update-ug
ruth-lim Nov 12, 2023
0168cb4
Update PPP
Nov 12, 2023
4a44ec0
Update User Stories to match v1.3 of ToothTracker
freddychenyouren2 Nov 12, 2023
7a734d0
Rephrase user stories benefits to be more user-centric
freddychenyouren2 Nov 12, 2023
5111e0d
Update DG and UG
Nov 12, 2023
6008c7c
Update User Stories for consistency of description
freddychenyouren2 Nov 12, 2023
913ac5b
Merge pull request #228 from SynapseProgramming/DG-updates
SynapseProgramming Nov 12, 2023
9192b7c
Merge branch 'master' into branch-DG-General
freddychenyouren2 Nov 12, 2023
41eee04
Update formatting of User Stories
freddychenyouren2 Nov 12, 2023
7db0c5a
Merge branches 'master' and 'master' of https://github.com/ruth-lim/tp
Nov 12, 2023
3b468dd
Merge branch 'master' of https://github.com/qyaner/tp into ugdg
Nov 12, 2023
58b2b78
Add toc for PPP
Nov 12, 2023
9f00610
Update VALIDATION_REGEX for Names to accept ending alphanumeric chara…
freddychenyouren2 Nov 12, 2023
a5b7885
Update PPP (12 Nov 2023)
freddychenyouren2 Nov 12, 2023
c03d679
Add in fields summary
SynapseProgramming Nov 12, 2023
2a7a80e
Fix typo
SynapseProgramming Nov 12, 2023
7c473f2
updated PPP
SynapseProgramming Nov 12, 2023
965d7da
Merge pull request #230 from qyaner/ugdg
qyaner Nov 12, 2023
42bee52
Add in warnings about indices
SynapseProgramming Nov 12, 2023
3b0c728
Merge pull request #231 from SynapseProgramming/UG-update
SynapseProgramming Nov 12, 2023
1b80bea
Merge pull request #229 from freddychenyouren2/branch-DG-General
SynapseProgramming Nov 12, 2023
ccd357b
Update FilterDentistCommand to fix bug for filtering by more than 1 a…
Nov 12, 2023
a90ae49
Update FilterDentist and FilterPatient commands to fix bugs relating …
Nov 12, 2023
8bd42e8
Update UG
Nov 12, 2023
d1934dd
Merge branch 'master' of https://github.com/techjay-c/tp into add-fix…
Nov 12, 2023
f0fc7c4
Merge branch 'master' into branch-FixPED
freddychenyouren2 Nov 12, 2023
fd4bee3
Update UG to ensure consistency and accuracy. Update certain command …
Nov 12, 2023
8139125
Merge pull request #233 from techjay-c/add-fix-last-bugs
techjay-c Nov 13, 2023
cf6d71f
Merge pull request #232 from freddychenyouren2/branch-FixPED
freddychenyouren2 Nov 13, 2023
fa749cf
Update PPP on PR links (13 Nov 2023)
freddychenyouren2 Nov 13, 2023
56b3dab
Merge branch 'master' into branch-ppp-freddy
freddychenyouren2 Nov 13, 2023
1d654fc
Merge branch 'master' into branch-DG-Storage
freddychenyouren2 Nov 13, 2023
2dae77a
Merge pull request #234 from freddychenyouren2/branch-ppp-freddy
SynapseProgramming Nov 13, 2023
7928c55
Merge pull request #235 from freddychenyouren2/branch-DG-Storage
SynapseProgramming Nov 13, 2023
871691e
Update AboutUs
Nov 13, 2023
cebfb0a
Update PPP
Nov 13, 2023
e8a1b91
Merge branch 'AY2324S1-CS2103T-W10-3:master' into master
ruth-lim Nov 13, 2023
97a04fa
Add in delete-treatment warning
SynapseProgramming Nov 13, 2023
67be551
Update Acknowledgemnents for UG and DG
Nov 13, 2023
9639d3c
Merge branch 'master' of https://github.com/ruth-lim/tp
Nov 13, 2023
947661c
Merge pull request #236 from SynapseProgramming/master
SynapseProgramming Nov 13, 2023
e483743
Merge pull request #237 from ruth-lim/master
SynapseProgramming Nov 13, 2023
3015a8d
Update PPP
Nov 13, 2023
96f3655
Fix final formatting issues in DG
Nov 13, 2023
c2442fb
Merge pull request #238 from techjay-c/add-fix-last-bugs
techjay-c Nov 13, 2023
d2b6b06
Update PPP
Nov 13, 2023
c757447
Add print settings
Nov 13, 2023
712b8f8
Update all screenshots
Nov 13, 2023
757bbed
Reformat all tip boxes
Nov 13, 2023
239f998
Update call-out text boxes
Nov 13, 2023
df9af0a
Add page breaks to print UG
Nov 13, 2023
33988ec
Final version of PPP
Nov 13, 2023
af961da
Merge pull request #239 from techjay-c/add-fix-last-bugs
techjay-c Nov 13, 2023
22a5a40
Update DG to convert to PDF
Nov 13, 2023
38c5d63
Update notes
Nov 13, 2023
211d5f3
Add caution message for delete treatment
Nov 13, 2023
f5294fb
Merge branch 'master' into branch-generate-pdf
ruth-lim Nov 13, 2023
d045fb4
Fix build issues
Nov 13, 2023
4ebcf30
Add code reuse credit
Nov 13, 2023
c6abc36
Merge branch 'branch-generate-pdf' of https://github.com/ruth-lim/tp …
Nov 13, 2023
b07da78
Merge pull request #240 from ruth-lim/branch-generate-pdf
SynapseProgramming Nov 14, 2023
98d939c
Merge pull request #241 from ruth-lim/branch-update-ppp
SynapseProgramming Nov 14, 2023
4dfddcd
Fix typos in fields summary
SynapseProgramming Nov 14, 2023
42e3772
Merge pull request #242 from SynapseProgramming/UG-changes
SynapseProgramming Nov 14, 2023
69181ef
Fix broken logic class diagram
SynapseProgramming Nov 14, 2023
2a74f68
Fix broken logic class diagram
SynapseProgramming Nov 14, 2023
1e7c1c0
Merge pull request #243 from SynapseProgramming/UG-changes
SynapseProgramming Nov 14, 2023
98acf02
Final Version of PPP
freddychenyouren2 Nov 14, 2023
1c88cab
Merge pull request #244 from freddychenyouren2/branch-ppp-freddy
SynapseProgramming Nov 14, 2023
e5bbd8a
Final Version PPP 12pm
freddychenyouren2 Nov 14, 2023
e04e4b8
Merge pull request #245 from freddychenyouren2/branch-ppp-freddy
SynapseProgramming Nov 14, 2023
0750ba6
Update UG and DG
Nov 14, 2023
715f510
Merge branch 'master' of https://github.com/techjay-c/tp into add-fix…
Nov 14, 2023
1b3c22b
Update bug
Nov 14, 2023
d24353e
Merge pull request #246 from techjay-c/add-fix-last-bugs
techjay-c Nov 14, 2023
33b7727
fix bug
Nov 14, 2023
c2b539a
Merge pull request #247 from techjay-c/add-fix-last-bugs
techjay-c Nov 14, 2023
130db27
fix
Nov 14, 2023
5e22b82
Merge pull request #248 from techjay-c/add-fix-last-bugs
ruth-lim Nov 14, 2023
0aa007b
Add citations for code reuse according to course policy.
freddychenyouren2 Nov 26, 2023
071b145
Fix Java CI Issues
freddychenyouren2 Nov 26, 2023
5f2dbe9
Merge pull request #249 from freddychenyouren2/branch-citation
SynapseProgramming Nov 29, 2023
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
229 changes: 212 additions & 17 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
@@ -63,7 +63,7 @@ Each of the four main components (also shown in the diagram above),

* defines its *API* in an `interface` with the same name as the Component.
* implements its functionality using a concrete `{Component Name}Manager` class (which follows the corresponding
API `interface` mentioned in the previous point.
API `interface` mentioned in the previous point).

For example, the `Logic` component defines its API in the `Logic.java` interface and implements its functionality using
the `LogicManager.java` class which follows the `Logic` interface. Other components interact with a given component
@@ -113,11 +113,11 @@ Here's a (partial) class diagram of the `Logic` component:
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., `DeletePatientCommandParser`) 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., `DeletePatientCommand`) which
is executed by the `LogicManager`.
1. The command can communicate with the `Model` when it is executed (e.g. to delete a person).
1. The result of the command execution is encapsulated as a `CommandResult` object which is returned back from `Logic`.
a parser that matches the command (e.g., `DeletePatientCommandParser`) and uses it to parse the command.
2. This results in a `Command` object (more precisely, an object of one of its subclasses e.g., `DeletePatientCommand`) which
is executed by the `LogicManager`.
3. The command can communicate with the `Model` when it is executed (e.g. to delete a person).
4. The result of the command execution is encapsulated as a `CommandResult` object which is returned back from `Logic`.

The sequence diagram below illustrates the interactions within the `Logic` component, taking `execute("delete-patient 1")` API
call as an example.
@@ -189,10 +189,10 @@ This section describes some noteworthy details on how certain features are imple
The features implemented are categorized into 4 sections:

1. [Dentist Features](#dentist-features)
1. [Patient Features](#patient-features)
1. [Appointment Features](#appointment-features)
1. [Treatment Features](#treatment-features)
1. [General Features](#general-features)
2. [Patient Features](#patient-features)
3. [Appointment Features](#appointment-features)
4. [Treatment Features](#treatment-features)
5. [General Features](#general-features)

### Dentist Features

@@ -432,6 +432,90 @@ keyword is of a valid type for that particular attribute. Users are responsible

### Appointment Features

#### Adding an Appointment

The `add-appointment` command creates a new appointment record in ToothTracker.

The activity diagram for creating a new appointment is illustrated as follows:

![AddAppointmentActivityDiagram](images/AddAppointmentActivityDiagram.png)

The sequence diagram shows the interactions between the various components during the execution of the `add-appointment` command:

![AddAppointmentSequenceDiagram](images/AddAppointmentSequenceDiagram.png)

##### Feature Details

1. Users provide essential appointment information, such as the dentist ID, patient ID, appointment start time and treatment name.
2. In case of missing or invalid command arguments, the system prompts users with an error message to enter the command correctly.
3. The system retrieves information about the treatment cost, duration, dentist and patient from the `Model` using the information provided by the user.
4. The system checks the new appointment's time slot with existing appointments in the `Model` to prevent clashing appointments.
If a timing clash is found, an error message informs the user.
5. If step 4 is completed without any exceptions, the new appointment record is created and stored in the system.

##### Feature Considerations

For the dentist ID, patient ID and treatment field, it is mandatory that the specified dentist, patient and treatment exists in ToothTracker.
If these conditions are not met, the user will receive an error message.

#### Deleting an Appointment

The `delete-appointment` command deletes an appointment record from ToothTracker.

The activity diagram for deleting an appointment is illustrated as follows:

![DeleteAppointmentActivityDiagram](images/DeleteAppointmentActivityDiagram.png)

The sequence diagram shows the interactions between the various components during the execution of the `delete-appointment` command:

![DeleteAppointmentSequenceDiagram](images/DeleteAppointmentSequenceDiagram.png)

##### Feature Details

1. The user specifies an appointment id that represents an `Appointment` to be deleted.
2. If an invalid `APPOINTMENT_ID` is provided, an error is thrown and the user is prompted to enter the command correctly via an error message.
3. The Appointment is cross-referenced in the `Model` to check if it exists. If it does not, then an error is raised to inform the user.
4. If step 3 completes without any exceptions, then the `Appointment` is successfully deleted.

##### Feature Considerations

In implementing the delete feature, we needed proper error handling and validation to ensure ToothTracker's robustness and provide clear guidance to the user.
Our approach validates appointment ID and shows an error message if the appointment does not exist.
This is in comparison to allowing commands to fail silently if appointment does not exist.

- Pros: Prevents invalid operations and provides immediate feedback to the user, helping to correct mistakes.
- Cons: Additional validation checks add complexity to the code.


#### Filtering an Appointment

The `filter-appointment` command filters appointments by DENTIST_ID or PATIENT_ID.

The activity diagram for filtering an appointment is illustrated as follows:

![FilterAppointmentActivityDiagram](images/FilterAppointmentActivityDiagram.png)

The sequence diagram shows the interactions between the various components during the execution of the `filter-appointment` command:

![DeleteAppointmentSequenceDiagram](images/FilterAppointmentSequenceDiagram.png)

##### Feature Details

1. Users initiate a filter for appointments using either a unique `DENTIST_ID` or a unique `PATIENT_ID`.
2. If an invalid `DENTIST_ID` or `PATIENT_ID` is provided, an error is thrown and the user is prompted to enter the command correctly via an error message.
3. If the user opts to filter by `DENTIST_ID`, the system processes the request to return a list of appointments with the specific dentist.
4. If the user opts to filter by `PATIENT_ID`, the system processes the request to return a list of appointments with the specific patient.
5. If there are no appointments with the specific dentist or patient, the system informs the user that no appointments were found with the specific dentist or patient.

##### Feature Considerations

Validity checks are performed to ensure that the `DENTIST_ID` or `PATIENT_ID` are valid and that they type of ID to filter by is clearly stated.
Otherwise, user would receive an error message that guides them to input the right command and details.

If no appointments with the specific dentist or patient are found in ToothTracker, it should be clearly
communicated to the user instead of just displaying an empty list. A message stating that no appointments with the
specified `DENTIST_ID` or `PATIENT_ID` are found would be displayed to the user.

### Treatment Features

#### Adding a Treatment
@@ -823,13 +907,13 @@ Use case ends.

Use Case Ends.

**Use case: Add Appointment**
**Use case: Add an Appointment**

**MSS**

1. User submits a request to add a new future appointment, providing information about the appointment.
Information includes dentist ID, patient ID, appointment start time and treatment provided during the appointment.
3. ToothTracker acknowledges the request to add the new appointment.
Information includes dentist ID, patient ID, appointment start time and treatment provided during the appointment.
2. ToothTracker acknowledges the request to add the new appointment.

Use case ends.

@@ -842,23 +926,135 @@ Use case ends.

Use case continues from step 2.


- **1b. User inputs a treatment that does not exist in the database**
- ToothTracker checks the database and finds that the treatment provided does not exist.
- ToothTracker alerts the user that the treatment is not provided in the clinic.
- Steps within 1b loop until an existing treatment is provided.


- **1c. User inputs a dentist or patient ID that does not exist in the database**
- ToothTracker checks the database and finds that the dentist or patient ID provided does not exist.
- ToothTracker alerts the user that the patient or dentist with the provided patient or dentist ID does not exist in this clinic.
- Steps within 1c loop until valid dentist and patient IDs are provided.


- **1d. User inputs an appointment time slot that clashes with an existing one in the database**
- ToothTracker checks the database and finds that the appointment to be added clashes with an existing one.
- ToothTracker alerts the user about the clashing appointments.
- Steps within 1d loop until an appointment time slot that does not clash with an existing appointment is provided.

Use case resumes at step 1.


**Use Case: Delete an Appointment**

**MSS**

1. User submits a request to delete an appointment:
- User specifies the appointment ID [APPOINTMENT ID] to delete.

2. ToothTracker searches for the appointment entry:
- ToothTracker looks for an appointment with the matching ID.

3. ToothTracker shows the appointment entry that matches the request:
- If a match is found:
- User confirms the deletion of the specified appointment.

4. ToothTracker deletes the appointment:
- Appointment entry is removed from the database.

Use Case Ends.

**Extensions**

* 2a. The list is empty:
- ToothTracker displays a message indicating no appointments are saved in its system.

Use Case Ends.


* 3a. No matching appointment found:
- ToothTracker displays an error message.

Use Case resumes at step 2.


* 3b. Invalid appointment ID:
- ToothTracker displays an error message.

Use Case ends.


* 4a. Deletion is cancelled by the user:
- ToothTracker cancels the deletion process.
- Use Case ends.

**Use case: List Appointment Data**

**MSS**

1. User submits a request to list all appointment data.
2. ToothTracker retrieves the list of all appointment data saved in the system.
3. ToothTracker displays the list of appointments to the user.

Use case ends.

**Extensions**

- **1a. User inputs an invalid command.**
- ToothTracker identifies the command error.
- ToothTracker prompts the user to make the necessary adjustments and provide the command in the correct format.
- Steps within 1a repeat until a valid `list-appointment` command is provided.

Use case continues from step 2.


- **2a. No appointment data available.**
- ToothTracker checks and finds that there are no appointment records in the system.
- ToothTracker informs the user that no appointment data is available.

Use case continues from step 2.


**Use Case: Filter Appointments**

**MSS**

1. User submits a request to filter appointments:
- User specifies filter criteria, which can be either a dentist ID [DENTIST ID] or a patient ID [PATIENT ID].

2. ToothTracker filters appointment list based on the criteria:
- If the request specifies [DENTIST ID]:
- ToothTracker filters the appointment list by the specified dentist ID.
- If the request specifies [PATIENT ID]:
- ToothTracker filters the appointment list by the specified patient ID.

3. ToothTracker displays the filter results:
- ToothTracker lists the matching appointments and their details.

Use Case Ends.

**Extensions**

* 2a. The list of appointment is empty:
- ToothTracker displays a message indicating that no appointments are saved in its system.

Use Case Ends.


* 3a. No matching appointments found:
- ToothTracker displays a message indicating no matching appointments were found.

Use Case Ends.


* 3b. Invalid appointment ID:
- ToothTracker displays an error message.

Use Case Ends.


**Use case: Add Treatment**

**MSS**
@@ -993,8 +1189,7 @@ testers are expected to do more *exploratory* testing.
1. Resize the window to an optimum size. Move the window to a different location. Close the window.
2. Re-launch ToothTracker by double-clicking the jar file.<br>
Expected: The most recent window size and location is retained.

4. _{ more test cases …​ }_
3. _{ more test cases …​ }_

## Dentist

@@ -1172,7 +1367,7 @@ Expected Output in the Command Output Box: Error message for invalid command for

### Listing all Appointments

Prerequisite: THere is at least 1 Appointment stored in ToothTracker.
Prerequisite: There is at least 1 Appointment stored in ToothTracker.

`list-appointment`

@@ -1297,4 +1492,4 @@ Expected Output: ToothTracker application closes.

1. _{explain how to simulate a missing/corrupted file, and the expected behavior}_

1. _{ more test cases …​ }_
2. _{ more test cases …​ }_
33 changes: 33 additions & 0 deletions docs/diagrams/AddAppointmentActivityDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@startuml
start
:User executes "add-appointment" command with required details;

if () then ([valid command])
:Check if treatment exists in model;

if () then ([treatment is valid])
:Check if dentist and patient exists in model;

if () then ([dentist and patient are valid])
:Check if appointment clashes with existing appointment in model;
if () then ([appointment does not clash])
:Add new appointment to model;
:Return message to show new appointment added;
else ([else])
:Throw CommandException for clashing appointments;
endif

else ([else])
:Throw CommandException for invalid dentist or patient;
endif

else ([else])
:Throw CommandException for invalid treatment;
endif

else ([else])
:Display error message for invalid command;
endif

stop
@enduml
Loading