Comprobación de médicos de familia asignados a centros al liminar un
CAP. Corregido error al obtener la cuenta de médicos de familia por CAP.
This commit is contained in:
@@ -230,6 +230,13 @@ public class SystemAdminFacadeBean implements SystemAdminFacadeRemote {
|
||||
return caps;
|
||||
}
|
||||
|
||||
public Long getFamilyDoctorsByCAPCount(int primaryHealthCareCenterId) {
|
||||
TypedQuery<Long> query = entman.createQuery("SELECT count(1) from FamilyDoctorJPA d where d.primaryHealthCareCenter.id=:capId", Long.class);
|
||||
query.setParameter("capId", primaryHealthCareCenterId);
|
||||
|
||||
return query.getSingleResult();
|
||||
}
|
||||
|
||||
public List<FamilyDoctorTO> listAllFamilyDoctorsByCAPPaged(int primaryHealthCareCenterId, int pageNumber, int pageSize) {
|
||||
List<FamilyDoctorTO> familyDoctorsByCAP = new ArrayList<FamilyDoctorTO>();
|
||||
|
||||
|
||||
@@ -22,32 +22,34 @@ public interface SystemAdminFacadeRemote {
|
||||
*/
|
||||
|
||||
public LoggedUserTO login(String id, String pwd);
|
||||
|
||||
|
||||
public MedicalSpecialtyTO updateSpecialty(int id, String name, String description) throws Exception;
|
||||
|
||||
|
||||
public MedicalSpecialtyTO findSpecialtyByName(String name);
|
||||
|
||||
|
||||
public void deleteSpecialty(int id) throws Exception;
|
||||
|
||||
|
||||
public MedicalSpecialtyTO insertSpecialty(String name, String description) throws Exception;
|
||||
|
||||
|
||||
public PrimaryHealthCareCenterTO updateHealthCareCenter(int id, String name, String location) throws Exception;
|
||||
|
||||
|
||||
public PrimaryHealthCareCenterTO findHealthCareCenterByName(String name);
|
||||
|
||||
|
||||
public void deleteHealthCareCenter(int id) throws Exception;
|
||||
|
||||
|
||||
public PrimaryHealthCareCenterTO insertHealthCareCenter(String name, String location) throws Exception;
|
||||
|
||||
|
||||
public Long getCAPCount();
|
||||
|
||||
|
||||
public List<PrimaryHealthCareCenterTO> listCAPsPaged(int pageNumber, int pageSize);
|
||||
|
||||
|
||||
public Long getFamilyDoctorsByCAPCount(int primaryHealthCareCenterId);
|
||||
|
||||
public List<FamilyDoctorTO> listAllFamilyDoctorsByCAPPaged(int primaryHealthCareCenterId, int pageNumber, int pageSize);
|
||||
|
||||
|
||||
public Long getPatientCount(int familyDoctorId);
|
||||
|
||||
|
||||
public SystemAdminTO findAdminByEmail(String email);
|
||||
|
||||
|
||||
public SystemAdminTO insertAdmin(String email, String password) throws Exception;
|
||||
}
|
||||
Reference in New Issue
Block a user