Skip to content

Commit

Permalink
Merge branch 'issue-#273' of https://buddhika75@github.com/lk-gov-hea…
Browse files Browse the repository at this point in the history
…lth-hiu/pssp.git into Issue#258
  • Loading branch information
buddhika75 committed Jan 20, 2023
2 parents da8930a + b7e8b60 commit 8fa45ef
Show file tree
Hide file tree
Showing 8 changed files with 148 additions and 129 deletions.
9 changes: 8 additions & 1 deletion src/main/webapp/indicators/clinic_counts.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,15 @@

</h:panelGrid>

<h:outputText value="#{indicatorController.result}" escape="false" ></h:outputText>
<h:panelGrid columns="2" >
<p:outputLabel value="Count" ></p:outputLabel>
<p:inputText readonly="true" value="#{indicatorController.queryComponent.name}" ></p:inputText>

<p:outputLabel value="Result" ></p:outputLabel>
<p:inputTextarea readonly="true" value="#{indicatorController.result}" class="w-100" rows="20"></p:inputTextarea>
</h:panelGrid>




</p:panelGrid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@
</p:column>
</p:dataTable>


<p:commandButton value="Calculate" style="width:30em;margin:auto;"
action="#{indicatorController.runClinicCountsForSelectedIndicators()}"
ajax="false">
</p:commandButton>

<p:commandButton value="Schedule" style="width:30em;margin:auto;"
action="#{indicatorController.scheduleClinicCountsForSelectedIndicators()}"
ajax="false">
Expand All @@ -94,14 +94,14 @@

</h:panelGrid>


<h:panelGrid columns="2" >
<p:outputLabel value="Results" ></p:outputLabel>

<p:outputLabel value="Result" ></p:outputLabel>
<h:outputText value="#{indicatorController.result}" escape="false" ></h:outputText>
<p:outputLabel value="Errors" ></p:outputLabel>
<h:outputText value="#{indicatorController.message}" escape="false" ></h:outputText>

<p:outputLabel value="Errors" ></p:outputLabel>
<h:outputText value="#{indicatorController.message}" escape="false" ></h:outputText>

</h:panelGrid>


Expand Down
7 changes: 5 additions & 2 deletions src/main/webapp/indicators/clinic_monthly.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,11 @@
<div class="row" >
<div class="col-md-12" >
<h:panelGrid columns="2" >
<p:inputText value="Result" ></p:inputText>
<p:inputText value="${indicatorController.result}" ></p:inputText>
<p:outputLabel value="Indicator" ></p:outputLabel>
<p:inputText readonly="true" value="#{indicatorController.queryComponent.name}" ></p:inputText>

<p:outputLabel value="Result" ></p:outputLabel>
<p:inputText readonly="true" value="#{indicatorController.result}" ></p:inputText>
</h:panelGrid>
<h:panelGrid columns="1" >
<h:outputText value="#{indicatorController.message}" escape="false" ></h:outputText>
Expand Down
207 changes: 102 additions & 105 deletions src/main/webapp/indicators/national_monthly.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -17,111 +17,108 @@
<h2>
<p:outputLabel value="Indicators - National Monthly" ></p:outputLabel>
</h2>


<p:panelGrid columns="2" style="width: 100%;" >
<p:outputLabel value="Indicator" for="indicator" ></p:outputLabel>
<p:autoComplete id="indicator"
required="true"
requiredMessage="Please select a report. To list reports, start entering few letters"
value="#{indicatorController.queryComponent}"
completeMethod="#{queryComponentController.completeIndicators}"
var="q" forceSelection="true" maxResults="15"
minQueryLength="3"
style="width: 100%;"
inputStyle="width: 100%;"
itemLabel="#{q.name}"
itemValue="#{q}">
</p:autoComplete>

<p:outputLabel id="lblYear" value="Year" ></p:outputLabel>
<p:inputText
required="true"
requiredMessage="Enter the year. Ex. 2022"
value="#{indicatorController.year}" ></p:inputText>

<p:outputLabel id="lblMonth" value="Month" ></p:outputLabel>
<p:selectOneMenu id="mnuMonth" value="#{indicatorController.month}"
requiredMessage="Please select a month."
required="true">
<f:selectItem itemLabel="Select a month" ></f:selectItem>
<f:selectItems value="#{commonController.months}" var="m" itemValue="#{m.value}" itemLabel="#{m}" ></f:selectItems>
</p:selectOneMenu>

</p:panelGrid>

<p:panelGrid columns="2" >

<p:commandButton value="Calculate" style="width:30em;margin:auto;"
action="#{indicatorController.runAllInstitutionMonthly()}"
ajax="false">
</p:commandButton>
<p:commandButton value="Prepare for Calculation" style="width:30em;margin:auto;"
action="#{indicatorController.runClinicCountsForRequestsForAllInstitutions()}"
ajax="false">
</p:commandButton>



