Esqueleto para consultar las visitas de un día.
This commit is contained in:
@@ -14,6 +14,7 @@ import TO.PatientTO;
|
||||
import TO.PrimaryHealthCareCenterTO;
|
||||
import TO.QuestionTO;
|
||||
import TO.SpecialistDoctorTO;
|
||||
import TO.VisitTO;
|
||||
import common.Utils;
|
||||
import jpa.FamilyDoctorJPA;
|
||||
import jpa.MedicalSpecialtyJPA;
|
||||
@@ -21,6 +22,7 @@ import jpa.PatientJPA;
|
||||
import jpa.PrimaryHealthCareCenterJPA;
|
||||
import jpa.QuestionJPA;
|
||||
import jpa.SpecialistDoctorJPA;
|
||||
import jpa.VisitJPA;
|
||||
|
||||
/***
|
||||
*
|
||||
@@ -479,4 +481,22 @@ public class CommonFacadeBean implements CommonFacadeRemote, CommonFacadeLocal {
|
||||
return qsTO;
|
||||
}
|
||||
|
||||
public VisitTO getPOJOforVisitJPA(VisitJPA qs, int nestedProps) {
|
||||
VisitTO qsTO = null;
|
||||
|
||||
if (qs != null) {
|
||||
FamilyDoctorJPA fd = null;
|
||||
PatientJPA pat = null;
|
||||
if (nestedProps > 0) {
|
||||
fd = qs.getFamilyDoctor();
|
||||
pat = qs.getPatient();
|
||||
}
|
||||
|
||||
nestedProps--;
|
||||
qsTO = new VisitTO(qs.getId(), qs.getDate(), qs.getTime(), qs.getObservations(), qs.getResult(), this.getPOJOforFamilyDoctorJPA(fd, nestedProps),
|
||||
this.getPOJOforPatientJPA(pat, nestedProps));
|
||||
}
|
||||
|
||||
return qsTO;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,12 +10,14 @@ import TO.PatientTO;
|
||||
import TO.PrimaryHealthCareCenterTO;
|
||||
import TO.QuestionTO;
|
||||
import TO.SpecialistDoctorTO;
|
||||
import TO.VisitTO;
|
||||
import jpa.FamilyDoctorJPA;
|
||||
import jpa.MedicalSpecialtyJPA;
|
||||
import jpa.PatientJPA;
|
||||
import jpa.PrimaryHealthCareCenterJPA;
|
||||
import jpa.QuestionJPA;
|
||||
import jpa.SpecialistDoctorJPA;
|
||||
import jpa.VisitJPA;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -52,13 +54,13 @@ public interface CommonFacadeLocal {
|
||||
public FamilyDoctorTO findFamilyDoctorById(int ProfessionalNumberId);
|
||||
|
||||
public FamilyDoctorTO findFamilyDoctorByCode(String code);
|
||||
|
||||
|
||||
public FamilyDoctorTO findFamilyDoctorByNif(String searchValue);
|
||||
|
||||
public SpecialistDoctorTO findSpecialistDoctorById(int ProfessionalNumberId);
|
||||
|
||||
public SpecialistDoctorTO findSpecialistDoctorByCode(String code);
|
||||
|
||||
|
||||
public SpecialistDoctorTO findSpecialistDoctorByNif(String searchValue);
|
||||
|
||||
public MedicalSpecialtyTO getPOJOforMedicalSpecialtyJPA(MedicalSpecialtyJPA ms);
|
||||
@@ -72,4 +74,6 @@ public interface CommonFacadeLocal {
|
||||
public PatientTO getPOJOforPatientJPA(PatientJPA pat, int nestedProps);
|
||||
|
||||
public QuestionTO getPOJOforQuestionJPA(QuestionJPA qs, int nestedProps);
|
||||
|
||||
public VisitTO getPOJOforVisitJPA(VisitJPA qs, int nestedProps);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user