-
Notifications
You must be signed in to change notification settings - Fork 1
feat(grm,case): add case management modules and sync GRM with stable #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
c118239
feat(grm,case): add case management modules and sync GRM with stable
gonzalesedwin1123 a954dae
chore: apply ruff-format and prettier auto-fixes
gonzalesedwin1123 6bc448e
test: add tests for 9 modules to reach 90%+ coverage
gonzalesedwin1123 6671bf0
feat: add spp_graduation and spp_session_tracking dependency modules
gonzalesedwin1123 591bcbc
fix(lint): resolve pre-commit errors across case and GRM modules
gonzalesedwin1123 527932f
fix(lint): apply prettier formatting and remove orphaned settings view
gonzalesedwin1123 fb02ccd
fix(lint): resolve pylint_odoo warnings across case, GRM, and session…
gonzalesedwin1123 bce3ab6
fix(lint): resolve remaining pre-commit errors across all PR modules
gonzalesedwin1123 cd896b3
fix(lint): exclude demo modules from semgrep sudo checks
gonzalesedwin1123 83cd1d6
fix(lint): annotate justified sudo() calls and fix ruff-format
gonzalesedwin1123 81abdc7
test: add tests for 90%+ coverage on spp_case_base
gonzalesedwin1123 3fce171
chore: add codecov.yml with carryforward flags
gonzalesedwin1123 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,179 @@ | ||
| ============================ | ||
| 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-Alpha-red.png | ||
| :target: https://odoo-community.org/page/development-status | ||
| :alt: Alpha | ||
| .. |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%2Fopenspp--modules-lightgray.png?logo=github | ||
| :target: https://github.com/OpenSPP/openspp-modules/tree/19.0/spp_case_base | ||
| :alt: OpenSPP/openspp-modules | ||
|
|
||
| |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`` | ||
|
|
||
| .. IMPORTANT:: | ||
| This is an alpha version, the data model and design can change at any time without warning. | ||
| Only for development or testing purpose, do not use in production. | ||
|
|
||
| **Table of contents** | ||
|
|
||
| .. contents:: | ||
| :local: | ||
|
|
||
| Bug Tracker | ||
| =========== | ||
|
|
||
| Bugs are tracked on `GitHub Issues <https://github.com/OpenSPP/openspp-modules/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/openspp-modules/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 | ||
|
|
||
| Maintainers | ||
| ----------- | ||
|
|
||
| This module is part of the `OpenSPP/openspp-modules <https://github.com/OpenSPP/openspp-modules/tree/19.0/spp_case_base>`_ project on GitHub. | ||
|
|
||
| You are welcome to contribute. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| from . import models |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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", | ||
| "website": "https://github.com/OpenSPP/openspp-modules", | ||
| "license": "LGPL-3", | ||
| "development_status": "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, | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| <?xml version="1.0" encoding="utf-8" ?> | ||
| <odoo> | ||
| <data 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> | ||
| </data> | ||
| </odoo> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
development_statusis set to "Stable", but this contradicts the "Alpha" maturity badge and the explicit warning in theREADME.rstfile. To avoid confusion and set correct expectations for users, this should be aligned with the alpha status mentioned in the documentation.