Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -304,4 +304,4 @@ repos:
# Only scan OpenSPP spp_* modules (not scripts, endpoint handlers, etc.)
files: ^spp_
# Exclude test files, migrations, and demo-only modules
exclude: ^(tests/|scripts/tests/|.*/tests/.*|.*/migrations/.*|spp_4ps_demo/)
exclude: ^(tests/|scripts/tests/|.*/tests/.*|.*/migrations/.*|spp_4ps_demo/|spp_case_demo/|spp_grm_demo/)
31 changes: 31 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Codecov configuration for OpenSPP
# https://docs.codecov.io/docs/codecov-yaml

coverage:
status:
project:
default:
# Only check coverage on files changed in this PR, not the entire project.
# CI only tests changed modules, so project-wide coverage would always drop
# on PRs that don't re-test every module.
only_pulls: true
patch:
default:
target: 70%

# Each module uploads with its own flag (flags: ${{ matrix.module }} in CI).
# Carry forward coverage from previous commits so modules not tested in this
# PR still contribute to overall project coverage.
flag_management:
default_rules:
carryforward: true

comment:
layout: "reach,diff,flags,files"
behavior: default
require_changes: false

ignore:
- "**/tests/**"
- "**/migrations/**"
- "scripts/**"
188 changes: 188 additions & 0 deletions spp_case_base/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
============================
OpenSPP Case Management Base
============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e58edc2517398a8339ded8ff8bf1eb6b07df10f996637a160c55d36dbf41b8a6
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
:target: https://odoo-community.org/page/development-status
:alt: Production/Stable
.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OpenSPP%2FOpenSPP2-lightgray.png?logo=github
:target: https://github.com/OpenSPP/OpenSPP2/tree/19.0/spp_case_base
:alt: OpenSPP/OpenSPP2

|badge1| |badge2| |badge3|

Case management system for social protection programs. Tracks cases from
intake through assessment, intervention planning, and closure with
workflow stages, risk assessments, and team assignment. Automated review
scheduling via cron job ensures timely case monitoring.

Key Capabilities
~~~~~~~~~~~~~~~~

- Track cases for individuals, households, or groups with configurable
types and workflow stages
- Conduct assessments with risk scoring (0-100) and automatic risk level
classification (low/medium/high/critical)
- Create versioned intervention plans with approval workflows and
progress tracking
- Document case activities: visits, notes, referrals to external
services
- Assign cases to workers and teams with supervisor oversight
- Schedule automated review reminders for cases approaching or past
review dates

Key Models
~~~~~~~~~~

+--------------------------------+-------------------------------------+
| Model | Description |
+================================+=====================================+
| ``spp.case`` | Core case record with client and |
| | assignment |
+--------------------------------+-------------------------------------+
| ``spp.case.type`` | Case type with default intensity |
| | and caseload |
+--------------------------------+-------------------------------------+
| ``spp.case.stage`` | Workflow stage with phase and |
| | requirements |
+--------------------------------+-------------------------------------+
| ``spp.case.assessment`` | Assessment with risk score and |
| | findings |
+--------------------------------+-------------------------------------+
| ``spp.case.intervention.plan`` | Versioned plan with approval |
| | workflow |
+--------------------------------+-------------------------------------+
| ``spp.case.intervention`` | Individual intervention with status |
| | tracking |
+--------------------------------+-------------------------------------+
| ``spp.case.visit`` | Client visit with type and notes |
+--------------------------------+-------------------------------------+
| ``spp.case.note`` | Case note with confidentiality flag |
+--------------------------------+-------------------------------------+
| ``spp.case.referral`` | External service referral with |
| | status |
+--------------------------------+-------------------------------------+
| ``spp.case.team`` | Team with supervisor and members |
+--------------------------------+-------------------------------------+
| ``spp.case.risk.factor`` | Risk factor with severity weight |
+--------------------------------+-------------------------------------+
| ``spp.case.vulnerability`` | Vulnerability for assessment |
+--------------------------------+-------------------------------------+
| ``spp.case.closure.reason`` | Closure reason with outcome type |
+--------------------------------+-------------------------------------+

Configuration
~~~~~~~~~~~~~

After installing:

1. Navigate to **Case Management > Configuration > Case Setup > Case
Types** and create case types
2. Navigate to **Case Management > Configuration > Case Setup > Case
Stages** and define workflow stages
3. Navigate to **Case Management > Configuration > Case Setup > Case
Teams** and create teams
4. Navigate to **Case Management > Configuration > Assessment > Risk
Factors** and define risk factors
5. Navigate to **Case Management > Configuration > Assessment >
Vulnerabilities** and define vulnerabilities
6. Navigate to **Case Management > Configuration > Closure > Closure
Reasons** and set up closure reasons
7. Verify the cron job **Case Management: Check Review Schedules** is
active under **Settings > Technical > Scheduled Actions**

