113
113
}
114
114
}
115
115
}
116
+ },
117
+ "/risks/crn/{crn}/risk-management-plan" : {
118
+ "get" : {
119
+ "tags" : [
120
+ " risks-controller"
121
+ ],
122
+ "description" : " Gets Risk Management Plan from latest complete assessments for crn" ,
123
+ "operationId" : " getRiskManagementPlan" ,
124
+ "parameters" : [
125
+ {
126
+ "name" : " crn" ,
127
+ "in" : " path" ,
128
+ "description" : " CRN" ,
129
+ "required" : true ,
130
+ "schema" : {
131
+ "type" : " string"
132
+ },
133
+ "example" : " D1974X"
134
+ }
135
+ ],
136
+ "responses" : {
137
+ "200" : {
138
+ "description" : " OK" ,
139
+ "content" : {
140
+ "*/*" : {
141
+ "schema" : {
142
+ "$ref" : " #/components/schemas/RiskManagementPlansDto"
143
+ }
144
+ }
145
+ }
146
+ },
147
+ "400" : {
148
+ "description" : " Bad Request" ,
149
+ "content" : {
150
+ "*/*" : {
151
+ "schema" : {
152
+ "oneOf" : [
153
+ {
154
+ "type" : " object"
155
+ },
156
+ {
157
+ "$ref" : " #/components/schemas/ErrorResponse"
158
+ }
159
+ ]
160
+ }
161
+ }
162
+ }
163
+ },
164
+ "401" : {
165
+ "description" : " Unauthorised" ,
166
+ "content" : {
167
+ "*/*" : {
168
+ "schema" : {
169
+ "$ref" : " #/components/schemas/ErrorResponse"
170
+ }
171
+ }
172
+ }
173
+ },
174
+ "403" : {
175
+ "description" : " User does not have permission to access offender with provided CRN" ,
176
+ "content" : {
177
+ "*/*" : {
178
+ "schema" : {
179
+ "$ref" : " #/components/schemas/ErrorResponse"
180
+ }
181
+ }
182
+ }
183
+ },
184
+ "404" : {
185
+ "description" : " User does not exist in Delius for provided user name" ,
186
+ "content" : {
187
+ "*/*" : {
188
+ "schema" : {
189
+ "$ref" : " #/components/schemas/ErrorResponse"
190
+ }
191
+ }
192
+ }
193
+ },
194
+ "409" : {
195
+ "description" : " Conflict" ,
196
+ "content" : {
197
+ "*/*" : {
198
+ "schema" : {
199
+ "$ref" : " #/components/schemas/SupplementaryRiskDto"
200
+ }
201
+ }
202
+ }
203
+ },
204
+ "500" : {
205
+ "description" : " Internal Server Error" ,
206
+ "content" : {
207
+ "*/*" : {
208
+ "schema" : {
209
+ "$ref" : " #/components/schemas/ErrorResponse"
210
+ }
211
+ }
212
+ }
213
+ }
214
+ }
215
+ }
116
216
}
117
217
},
118
218
"components" : {
119
219
"schemas" : {
220
+ "ErrorResponse" : {
221
+ "required" : [
222
+ " errorCode" ,
223
+ " status" ,
224
+ " userMessage"
225
+ ],
226
+ "type" : " object" ,
227
+ "properties" : {
228
+ "status" : {
229
+ "type" : " integer" ,
230
+ "description" : " Status of Error Code" ,
231
+ "format" : " int32" ,
232
+ "example" : 400
233
+ },
234
+ "developerMessage" : {
235
+ "type" : " string" ,
236
+ "description" : " Developer Information message" ,
237
+ "example" : " System is down"
238
+ },
239
+ "errorCode" : {
240
+ "type" : " integer" ,
241
+ "description" : " Internal Error Code" ,
242
+ "format" : " int32" ,
243
+ "example" : 20012
244
+ },
245
+ "userMessage" : {
246
+ "type" : " string" ,
247
+ "description" : " Error message information" ,
248
+ "example" : " Prisoner Not Found"
249
+ },
250
+ "moreInfo" : {
251
+ "type" : " string" ,
252
+ "description" : " Additional information about the error" ,
253
+ "example" : " Hard disk failure"
254
+ }
255
+ }
256
+ },
257
+ "RiskManagementPlanDto" : {
258
+ "required" : [
259
+ " assessmentId" ,
260
+ " assessmentStatus" ,
261
+ " assessmentType"
262
+ ],
263
+ "type" : " object" ,
264
+ "properties" : {
265
+ "assessmentId" : {
266
+ "type" : " integer" ,
267
+ "format" : " int64"
268
+ },
269
+ "dateCompleted" : {
270
+ "type" : " object" ,
271
+ "example" : " 2024-05-08T23:11:23"
272
+ },
273
+ "partcompStatus" : {
274
+ "type" : " string"
275
+ },
276
+ "initiationDate" : {
277
+ "type" : " object" ,
278
+ "example" : " 2024-05-08T23:11:23"
279
+ },
280
+ "assessmentStatus" : {
281
+ "type" : " string"
282
+ },
283
+ "assessmentType" : {
284
+ "type" : " string"
285
+ },
286
+ "superStatus" : {
287
+ "type" : " string"
288
+ },
289
+ "keyInformationCurrentSituation" : {
290
+ "type" : " string"
291
+ },
292
+ "furtherConsiderationsCurrentSituation" : {
293
+ "type" : " string"
294
+ },
295
+ "supervision" : {
296
+ "type" : " string"
297
+ },
298
+ "monitoringAndControl" : {
299
+ "type" : " string"
300
+ },
301
+ "interventionsAndTreatment" : {
302
+ "type" : " string"
303
+ },
304
+ "victimSafetyPlanning" : {
305
+ "type" : " string"
306
+ },
307
+ "contingencyPlans" : {
308
+ "type" : " string"
309
+ },
310
+ "laterWIPAssessmentExists" : {
311
+ "type" : " boolean"
312
+ },
313
+ "latestWIPDate" : {
314
+ "type" : " object" ,
315
+ "example" : " 2024-05-08T23:11:23"
316
+ },
317
+ "laterSignLockAssessmentExists" : {
318
+ "type" : " boolean"
319
+ },
320
+ "latestSignLockDate" : {
321
+ "type" : " object" ,
322
+ "example" : " 2024-05-08T23:11:23"
323
+ },
324
+ "laterPartCompUnsignedAssessmentExists" : {
325
+ "type" : " boolean"
326
+ },
327
+ "latestPartCompUnsignedDate" : {
328
+ "type" : " object" ,
329
+ "example" : " 2024-05-08T23:11:23"
330
+ },
331
+ "laterPartCompSignedAssessmentExists" : {
332
+ "type" : " boolean"
333
+ },
334
+ "latestPartCompSignedDate" : {
335
+ "type" : " object" ,
336
+ "example" : " 2024-05-08T23:11:23"
337
+ },
338
+ "laterCompleteAssessmentExists" : {
339
+ "type" : " boolean"
340
+ },
341
+ "latestCompleteDate" : {
342
+ "type" : " object" ,
343
+ "example" : " 2024-05-08T23:11:23"
344
+ }
345
+ }
346
+ },
347
+ "RiskManagementPlansDto" : {
348
+ "required" : [
349
+ " crn" ,
350
+ " limitedAccessOffender" ,
351
+ " riskManagementPlan"
352
+ ],
353
+ "type" : " object" ,
354
+ "properties" : {
355
+ "crn" : {
356
+ "type" : " string"
357
+ },
358
+ "limitedAccessOffender" : {
359
+ "type" : " boolean"
360
+ },
361
+ "riskManagementPlan" : {
362
+ "type" : " array" ,
363
+ "items" : {
364
+ "$ref" : " #/components/schemas/RiskManagementPlanDto"
365
+ }
366
+ }
367
+ }
368
+ },
369
+ "SupplementaryRiskDto" : {
370
+ "required" : [
371
+ " createdByUserType" ,
372
+ " createdDate" ,
373
+ " crn" ,
374
+ " riskSummaryComments" ,
375
+ " source" ,
376
+ " sourceId"
377
+ ],
378
+ "type" : " object" ,
379
+ "properties" : {
380
+ "supplementaryRiskId" : {
381
+ "type" : " string" ,
382
+ "description" : " Supplementary Risk ID" ,
383
+ "format" : " uuid" ,
384
+ "example" : " 78beac68-884c-4784-9bea-fd8088f52a47"
385
+ },
386
+ "source" : {
387
+ "type" : " string" ,
388
+ "description" : " Source of Risk" ,
389
+ "example" : " INTERVENTION_REFERRAL" ,
390
+ "enum" : [
391
+ " INTERVENTION_REFERRAL"
392
+ ]
393
+ },
394
+ "sourceId" : {
395
+ "type" : " string" ,
396
+ "description" : " Source Id" ,
397
+ "example" : " 78beac68-884c-4784-9bea-fd8088f52a47 or 1989823"
398
+ },
399
+ "crn" : {
400
+ "type" : " string" ,
401
+ "description" : " Offender CRN" ,
402
+ "example" : " DX12340A"
403
+ },
404
+ "createdByUser" : {
405
+ "type" : " string" ,
406
+ "description" : " Created By User" ,
407
+ "example" : " Paul Newman"
408
+ },
409
+ "createdByUserType" : {
410
+ "type" : " string" ,
411
+ "description" : " Created By User Type" ,
412
+ "example" : " delius"
413
+ },
414
+ "createdDate" : {
415
+ "type" : " object" ,
416
+ "example" : " 2024-05-08T23:11:23"
417
+ },
418
+ "redactedRisk" : {
419
+ "$ref" : " #/components/schemas/RedactedOasysRiskDto"
420
+ },
421
+ "riskSummaryComments" : {
422
+ "type" : " string" ,
423
+ "description" : " Risk Summary Comments" ,
424
+ "example" : " Free text up to 4000 characters"
425
+ }
426
+ }
427
+ },
428
+ "RedactedOasysRiskDto" : {
429
+ "type" : " object" ,
430
+ "properties" : {
431
+ "riskWho" : {
432
+ "type" : " string" ,
433
+ "description" : " Question corresponding to OASys ROSH 10.1, 'Who is at risk'" ,
434
+ "example" : " Free text up to 4000 characters"
435
+ },
436
+ "riskWhen" : {
437
+ "type" : " string" ,
438
+ "description" : " Question corresponding to OASys ROSH 10.3, 'When is the risk likely to be greatest'" ,
439
+ "example" : " Free text up to 4000 characters"
440
+ },
441
+ "riskNature" : {
442
+ "type" : " string" ,
443
+ "description" : " Question corresponding to OASys ROSH 10.2, 'What is the nature of the risk'" ,
444
+ "example" : " Free text up to 4000 characters"
445
+ },
446
+ "concernsSelfHarm" : {
447
+ "type" : " string" ,
448
+ "description" : " Question corresponding to OASys ROSH 3.2, 'Concerns in relation to self harm'" ,
449
+ "example" : " Free text up to 4000 characters"
450
+ },
451
+ "concernsSuicide" : {
452
+ "type" : " string" ,
453
+ "description" : " Question corresponding to OASys ROSH 3.1, 'Concerns in relation to suicide'" ,
454
+ "example" : " Free text up to 4000 characters"
455
+ },
456
+ "concernsHostel" : {
457
+ "type" : " string" ,
458
+ "description" : " Question corresponding to OASys ROSH 3.3, 'Concerns in relation to coping in a hostel setting'" ,
459
+ "example" : " Free text up to 4000 characters"
460
+ },
461
+ "concernsVulnerability" : {
462
+ "type" : " string" ,
463
+ "description" : " Question corresponding to OASys ROSH 3.4, 'Concerns in relation to vulnerability'" ,
464
+ "example" : " Free text up to 4000 characters"
465
+ }
466
+ },
467
+ "description" : " Redacted risk answers"
468
+ },
120
469
"AllRoshRiskDto_AllRisksView" : {
121
470
"required" : [
122
471
" otherRisks" ,
650
999
}
651
1000
}
652
1001
}
653
- }
1002
+ }
0 commit comments