wiki:BluePrintOrganisationRegistry

Version 20 (modified by Michael Howden, 10 years ago) ( diff )

--

NEW!

This relates to functionality implemented in https://code.launchpad.net/~michael-howden/sahana-eden/eden. It is being documented in the Blue Prints so that the functionality can be reviewed. Once it is approved this documentation will be shifted between:

Site Super Entity

The following are instances of the site super entity:

  • org_office
  • cr_shelter
  • hms_hospital

The Site Super Entity allows the following components to be shared between these resources through the use of a single foreign key (site_id):

  • org_staff
  • inv_inv_item
  • inv_recv
  • inv_send
  • req_req
  • req_commit

Staff Permissions

Staff (org_staff}) can be added as components of site instances (offices, hospitals and shelters) and organisations. There are a number of Use Cases where you may want to apply permissions based on the staff of a resource:

  • Only staff of an organisation have permissions (READ, CREATE, UPDATE and/or DELETE) for their organisation resource.
  • Only staff stationed at a certain site have permissions (READ, CREATE, UPDATE and/or DELETE) for their organisation resource.

For further flexibility, there are 2 boolean fields for staff:

  • no_access - If this is true, this staff member has no additional priviledges
  • supervisor - This gives the options for more permissive permissions for some staff.

This is done by the shn_create_record_roles function in models/05_org.py, which can be called from a org or site onaccept by using:

# Create roles for each organisation 
s3xrc.model.configure(table, 
                      onaccept = shn_staff_join_onaccept_func(tablename))  

Enabling Staff Permissions

  1. Set:
    deployment_settings.security.policy = 3 # Controller-ACLs
    deployment_settings.aaa.has_staff_permissions = True
    deployment_settings.aaa.staff_acl = Permissions for staff
    deployment_settings.aaa.supervisor_acl = Permissions for staff flagged as "supervisor"
    
  2. Add staff to organisations and sites

Inheriting Permissions

To allow other components inherit the same permissions as the primary resource, the following function can be called, to add a onaccept function which will copy the "owned_by_role" from the primary resource

# Update owned_by_role to the site's owned_by_role    
s3xrc.model.configure(
    table, 
    onaccept = shn_component_copy_role_func(component_name = tablename, 
                                            resource_name = "org_site", 
                                            fk = "site_id",
                                            pk = "site_id")
)    

To Do

  • How to handle permissions for site resources - should they inherit permissions from an organisation resource?
  • if a single person is assigned as staff to multiple sites or organisations, there will be multiple site records for this person. This may cause confusion when creating staff lists. Perhaps the data structure should be revised to accommodate this.

Inventory Management

Inventories can be added to any site instance, by adding shn_show_inv_tabs(r) to the rheader tabs for that site instance.

Organisation Registry

Who's doing What Where and When (4W)

Introduction

"Who, What, Where"
The Organization Registry keeps track of all the relief organizations working in the disaster region. It captures not only the places where they are active, but also captures information on the range of services they are providing in each area.

Haiti Requirements: http://wiki.sahanafoundation.org/doku.php/haiti:requirements#organization_registry

Old PHP User Guide: http://wiki.sahanafoundation.org/doku.php?id=doc:or:english

We should aim to be able to exchange data with UN OCHA's 3W. Information about the 3W database schema, possible import methods to OCHA, and 3W controlled vocabulary lists can be found at BluePrint3W More work should be done to ensure that the schema is compatible with the BluePrint3W schema.

Tables

This means having the following tables:

Organisation

  • Name
  • Acronym
  • Type IS_IN_SET([Government,International Governmental Organization,International NGO,Misc,National Institution,National NGO,United Nations])
  • Website
  • National Staff
  • International Staff
  • Number of Vehicles
  • Vehicle Types
  • Donation Phone (gives the org an incentive to be listed)
  • Logo (could be displayed on the map)

Sectors

  • Name
  • Abbreviation

Office

Instance of the Site super entity

  • Name
  • Type IS_IN_SET([Headquarters,Regional,Country,Satellite Office]) (Would "Field" be a better term than "Satellite")
  • Phone 1
  • Phone 2
  • Email
  • Fax
  • Address 1
  • Address 2 (used for Postcode)
  • Needs validation (checkbox) [NEW] or Validate

Contact

Handled by the Person Registry?

  • First Name
  • Last Name
  • Title

Projects (previously Activities)

The Project Management module will be the main repository for Projects information.

These fields are take from a WASH (Water Health and Sanitation) Cluster form

  • Organization (link to Org Table)
  • Location
  • Sector
  • Sub-Sector (opt)
  • Description
  • Beneficiaries (number)
  • Start Date
  • End Date
  • Funded (Y/N)

4x Many-to-Many tables to link them

  • structured like t2_membership

Sector-to-Organisation

Many-to-Many table to link Sector to Organisations.

Office-to-Organisation

Many-to-Many table to link Offices to Organisations.
Optional validator to limit Offices as being affiliated to just a single Organisation

Contact-to-Office

Many-to-Many table to link Contacts to Offices.
Optional validator to limit Contacts as being affiliated to just a single Office

Contact-to-Organisation

Many-to-Many table to link Contacts to Organisations.
Optional validator to limit Contacts as being affiliated to just a single Organisation

Q: Is it useful to be able to have a Contact be affiliated to an Organisation but not to an Office?

  • would the default 'HQ' be appropriate?

Would be nice to add these functionalities:

  • Organigram creator from the Contacts
  • ID cards from the Contacts

Q: Wouldn't "Staff" be a better description than contact? Q: Contact implies just a single person for each organization.

Screens

This describes the screens laid out in a way matching with the workflow.

Dashboard

  • Organization Dashboard (will go to the organization of the current user)
  • Organizations Registry
  • Projects
  • Map

Organization Dashboard

  • Org. Details
  • Edit Org. (Restricted)
  • Offices
    • Add Office
  • Projects (for displayed Org.)
    • New Project

Organization Registry

  • List of Organizations
  • Add New Organization

Projects

  • List of all Projects
  • Display on Map (redirects to Map, with Project filter selected)

Map

Filterable options to display:

  • Offices
  • Projects
  • We want to be able to add Proejcts by Jurisdiction (e.g. Neighborhood for PaP)...without knowing the GIS data.
  • If we do have polygons for neighborhoods, these will be displayed automatically on map.
  • KML/GeoRSS feeds will just be GIS Centroids.

Reports

  • Tabular
  • Map
  • Key is to be able to identify Gaps

BluePrints

Note: See TracWiki for help on using the wiki.