BluePrint: Event Modules
Table of Contents
Introduction
When Sahana Eden is used for Emergency Management an Event Module is important to be able to manage information by events. Events could either be real disasters, emergencies or trainings/simulations
Description
Related BluePrints
- BluePrintIncidentReporting - Within a single event there may be multiple incidents.
- BluePrintScenario - Scenarios are used to specify what resources are required by specific types of events and incidents
- BluePrintExerciseManagement - How events can be used for trainings and simulations
- BluePrintRegionsAndIncidents
Requirements
- Assign resources ( Staff, Volunteers, Assets, Vechicles) to an Incident
- Set up projects, activities, tasks for an Incident
- Record costs involved with an Incident
- Distributed Inventory Items
- Volunteer/Staff/Asset Hours
- Filter information by Event or Incident
- Navigate by Events - ability to have a top level menu of specific events
- Event Dashboard
Use-Cases
- Deployments/DERA
Designs
SituationReport (SitRep) Aggregation
We currently have a very basic SitRep module in Eden where we can write a Rich Text report &/or add a file attachment.
There are cases where the SitReps for different Districts should be aggregated at the next higher level (e.g. Province or Division).
For the Rich-Text, I see this as creating a section for each District with a Section Header added and all the Heading levels taken down a notch: H1s -> H2s, etc
SitReps can also include hard numbers though, like #affected, #dead, #wounded, #missing, #displaced, # staff, #volunteers, # vehicles, #shelters, etc then obviously these should be totalled in the aggregated report, so, we need a way to store these in the SitRep.
Data Model
I would suggest a Key-Value system in a new table:
doc_sitrep_tag
This would be like the ones for gis_location
(amongst others):
Note how these are added to the parent resource as a Component:
This model should be added to the SitRep class (I don't think we need a separate class here):
UI
For UI, this could be a Tab, as it is for gis_location
, or could be an Inline form. I think the Inline form is better, generally better UX & works better for when the sitrep is itself on a tab (e.g. of the Event or Org)
Inline form:
- https://github.com/flavour/eden/blob/master/modules/s3db/doc.py#L715 (Can add KV like Files)
Tabs:
- https://github.com/flavour/eden/blob/master/modules/s3db/gis.py#L5427 (Need to add an rheader like this to SitReps)
I have provided an initial UI for the aggregation:
i.e. there is a hook for a new 'consolidate' method which is called with the selected sitreps.
The consolidate
method needs writing. It would look something like this:
XSLT Import
XSLT should be provided to import the Tags:
- https://github.com/flavour/eden/blob/master/static/formats/s3csv/event/event.xsl [Example of a KV in an XSLT file]
- https://github.com/flavour/eden/blob/master/static/formats/s3csv/doc/sitrep.xsl [File which needs modifying]
Implementation
- modules/s3db/event.py
- modules/s3db/irs.py (to be merged with modules/s3db/event.py)
References
- Sahana Eden List IRS merging into Events module?
- Domain/EmergencyManagement/IncidentManagementSystems