Package DatabaseItems
Class AppointmentOutcome
java.lang.Object
DatabaseItems.AppointmentOutcome
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionAppointmentOutcome
(String... params) Constructs anAppointmentOutcome
by deserializing from a set of parameters.AppointmentOutcome
(String appointment_id, String doctor_id, String patient_id, String date, String type_of_service, String medication, String consultation_notes, AppointmentOutcomeStatus status) Constructs anAppointmentOutcome
with specified details. -
Method Summary
Modifier and TypeMethodDescriptionvoid
deserialise
(String... params) Deserializes appointment details from a string array.Returns the unique identifier for the appointment.Returns notes from the consultation.getDate()
Returns the date of the appointment.Returns the unique identifier for the doctor associated with this outcome.Returns the prescribed medication.Returns the unique identifier for the patient associated with this outcome.Returns the status of the appointment outcome.Returns the type of service provided during the appointment.void
Prints the details of the appointment outcome to standard output.Serializes the appointment outcome into a comma-separated string.void
setConsultationNotes
(String consultation_notes) Sets new consultation notes for the appointment outcome.void
Sets a new date for the appointment outcome.void
setDoctorId
(String doctor_id) Sets a new doctor ID for this outcome.void
setMedication
(String medication) Sets a new medication for the appointment outcome.void
setPatientId
(String patient_id) Sets a new patient ID for this outcome.void
setStatus
(AppointmentOutcomeStatus status) Sets a new status for the appointment outcome.void
setTypeOfService
(String type_of_service) Sets a new type of service for 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 anAppointmentOutcome
with specified details.- Parameters:
appointment_id
- the unique identifier for the appointmentdoctor_id
- the unique identifier for the doctorpatient_id
- the unique identifier for the patientdate
- the date of the appointmenttype_of_service
- the type of service provided during the appointmentmedication
- prescribed medicationconsultation_notes
- notes from the consultationstatus
- the status of the appointment outcome
-
AppointmentOutcome
Constructs anAppointmentOutcome
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
Deserializes appointment details from a string array.- Specified by:
deserialise
in interfaceDatabaseItems
- 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
Serializes the appointment outcome into a comma-separated string.- Specified by:
serialise
in interfaceDatabaseItems
- 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 interfaceDatabaseItems
-
getAppointmentId
Returns the unique identifier for the appointment.- Returns:
- the appointment ID
-
getDate
Returns the date of the appointment.- Returns:
- the date of the appointment
-
getTypeOfService
Returns the type of service provided during the appointment.- Returns:
- the type of service
-
getMedication
Returns the prescribed medication.- Returns:
- the medication prescribed
-
getConsultationNotes
Returns notes from the consultation.- Returns:
- consultation notes
-
getStatus
Returns the status of the appointment outcome.- Returns:
- the status of the outcome
-
getDoctorId
Returns the unique identifier for the doctor associated with this outcome.- Returns:
- the doctor ID
-
getPatientId
Returns the unique identifier for the patient associated with this outcome.- Returns:
- the patient ID
-
setDate
Sets a new date for the appointment outcome.- Parameters:
date
- new date for the appointment
-
setTypeOfService
Sets a new type of service for the appointment outcome.- Parameters:
type_of_service
- new type of service
-
setMedication
Sets a new medication for the appointment outcome.- Parameters:
medication
- new medication
-
setConsultationNotes
Sets new consultation notes for the appointment outcome.- Parameters:
consultation_notes
- new consultation notes
-
setStatus
Sets a new status for the appointment outcome.- Parameters:
status
- new status for the outcome
-
setPatientId
Sets a new patient ID for this outcome.- Parameters:
patient_id
- new patient ID
-
setDoctorId
Sets a new doctor ID for this outcome.- Parameters:
doctor_id
- new doctor ID
-