Skip to content

ministryofjustice/hmpps-manage-adjudications-api

Repository files navigation

Hmpps manage adjudications API

CircleCI Docker Repository on Quay API docs Repo standards badge

Features

  • start a new draft adjudication
  • add incident details, offence rules and roles, statements, damages, evidence and witnesses to the draft
  • submit a draft, creating a reported adjudication
  • review a reported adjudication
  • add amend hearings and outcomes
  • add / amend punishments

The frontend can be found here: https://github.com/ministryofjustice/hmpps-manage-adjudications

Record security

The Active-Caseload header parameter is used in conjunction with the front end, to avoid prisoner officers or ALO's navigating to records they are not allowed to action, it is only use for endpoints for a specific resource, and is not used for all reports endpoints

Transfers

Transfers are handled by events within the api. If a prisoner is transferred, a service will identify whether the prisoner has any transfer in a transferable state, and will mark the new agency as the override agency

Adding an offence rule

Due to nomis synchronisation, confirm if a new nomis code is required. The majority of work to add a new offence is handled by the front end, based on the questions and decision paths.

The api would require a new OffenceCode, the original mapping spreadsheet can be found at https://docs.google.com/spreadsheets/d/1Dx1CRSeJTjIQhDY8v4NrxYk-sUhVgbZgiW08WOo1Hk0/edit?usp_dm=false#gid=1375955278

Paragraph descriptions will need gender based content

Hearing outcomes and outcomes

Validation and ordering of the outcomes is important. A hearing can have a hearing outcome, and generally an outcome (except for adjourn). You can also have outcomes, without hearings. In addition, from a rendering perspective, referrals have referral outcomes.

The api handles the complexity for rendering on behalf of the UI.

For guidance refer to the integration tests which demonstrate how the user will build this model and how it should be represented for the UI

Instructions

Running locally

For running locally against docker instances of the following services:

  • run this application independently e.g. in IntelliJ

docker-compose -f docker-compose-local.yml up

Running all services including this service

docker-compose up

Tests

Before running the tests docker-compose up needs to be running and to have finished loading before you start running the tests. Once done you can run the tests by running ./gradlew build

Running locally

./gradlew bootRun --args='--spring.profiles.active=dev-local'

Architecture

High Level architecture show below Architecture

Architecture decision records start here

Glossary

There are numerous terms and acronyms used in this codebase that aren't immediately obvious, including

Term Definition
HMPPS HM Prison and Probation Service, and executive agency of the MoJ
MOJ Ministry of Justice

Licence

MIT License

About

An API providing backend functionality to the adjudication process

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published