Giter Club home page Giter Club logo

coconut-analytics's Introduction

Stories in Ready

A responsive web monitoring, alerting, analytics, and reporting application for Coconut Surveillance™ for malaria elimination.

How to use

cd _attachments
npm install
npm start

Then go to http://localhost:8081

For extra development fun pleasure install the livereload extension and it will automatically reload the page in your browser when the code changes

coconut-analytics's People

Contributors

evansdianga avatar mikeymckay avatar punkmap avatar workmaps avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

coconut-analytics's Issues

Buttons like CSV, XLS are missing on page

The tables in the report uses dataTable library. And even though the codes calls for the buttons to be displayed, they are not currently being displayed. The swf file is in the js-library folder.

Example codes:
$("#thresholdTable").dataTable
aaSorting: [[0,"desc"]]
iDisplayLength: 50
dom: 'T<"clear">lfrtip'
tableTools:
sSwfPath: "js-libraries/copy_csv_xls.swf"
aButtons: [
"csv",
]

Import org hierarchy from DHIS 2

DHIS 2 can export organizational hierarchy metadata and data in JSON format. Import this file, including the following document types:

  • Organizational Unit
  • Organization Unit Level
  • Organizational Unit Group
  • Organizational Unit Group Set

Organizational Unit documents may include geographical data (point coordinates or polygon coordinates)

  • Import these data into Coconut Surveillance
  • Handle repeated imports needed to update these data when organizational data change

Remove left and right borders on tables

Removing the left and right borders on tables would help open up the displays. This would also be consistent with MD data tables. This is a minor point and preference, but can this change be made in a single location?

image

The points menu on top right not responding when clicked

Stange bug. When you click the Dashboard link and then try to click the 3 points top right hand menu, it does not respond with the dropdown. And if you select any other menu links following clicking the Dashboard, they too have the same issue, except for pages under the Reports menu.

Once you click any report links under the Report menu, all these other pages elsewhere will now work as expected, except for the Dashboard. Apparently something triggers in Dashboard that causes all other pages to have this specific dropdown issue.

Complete dashboard function

  • Selected statistics update automatically and are displayed at top of dashboard.
  • User can drill down from selected statistic to detail (e.g. report).
  • Highest priority graphs are updated automatically and displayed on dashboard
  • User can select a graph to display the selected graph on its own page.
  • Date selector at top of dashboard filters data for all dashboard components.

Mapview date selector returns to incorrect view

After submitting the date selector filter, it returns to the latest viewed report view instead of the Mapview.
Need to refactor the DateSelector to accommodate other modules than the reports.

Date Selector need to check valid dates

When specifying the StartDate and EndDate, it will throw an error if the date is not in the right format. For example 2015-1-1 or 2015-1-31 will produce error. Need to have it like 2015-01-01.

Admin: Users - Reword text in modal to eliminate country-specific terms

Current text uses "DMSO". This is specific to Zanzibar. @mikeymckay, can you help reword this? Let's consider them:

"DMSOs must have a username that corresponds to their phone number."

This is probably a country-specific policy. Perhaps this message should be removed, or reworded as a suggestion. Such as:

"We recommend a username that corresponds to the users phone number."

Next:

"If a DSMO is no longer working, mark their account as Inactive to stop notification messages being sent."

We could just change this to:

"If a user is no longer working, mark their account as Inactive. This will stop notification messages from being sent to the user."

image

Finish polishing out the current UI

Finish styling out, arranging, and testing the current map user interface. Get it to a polished state before we move on to any additional functionality.

Remember user week/date selection

If the user changes the week/date selection at the top of a report, remember that, and use it for subsequent reports, graphs, and maps in the same user session.

Restyle all buttons using MD

Make sure all buttons in the app consistently use Material Design guidelines. In the example below, we're using two different non-MD buttons styles on the same page.

image

Add map image download control

Add control to map UI to enable the user to download an image of the currently displayed map.

Offer different file types (png, jpg, pdf, ...)?

