Diseño de pruebas

Ejecución de pruebas
Correcciones menores encontradas durante las pruebas
This commit is contained in:
Roberto Orden Erena
2019-12-31 12:20:15 +01:00
parent e3174faf34
commit 44f61ee745
8 changed files with 23 additions and 16 deletions

View File

@@ -286,17 +286,17 @@ public class MedicalTestFacadeBean implements MedicalTestFacadeRemote {
}
@Override
public List<MedicalTestTO> loadMedicalTestForFamilyDoctor(int familyDoctorID, Integer patientID) {
public List<MedicalTestTO> loadMedicalTestForFamilyDoctor(int familyDoctorID, int patientID) {
List<MedicalTestTO> medicalTests = new ArrayList<MedicalTestTO>();
String extraQuery = "";
if (patientID != null) {
if (patientID >= 0) {
extraQuery = " and q.patient.id=:patientID";
}
TypedQuery<MedicalTestJPA> query = entman
.createQuery("SELECT q from MedicalTestJPA q where q.patient.familyDoctor.id=:familyDoctorID " + extraQuery + " order by q.id desc", MedicalTestJPA.class);
if (patientID != null) {
if (patientID >= 0) {
query.setParameter("patientID", patientID);
}
query.setParameter("familyDoctorID", familyDoctorID);
@@ -311,18 +311,18 @@ public class MedicalTestFacadeBean implements MedicalTestFacadeRemote {
}
@Override
public List<MedicalTestTO> loadMedicalTestForSpecialistDoctor(int specialistDoctorID, Integer patientID) {
public List<MedicalTestTO> loadMedicalTestForSpecialistDoctor(int specialistDoctorID, int patientID) {
List<MedicalTestTO> medicalTests = new ArrayList<MedicalTestTO>();
String extraQuery = "";
if (patientID != null) {
if (patientID >= 0) {
extraQuery = " and q.patient.id=:patientID";
}
TypedQuery<MedicalTestJPA> query = entman
.createQuery("SELECT q from MedicalTestJPA q where q.specialistDoctor.id=:specialistDoctorID " + extraQuery + " order by q.id desc", MedicalTestJPA.class);
if (patientID != null) {
if (patientID >= 0) {
query.setParameter("patientID", patientID);
}
query.setParameter("specialistDoctorID", specialistDoctorID);