-
Notifications
You must be signed in to change notification settings - Fork 4
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
Implemented AddVisit and DeleteVisit feature #27
Conversation
…markCommandParser to AddVisitCommandParser improvement: add JsonAdaptedVisit.java
…and save them in the json file
… chosen patient when user uses deleteVisit command only specifying index of patient feat(deleteVisit): add deleteVisit command to delete visit record by index when user uses deleteVisit command with both index of patient and index of report to be deleted
docs: checkstyle compliance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good progress for mid-milestone, may want to look at refactoring Person
to Patient
. To discuss how we want to structure Diagnosis and Remarks, perhaps.
100/100 for TypicalVisits
test (good example on how Visit is structured, CC @gachia @Wingedevil @Q-gabe).
LGTM.
@gachia can you change the Coveralls threshold or remove it as a merge prerequisite? |
Done. Lowered Threshold for Coveralls. |
AddVisit
addVisit takes in index of person and formatted date (dd/mm/yyyy) and calls handleAddVisit function of MainWindow.
handleAddVisit function of MainWindow shows VisitRecordWindow, which is a form for the user to fill in.
Pressing the submit button/F2 key will call SaveVisitCommand which takes the index and date passed from AddVisitCommand and the user's input on the form to add new VisitReport with all the relevant fields filled in to the Person's VisitList.
Saved reports can be found in the addressbook.json file in the data folder
DeleteVisit
deleteVisit takes in index of the person and the index of the record to be deleted
Everytime deleteVisit is run, handleDeleteVisit function of MainWindow will run to show a list of VisitRecords of the chosen person.
If the second argument (index of the record) is empty, pop up list will still show up and no changes would be made to the chosen Person.