Export selected data values to DHIS 2

  • Export malaria data element metadata to DHIS 2 in a format that is easy to import into DHIS 2. DHIS 2 provides a metadata import function, and can import JSON.
  • Export aggregate malaria data in a forma that is easy to import into DHIS 2. DHIS 2 provides a data import mechanism that can import JSON.
  • Deal with the time dimension for aggregation.

Generalize admin level zoom controls

Admin level zoom controls need to function well assuming:

  • Unlimited number of admin levels. The number can be determined from the database
  • Admin level names are soft and in the database
  • Names of admin units are soft and in the database
  • Large numbers of admin units in any level; users need effective type-ahead match capability to efficiently find a desired admin unit

It will help to get the DHIS2 org hierarchy in the database. We'll need a set of functions that work with this.

Add date picker widget

Add a date picker widget to enable the user to select a data from the calendar. Use this where ever a user may enter a date.

Dialog modal issue on non Chrome browser

The Dialog modal has an issue running on non Chrome browser. Example Safari. Needs to switch to polyfill mode to run properly.

Need to find the way get this code working:
dialogPolyfill.registerDialog(dialog)

User color palette choice

Enable the user to select from a limited set of predesigned Google Material Design color palettes. All color elements throughout the app should change to match the user-selected color palette.

  • Generate a set of, say, 6 alternative MD palettes
  • Design an efficient way to display the alternative palettes, and enable the user to select one (checkbox?).
  • Add this to the Settings menu.
  • Use the current color palette settings throughout the app.

Try to design this in a way that makes it easy to duplicate in mobile-coconut.

Add admin option to turn off use of DHIS2 geographic data by level

An imported DHIS2 org hierarchy may contain geographic coordinate data in any org unit document. This is likely to be a list of polygon vertices for admin units, and lat/lon point coordinate data for facilities.

Use Case
A malaria elimination program imports the org hierarchy from the country's national DHIS2 data warehouse. They prefer using their own boundary coordinates, particularly for lower level admin units, since they believe these to be more accurate than those in the national DHIS2 data warehouse. However, they do want to use the DHIS2 coordinates for facilities.

Proposed Solution

  • Admin configuration option to turn on/off use of geographical coordinate data for any org level.

We still need a mechanism to import coordinate data for any org level. We don't have that yet.

Setting Date Range

Unable to set new date range on mapping page. When date range is changed and the 'Submit' button is clicked the date defaults to: startDate/2016-05-05/endDate/2016-05-12

Ajax url path in Mapview

The ajax url path specified for the various json files under the mapdata directory is not valid once deploy as couchapp.
Instead of "../../mapdata.." it should be the full path "zanzibar/_design/analytics/mapdata/....".

Need to specify in such a way that it will be valid on both the development environment and the production environment.

Improve delineation of admin boundary layers

  • Remove shading from polygons
  • Use different line colors and thicknesses to identify different admin layers. Make these these can be distinguished from each other when overlaid on the available base maps
  • Display admin unit name on hover?
  • Reveal / hide admin boundaries depending on zoom level.

Weekly Facility Report not showing data

The Weekly Facility Reports from MEEDS or iSMS is not showing any data for some reason. Need to troubleshoot the Reports model to fix. Especially in the module aggregateWeeklyReportsAndFacilityCases
which is where the view is getting its data.

Date selector toggles multiple times when pressed

The Date Selector behaves erratically when pressed. Initially when the dashboard is displayed, the first two reports has no such issue. But as we go down the report list, it starts to toggle multiple times with each one, in increasing number of times as we go down the list.

Correct all report titles

  • Remove "Reports:" prefix from all reports. It doesn't add any useful information.
  • Make sure the report title uses the same text that appears in the report menu. Reuse this text. It will need to be translated at some point when we support alternate languages.
  • Remove any other report title or subtitle text that does not add information or conflicts with the report title.

image

Case Followup Report table not resizing

The table is not resizing with the resizing of the browser display size. In the other reports like the Epidermic Threshold table, it is resizing accordingly.