</p:panelGrid>

<h:panelGrid columns="2" >
<h:panelGroup >
<h1><p:inputText value="Result" ></p:inputText></h1>
</h:panelGroup>
<h:panelGroup >
<h1><p:inputText styleClass="h1" value="#{indicatorController.result}" >
</p:inputText>
</h1>
</h:panelGroup>
</h:panelGrid>
<h:panelGrid columns="1" >
<h:outputText value="#{indicatorController.message}" escape="false" ></h:outputText>
</h:panelGrid>


<h:panelGrid columns="2" >
<p:commandButton ajax="false" value="Generate Excel" >
<p:dataExporter target="tbl" type="xlsx" fileName="Analysis" ></p:dataExporter>
</p:commandButton>
<p:commandButton value="Run Analytics in Selected"
ajax="false"
action="#{indicatorController.runClinicCountsForRequests}">
</p:commandButton>
</h:panelGrid>



<!--
<p:dataTable value="#{indicatorController.dataQueries}"
var="dq"
id="tbl"
rowKey="#{dq.tid}"
selection="#{indicatorController.selectedDq}"
selectionMode="single"
rows="10"
paginator="true"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
currentPageReportTemplate="{startRecord}-{endRecord} of {totalRecords} records"
rowsPerPageTemplate="5,10,{ShowAll|'All'}"
>
<p:ajax event="rowSelect" process="tbl"/>
<p:ajax event="rowUnselect" process="tbl"/>
<p:column headerText="No" sortBy="#{dq.tid}" width="80" >
<h:outputText value="#{dq.tid}" ></h:outputText>
</p:column>
<p:column headerText="Clinic" sortBy="#{dq.institution.name}" >
<h:outputText value="#{dq.institution.name}" ></h:outputText>
</p:column>
<p:column headerText="Query" sortBy="#{dq.query.name}" >
<h:outputText value="#{dq.query.name}" ></h:outputText>
</p:column>
<p:column headerText="Value" sortBy="#{dq.value}" >
<h:outputText value="#{dq.value}" ></h:outputText>
</p:column>
</p:dataTable>-->


<p:panelGrid columns="2" style="width: 100%;" >
<p:outputLabel value="Indicator" for="indicator" ></p:outputLabel>
<p:autoComplete id="indicator"
required="true"
requiredMessage="Please select a report. To list reports, start entering few letters"
value="#{indicatorController.queryComponent}"
completeMethod="#{queryComponentController.completeIndicators}"
var="q" forceSelection="true" maxResults="15"
minQueryLength="3"
style="width: 100%;"
inputStyle="width: 100%;"
itemLabel="#{q.name}"
itemValue="#{q}">
</p:autoComplete>

<p:outputLabel id="lblYear" value="Year" ></p:outputLabel>
<p:inputText
required="true"
requiredMessage="Enter the year. Ex. 2022"
value="#{indicatorController.year}" ></p:inputText>

<p:outputLabel id="lblMonth" value="Month" ></p:outputLabel>
<p:selectOneMenu id="mnuMonth" value="#{indicatorController.month}"
requiredMessage="Please select a month."
required="true">
<f:selectItem itemLabel="Select a month" ></f:selectItem>
<f:selectItems value="#{commonController.months}" var="m" itemValue="#{m.value}" itemLabel="#{m}" ></f:selectItems>
</p:selectOneMenu>

</p:panelGrid>

<p:panelGrid columns="2" >

<p:commandButton value="Calculate" style="width:30em;margin:auto;"
action="#{indicatorController.runAllInstitutionMonthly()}"
ajax="false">
</p:commandButton>
<p:commandButton value="Prepare for Calculation" style="width:30em;margin:auto;"
action="#{indicatorController.runClinicCountsForRequestsForAllInstitutions()}"
ajax="false">
</p:commandButton>



</p:panelGrid>

<h:panelGrid columns="2" >
<p:outputLabel value="Indicator" ></p:outputLabel>
<p:inputText readonly="true" value="#{indicatorController.queryComponent.name}" ></p:inputText>

<p:outputLabel value="Result" ></p:outputLabel>
<p:inputText readonly="true" value="#{indicatorController.result}" ></p:inputText>

<p:outputLabel value="Messages" ></p:outputLabel>
<h:outputText value="#{indicatorController.message}" escape="false" ></h:outputText>
</h:panelGrid>


<h:panelGrid columns="2" >
<p:commandButton ajax="false" value="Generate Excel" >
<p:dataExporter target="tbl" type="xlsx" fileName="Analysis" ></p:dataExporter>
</p:commandButton>
<p:commandButton value="Run Analytics in Selected"
ajax="false"
action="#{indicatorController.runClinicCountsForRequests}">
</p:commandButton>
</h:panelGrid>



