Ver pruebas médicas casi funcionando al completo: falta cargar imagen real
Crear prueba medica: formulario comenzado.
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
package TO;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalTime;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@@ -19,7 +23,7 @@ public class MedicalTestTO implements Serializable {
|
||||
|
||||
private int id;
|
||||
private Date date;
|
||||
private long time;
|
||||
private LocalTime time;
|
||||
private String observations;
|
||||
private String highresimage;
|
||||
private MedicalTestType type;
|
||||
@@ -27,7 +31,15 @@ public class MedicalTestTO implements Serializable {
|
||||
private SpecialistDoctorTO specialistDoctor;
|
||||
|
||||
|
||||
public MedicalTestTO(int id, Date date, int time, String observations, String highresimage, MedicalTestType type,
|
||||
public MedicalTestTO() {
|
||||
super();
|
||||
this.date = new Date();
|
||||
this.time = LocalTime.now();
|
||||
this.patient = new PatientTO();
|
||||
this.specialistDoctor = new SpecialistDoctorTO();
|
||||
}
|
||||
|
||||
public MedicalTestTO(int id, Date date, LocalTime time, String observations, String highresimage, MedicalTestType type,
|
||||
PatientTO patiend, SpecialistDoctorTO specialistDoctor) {
|
||||
this.setId(id);
|
||||
this.setDate(date);
|
||||
@@ -55,11 +67,11 @@ public class MedicalTestTO implements Serializable {
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
public long getTime() {
|
||||
public LocalTime getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(long time) {
|
||||
public void setTime(LocalTime time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
@@ -102,5 +114,16 @@ public class MedicalTestTO implements Serializable {
|
||||
public void setSpecialistDoctor(SpecialistDoctorTO specialistDoctor) {
|
||||
this.specialistDoctor = specialistDoctor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Integer.toString(this.getId());
|
||||
}
|
||||
|
||||
public String getOnlyDate() {
|
||||
DateFormat df = DateFormat.getDateInstance(DateFormat.DATE_FIELD, new Locale("es", "ES"));
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
|
||||
return sdf.format(this.getDate());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user