wiki:BluePrint/SurveyTool/ADAT

Version 14 (modified by graeme, 10 years ago) ( diff )

--

Survey Tool Blue Print - Assessment Data Analysis Tool (ADAT)

Introduction

ADAT will provide IFRC with a flexible tool to create assessments and analyse the data.

Features

  • Easily create customised assessments
  • Reusable list of questions which can be used in multiple assessments
  • Ability to compare the same questions from different assessments

Back Ground

This blue print describes the extensions to use the Survey Tool to implement the ADAT project for IFRC. It is based on the initial specification from the GSoC project: http://wiki.sahanafoundation.org/doku.php/foundation:surveytool_spec, although reflecting changes due to improvements to the Sahana Eden Framework and lessons learned from the GSoC project.

Data Model


http://yuml.me/diagram/scruffy/class/edit/%23%20Cool%20UML%20Diagram,%20%5BTemplate%5D+1-%3E0..*%5BSections%5D,%20%5BSections%5D+1-%20%3E0..*%5BSurvey%20Question%5D,%20%5BQuestion%5D+1-%3E0..*%5BSurvey%20Question%5D%20%20,%20%5BTemplate%5D+1-%3E0..*%5BSeries%5D,%20%5BSeries%5D+1-%3E0..*%5BTable%20for%20Survey%20Answers%5D,%20%5BTemplate%5Dused%20to%20define-.-%3E%5BTables%20for%20Survey%20Answers%5D.

Template

Table to store all the information about an assessment

Series

Table to store data related to a specific "instance" of a template:

  • Title
  • Conducted By (Person & Organisation)
  • Logo (Default from Org Logo)
  • Language
  • Duration

Sections

Used to split an assessment up into different sections

  • Reuse the existing 'subheadings' functionality to split a create form into different "sections" (with headings)
    • see rat() in controllers/assess.py

Section Question

Table to link questions with sections

Question

Library of questions which can be reused on numerous assessment templates. This table will have to store all information needed to construct the questions (widget definition).
See http://wiki.sahanafoundation.org/doku.php/foundation:surveytool_spec#question_data_types for types of questions.

Tables for Survey Answers

Table to store data for completed assessments will be defined dynamically when that assessment is first filled. The name of this table will be stored in the template table. The Survey will be accessed via the REST Controller to be filled out, analysed, exported, etc.
This can certainly utilise the new S3Request capability to handle foreign table access, so that you do not need a dedicated controller per survey table, but can just create a suitable request substitute from the controller, like:

r = s3mgr.parse_request(prefix=xxx, name=yyy) output = r()

or, if you want more granular control, then use it URL-like:

r = s3mgr.parse_request(c=xxx, f=yyy, args="create", vars="...") output = r()

where xxx_yyy is the respective survey answer table.

Work Flow

Create Assessment Template

  1. Enter basic data for the Template
  2. Add a Section to the Template
  3. Add a Question to the Section, by either:
    1. Creating a new Question
    2. Reusing an existing Question
  4. Repeat steps 2. & 3. as required

Fill Assessment

  1. Select a Assessment Template to complete
  2. If this is a new template
    1. Create a table based on data in the Template, Sections, Section Questions and Question.
    2. Lock all of the records in these tables (Template can't be modified after it's been used.
    3. Optional: Create a copy of the template (and components) so that it can be modified at a later date.
  3. Open the table for the Assessment Template in a regular Create view

Analyse Assessment

Basic

  1. Select an Assessment Template which has been completed
  2. Select a range of completed assessments by:
    1. Using the existing search method
    2. Selecting rows in the table (new feature)
  3. View all the results for that Assessment Template using
    1. Tables (& PDF & Excel)
    2. Plots (Graphs)
    3. Map (As a pin which will open the survey results)
    4. Statistical (Sum, Average, Min, Max) - this could be an extension to our Datatables

Advanced

  1. Select a question (or range of questions)
  2. Select a range of completed assessments by:
    1. Using the existing search method
    2. Selecting rows in the table (new feature)
  3. View all the results for that question from ALL Assessment Template using
    1. Tables (& PDF & Excel)
    2. Plots (Graphs)
    3. Map (As different coloured pins or highlighted areas on the map)
    4. Statistical (Sum, Average, Min, Max) - this could be an extension to our Datatables

Additional Functionality

Translation

Implement a generic UI feature which allows the translation of strings which are stored in the database. This could be based on the web2py admin UI.

Tasks

  • Roles and permissions
  • Create the data model
    • Template and series
    • Section and questions
    • Question type, standard questions (and maybe standard sections)
  • Create Test Data
    • Design the CSV and xsl for each table
    • Add some basic data (as a minimum)
      • 1 template
      • 2 series
      • 5 questions in each section
      • 20 completed surveys in each series
    • Add additional data for extensive testing
      • probably need at least 11 templates (to test the pagination of dataTable row select)
  • UI for creating a template
    • Create a new template
    • Reuse an existing template
    • List all templates (filter on status - pending, active & completed)
    • add a section (select a standard section-?)
    • add or select questions
    • select a question type
    • modify a question type
  • UI for assessment data
    • List templates (silently manage the template status so if necessary it is locked)
    • Enter answers to the template
    • Remember the template that the user has been working on for easy recall
  • UI for basic analysis
    • Select the template(s) for analysis
    • Select the questions for analysis (optional - default will be all)
    • Complete the enhancement of dataTables to manage multi-row select
    • Provide basic summary on screen
    • Export details to excel (one sheet per template, one row per answer)
    • PDF presentation of the screen display
  • UI for advanced analysis
    • Add to the screen and PDF presentation by adding:
      • charts (based on question type defaults - using matplotlib)
      • maps (based on question type defaults)
    • Select analysis type for each question (default will depend upon the question type)
    • Select data that can be aggregated
  • Dynamic translation of strings
    • Need to look at how web2py admin does this.
  • Printed (pdf) format
    • Add image handling in S3PDF
    • Add proper header and footer handling in S3PDF

Attachments (2)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.