You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Access to Cloud Platform’s Kubernetes cluster](https://user-guide.cloud-platform.service.justice.gov.uk/documentation/getting-started/kubectl-config.html#installing-kubectl)
14
14
15
+
As a pre-requisite to create a client certificate by running the script below, please ensure that:
16
+
- You are logged in so that you can access AWS resources via the CLI.
17
+
- Verify that you have all your AWS credentials ready by opening the config file in the ".aws" directory.
18
+
15
19
## Create a client certificate
16
20
17
-
1.Run the [generate-client-certificate.sh](/scripts/client_certificates/generate.sh) script with the name of the environment and client.
21
+
Run the [generate-client-certificate.sh](/scripts/client_certificates/generate.sh) script with the name of the environment and client.
18
22
19
23
```bash
20
24
make generate-client-certificate
21
25
```
22
-
23
26
This will output three files in the ./scripts/client_certificates directory:
24
27
25
28
- a private key e.g. `dev-nhs-client.key`
@@ -114,3 +117,14 @@ kubectl -n hmpps-integration-api-[environment] get secrets [your queue secret na
114
117
5. Create new [Cloud Platform Environments GitHub repository](https://github.com/ministryofjustice/cloud-platform-environments/tree/main) branch
115
118
6. Update terraform to load the secret value from AWS and update filter_policy value. Follow [Example](https://github.com/ministryofjustice/cloud-platform-environments/pull/22111/files). Note: The name of aws_secretsmanager_secret module has to be same as the secret name created from step 4/5 above.
116
119
7. Follow steps 3-8 in [Create an API key](#create-an-api-key) to merge branch to main.
120
+
121
+
## Create a new endpoint for a client
122
+
123
+
### Create basic infrastructure
124
+
Within the [Cloud Platform Environments GitHub repository](https://github.com/ministryofjustice/cloud-platform-environments/tree/main) and the namespace of the environment:
125
+
126
+
1. Create a branch.
127
+
2. Add a new API Gateway resource, a SQS method, a SQS method response, and an integration. Example: [api_gateway.tf](https://github.com/ministryofjustice/cloud-platform-environments/pull/22695/files)
128
+
3. Ensure that all the permissions are up-to-date and add a new role and policy for your new resource. Example: [iam.tf](https://github.com/ministryofjustice/cloud-platform-environments/pull/22787/files#diff-a376622fa4a4c2fd9404d5ee4221487259264608a0cbe36b99c150c472558f29)
129
+
4. Check that the integration is pointing to the right queue. Example: [api_gateway.tf](https://github.com/ministryofjustice/cloud-platform-environments/pull/22795/files)
130
+
5. Deploy and test (do not use Postman, rather use a GET cURL command with "x-api-key" as your header.)
description: An identifier from the Police National Computer (PNC)
1813
1798
hmppsId:
1814
1799
type: string
1815
-
example: X00001
1816
-
description: Currently a hmppsId is a CRN identifier however this will change in the future to be a new unique Hmpps identifier
1800
+
example: 2008/0545166T
1801
+
description: Hmpps identifier
1817
1802
contactDetails:
1818
1803
$ref: "#/components/schemas/ContactDetails"
1819
1804
PersonResponsibleOfficerName:
@@ -1955,7 +1940,6 @@ components:
1955
1940
nullable: true
1956
1941
prison:
1957
1942
$ref: "#/components/schemas/Prison"
1958
-
1959
1943
Punishment:
1960
1944
type: object
1961
1945
properties:
@@ -2504,6 +2488,65 @@ components:
2504
2488
type: string
2505
2489
example: "Risk of self harm concerns due to ..."
2506
2490
description: Supporting comments for any current concerns
2491
+
RiskManagementPlan:
2492
+
type: object
2493
+
properties:
2494
+
assessmentId:
2495
+
type: string
2496
+
example: "123456"
2497
+
description: The unique ID of the risk management plan
2498
+
dateCompleted:
2499
+
type: string
2500
+
example: "2024-05-04T01:04:20"
2501
+
description: The date that the risk management plan was completed
2502
+
initiationDate:
2503
+
type: string
2504
+
example: "2024-05-04T01:04:20"
2505
+
description: The date of plan initiation
2506
+
assessmentStatus:
2507
+
type: string
2508
+
example: "COMPLETE"
2509
+
description: The status of the plan
2510
+
assessmentType:
2511
+
type: string
2512
+
example: "string"
2513
+
description: The type of assessment
2514
+
keyInformationCurrentSituation:
2515
+
type: string
2516
+
example: "string"
2517
+
description: Key information about the current situation of the subject being assessed
2518
+
furtherConsiderationsCurrentSituation:
2519
+
type: string
2520
+
example: "string"
2521
+
description: Further considerations about the situation of the subject being assessed
2522
+
supervision:
2523
+
type: string
2524
+
example: "string"
2525
+
description: Who they see, when and why, any support they get from their community, family and friends, and how well they're desisting from problematic behaviour
2526
+
monitoringAndControl:
2527
+
type: string
2528
+
example: "string"
2529
+
description: Information on restrictions in place to prevent reoffending, what steps have been taken to monitor potential reoffending, including license conditions, community order requirements, PPM restrictions and such.
2530
+
interventionsAndTreatment:
2531
+
type: string
2532
+
example: "string"
2533
+
description: Interventions delivered to develop controls and protective factors to reduce risk of reoffending, including practical support, requirements to support interventions and details of who and where these interventions will be administered.
2534
+
victimSafetyPlanning:
2535
+
type: string
2536
+
example: "string"
2537
+
description: Restrictions in place to specifically protect victims of, adults known to, and children potentially at risk from the offender.
2538
+
contingencyPlans:
2539
+
type: string
2540
+
example: "string"
2541
+
description: Future plans in the form "If X happens, we will do Y...." for if parts of the risk management plan break down or requirements or restrictions are breached by the offender.
2542
+
latestSignLockDate:
2543
+
type: string
2544
+
example: "2024-05-04T01:04:20"
2545
+
description: An assessment is considered 'Signed and locked' once it is signed by the assessor, making the plan read-only. This is the date the plan has been signed by the assessor.
2546
+
latestCompleteDate:
2547
+
type: string
2548
+
example: "2024-05-04T01:04:20"
2549
+
description: Once a countersignature has been applied to the plan, the plan is considered complete. This is the date the plan has been countersigned.
Copy file name to clipboardexpand all lines: src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/person/PersonController.kt
+4-3
Original file line number
Diff line number
Diff line change
@@ -61,16 +61,17 @@ class PersonController(
61
61
@GetMapping("{encodedHmppsId}")
62
62
fungetPerson(
63
63
@PathVariable encodedHmppsId:String,
64
-
): Map<String, Person?> {
64
+
): Map<String, Map<String, Person?>> {
65
65
val hmppsId = encodedHmppsId.decodeUrlCharacters()
66
-
val response = getPersonService.execute(hmppsId)
66
+
val response = getPersonService.getCombinedDataForPerson(hmppsId)
67
67
68
68
if (response.hasErrorCausedBy(ENTITY_NOT_FOUND, causedBy =UpstreamApi.PROBATION_OFFENDER_SEARCH)) {
69
69
throwEntityNotFoundException("Could not find person with id: $hmppsId")
70
70
}
71
71
72
72
auditService.createEvent("GET_PERSON_DETAILS", mapOf("hmppsId" to hmppsId))
0 commit comments