UI Location
~~~~~~~~~~~

- **Cases**: Case Management > Cases > All Cases / My Cases / Unassigned
Cases
- **Activities**: Case Management > Activities > Visits / Notes /
Referrals / Assessments
- **Planning**: Case Management > Planning > Intervention Plans /
Interventions
- **Configuration**: Case Management > Configuration (Manager role
required)
- **Form tabs**: Details, Participants, Programs, History

Security
~~~~~~~~

========================= ==============================================
Group Access
========================= ==============================================
``group_case_viewer`` Read-only access to all case records
``group_case_worker`` Full CRUD on cases and activities
``group_case_supervisor`` Full CRUD on cases and activities, read config
``group_case_manager`` Full CRUD including configuration
========================= ==============================================

Extension Points
~~~~~~~~~~~~~~~~

- Override ``_check_stage_requirements()`` on ``spp.case`` for custom
stage validation
- Override ``_compute_risk_level()`` on ``spp.case.assessment`` to
customize risk calculation thresholds
- Extend ``spp.case.intervention.plan`` with domain-specific fields
- Hook ``_cron_check_reviews()`` to add custom review logic or
notification templates

Dependencies
~~~~~~~~~~~~

``base``, ``mail``, ``portal``, ``spp_security``

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OpenSPP/OpenSPP2/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OpenSPP/OpenSPP2/issues/new?body=module:%20spp_case_base%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* OpenSPP.org

Maintainers
-----------

.. |maintainer-jeremi| image:: https://github.com/jeremi.png?size=40px
:target: https://github.com/jeremi
:alt: jeremi
.. |maintainer-gonzalesedwin1123| image:: https://github.com/gonzalesedwin1123.png?size=40px
:target: https://github.com/gonzalesedwin1123
:alt: gonzalesedwin1123
.. |maintainer-emjay0921| image:: https://github.com/emjay0921.png?size=40px
:target: https://github.com/emjay0921
:alt: emjay0921

Current maintainers:

|maintainer-jeremi| |maintainer-gonzalesedwin1123| |maintainer-emjay0921|

This module is part of the `OpenSPP/OpenSPP2 <https://github.com/OpenSPP/OpenSPP2/tree/19.0/spp_case_base>`_ project on GitHub.

You are welcome to contribute.
1 change: 1 addition & 0 deletions spp_case_base/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
42 changes: 42 additions & 0 deletions spp_case_base/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# pylint: disable=pointless-statement
{
"name": "OpenSPP Case Management Base",
"version": "19.0.1.0.0",
"category": "OpenSPP/Monitoring",
"summary": "Core case management functionality for OpenSPP",
"author": "OpenSPP.org",
"website": "https://github.com/OpenSPP/OpenSPP2",
"license": "LGPL-3",
"development_status": "Production/Stable",
"maintainers": ["jeremi", "gonzalesedwin1123", "emjay0921"],
"depends": [
"base",
"mail",
"portal",
"spp_security",
],
"data": [
# Security
"security/privileges.xml",
"security/groups.xml",
"security/case_security.xml",
"security/ir.model.access.csv",
"security/rules.xml",
# Data
"data/ir_cron.xml",
# Views - load actions first, then main case view that references them
"views/case_stage_views.xml",
"views/case_type_views.xml",
"views/case_assessment_views.xml",
"views/case_intervention_views.xml",
"views/case_activity_views.xml",
"views/case_config_views.xml",
"views/case_views.xml",
# Menus
"views/case_menus.xml",
],
"demo": [],
"installable": True,
"application": True,
"auto_install": False,
}
12 changes: 12 additions & 0 deletions spp_case_base/data/ir_cron.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="cron_check_case_reviews" model="ir.cron">
<field name="name">Case Management: Check Review Schedules</field>
<field name="model_id" ref="model_spp_case" />
<field name="state">code</field>
<field name="code">model._cron_check_reviews()</field>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="active" eval="True" />
</record>
</odoo>
10 changes: 10 additions & 0 deletions spp_case_base/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from . import case_config
from . import case_stage
from . import case_type
from . import case
from . import case_assessment
from . import case_intervention_plan
from . import case_intervention
from . import case_visit
from . import case_note
from . import case_referral
Loading
Loading