Convert Admin: Facilities to use DHIS2 org hierarchy

  • Retrieve all of this information from the DHIS2 org structure.
  • Admin setting to select admin level that corresponds to "Facility"?
  • Display only one admin level above "Facility" level? If there is such a level?
  • No "Aliases" field in DHIS2 org unit doc structure. Display and use "Description" field instead?
  • Use"phonenumber field in DHIS2 org unit doc structure.
  • "Type" doesn't exist in this simple way in DHIS2. This is normally implemented as an organisationUnitGroupSets to which organisationUnitGroups belong. Admin setting to select organisationUnitGroupSets to be displayed on this page?
  • Admin option to turn off the ability to [add | edit | delete] anything on this page. This is needed to preserve interoperability with DHIS2.

image

Setting Date Range in MapView

Unable to set new date range on mapping page. When date range is changed and the 'Submit' button is clicked the date defaults to: startDate/2016-05-05/endDate/2016-05-12

Admin: Users - Improve handling of "Inactive" field

  • Change data in "Inactive" column do that it is boolean.
  • Display values in this column as "Yes" or "No", or just display the sliders in the column. If the latter, use a modal dialog to get confirmation from the user before changing the value.

I suggest changing the name of this field to "Active". It is simpler and more direct.

image

image

Do we need to do all of that stuff to make links work?

@scloo :
Looking at this code:
https://github.com/ICTatRTI/coconut-reports/blob/master/_attachments/app/views/MenuView.coffee#L8-L25

I see a lot of code (and repeated code) that simply lets links be clicked on. Is that necessary? Clicking on a link will take you to a new route, which the router will handle. The animation actions (setting items to active, etc) should all be automatically handled by material design lite. Am I missing something?

Add Settings for turning off Add and turning off Edit of Facilities

Scenario
A country already has an installation of DHIS 2. This will serve as the authoritative source of data on the entire organizational hierarchy down to and including facilities. They will import this into Coconut Surveillance. When changes are made to the organizational hierarchy, including adding and editing facilities, these changes will be made in DHIS 2, and then imported into Coconut Surveillance.

The country wants to prevent users from adding or editing any of the organizational data in Coconut Surveillance, since doing so would create a conflict with DHIS 2, the authoritative data for these data.

npm script issue

The sed -i "s/......./ app/start.coffee" command is not working correctly. When doing "npm run dev" it is not substituting correctly and hence still getting data from cococloud.co instead of localhost.

I have updated the script to:
"sed 's/https://cococloud.co/zanzibar/http://localhost:5984/zanzibar/' app/start.coffee & npm run watch & npm run livereload & npm run static"

It is substituting correctly now but not writing back to the file. Hence when creating bundle.js, it is still using the same old start.coffee file.

Add calendar date picker widget

  • Add a calendar date picker widget, consistent with MD, to all date selection controls.
  • Can we make the date selection control (the little calendar button) more obvious? It's not obvious to me that it is a control that I can use to change the date.

image

Add mechanism to change app title and icon

Make it possible for an authorized admin to white label the app by changing the app name and icon. Provide guidance concerning the size of the icon.

Add a mechanism to propagate these changes to the mobile app.

Dev environment on a Windows OS

While trying to get Tyler's dev environment set up on his Windows machine, we encountered a number of problems with the coconut-analytics code, which is specifically for Linux/Unix env.

Firstly there is no sed command in Windows. This can be overcome by install Cygwin for Linux commands.

Secondly when running "npm run dev" there are numerous errors that came up about paths not found, assuming during the building of the bundle.js. Specifically it is not able to understand the path names in the "require()" commands where we are using "/" and I believe it is expecting "".
Error messages:
Error: Cannot find module './Router' from .....\coconut-analytics_attachments\app'
Error: Cannot find module './views/HeaderView' from .....\coconut-analytics_attachments\app'
etc

Admin: Users - Convert handling of org unit assignment of user

Users are currently assigned to a "District". DHIS2 permits any number of org levels. In other countries, users may be assigned to units at a different level. In fact, different users may be assigned to different levels. For example, some may be malaria surveillance officers assigned to the district, and others may be village malaria workers affiliated with specific villages.

This may need to permit a user to first select the org unit level, and then the org unit within that level, individually for each user. Some of the logic that @workmaps is working on for the map display may be useful here. This display and the model dialog will probably need two columns: org unit level, and org unit.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.