package TO;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalTime;

import javax.xml.bind.annotation.XmlRootElement;

import common.MedicalTestType;

/**
 * 
 * @author Roberto Orden Erena <rorden@uoc.edu>
 *
 */
@XmlRootElement(name = "MedicalTest")
public class MedicalTestTO implements Serializable {

	private static final long serialVersionUID = 1L;

	private int id;
	private LocalDate date;
	private LocalTime time;
	private String observations;
	private String highresimage;
	private MedicalTestType type;
	private PatientTO patient;
	private SpecialistDoctorTO specialistDoctor;


	public MedicalTestTO() {
		super();
		this.date = LocalDate.now();
		this.time = LocalTime.now();
		this.patient = new PatientTO();
		this.specialistDoctor = new SpecialistDoctorTO();
	}
	
	public MedicalTestTO(int id, LocalDate date, LocalTime time, String observations, String highresimage, MedicalTestType type,
			PatientTO patiend, SpecialistDoctorTO specialistDoctor) {
		this.setId(id);
		this.setDate(date);
		this.setTime(time);
		this.setObservations(observations);
		this.setHighresimage(highresimage);
		this.setType(type);
		this.setPatient(patiend);
		this.setSpecialistDoctor(specialistDoctor);
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public LocalDate getDate() {
		return date;
	}

	public void setDate(LocalDate date) {
		this.date = date;
	}

	public LocalTime getTime() {
		return time;
	}

	public void setTime(LocalTime time) {
		this.time = time;
	}

	public String getObservations() {
		return observations;
	}

	public void setObservations(String observations) {
		this.observations = observations;
	}

	public String getHighresimage() {
		return highresimage;
	}

	public void setHighresimage(String highresimage) {
		this.highresimage = highresimage;
	}

	public MedicalTestType getType() {
		return type;
	}

	public void setType(MedicalTestType type) {
		this.type = type;
	}

	public PatientTO getPatient() {
		return patient;
	}

	public void setPatient(PatientTO patient) {
		this.patient = patient;
	}

	public SpecialistDoctorTO getSpecialistDoctor() {
		return specialistDoctor;
	}

	public void setSpecialistDoctor(SpecialistDoctorTO specialistDoctor) {
		this.specialistDoctor = specialistDoctor;
	}
	
	@Override
	public String toString() {
		return Integer.toString(this.getId());
	}
}
