Package DatabaseItems

Class AppointmentOutcome

java.lang.Object
DatabaseItems.AppointmentOutcome
All Implemented Interfaces:
DatabaseItems

public class AppointmentOutcome extends Object implements DatabaseItems
The AppointmentOutcome class represents the outcome of a medical appointment. It includes details such as appointment ID, doctor ID, patient ID, date, type of service, medication prescribed, consultation notes, and the status of the appointment outcome.
  • Constructor Details

    • AppointmentOutcome

      public AppointmentOutcome(String appointment_id, String doctor_id, String patient_id, String date, String type_of_service, String medication, String consultation_notes, AppointmentOutcomeStatus status)
      Constructs an AppointmentOutcome with specified details.
      Parameters:
      appointment_id - the unique identifier for the appointment
      doctor_id - the unique identifier for the doctor
      patient_id - the unique identifier for the patient
      date - the date of the appointment
      type_of_service - the type of service provided during the appointment
      medication - prescribed medication
      consultation_notes - notes from the consultation
      status - the status of the appointment outcome
    • AppointmentOutcome

      public AppointmentOutcome(String... params)
      Constructs an AppointmentOutcome by deserializing from a set of parameters.
      Parameters:
      params - an array of strings containing appointment details in order: appointment_id, patient_id, doctor_id, date, type_of_service, medication, consultation_notes, status
  • Method Details

    • deserialise

      public void deserialise(String... params)
      Deserializes appointment details from a string array.
      Specified by:
      deserialise in interface DatabaseItems
      Parameters:
      params - an array of strings containing appointment details in order: appointment_id, patient_id, doctor_id, date, type_of_service, medication, consultation_notes, status
    • serialise

      public String serialise()
      Serializes the appointment outcome into a comma-separated string.
      Specified by:
      serialise in interface DatabaseItems
      Returns:
      a string representation of the appointment outcome
    • printItem

      public void printItem()
      Prints the details of the appointment outcome to standard output.
      Specified by:
      printItem in interface DatabaseItems
    • getAppointmentId

      public String getAppointmentId()
      Returns the unique identifier for the appointment.
      Returns:
      the appointment ID
    • getDate

      public String getDate()
      Returns the date of the appointment.
      Returns:
      the date of the appointment
    • getTypeOfService

      public String getTypeOfService()
      Returns the type of service provided during the appointment.
      Returns:
      the type of service
    • getMedication

      public String getMedication()
      Returns the prescribed medication.
      Returns:
      the medication prescribed
    • getConsultationNotes

      public String getConsultationNotes()
      Returns notes from the consultation.
      Returns:
      consultation notes
    • getStatus

      public AppointmentOutcomeStatus getStatus()
      Returns the status of the appointment outcome.
      Returns:
      the status of the outcome
    • getDoctorId

      public String getDoctorId()
      Returns the unique identifier for the doctor associated with this outcome.
      Returns:
      the doctor ID
    • getPatientId

      public String getPatientId()
      Returns the unique identifier for the patient associated with this outcome.
      Returns:
      the patient ID
    • setDate

      public void setDate(String date)
      Sets a new date for the appointment outcome.
      Parameters:
      date - new date for the appointment
    • setTypeOfService

      public void setTypeOfService(String type_of_service)
      Sets a new type of service for the appointment outcome.
      Parameters:
      type_of_service - new type of service
    • setMedication

      public void setMedication(String medication)
      Sets a new medication for the appointment outcome.
      Parameters:
      medication - new medication
    • setConsultationNotes

      public void setConsultationNotes(String consultation_notes)
      Sets new consultation notes for the appointment outcome.
      Parameters:
      consultation_notes - new consultation notes
    • setStatus

      public void setStatus(AppointmentOutcomeStatus status)
      Sets a new status for the appointment outcome.
      Parameters:
      status - new status for the outcome
    • setPatientId

      public void setPatientId(String patient_id)
      Sets a new patient ID for this outcome.
      Parameters:
      patient_id - new patient ID
    • setDoctorId

      public void setDoctorId(String doctor_id)
      Sets a new doctor ID for this outcome.
      Parameters:
      doctor_id - new doctor ID