- Creado Question transferObject

-- Se le ha añadido la relación con FamilyDoctor inexistente en el diseño inicial
-- Tiene integrado en formato String la response en lugar de un objeto (tabla en BBDD)
- Modificado MedicalTest transferObject
-- Se le ha creado el tipo de dato de prueba médica (en lugar de un entero sin más sentido en BL)
- Actualizado el diseño de BBDD
-- Con las restricciones/características anteriormente comentadas
-- Todas las tablas tienen una PK como INT AI, excepto administrator
- Se actualiza la interfaz para Remoto y el EJB
This commit is contained in:
Roberto Orden Erena
2019-12-15 18:17:32 +01:00
parent 7854ca85bc
commit e5900a8d0f
5 changed files with 280 additions and 60 deletions

View File

@@ -14,17 +14,22 @@ import javax.xml.bind.annotation.XmlRootElement;
public class MedicalTestTO implements Serializable {
private static final long serialVersionUID = 1L;
private int id;
private Date date;
private long time;
private String observations;
private String highresimage;
private int type;
private MedicalTestType type;
private PatientTO patient;
private SpecialistDoctorTO specialistDoctor;
public static enum MedicalTestType {
BLOD_TEST, MAGNETIC_RESONANCE, TAC
}
public MedicalTestTO(int id, Date date, int time, String observations, String highresimage, int type, PatientTO patiend, SpecialistDoctorTO specialistDoctor) {
public MedicalTestTO(int id, Date date, int time, String observations, String highresimage, MedicalTestType type,
PatientTO patiend, SpecialistDoctorTO specialistDoctor) {
this.setId(id);
this.setDate(date);
this.setTime(time);
@@ -33,89 +38,70 @@ public class MedicalTestTO implements Serializable {
this.setType(type);
this.setPatient(patiend);
this.setSpecialistDoctor(specialistDoctor);
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public long getTime() {
return time;
}
public void setTime(long 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 int getType() {
public MedicalTestType getType() {
return type;
}
public void setType(int 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;
}
}

View File

@@ -0,0 +1,102 @@
package TO;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author Roberto Orden Erena <rorden@uoc.edu>
*
*/
@XmlRootElement(name = "Question")
public class QuestionTO implements Serializable {
public static enum QuestionStatus {
ANSWERED, PENDING
}
private static final long serialVersionUID = 1L;
private int id;
private String title;
private String message;
private QuestionStatus status;
private String response;
private PatientTO patient;
private FamilyDoctorTO fdoctor;
public QuestionTO() {
super();
}
public QuestionTO(int id, String title, String message, QuestionStatus status, PatientTO patient,
FamilyDoctorTO fdoctor, String response) {
super();
this.id = id;
this.title = title;
this.message = message;
this.status = status;
this.patient = patient;
this.fdoctor = fdoctor;
this.response = response;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public QuestionStatus getStatus() {
return status;
}
public void setStatus(QuestionStatus status) {
this.status = status;
}
public PatientTO getPatient() {
return patient;
}
public void setPatient(PatientTO patient) {
this.patient = patient;
}
public FamilyDoctorTO getDoctor() {
return fdoctor;
}
public void setDoctor(FamilyDoctorTO fdoctor) {
this.fdoctor = fdoctor;
}
public String getResponse() {
return response;
}
public void setResponse(String response) {
this.response = response;
}
}