Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added registry dashboard #72

Open
wants to merge 1 commit into
base: 2.x.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package org.openmrs.module.financials.page.controller.reports;

import org.openmrs.Program;
import org.openmrs.api.context.Context;
import org.openmrs.module.appframework.domain.AppDescriptor;
import org.openmrs.module.ehrconfigs.metadata.EhrCommonMetadata;
import org.openmrs.module.kenyacore.program.ProgramDescriptor;
import org.openmrs.module.kenyacore.program.ProgramManager;
import org.openmrs.module.kenyacore.report.ReportDescriptor;
Expand Down Expand Up @@ -35,9 +33,7 @@ public void controller(PageModel model, UiUtils ui, @SpringBean ReportManager re
for (ReportDescriptor report : reportManager.getCommonReports(currentApp)) {
common.add(ui.simplifyObject(report));
}
if (Context.getAuthenticatedUser().hasRole(EhrCommonMetadata._Roles.EHR_ACCESS_FINANCE_REPORT_SECTION)) {
reportsByProgram.put("Facility Summaries", common);
}
reportsByProgram.put("Facility Summaries", common);

for (ProgramDescriptor programDescriptor : programManager.getAllProgramDescriptors()) {
Program program = programDescriptor.getTarget();
Expand Down
119 changes: 119 additions & 0 deletions omod/src/main/webapp/fragments/workLoad.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,77 @@
populateWorkLoadDetails(jQuery("#workLoadFromDate-field").val(), jQuery("#workLoadToDate-field").val());
}
</script>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" />
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>

<style type="text/css">
table#pDetails.dataTable tbody tr:hover {
background-color: #43fff8;
}
.card-counter{
box-shadow: 2px 2px 10px #DADADA;
margin: 5px;
padding: 20px 10px;
background-color: #fff;
height: 100px;
border-radius: 5px;
transition: .3s linear all;
}

.card-counter:hover{
box-shadow: 4px 4px 20px #DADADA;
transition: .3s linear all;
}

.card-counter.primary{
background-color: #B0E0E6;
color: black;
}

.card-counter.danger{
background-color: #E6E6FA;
color: black;
}

.card-counter.pham{
background-color: #E0FFFF;
color: black;
}

.card-counter.success{
background-color: #A9FF96;
color: black;
}

.card-counter.info{
background-color: #FFA07A;
color: black;
}

.card-counter i{
font-size: 2.5em;
opacity: 0.2;
}

.card-counter .count-numbers{
position: absolute;
right: 35px;
top: 20px;
font-size: 20px;
display: block;
}

.card-counter .count-name{
position: absolute;
right: 35px;
top: 65px;
font-style: italic;
text-transform: capitalize;
opacity: 0.5;
display: block;
font-size: 15px;
}
</style>
<div class="ke-panel-frame">
<div class="ke-panel-heading">Facility Workload Summary</div>
Expand All @@ -68,6 +135,58 @@ table#pDetails.dataTable tbody tr:hover {
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<hr />
</div>
</div>
<div class="row" style="background-color: #fff;">
<div class="col-12">
<div class="row">

<div class="col-md-4">
<div class="card-counter danger">
<i class="fa fa-users"></i>
<span class="count-name stat-text">TOTAL PATIENTS</span>
<span class="count-numbers stat-digit"></span>
</div>
</div>

<div class="col-md-4">
<div class="card-counter pham">
<i class="fa fa-user-plus"></i>
<span class="count-name stat-text">TOTAL NEW PATIENTS</span>
<span class="count-numbers stat-digit"></span>
</div>
</div>

<div class="col-md-4">
<div class="card-counter success">
<i class="fa fa-user-circle-o"></i>
<span class="count-name stat-text">TOTAL REVISIT PATIENTS</span>
<span class="count-numbers stat-digit"></span>
</div>
</div>

<div class="col-md-4">
<div class="card-counter info">
<i class="fa fa fa-male"></i>
<span class="count-name stat-text">TOTAL MALE PATIENT</span>
<span class="count-numbers stat-digit"></span>
</div>
</div>

<div class="col-md-4">
<div class="card-counter primary">
<i class="fa fa-female"></i>
<span class="count-name stat-text">TOTAL FEMALE PATIENT</span>
<span class="count-numbers stat-digit"></span>
</div>
</div>
</div>
</div>
</div>

<div class="row">
<div class="col-md-12">
<hr />
Expand Down