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

Implement edit patient doctor functionality #107

Conversation

Alteqa
Copy link
Collaborator

@Alteqa Alteqa commented Apr 1, 2024

No description provided.

@Alteqa Alteqa self-assigned this Apr 1, 2024
@Alteqa Alteqa added this to the v1.3 milestone Apr 1, 2024
Copy link

codecov bot commented Apr 1, 2024

Codecov Report

Attention: Patch coverage is 88.23529% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 79.41%. Comparing base (8505500) to head (0c104c9).

Files Patch % Lines
...java/seedu/address/logic/commands/EditCommand.java 84.61% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #107      +/-   ##
============================================
+ Coverage     79.33%   79.41%   +0.08%     
+ Complexity      690      677      -13     
============================================
  Files           109      107       -2     
  Lines          2095     2060      -35     
  Branches        225      218       -7     
============================================
- Hits           1662     1636      -26     
+ Misses          377      369       -8     
+ Partials         56       55       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Alteqa Alteqa changed the title Branch editpatientresolveconflicts Implement edit patient doctor functionality Apr 1, 2024
Phone updatedPhone = editPersonDescriptor.getPhone().orElse(personToEdit.getPhone());
Nric updatedNric = editPersonDescriptor.getNric().orElse(personToEdit.getNric());
DoB updatedDob = editPersonDescriptor.getDob().orElse(personToEdit.getDoB());
return new Patient(updatedNric, updatedName, updatedDob, updatedPhone);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this one can return a doctor too, so might wanna rethink the return statement

import seedu.address.testutil.EditPersonDescriptorBuilder;
import seedu.address.testutil.PersonBuilder;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesnt calling the PersonBuilder throw an error?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep changed it to patientbuilder instead

assertEquals(expected, editPersonDescriptor.toString());
}
}
//package seedu.address.logic.commands;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think this file should be deleted....

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added it back

}

public Person build() {
return new Patient(nric, name, dob, phone);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we returning Patient in person builder? why does person builder still exist lol? just delete this already

@alfaloo alfaloo merged commit a5e0995 into AY2324S2-CS2103T-T15-1:master Apr 3, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement edit doctor functionality Implement edit patient functionality
2 participants