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 project from team repo #5

Merged
merged 19 commits into from
Oct 18, 2023

Conversation

longnguyentan
Copy link
Owner

No description provided.

AaronJT1 and others added 19 commits October 16, 2023 12:01
Currently, Patient class is taking in Department and Record as input

Department and Record are to be created when Patient is created, thus it
shouldnt be an input

Update Patient constructor to remove AssignedDepartment and Record
parameters, also initialiazed them with default values
Currently, the instantiation of Record class does not initialise default
values for other fields.

This means that if a particular program wants to get its attribute
value, it could lead to null value.

Update Record.java to include 3 default initialization values for its
fields
Currently, the sample patients are using outdated fields.

It is important to update the patients to use the new fields.

Add the Gender, IcNumber and Birthday fields to sample Patients
Edit EditCommand.java, EditCommandParser.java, and ParserUtil.java so that we can edit the patient information and its record.
Update EditCommand.java, EditCommandParser.java, and ParserUtil.java
Update AddCommandParser to integrate ParserUtil
Currently, the EditCommand and EditCommandParser classes are
inconsistent in that they contain methods that process
patient attributes that are not parameters into the Edit
command, or certain parts lack the processing of important
attributes.

Fixing this issue will prevent further bugs and lead to
neater code.

Let's,
* Add and remove attributes in the two classes for
consistency
* Make sure that important attributes are mentioned in
parts that were previously lacking them
There is an issue where after PatientBuilder() is called,
it will call RecordBuilder(), which in turn calls
PatientBuilder() again, causing a StackOverflow error.

We need to fix this to get our test cases to pass.

Let's
* Add a new constructor to RecordBuilder that takes in
a PatientBuilder to initialize its patient, instead
of calling PatientBuilder again
* Add new attributes to TypicalPatients

Note that not all of the fields in Typical Patients are
updated! AMY and BOB still need to be updated, which
involves adding new attributes into CommandTestUtilgit add --all
The existing console messages do not display the
new attributes, confusing the user as to what
attributes are available.

Adding them to the messages allow them to view
all the patient's attributes even without the
updated GUI.

Let's update the Add command and patient messages.
@longnguyentan longnguyentan merged commit c6032ac into longnguyentan:master Oct 18, 2023
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants