Skip to content

[CS2113-T12-1] MediNote#62

Open
Li-JunXian wants to merge 390 commits into
nus-cs2113-AY2425S2:masterfrom
AY2425S2-CS2113-T12-1:master
Open

[CS2113-T12-1] MediNote#62
Li-JunXian wants to merge 390 commits into
nus-cs2113-AY2425S2:masterfrom
AY2425S2-CS2113-T12-1:master

Conversation

@Li-JunXian
Copy link
Copy Markdown

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

jhu0748 and others added 12 commits March 29, 2025 02:03
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
Copy link
Copy Markdown

@wenxin-c wenxin-c left a comment

Choose a reason for hiding this comment

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

Overall good work so far. There are some comments for your consideration. Keep it up!!

Comment thread README.md Outdated
Comment on lines +1 to +5
<<<<<<< HEAD
# MediNote template
=======
# MediNote project template
>>>>>>> upstream/master
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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(){
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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){
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The first letter should be small letter for method name, i.e. printDoctorAttributes.

Comment on lines +23 to +57
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;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

There shouldn't be extra indentation in front of case clauses.
E.g.
image

Comment on lines +24 to +28
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);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.
Ashertan256 pushed a commit to Ashertan256/tp that referenced this pull request Mar 30, 2025
siqiangz and others added 13 commits April 2, 2025 15:08
Added user stories, product scope.
Started on Developer Guide, read desc
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
cj143n and others added 30 commits April 8, 2025 06:21
Remove redundant trims and empty spaces, update junit test code
Made admission timestamp to be in a datetime format
Big changes to update command and reflected it in UG
Updated DG with sequence diagrams for update, patient, doctor functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.