Skip to content
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

Open API spec for risks/categories #385

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,45 @@ paths:
PersonNotFoundError:
$ref: "#/components/examples/PersonNotFoundError"

/v1/persons/{hmppsId}/risks/categories:
get:
tags:
- persons
summary: Returns the categories related to an offender.
parameters:
- $ref: "#/components/parameters/HmppsId"
responses:
"200":
description: Successfully found risk categories for a person with the provided HMPPS ID.
content:
application/json:
schema:
type: object
properties:
data:
type: object
properties:
offenderNo:
type: string
assessments:
type: array
minItems: 0
items:
$ref: "#/components/schemas/RiskAssessment"
category:
type: string
categoryCode:
type: string
"404":
description: Failed to find risk categories a person with the provided HMPPS ID.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
examples:
PersonNotFoundError:
$ref: "#/components/examples/PersonNotFoundError"

/v1/persons/{hmppsId}/needs:
get:
tags:
Expand Down Expand Up @@ -1736,6 +1775,45 @@ components:
`SEC86` - Section 86 of 2000 Act,
`SUP` - Sentence Length,
`SUSP` - Suspension Period
RiskAssessment:
type: object
properties:
classificationCode:
type: string
example: C
description: The classification code of the risk
classification:
type: string
example: Cat C
description: The classification of the code
assessmentCode:
type: string
example: CATEGORY
description: The assessment code
assessmentDescription:
type: string
example: Categorisation
description: The description of the assessment
assessmentDate:
type: string
example: 2018-02-11
description: The date of the assessment
nextReviewDate:
type: string
example: 2018-02-11
description: Next review date
assessmentAgencyId:
type: string
example: MDI
description: Agency ID of the assessment
assessmentStatus:
type: string
example: P
description: The status of the assessment
assessmentComment:
type: string
example: Comment details
description: Comments regarding the assessment
RiskScore:
type: object
properties:
Expand Down
Loading