Número de pacientes por doctor
This commit is contained in:
@@ -26,7 +26,8 @@
|
|||||||
<h:outputText value="#{phc.location}" />
|
<h:outputText value="#{phc.location}" />
|
||||||
</p:column>
|
</p:column>
|
||||||
</p:autoComplete>
|
</p:autoComplete>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ui-g-4 ui-md-4" />
|
<div class="ui-g-4 ui-md-4" />
|
||||||
|
|
||||||
<div class="ui-g-12">
|
<div class="ui-g-12">
|
||||||
@@ -35,24 +36,28 @@
|
|||||||
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="10,20,30,40"
|
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="10,20,30,40"
|
||||||
emptyMessage="No existe ningún doctor para el centro seleccionado.">
|
emptyMessage="No existe ningún doctor para el centro seleccionado.">
|
||||||
|
|
||||||
<p:column headerText="Número Profesional" width="100">
|
<p:column headerText="Número Profesional" style="width:100px;">
|
||||||
<h:outputText value="#{d.professionalNumber}" />
|
<h:outputText value="#{d.professionalNumber}" />
|
||||||
</p:column>
|
</p:column>
|
||||||
|
|
||||||
<p:column headerText="Nombre" width="150">
|
<p:column headerText="Nombre" style="width:150px;">
|
||||||
<h:outputText value="#{d.name}">
|
<h:outputText value="#{d.name}">
|
||||||
<f:convertDateTime type="time" pattern="HH:mm" />
|
<f:convertDateTime type="time" pattern="HH:mm" />
|
||||||
</h:outputText>
|
</h:outputText>
|
||||||
</p:column>
|
</p:column>
|
||||||
|
|
||||||
<p:column headerText="Apellidos" width="auto">
|
<p:column headerText="Apellidos" style="width:auto;">
|
||||||
<h:outputText value="#{d.surname}" />
|
<h:outputText value="#{d.surname}" />
|
||||||
</p:column>
|
</p:column>
|
||||||
|
|
||||||
<p:column headerText="Correo electrónico" width="auto">
|
<p:column headerText="Correo electrónico" style="width:auto;">
|
||||||
<h:outputText value="#{d.email}" />
|
<h:outputText value="#{d.email}" />
|
||||||
</p:column>
|
</p:column>
|
||||||
|
|
||||||
|
<p:column headerText="Número de pacientes" style="width:100px; text-align: center;">
|
||||||
|
<h:outputText value="#{listDoctors.getPatientsByDoctor(d.id)}" />
|
||||||
|
</p:column>
|
||||||
|
|
||||||
<f:facet name="paginatorBottomLeft">
|
<f:facet name="paginatorBottomLeft">
|
||||||
<p:commandButton type="button" icon="pi pi-refresh" onclick="PF('dtDoctorList').getPaginator().setPage(0);" />
|
<p:commandButton type="button" icon="pi pi-refresh" onclick="PF('dtDoctorList').getPaginator().setPage(0);" />
|
||||||
</f:facet>
|
</f:facet>
|
||||||
|
|||||||
@@ -229,13 +229,6 @@ public class SystemAdminFacadeBean implements SystemAdminFacadeRemote {
|
|||||||
return caps;
|
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) {
|
public List<FamilyDoctorTO> listAllFamilyDoctorsByCAPPaged(int primaryHealthCareCenterId, int pageNumber, int pageSize) {
|
||||||
List<FamilyDoctorTO> familyDoctorsByCAP = new ArrayList<FamilyDoctorTO>();
|
List<FamilyDoctorTO> familyDoctorsByCAP = new ArrayList<FamilyDoctorTO>();
|
||||||
|
|
||||||
@@ -256,4 +249,11 @@ public class SystemAdminFacadeBean implements SystemAdminFacadeRemote {
|
|||||||
|
|
||||||
return familyDoctorsByCAP;
|
return familyDoctorsByCAP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Long getPatientCount(int familyDoctorId) {
|
||||||
|
TypedQuery<Long> query = entman.createQuery("SELECT count(1) from PatientJPA p where p.familyDoctor.id=:familyDoctorId", Long.class);
|
||||||
|
query.setParameter("familyDoctorId", familyDoctorId);
|
||||||
|
|
||||||
|
return query.getSingleResult();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public interface SystemAdminFacadeRemote {
|
|||||||
|
|
||||||
public List<PrimaryHealthCareCenterTO> listCAPsPaged(int pageNumber, int pageSize);
|
public List<PrimaryHealthCareCenterTO> listCAPsPaged(int pageNumber, int pageSize);
|
||||||
|
|
||||||
public Long getFamilyDoctorsByCAPCount(int primaryHealthCareCenterId);
|
|
||||||
|
|
||||||
public List<FamilyDoctorTO> listAllFamilyDoctorsByCAPPaged(int primaryHealthCareCenterId, int pageNumber, int pageSize);
|
public List<FamilyDoctorTO> listAllFamilyDoctorsByCAPPaged(int primaryHealthCareCenterId, int pageNumber, int pageSize);
|
||||||
|
|
||||||
|
public Long getPatientCount(int primaryHealthCareCenterId);
|
||||||
}
|
}
|
||||||
@@ -82,4 +82,7 @@ public class ListDoctorsByCenterMBean extends ManagedBeanBase implements Seriali
|
|||||||
this.primaryHealthCareCenter = value;
|
this.primaryHealthCareCenter = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Long getPatientsByDoctor(int familyDoctorId) {
|
||||||
|
return getRemoteManagerSystemAdmin().getPatientCount(familyDoctorId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user