Filtro por paciente para la consulta y modificación de visitas por parte

de un administrador.
This commit is contained in:
Marcos Garcia Nuñez
2019-12-27 01:41:17 +01:00
parent 1d0118bcc8
commit ec3b1dc1cd
4 changed files with 68 additions and 22 deletions

View File

@@ -2,7 +2,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui">
xmlns:p="http://primefaces.org/ui" xmlns:o="http://omnifaces.org/ui">
<ui:composition template="../header.xhtml">
<ui:define name="content">
@@ -16,15 +16,31 @@
</div>
<div class="ui-g-3">
<div class="ui-inputgroup">
<p:datePicker id="fecha" value="#{PatientVisitList.selectedDate}" pattern="dd/MM/yyyy" showIcon="true" showButtonBar="true" autocomplete="true" required="true"
requiredMessage="Especifique una fecha para realizar la consulta." />
<p:commandButton value="Mostrar" update="frmPatientVisitList" action="#{PatientVisitList.showData}" icon="fa calendar-alt" />
<p:datePicker id="fecha" value="#{PatientVisitList.selectedDate}" pattern="dd/MM/yyyy" showIcon="true" showButtonBar="true" autocomplete="true">
<p:ajax event="dateSelect" listener="#{PatientVisitList.showData}" update="frmPatientVisitList" />
</p:datePicker>
<p:commandButton value="Mostrar" update="frmPatientVisitList" action="#{PatientVisitList.showData}" icon="fa calendar-alt" />
</div>
</div>
<div class="ui-g-2" />
<div class="ui-g-5">
Paciente:
<h:outputText value="#{PatientVisitList.patient.displayName}" style="font-weight: bold;" />
<div class="ui-g-1" />
<div class="ui-g-2">Paciente:</div>
<div class="ui-g-4">
<h:outputText rendered="#{not PatientVisitList.admin}" value="#{PatientVisitList.patient.displayName}" style="font-weight: bold;" />
<p:autoComplete rendered="#{PatientVisitList.admin}" id="filterPatient" dropdown="true" value="#{PatientVisitList.patient}"
completeMethod="#{PatientVisitList.completePatient}" var="p" itemLabel="#{p.displayName}" itemValue="#{p}" forceSelection="true"
placeholder="Seleccione un paciente o teclee para buscar...">
<o:converter converterId="omnifaces.ListConverter" list="#{PatientVisitList.patientList}" />
<p:column headerText="Num. Prof.">
<h:outputText value="#{p.personalIdentificationCode}" />
</p:column>
<p:column headerText="Nombre">
<h:outputText value="#{p.name}" />
</p:column>
<p:column headerText="Apellidos">
<h:outputText value="#{p.surname}" />
</p:column>
<p:ajax event="itemSelect" listener="#{PatientVisitList.showData}" update="frmPatientVisitList" />
</p:autoComplete>
</div>
<p:dataTable id="dtPatientVisitList" widgetVar="dtPatientVisitList" var="v" value="#{PatientVisitList.lazyDataModelVisitList}" lazy="true" paginator="true" rows="10"