Difference between revisions of "MasterList"

From mn/ifi/inf5750
Jump to: navigation, search
(Product description)
(Architecture: update)
 
(9 intermediate revisions by 3 users not shown)
Line 17: Line 17:
 
# The user can search simply by name or more advanced using a combo of multiple variables
 
# The user can search simply by name or more advanced using a combo of multiple variables
 
# Browse information on different organisatation-units.
 
# Browse information on different organisatation-units.
* Admin tabs: 1. The admin-user can view proposal of organisatation-units     2. Access to config tab where the user can decide which program to show
+
* Admin tabs:  
 +
# The admin-user can view proposal of organisatation-units
 +
# Access to config tab where the user can decide which program to show
  
 
'''Summary:'''
 
'''Summary:'''
Line 43: Line 45:
 
* Mark relevant proposals as complete/invalid, marked proposals should be hidden by default.
 
* Mark relevant proposals as complete/invalid, marked proposals should be hidden by default.
 
* Manage data to be show for a given unit
 
* Manage data to be show for a given unit
 +
 +
== Search function ==
 +
The search function in our app is implemented in two ways:
 +
* Simple search
 +
* Advanced search
 +
The simple search lets you search for any organisation unit in selected country (Sierra Leone). We take use of the DHIS2 api and fetch and display all organisation unit that match with the users search input. We use the keywork "ilike" that is shown in DHIS2 documentation about organisation units. This means that it will find all the organisation units that contains the search sting, without case sensibility.
 +
 +
The advance search works very similar as the simple, but here you can combine fields of your search to narrow the result and get more specific search result. Here you can further specify the city and district of the organisation unit, what kind of program they offer, what dataset they have and which organisation group they are a part of.
 +
 +
[[File:Simple search.png|frameless]] [[File:Advance serach.png|frameless]]
 +
 +
The result can then be seen and browsed.
 +
 +
[[File:Show all units.png|frameless]]  [[File:Show search result 1.png|frameless]] [[File:Show search result 2.png|frameless]] [[File:Show search result 3.png|frameless]]
 +
 +
== Organisation unit ==
 +
From the search window you can select a organisation unit to view more details about it.
 +
 +
The details of the organisation unit is:
 +
* Name
 +
* Level in the hierarchy
 +
* Code
 +
* ID
 +
* Programs it offers
 +
* Datasets
 +
* Its ancestor and children in the hierarchy level
 +
* Location on map (if coordinates not available, default is country view)
 +
 +
[[File:Detail unit.png|frameless]] [[File:Detail unit map default.png|frameless]] [[File:Detail unit map.png|frameless]]
 +
 +
In addition to this we also have included a form witch a user can file for changes on selected organisation unit. This will then be saved and admin users can see these proposals in the proposal tabs and decide what to do with them.
 +
 +
[[File:Detail unit proposal.png|frameless]]
 +
 +
== Proposal ==
 +
[[File:Props.png|thumb|600x600px|Admin privileges access view of proposal with buttons to mark as resolved/invalid]]
 +
All proposals submitted in organisation units will be shown in proposals component. If proposal exists for the organisation unit, it'll be shown in the left menu, otherwise it'll not be listed at all. Users with update or write access can mark the proposals as resolved or invalid. Guests users without these accesses can should not be able to see or mark these proposals. For testing we have also implemented a delete proposal button.
 +
 +
== Show Config ==
 +
[[File:Show-config.png|thumb|Show config for users with manage access]]
 +
Show config hide the data set element for each organisation unit if administrators don't want to show the elements in data set. The elements will be hidden in organisation units for everyone included administrators. To change which data set to change, you need to have manage access, otherwise the form will be empty.
  
 
== Milestones ==
 
== Milestones ==
Line 85: Line 128:
 
Information/data should only be retrieved on an as needed basis. Search should be altered when the user commits parameters.
 
Information/data should only be retrieved on an as needed basis. Search should be altered when the user commits parameters.
  
Dataset configuration should be stored using the units ID.
+
How proposal and show config is stored<syntaxhighlight lang="json">
DataStore {  
+
{
 
+
dataStore {
config: {  
+
p-[unitId]{
 
+
proposalId {
orgUnitID: [
+
proposal: {
 
+
name: "facilityname",
dataSetID
+
program: "program",
 
+
longitude: "longitude",
]
+
latitude: "latitude",
 
+
message: "other changes"
}
+
},
 
+
id: "3318df8e-0d77-4de5-9dde-0dec788d1dcf",
}
+
name: "Adonkia CHP!!!!",
Proposals are stored in: '''<nowiki>https://inf5750.dhis2.org/demo/api/dataStore/p-</nowiki>[organisationUnitId]/[proposal ids]'''
+
fac_id: "Rp268JB6Ne4",
 +
ancestor: [
 +
{
 +
level: 1,
 +
name: "Sierra Leone",
 +
id: "ImspTQPwCqd"
 +
},
 +
{
 +
level: 2,
 +
name: "Western Area",
 +
id: "at6UHUQatSo"
 +
},
 +
{
 +
level: 3,
 +
name: "Rural Western Area",
 +
id: "qtr8GGlm4gg"
 +
}
 +
],
 +
flag: "submitted",
 +
updated: "04/12/2017, 17:11:15"
 +
}
 +
 +
},
 +
 +
masterconfig{
 +
unitId {
 +
dataSetsId: [ ]
 +
}
 +
 +
}
 +
}
 +
}
 +
</syntaxhighlight>
  
 
===== Technologies used =====
 
===== Technologies used =====

