Skip to content

Commit 1482b28

Browse files
authored
Merge pull request #274 from ministryofjustice/HIA-535-update-open-api-spec-person-risks
Hia 535 update open api spec person risks
2 parents 23f2b38 + d217fb3 commit 1482b28

File tree

1 file changed

+186
-0
lines changed

1 file changed

+186
-0
lines changed

openapi.yml

+186
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,33 @@ paths:
362362
PersonNotFoundError:
363363
$ref: "#/components/examples/PersonNotFoundError"
364364

365+
/v1/persons/{hmppsId}/risks:
366+
get:
367+
tags:
368+
- risks
369+
summary: Returns Risk of Serious Harm (ROSH) risks associated with a person. Returns only assessments completed in the last year.
370+
parameters:
371+
- $ref: "#/components/parameters/HmppsId"
372+
responses:
373+
"200":
374+
description: Successfully found risks for a person with the provided HMPPS ID.
375+
content:
376+
application/json:
377+
schema:
378+
type: object
379+
properties:
380+
data:
381+
$ref: "#/components/schemas/Risks"
382+
"404":
383+
description: Failed to find risks for a person with the provided HMPPS ID.
384+
content:
385+
application/json:
386+
schema:
387+
$ref: "#/components/schemas/Error"
388+
examples:
389+
PersonNotFoundError:
390+
$ref: "#/components/examples/PersonNotFoundError"
391+
365392
/{TBC}/v1/persons/{Id}/accommodations:
366393
get:
367394
summary: FUTURE ENDPOINT - Returns accommodation and referral information associated with a person.
@@ -1042,6 +1069,165 @@ components:
10421069
`VERY_HIGH`,
10431070
`NOT_APPLICABLE`,
10441071
1072+
Risks:
1073+
type: object
1074+
properties:
1075+
assessedOn:
1076+
type: string
1077+
format: date
1078+
example: 2023-09-05T10:15:41
1079+
description: Date of risk assessment
1080+
riskToSelf:
1081+
$ref: "#/components/schemas/RiskToSelf"
1082+
otherRisks:
1083+
$ref: "#/components/schemas/OtherRisks"
1084+
summary:
1085+
$ref: "#/components/schemas/Summary"
1086+
1087+
RiskToSelf:
1088+
type: object
1089+
properties:
1090+
suicide:
1091+
$ref: "#/components/schemas/Risk"
1092+
selfHarm:
1093+
$ref: "#/components/schemas/Risk"
1094+
custody:
1095+
$ref: "#/components/schemas/Risk"
1096+
hostelSetting:
1097+
$ref: "#/components/schemas/Risk"
1098+
vulnerability:
1099+
$ref: "#/components/schemas/Risk"
1100+
1101+
Risk:
1102+
type: object
1103+
properties:
1104+
risk:
1105+
type: string
1106+
example: "YES"
1107+
enum: [ YES, NO, DK, NA ]
1108+
description: Presence of risk
1109+
previous:
1110+
type: string
1111+
example: "NO"
1112+
enum: [ YES, NO, DK, NA ]
1113+
description: Previous concerns
1114+
previousConcernsText:
1115+
type: string
1116+
example: "Risk of self harm concerns due to ..."
1117+
description: Supporting comments for any previous concerns
1118+
current:
1119+
type: string
1120+
example: "YES"
1121+
enum: [ YES, NO, DK, NA ]
1122+
description: Current concerns
1123+
currentConcernsText:
1124+
type: string
1125+
example: "Risk of self harm concerns due to ..."
1126+
description: Supporting comments for any current concerns
1127+
1128+
OtherRisks:
1129+
type: object
1130+
properties:
1131+
escapeOrAbscond:
1132+
type: string
1133+
example: "YES"
1134+
enum: [ YES, NO, DK, NA ]
1135+
description: Risk of escape/abscond
1136+
controlIssuesDisruptiveBehaviour:
1137+
type: string
1138+
example: "DK"
1139+
enum: [ YES, NO, DK, NA ]
1140+
description: Risk control issues/disruptive behaviour
1141+
breachOfTrust:
1142+
type: string
1143+
example: "NO"
1144+
enum: [ YES, NO, DK, NA ]
1145+
description: Risk of breach of trust
1146+
riskToOtherPrisoners:
1147+
type: string
1148+
example: "YES"
1149+
enum: [ YES, NO, DK, NA ]
1150+
description: Risk to other prisoners
1151+
1152+
Summary:
1153+
type: object
1154+
properties:
1155+
whoIsAtRisk:
1156+
type: string
1157+
example: "X, Y and Z are at risk"
1158+
description: Who is at risk
1159+
natureOfRisk:
1160+
type: string
1161+
example: "The nature of the risk is X"
1162+
description: What is the nature of the risk
1163+
riskImminence:
1164+
type: string
1165+
example: The risk is imminent and more probable in X situation
1166+
description: When is the risk likely to be greatest. Consider the timescale and indicate whether risk is immediate or not. Consider the risks in custody as well as on release.
1167+
riskIncreaseFactors:
1168+
type: string
1169+
example: If offender is in situation X the risk can be higher
1170+
description: What circumstances are likely to increase risk. Describe factors, actions, events which might increase level of risk, now and in the future.
1171+
riskMitigationFactors:
1172+
type: string
1173+
example: Giving offender therapy in X will reduce the risk
1174+
description: What factors are likely to reduce the risk. Describe factors, actions, and events which may reduce or contain the level of risk. What has previously stopped them?
1175+
overallRiskLevel:
1176+
type: string
1177+
example: HIGH
1178+
enum: [ VERY_HIGH, HIGH, MEDIUM, LOW ]
1179+
description: The overall risk level
1180+
riskInCommunity:
1181+
type: object
1182+
description: >
1183+
Assess the risk of serious harm the offender poses on the basis that they could be released imminently back into the community. This field is a map which can return all or some of the properties given.
1184+
properties:
1185+
children:
1186+
type: string
1187+
example: HIGH
1188+
enum: [ VERY_HIGH, HIGH, MEDIUM, LOW ]
1189+
public:
1190+
type: string
1191+
example: Medium
1192+
enum: [ VERY_HIGH, HIGH, MEDIUM, LOW ]
1193+
knownAdult:
1194+
type: string
1195+
example: VERY_HIGH
1196+
enum: [ VERY_HIGH, HIGH, MEDIUM, LOW ]
1197+
staff:
1198+
type: string
1199+
example: HIGH
1200+
enum: [ VERY_HIGH, HIGH, MEDIUM, LOW ]
1201+
prisoners:
1202+
type: string
1203+
example: LOW
1204+
enum: [ VERY_HIGH, HIGH, MEDIUM, LOW ]
1205+
riskInCustody:
1206+
type: object
1207+
description: >
1208+
Assess both the risk of serious harm the offender presents now, in custody, and the risk they could present to others whilst in a custodial setting. This field is a map which can return all or some of the properties given.
1209+
properties:
1210+
children:
1211+
type: string
1212+
example: HIGH
1213+
enum: [ VERY_HIGH, HIGH, MEDIUM, LOW ]
1214+
public:
1215+
type: string
1216+
example: Medium
1217+
enum: [ VERY_HIGH, HIGH, MEDIUM, LOW ]
1218+
knownAdult:
1219+
type: string
1220+
example: VERY_HIGH
1221+
enum: [ VERY_HIGH, HIGH, MEDIUM, LOW ]
1222+
staff:
1223+
type: string
1224+
example: HIGH
1225+
enum: [ VERY_HIGH, HIGH, MEDIUM, LOW ]
1226+
prisoners:
1227+
type: string
1228+
example: LOW
1229+
enum: [ VERY_HIGH, HIGH, MEDIUM, LOW ]
1230+
10451231
Needs:
10461232
type: object
10471233
properties:

0 commit comments

Comments
 (0)