COMP642 web page.

Design and implement in Python, a set of classes that work together to manage information for a small medical centre. Once implemented, the application must be able to:
• Keep track of doctors, patients and consultations.
• Create doctors.
• Create patients.
• Assign doctor to a patient.
• Add a consultation.
• Search for a doctor.
• Display doctor’s information.
• Search for a patient.
• Display patient’s information.
• Display consultation report.
• Display all patients.
• Display all doctors.
• Display patient list for a particular doctor.
• Display consultation list for a particular doctor.
• Display consultation list for a particular patient.
Your design should be based on the Model View Controller (MVC) pattern:
• The model deals with the information about patients, doctors, and consultations.
• The controller class should look after creating and maintaining objects in the model.
The system must support the development of different views in which user can interact with the system (such as form, web form or data from files).

The class diagram for this application is shown below, where the Patient, Doctor and Consultation classes are the model, and the Clinic class is the controller.
* myPatients
%. myDoctor
myPatientFName myPatientiD myPatientiName %, nextio
• Properties
myPatients
myconsultations
myConsultations
Consultation
a Fields myCDate
myCDoctor myCPatient %. myCReason %. myfee
• Properties
%. myDoctorCons
%. myDoctors.
a Fields %. myDoctorfName myDoctorlD myDoctorlName %. myDoctorSpec nextiD
• Properties
Figure 1 Class Diagram
Your application must:
• Run correctly to the specified requirements.
• Read the supplied files and create the appropriate doctor and patient objects, files described below.
• Assign a doctor to a patient.
• Add a consultation between a doctor and patient which may contain information about the date, reason for appointment and fee.
• Display full information for a selected doctor with the list of the patients they have and the list of consultations.
• Display full information of a selected patient, the doctor’s name, a list of consultations and the total fees due.
• Display the consultation report for the clinic.
• Have a user interface with:
• appropriate controls o useful feedback
• prevention of input errors
Your code must:
• Make appropriate use of the model and controller classes provided based on the class diagram shown in Figure 1.
• Well-structured and easy to maintain.
• Be appropriately commented.
• Each class must provide getter and setter methods and any other appropriate methods.

What you are to do:
You are to create a Python application to manage the medical centre. The two files
“Patient txt” and “Doctor.txt” contain information about doctors (first name, last name and specialisation) and patient (first name and last name and can be downloaded from COMP642 web page.
1. Implement the class diagram shown in Figure 1 so that:
• A patient can be assigned to a doctor.
• A consultation can be added for a patient and a doctor.
• It provides the following information for a doctor:
• The doctor personal information (id number, full name and specialisation).
• The list of patients.
• The list of consultations with patients.
1000 James Wright General Practitioner
Patient List
100 Misha Patel
101 Kevin Chin
102 Doris Grant
Consultations
01/08/2023 Headache Doris Grant $57.00
01/08/2023 Regular checkup Kevin Chin $50.00
01/08/2023 Bleeding Misha Patel $58.00
Example 1: Possible doctor information report format.
• It should provide the following information for a patient:
• The patient personal information (patient number and full name).
• The doctor information.
• The list of consultations and total fees due.
100 Misha Patel
– Doctor: 1000 James Wright
Consultations
James Wright 1/08/2023 12:00:00 am $58.00
James Wright 10/08/2023 12:00:00 am $50.00
Total Fees Due: $108.00
Example 2: Possible patient information report format.

It should display the consultation report, example below.
Consultation Report for XYZ Medical Center
01/08/2023 Headache Doris Grant $57.00
01/08/2023 Regular Checkup Kevin Chin $50.00
01/08/2023 Bleeding Misha Patel $58.00
10/08/2023 Blood Pressure Check Misha Patel $40.00
Total Fees: $205.00
Example 3: Possible Consultation Report format.
2. Write and test the code for all the classes.
3. Write code for an application that uses the classes to:
• Read the files and create the appropriate doctors and patient objects (your
Controller will have methods to create these objects).
• Implement an appropriately designed view (GUI interface). An example is shown in Figure 2 that will:
• Allow the user to assign a patient to a doctor.
• Allow the user to add a consultation.
• Allow the user to view full information about a selected doctor.
• Allow the user to view full information about a selected patient.
• Allow the user to view the consultation report.
98 Clinic Management System
All doctors
All patients
100 Misha Patel
101 Kevin Chin
102 Doris Grant
103 Andrew Smith
104 Gregory Hart
105 Samantha Bum
106 Candice Biggs
107 Joe Rourke
108 Rowan Chang
109 Henrietta Mann
1000 James Wright
1001 Katie McDonnel
1002 Humphrey Gray
1003 Julius Bames
1004 Vicky Scott
Consultation
Consultation details
Assign a doctor to a patient
consultation
Assign Doctor
Add Consultation
Doctor’s information
Doctor Information
Patient Information
Consultation Report
Patient’s information
Consultation report

4. Your application:
•Does not have to provide facilities for the user to add new doctors or patients, or to delete existing objects.
• Does not have to provide facilities for a user to amend details of consultations, doctors or patients (other than adding new consultations).
Note: You may add additional methods as you see fit. You do not need to replicate the GUI provided in Figure 2. Feel free to design your own user interface.
Model (Patient, Doctor, Consultation)
Controller
User Interface
Error handling
Coding style, comments, clear logic
Marks (out of 100)
Text Files
Doctor.txt
James, Wright, General Practitioner Katie,McDonnell,Gynaecologist Humphrey, Gray,Surgeon Julius, Barnes, Paediatric Vicky,Scott, General Practitioner
Patient. txt
Misha, Patel Kevin, Chin Doris, Grant Andrew,Smith Gregory, Hart Samantha, Burn Candice, Biggs Joe, Rourke Rowan,Chang Henrietta, Mann