openimis-be-grievance_social_protection_py
The Grievance Reference Module is used for handling grievances in the system.
Introduction
It provides services, functionalities, and GraphQL queries related to grievance processing. It’s is designed to be deployed as a module of openimis-be_py
, the OpenIMIS backend application.
This documentation aims to provide a comprehensive guide on how to utilize, configure, and interact with the Grievance Reference Module effectively.
ORM Mapping
The module uses Object-Relational Mapping (ORM) to map data from the database to Python objects. The following ORM mappings are used:
grievance_social_protection_comment
,grievance_social_protection_historicalcomment
→Comment
: Represents Comments linked to the Tickets.grievance_social_protection_ticket
,grievance_social_protection_historicalticket
→Ticket
: Represents issued Grievance.
Developers can access and manipulate both tickets and grievances data using these mapped objects, which abstract away the underlying database complexities.
GraphQL Queries
The module provides several GraphQL queries to retrieve tasks information:
tickets
: Retrieves tickets for specified filters.ticketDetails
: Retrieves comprehensive information about the ticket.grievanceConfig
: Retrieves config of the module, including types, flags, channels, category staff roles and default resolutions.comments
: Retrieve comments for the specified filters.
GraphQL Mutations
The Deduplication Reference Module offers GraphQL mutations to manage it’s Each mutation emits default signals and returns standard error lists following the conventions of openimis-be-core_py
.
List of available mutations:
createTicket
: Creates a new grievance ticket.updateTicket
: Update grievance ticket.deleteTicket
: Delete grievance ticket.createComment
: Create a new comment for specific ticket.resolveGrievanceByComment
: Select comment and close the ticket.reopenTicket
: Reopen specific ticket.
Services
The module provides the following services:
TicketService
: Allows create, update, delete and reopen operations on the ticket.CommentService
: Allows create, update, delete and resolve by comment operations on the comments.
Developers can interact with these services to perform various operations related to individual and group management.
Configuration Options
The behavior of the Reference Module can be customized through configuration options, which can be modified via core.ModuleConfiguration
. The available configuration options are:
Role Rights For Specific Operations
gql_query_tickets_perms
, default: ["127000"],gql_query_comments_perms
, default: ["127004"],gql_mutation_create_tickets_perms
, default: ["127001"],gql_mutation_update_tickets_perms
, default: ["127002"],gql_mutation_delete_tickets_perms
, default: ["127003"],gql_mutation_create_comment_perms
, default: ["127005"],gql_mutation_resolve_grievance_perms
, default: ["127006"],grievance_types
- Types of tickets handled by system. default: [“Default”, “Category A”, “Category B”]grievance_flags
- Types of flags for the tickets, defaults: [“Default”, “Flag A”, “Flag B”]grievance_channels
- Types of channels for the tickets defaults: [“Default”, “Channel A”, “Channel B”]grievance_anonymized_fields
- Fields in the grievance that wil be anonymized {“Default”: []}resolution_times
- What is the time for task resolution for specific ticket types. Default: “5,0”default_resolution
- What are default resolution times for specified ticket types. Default: {'Default”: “5,0”, 'Category A': '4,0', 'Category B': '6,12'}attending_staff_role_ids
- staff roles eligible for handling Grievances. Default: []default_attending_staff_role_ids
- Default staff roles eligible for certain tasks. Default: {“Default”: [1, 2]}
OpenIMIS Modules Dependencies
The Reference Module relies on the following module:
core
: Provides core functionality and utilities for the OpenIMIS system.tasks
: Task management for resolving the tickets.
Did you encounter a problem or do you have a suggestion?
Please contact our Service Desk
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. https://creativecommons.org/licenses/by-sa/4.0/