Package Common

Class MedicalRecordsManager

java.lang.Object
Common.MedicalRecordsManager
Direct Known Subclasses:
DoctorMRM, PatientMRM

public class MedicalRecordsManager extends Object
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 Details

  • Constructor Details

    • MedicalRecordsManager

      public MedicalRecordsManager(MedicalRecordDatabase medicalRecordDatabase)
      Constructs a MedicalRecordsManager with the specified medical record database.
      Parameters:
      medicalRecordDatabase - the MedicalRecordDatabase used to manage medical records
  • Method Details

    • getRecord

      public MedicalRecord getRecord(String userId)
      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

      public boolean viewRecord(String userId)
      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

      public boolean viewTreatments(String userId)
      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

      public boolean viewDiagnoses(String userId)
      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