Package Common
Class MedicalRecordsManager
java.lang.Object
Common.MedicalRecordsManager
- Direct Known Subclasses:
DoctorMRM
,PatientMRM
The
MedicalRecordsManager
class provides functionalities for managing
medical records. It allows retrieval and viewing of medical records, treatments,
and diagnoses associated with a specific user.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMedicalRecordsManager
(MedicalRecordDatabase medicalRecordDatabase) Constructs aMedicalRecordsManager
with the specified medical record database. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves a medical record by user ID.boolean
viewDiagnoses
(String userId) Views diagnoses associated with a user's medical record.boolean
viewRecord
(String userId) Views a medical record by user ID and prints its details.boolean
viewTreatments
(String userId) Views treatments associated with a user's medical record.
-
Field Details
-
medicalRecordDatabase
-
-
Constructor Details
-
MedicalRecordsManager
Constructs aMedicalRecordsManager
with the specified medical record database.- Parameters:
medicalRecordDatabase
- theMedicalRecordDatabase
used to manage medical records
-
-
Method Details
-
getRecord
Retrieves a medical record by user ID.- Parameters:
userId
- the unique identifier of the user whose medical record is to be retrieved- Returns:
- the
MedicalRecord
associated with the user ID, or null if not found
-
viewRecord
Views a medical record by user ID and prints its details.- Parameters:
userId
- the unique identifier of the user whose medical record is to be viewed- Returns:
- true if the record was found and printed; false if not found
-
viewTreatments
Views treatments associated with a user's medical record.- Parameters:
userId
- the unique identifier of the user whose treatments are to be viewed- Returns:
- true if treatments were found and printed; false if not found
-
viewDiagnoses
Views diagnoses associated with a user's medical record.- Parameters:
userId
- the unique identifier of the user whose diagnoses are to be viewed- Returns:
- true if diagnoses were found and printed; false if not found
-