[CS2113-T12-1] MediNote#62
Conversation
Updated delete doctor, discharge patient functions
…-branch-update-delete-doctor-function Each function now removes corresponding info in other persons' attributes. Delete doctor removes doctor name in patient's doctorAssigned attribute. Discharge patient removes patient name from doctor's patientsBeingTreated attribute.
Viewing-Patient-Doctor-Attributes-And-Statistics
Added JUnit tests for delete doctor function
Added JUnit tests for delete doctor function
…-jUnit-tests Branch delete doctor j unit tests
…Patients, as well as some cleaning up of codes.
For [Issue #67] Implement Data Storage of all information related to the Doctors and Patients, as well as some cleaning up of codes.
…function For [Issue #67] Merge branch-dataStorage-function into master
wenxin-c
left a comment
There was a problem hiding this comment.
Overall good work so far. There are some comments for your consideration. Keep it up!!
| <<<<<<< HEAD | ||
| # MediNote template | ||
| ======= | ||
| # MediNote project template | ||
| >>>>>>> upstream/master |
There was a problem hiding this comment.
Please remove the arrow heads and separation line due to merge conflicts after resolving them.
|
|
||
| public static void listAllDoctors(ArrayList<Doctor> doctorList) { | ||
| printListDoctorHeader(doctorList.size()); | ||
| int doctorIndex = 1; |
There was a problem hiding this comment.
You might consider converting magic numbers or literals into named constant so that it will be easier to understand, maintain and reuse in your code.
| private static final String LINE_BREAK = "===============================================" + | ||
| "==============================================="; | ||
|
|
||
| public static void ShowStatistics(){ |
There was a problem hiding this comment.
You might consider abstracting this long method into several smaller methods, e.g. a separate method for each stats calculation then use the calculated stats in final calculation.
| private static final String LINE_BREAK = "===============================================" + | ||
| "==============================================="; | ||
|
|
||
| public static void PrintDoctorAttributes(String attribute){ |
There was a problem hiding this comment.
The first letter should be small letter for method name, i.e. printDoctorAttributes.
| case "name": | ||
| for (int i = 0; i < doctors.size(); i++) { | ||
| System.out.println(LINE_BREAK); | ||
| System.out.println((i + 1) + ". " + doctors.get(i).getName()); | ||
| System.out.println(LINE_BREAK); | ||
| } | ||
| break; | ||
| case "specialisation": | ||
| for (int i = 0; i < doctors.size(); i++) { | ||
| System.out.println(LINE_BREAK); | ||
| System.out.println((i + 1) + ". " + doctors.get(i).getName() + ": " + doctors.get(i).getSpecialisation()); | ||
| System.out.println(LINE_BREAK); | ||
| } | ||
| break; | ||
| case "availability": | ||
| for (int i = 0; i < doctors.size(); i++) { | ||
| System.out.println(LINE_BREAK); | ||
| System.out.println((i + 1) + ". " + doctors.get(i).getName() + ": " + doctors.get(i).getAvailability()); | ||
| System.out.println(LINE_BREAK); | ||
| } | ||
| break; | ||
| case "patients": | ||
| for (int i = 0; i < doctors.size(); i++) { | ||
| System.out.println(LINE_BREAK); | ||
| System.out.println((i + 1) + ". " + doctors.get(i).getName() + ": " + doctors.get(i).getPatientsBeingTreated()); | ||
| System.out.println(LINE_BREAK); | ||
| } | ||
| break; | ||
| case "count": | ||
| for (int i = 0; i < doctors.size(); i++) { | ||
| System.out.println(LINE_BREAK); | ||
| System.out.println((i + 1) + ". " + doctors.get(i).getName() + ": " + doctors.get(i).getNumPatientsTreated() + " number of patients treated"); | ||
| System.out.println(LINE_BREAK); | ||
| } | ||
| break; |
| for (int i = 0; i < patients.size(); i++) { | ||
| System.out.println(LINE_BREAK); | ||
| System.out.println((i + 1) + ". " + patients.get(i).getName()); | ||
| System.out.println(LINE_BREAK); | ||
| } |
There was a problem hiding this comment.
Since each of the case block is pretty similar, you might consider abstracting it into a separate method and pass in parameters to decide which method to call/which attribute to get.
| import java.nio.file.Files; | ||
| import java.nio.file.Paths; | ||
|
|
||
| public class ensureFilesExist { |
There was a problem hiding this comment.
Class name must be noun and written in PascalCase, i.e. the first letter must be capital letter as well.
Complete Clean-up of the code based on errors identified by GitHub in-built "build (ubuntu-latest)" test.
Add DG content for Group class
Added user stories, product scope.
Branch 0204 updates
Started on Developer Guide, read desc
Branch user guide
Update UserGuide
Branch user guide
Merge branch 'branch-DG-V1' of https://github.com/AY2425S2-CS2113-T12-1/tp into branch-Developer-Guide
…itecture of MediNote added. Made a diagram and png of overall architecture.
Started on Design and Implementation in Developer Guide. Overall arch…
Developer Guide: Added overall architecture information under design and implementation. Read desc
…-1/tp into branch-Developer-Guide
Branch pe d cj143n
Branch datetime timestamp
Remove redundant trims and empty spaces, update junit test code
Fix indentation levels
Made admission timestamp to be in a datetime format
Branch pe d cj143n
Big changes to update command and reflected it in UG
Branch pe d siqiangz
Updated DG with sequence diagrams for update, patient, doctor functions
Branch pe d siqiangz
Update DG, PPP and AboutUs
Branch pe d siqiangz

MediNote is a desktop app for managing hospital information such as doctor and patient records, optimised for use via a Command Line Interface (CLI).