<!--
<p:dataTable value="#{indicatorController.dataQueries}"
var="dq"
id="tbl"
rowKey="#{dq.tid}"
selection="#{indicatorController.selectedDq}"
selectionMode="single"
rows="10"
paginator="true"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
currentPageReportTemplate="{startRecord}-{endRecord} of {totalRecords} records"
rowsPerPageTemplate="5,10,{ShowAll|'All'}"
>
<p:ajax event="rowSelect" process="tbl"/>
<p:ajax event="rowUnselect" process="tbl"/>
<p:column headerText="No" sortBy="#{dq.tid}" width="80" >
<h:outputText value="#{dq.tid}" ></h:outputText>
</p:column>
<p:column headerText="Clinic" sortBy="#{dq.institution.name}" >
<h:outputText value="#{dq.institution.name}" ></h:outputText>
</p:column>
<p:column headerText="Query" sortBy="#{dq.query.name}" >
<h:outputText value="#{dq.query.name}" ></h:outputText>
</p:column>
<p:column headerText="Value" sortBy="#{dq.value}" >
<h:outputText value="#{dq.value}" ></h:outputText>
</p:column>
</p:dataTable>-->


</h:form>
Expand Down
11 changes: 7 additions & 4 deletions src/main/webapp/indicators/pdhs_monthly.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,13 @@
</h:panelGrid>


<h:panelGrid columns="2" >
<p:inputText value="Result" ></p:inputText>
<p:inputText value="${indicatorController.result}" ></p:inputText>
</h:panelGrid>
<h:panelGrid columns="2" >
<p:outputLabel value="Indicator" ></p:outputLabel>
<p:inputText readonly="true" value="#{indicatorController.queryComponent.name}" ></p:inputText>

<p:outputLabel value="Result" ></p:outputLabel>
<p:inputText readonly="true" value="#{indicatorController.result}" ></p:inputText>
</h:panelGrid>
<h:panelGrid columns="1" >
<h:outputText value="#{indicatorController.message}" escape="false" ></h:outputText>
</h:panelGrid>
Expand Down
9 changes: 6 additions & 3 deletions src/main/webapp/indicators/province_monthly.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,12 @@


<h:panelGrid columns="2" >
<p:inputText value="Result" ></p:inputText>
<p:inputText value="${indicatorController.result}" ></p:inputText>
</h:panelGrid>
<p:outputLabel value="Indicator" ></p:outputLabel>
<p:inputText readonly="true" value="#{indicatorController.queryComponent.name}" ></p:inputText>

<p:outputLabel value="Result" ></p:outputLabel>
<p:inputText readonly="true" value="#{indicatorController.result}" ></p:inputText>
</h:panelGrid>
<h:panelGrid columns="1" >
<h:outputText value="#{indicatorController.message}" escape="false" ></h:outputText>
</h:panelGrid>
Expand Down
9 changes: 6 additions & 3 deletions src/main/webapp/indicators/rdhs_monthly.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,13 @@


<h:panelGrid columns="2" >
<p:inputText value="Result" ></p:inputText>
<p:inputText value="${indicatorController.result}" ></p:inputText>
<p:outputLabel value="Indicator" ></p:outputLabel>
<p:inputText readonly="true" value="#{indicatorController.queryComponent.name}" ></p:inputText>

<p:outputLabel value="Result" ></p:outputLabel>
<p:inputText readonly="true" value="#{indicatorController.result}" ></p:inputText>
</h:panelGrid>
<h:panelGrid columns="1" >
<h:panelGrid columns="1" >
<h:outputText value="#{indicatorController.message}" escape="false" ></h:outputText>
</h:panelGrid>

Expand Down
9 changes: 6 additions & 3 deletions src/main/webapp/institution/indicators/hospital_monthly.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,13 @@


<h:panelGrid columns="2" >
<p:inputText value="Result" ></p:inputText>
<p:inputText value="${indicatorController.result}" ></p:inputText>
<p:outputLabel value="Indicator" ></p:outputLabel>
<p:inputText readonly="true" value="#{indicatorController.queryComponent.name}" ></p:inputText>

<p:outputLabel value="Result" ></p:outputLabel>
<p:inputText readonly="true" value="#{indicatorController.result}" ></p:inputText>
</h:panelGrid>
<h:panelGrid columns="1" >
<h:panelGrid columns="1" >
<h:outputText value="#{indicatorController.message}" escape="false" ></h:outputText>
</h:panelGrid>

Expand Down

0 comments on commit 8fa45ef

Please sign in to comment.