Package Controllers.MRManagers
Class DoctorMRM
java.lang.Object
Common.MedicalRecordsManager
Controllers.MRManagers.DoctorMRM
The
DoctorMRM
class extends MedicalRecordsManager
to provide
functionalities specific to managing medical records for patients by doctors.
It allows doctors to view, edit, and update patient records.-
Field Summary
Fields inherited from class Common.MedicalRecordsManager
medicalRecordDatabase
-
Constructor Summary
ConstructorsConstructorDescriptionDoctorMRM
(MedicalRecordDatabase medicalRecordDatabase, AccountDatabase accountDatabase) Constructs aDoctorMRM
with the specified medical record database and account database. -
Method Summary
Modifier and TypeMethodDescriptionboolean
addDiagnoses
(String id, String diagnose) Adds a diagnosis to a specific patient record.boolean
addTreatments
(String id, String treatment) Adds a treatment to a specific patient record.boolean
editDiagnoses
(String id, int index, String diagnose) Edits an existing diagnosis in a specific patient record.boolean
editTreatments
(String id, int index, String treatment) Edits an existing treatment in a specific patient record.boolean
setBloodType
(String id, BloodType bloodType) Sets the blood type for a specific patient record.boolean
Views all patient medical records managed by the doctor.Methods inherited from class Common.MedicalRecordsManager
getRecord, viewDiagnoses, viewRecord, viewTreatments
-
Constructor Details
-
DoctorMRM
Constructs aDoctorMRM
with the specified medical record database and account database.- Parameters:
medicalRecordDatabase
- theMedicalRecordDatabase
used to manage medical recordsaccountDatabase
- theAccountDatabase
used to manage accounts
-
-
Method Details
-
viewAllRecords
public boolean viewAllRecords()Views all patient medical records managed by the doctor.- Returns:
- true if records were successfully viewed; false if no records exist
-
setBloodType
Sets the blood type for a specific patient record.- Parameters:
id
- the unique identifier of the patient whose blood type is to be setbloodType
- the new blood type to set for the patient- Returns:
- true if the blood type was successfully set; false if not found
-
addDiagnoses
Adds a diagnosis to a specific patient record.- Parameters:
id
- the unique identifier of the patient whose diagnosis is to be addeddiagnose
- the diagnosis to add- Returns:
- true if the diagnosis was successfully added; false if not found or invalid input
-
addTreatments
Adds a treatment to a specific patient record.- Parameters:
id
- the unique identifier of the patient whose treatment is to be addedtreatment
- the treatment to add- Returns:
- true if the treatment was successfully added; false if not found or invalid input
-
editDiagnoses
Edits an existing diagnosis in a specific patient record.- Parameters:
id
- the unique identifier of the patient whose diagnosis is to be editedindex
- the index of the diagnosis to edit (1-based index)diagnose
- the new diagnosis value- Returns:
- true if the diagnosis was successfully edited; false if not found or invalid input
-
editTreatments
Edits an existing treatment in a specific patient record.- Parameters:
id
- the unique identifier of the patient whose treatment is to be editedindex
- the index of the treatment to edit (1-based index)treatment
- the new treatment value- Returns:
- true if the treatment was successfully edited; false if not found or invalid input
-