Latest revision as of 10:29, 6 December 2017

 Group members

  • Dana Zangana
  • Niklas Mortensen Hamang
  • Minh Duong
  • Thach Khoi Pham

Link to the repository: https://github.uio.no/MasterList/Master-Facility-List.git(Private)

Product description

Assignment:

Master Facility List

Design:

The app have two main views: a user tabs; and an administrator tabs.

  • User tabs:
  1. The user can search simply by name or more advanced using a combo of multiple variables
  2. Browse information on different organisatation-units.
  • Admin tabs:
  1. The admin-user can view proposal of organisatation-units
  2. Access to config tab where the user can decide which program to show

Summary:

To make a web app that allow for user friendly searching, browsing and proposing changes for facilities within the DHIS2 data, with main focus on searching,

Features:

Users should be able to:

  • To find all units, search based on:
    • The units name.
    • The units group.
    • The units hierarchy.
    • The data set information
    • Or a combination of these.
  • View information about the unit, like:
    • GIS coordinates, if available.
    • The units group membership
    • The units data set
    • The stats of the unit
  • Submit change proposals

Administrators should be able to:

  • View change proposals relevant to the units they manage
  • Mark relevant proposals as complete/invalid, marked proposals should be hidden by default.
  • Manage data to be show for a given unit

Search function

The search function in our app is implemented in two ways:

  • Simple search
  • Advanced search

The simple search lets you search for any organisation unit in selected country (Sierra Leone). We take use of the DHIS2 api and fetch and display all organisation unit that match with the users search input. We use the keywork "ilike" that is shown in DHIS2 documentation about organisation units. This means that it will find all the organisation units that contains the search sting, without case sensibility.

The advance search works very similar as the simple, but here you can combine fields of your search to narrow the result and get more specific search result. Here you can further specify the city and district of the organisation unit, what kind of program they offer, what dataset they have and which organisation group they are a part of.

Simple search.png Advance serach.png

The result can then be seen and browsed.

Show all units.png Show search result 1.png Show search result 2.png Show search result 3.png

Organisation unit

From the search window you can select a organisation unit to view more details about it.

The details of the organisation unit is:

  • Name
  • Level in the hierarchy
  • Code
  • ID
  • Programs it offers
  • Datasets
  • Its ancestor and children in the hierarchy level
  • Location on map (if coordinates not available, default is country view)

Detail unit.png Detail unit map default.png Detail unit map.png

In addition to this we also have included a form witch a user can file for changes on selected organisation unit. This will then be saved and admin users can see these proposals in the proposal tabs and decide what to do with them.

Detail unit proposal.png

Proposal

Admin privileges access view of proposal with buttons to mark as resolved/invalid

All proposals submitted in organisation units will be shown in proposals component. If proposal exists for the organisation unit, it'll be shown in the left menu, otherwise it'll not be listed at all. Users with update or write access can mark the proposals as resolved or invalid. Guests users without these accesses can should not be able to see or mark these proposals. For testing we have also implemented a delete proposal button.

Show Config

Show config for users with manage access

Show config hide the data set element for each organisation unit if administrators don't want to show the elements in data set. The elements will be hidden in organisation units for everyone included administrators. To change which data set to change, you need to have manage access, otherwise the form will be empty.

Milestones

We have divided the project into a couple of main tasks:

  • Create a basic web app for DHIS2 [Complete]
  • A search bar which is able to retrieve info from the DHIS2 api [Complete]
  • A detail search of viewing units and filtering search results [Complete]
  • Able to draw and view organisation units on the map [Complete]
  • Able to edit organization units [Complete]

Timeline

Week Description
41-42 Build group & choose assignment
41-44 Work on wiki for the 1. of November
42-43 Build base app, familiarize with frameworks
43-45 work with API-calls
44 Work with front-end of the search and display views
44-46 Implementing functionality for search, display and configuration
46-47 Bug fix and finilizing

Licensing

Angular 4, Jquery & npm all fall under the MIT license. As does the Leaflet and Angular-cli. So we choose to continue to license under the MIT license to keep open and none restrictive to derived work.

Architecture

Information/data should only be retrieved on an as needed basis. Search should be altered when the user commits parameters.

How proposal and show config is stored
{
	dataStore {
		p-[unitId]{
			proposalId {
				proposal: {
					name: "facilityname",
					program: "program",
					longitude: "longitude",
					latitude: "latitude",
					message: "other changes"
				},
				id: "3318df8e-0d77-4de5-9dde-0dec788d1dcf",
				name: "Adonkia CHP!!!!",
				fac_id: "Rp268JB6Ne4",
				ancestor: [
					{
						level: 1,
						name: "Sierra Leone",
						id: "ImspTQPwCqd"
					},
					{
						level: 2,
						name: "Western Area",
						id: "at6UHUQatSo"
					},
					{
						level: 3,
						name: "Rural Western Area",
						id: "qtr8GGlm4gg"
					}
				],
				flag: "submitted",
				updated: "04/12/2017, 17:11:15"
			}
			
		},
		
		masterconfig{
			unitId {
				dataSetsId: [ ]
			}
			
		}
	}
}
Technologies used
  • Angular 4
  • Typescript
  • CSS, HTML, jQuery
  • LeafletNode & npm
  • Angular-cli

How we are dividing tasks within the group

Built basic app - Thach

Basic search - Dana & Nicklas

Displaying Info - Minh & Thach

Advanced Search - Dana & Nicklas

Sending Proposal changes - Minh & Thach

View proposal - Minh

Choosing configuration - Nicklas & Thach