From 6ec448f83a3ee6dc5bf648d831e4cd9c81b12115 Mon Sep 17 00:00:00 2001 From: Chiara Date: Thu, 13 Jun 2024 10:10:04 +0100 Subject: [PATCH 1/5] Rewrote 'data' key --- .../gateways/ProbationOffenderSearchGateway.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/ProbationOffenderSearchGateway.kt b/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/ProbationOffenderSearchGateway.kt index 01d750c17..986d99cd7 100644 --- a/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/ProbationOffenderSearchGateway.kt +++ b/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/ProbationOffenderSearchGateway.kt @@ -104,7 +104,7 @@ class ProbationOffenderSearchGateway( return when (result) { is WebClientWrapperResponse.Success -> { Response( - result.data.map { it.toPerson() }.sortedBy { it.dateOfBirth }, + data = result.data.map { it.toPerson() }.sortedBy { it.dateOfBirth }, ) } is WebClientWrapperResponse.Error -> { From c20128c72228f0d7f8ebe47744f9be174e51b473 Mon Sep 17 00:00:00 2001 From: Chiara Date: Thu, 13 Jun 2024 10:39:12 +0100 Subject: [PATCH 2/5] Made descending explicit. --- .../gateways/AdjudicationsGateway.kt | 6 +++--- .../gateways/AssessRisksAndNeedsGateway.kt | 6 +++++- .../gateways/CreateAndVaryLicenceGateway.kt | 2 +- .../hmppsintegrationapi/gateways/NomisGateway.kt | 8 ++++---- .../gateways/PrisonerOffenderSearchGateway.kt | 2 +- .../gateways/ProbationOffenderSearchGateway.kt | 2 +- .../PrisonerOffenderSearchGatewayTest.kt | 16 ++++++++-------- 7 files changed, 23 insertions(+), 19 deletions(-) diff --git a/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/AdjudicationsGateway.kt b/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/AdjudicationsGateway.kt index 0524d4717..3331eba2b 100644 --- a/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/AdjudicationsGateway.kt +++ b/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/AdjudicationsGateway.kt @@ -32,9 +32,9 @@ class AdjudicationsGateway( is WebClientWrapper.WebClientWrapperResponse.Success -> { Response( data = - result.data - .map { it.toAdjudication() } - .sortedBy { it.incidentDetails?.dateTimeOfIncident }, + result.data + .map { it.toAdjudication() } + .sortedByDescending { it.incidentDetails?.dateTimeOfIncident }, ) } diff --git a/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/AssessRisksAndNeedsGateway.kt b/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/AssessRisksAndNeedsGateway.kt index 49c1e39c0..dfb68462b 100644 --- a/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/AssessRisksAndNeedsGateway.kt +++ b/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/AssessRisksAndNeedsGateway.kt @@ -35,7 +35,11 @@ class AssessRisksAndNeedsGateway( return when (result) { is WebClientWrapperResponse.Success -> { - Response(data = result.data.map { it.toRiskPredictorScore() }.sortedBy { it.completedDate }) + Response( + data = result.data + .map { it.toRiskPredictorScore() } + .sortedByDescending { it.completedDate } + ) } is WebClientWrapperResponse.Error -> { diff --git a/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/CreateAndVaryLicenceGateway.kt b/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/CreateAndVaryLicenceGateway.kt index d137c2c77..f0474363d 100644 --- a/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/CreateAndVaryLicenceGateway.kt +++ b/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/CreateAndVaryLicenceGateway.kt @@ -33,7 +33,7 @@ class CreateAndVaryLicenceGateway( return when (result) { is WebClientWrapperResponse.Success -> { - val sortedLicences = result.data.sortedBy { it.createdDateTime } + val sortedLicences = result.data.sortedByDescending { it.createdDateTime } Response(data = sortedLicences.map { it.toLicence() }) } diff --git a/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/NomisGateway.kt b/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/NomisGateway.kt index 01345918d..c9f35a3db 100644 --- a/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/NomisGateway.kt +++ b/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/NomisGateway.kt @@ -89,7 +89,7 @@ class NomisGateway( return when (result) { is WebClientWrapperResponse.Success -> { - Response(data = result.data.map { it.toAddress() }.sortedBy { it.startDate }) + Response(data = result.data.map { it.toAddress() }.sortedByDescending { it.startDate }) } is WebClientWrapperResponse.Error -> { @@ -111,7 +111,7 @@ class NomisGateway( ) return when (result) { is WebClientWrapperResponse.Success -> { - Response(data = result.data.map { it.toOffence() }.sortedBy { it.startDate }) + Response(data = result.data.map { it.toOffence() }.sortedByDescending { it.startDate }) } is WebClientWrapperResponse.Error -> { @@ -133,7 +133,7 @@ class NomisGateway( ) return when (result) { is WebClientWrapperResponse.Success -> { - Response(data = result.data.map { it.toAlert() }.sortedBy { it.dateCreated }) + Response(data = result.data.map { it.toAlert() }.sortedByDescending { it.dateCreated }) } is WebClientWrapperResponse.Error -> { @@ -155,7 +155,7 @@ class NomisGateway( ) return when (result) { is WebClientWrapperResponse.Success -> { - Response(data = result.data.map { it.toSentence() }.sortedBy { it.dateOfSentencing }) + Response(data = result.data.map { it.toSentence() }.sortedByDescending { it.dateOfSentencing }) } is WebClientWrapperResponse.Error -> { diff --git a/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/PrisonerOffenderSearchGateway.kt b/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/PrisonerOffenderSearchGateway.kt index d58594db1..03ecd431d 100644 --- a/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/PrisonerOffenderSearchGateway.kt +++ b/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/PrisonerOffenderSearchGateway.kt @@ -43,7 +43,7 @@ class PrisonerOffenderSearchGateway( return when (result) { is WebClientWrapperResponse.Success -> { - Response(data = result.data.content.map { it.toPerson() }.sortedBy { it.dateOfBirth }) + Response(data = result.data.content.map { it.toPerson() }.sortedByDescending { it.dateOfBirth }) } is WebClientWrapperResponse.Error -> { diff --git a/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/ProbationOffenderSearchGateway.kt b/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/ProbationOffenderSearchGateway.kt index 986d99cd7..75edaa568 100644 --- a/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/ProbationOffenderSearchGateway.kt +++ b/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/ProbationOffenderSearchGateway.kt @@ -104,7 +104,7 @@ class ProbationOffenderSearchGateway( return when (result) { is WebClientWrapperResponse.Success -> { Response( - data = result.data.map { it.toPerson() }.sortedBy { it.dateOfBirth }, + data = result.data.map { it.toPerson() }.sortedByDescending { it.dateOfBirth } ) } is WebClientWrapperResponse.Error -> { diff --git a/src/test/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/prisoneroffendersearch/PrisonerOffenderSearchGatewayTest.kt b/src/test/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/prisoneroffendersearch/PrisonerOffenderSearchGatewayTest.kt index 8c2b8b038..3e59d16b4 100644 --- a/src/test/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/prisoneroffendersearch/PrisonerOffenderSearchGatewayTest.kt +++ b/src/test/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/prisoneroffendersearch/PrisonerOffenderSearchGatewayTest.kt @@ -72,7 +72,7 @@ class PrisonerOffenderSearchGatewayTest( verify(hmppsAuthGateway, VerificationModeFactory.times(1)).getClientToken("Prisoner Offender Search") } - it("returns person(s) when searching on first name, last name and date of birth") { + it("returns person(s) when searching on first name, last name and date of birth, in a descending order according to date of birth") { val response = prisonerOffenderSearchGateway.getPersons(firstName, lastName, dateOfBirth) response.data.count().shouldBe(4) @@ -80,15 +80,15 @@ class PrisonerOffenderSearchGatewayTest( it.firstName.shouldBe(firstName) it.lastName.shouldBe(lastName) } - response.data[0].identifiers.nomisNumber.shouldBe("A7796DY") - response.data[1].identifiers.nomisNumber.shouldBe("G9347GV") - response.data[2].identifiers.nomisNumber.shouldBe("A5043DY") - response.data[3].identifiers.nomisNumber.shouldBe("A5083DY") + response.data[0].identifiers.nomisNumber.shouldBe("A5043DY") + response.data[1].identifiers.nomisNumber.shouldBe("A5083DY") + response.data[2].identifiers.nomisNumber.shouldBe("G9347GV") + response.data[3].identifiers.nomisNumber.shouldBe("A7796DY") response.data[0].pncId.shouldBeNull() - response.data[1].pncId.shouldBe("95/289622B") - response.data[2].pncId.shouldBeNull() - response.data[3].pncId.shouldBe("03/11985X") + response.data[1].pncId.shouldBe("03/11985X") + response.data[2].pncId.shouldBe("95/289622B") + response.data[3].pncId.shouldBeNull() } it("returns person(s) when searching on first name only") { From bf36b868de60a46d926f10e4a7d227d9e21acafa Mon Sep 17 00:00:00 2001 From: Chiara Date: Thu, 13 Jun 2024 10:42:44 +0100 Subject: [PATCH 3/5] Explicitly saying the order is desc --- openapi.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/openapi.yml b/openapi.yml index 7aaa6b560..45a4e1de6 100644 --- a/openapi.yml +++ b/openapi.yml @@ -12,7 +12,7 @@ paths: get: tags: - persons - summary: Returns person(s) by search criteria, sorted by date of birth. At least one query parameter must be specified. + summary: Returns person(s) by search criteria, sorted by date of birth (descending). At least one query parameter must be specified. parameters: - in: query name: first_name @@ -44,7 +44,7 @@ paths: type: boolean default: false required: false - description: Whether to return results that match the search criteria within the aliases of a person, sorted by date of birth. + description: Whether to return results that match the search criteria within the aliases of a person. - $ref: "#/components/parameters/page" - $ref: "#/components/parameters/perPage" responses: @@ -126,7 +126,7 @@ paths: get: tags: - persons - summary: Returns metadata of images associated with a person sorted by captureDateTime. + summary: Returns metadata of images associated with a person sorted by captureDateTime (descending). parameters: - $ref: "#/components/parameters/hmppsId" - $ref: "#/components/parameters/page" @@ -254,11 +254,11 @@ paths: tags: - persons summary: > - Returns offences associated with a person, ordered by startDate. - - Note: This API does not contain the complete list of offences for a person. - Offences are retrieved from Prison and Probation systems exclusively. - Prison systems record only custodial sentences, while Probation systems record only the main offence and some additional offences for case management purposes. Other offences recorded by HMCTS and police may not be included. + Returns offences associated with a person, ordered by startDate (descending). + > + Note: This API does not contain the complete list of offences for a person. + Offences are retrieved from Prison and Probation systems exclusively. + Prison systems record only custodial sentences, while Probation systems record only the main offence and some additional offences for case management purposes. Other offences recorded by HMCTS and police may not be included. parameters: - $ref: "#/components/parameters/hmppsId" - $ref: "#/components/parameters/page" @@ -331,7 +331,7 @@ paths: tags: - persons - alerts - summary: Returns alerts associated with a person, sorted by dateCreated. + summary: Returns alerts associated with a person, sorted by dateCreated (descending). parameters: - $ref: "#/components/parameters/hmppsId" - $ref: "#/components/parameters/page" @@ -375,7 +375,7 @@ paths: tags: - persons - alerts - summary: Returns alerts associated with a person, sorted by dateCreated. + summary: Returns alerts associated with a person, sorted by dateCreated (descending). parameters: - $ref: "#/components/parameters/hmppsId" - $ref: "#/components/parameters/page" @@ -418,7 +418,7 @@ paths: get: tags: - persons - summary: Returns sentences associated with a person, sorted by dateOfSentencing. + summary: Returns sentences associated with a person, sorted by dateOfSentencing (descending). parameters: - $ref: "#/components/parameters/hmppsId" - $ref: "#/components/parameters/page" @@ -497,7 +497,7 @@ paths: get: tags: - risks - summary: Returns risk scores from the last year associated with a person, sorted by completedDate. + summary: Returns risk scores from the last year associated with a person, sorted by completedDate (descending). parameters: - $ref: "#/components/parameters/hmppsId" - $ref: "#/components/parameters/page" @@ -802,7 +802,7 @@ paths: /v1/persons/{hmppsId}/adjudications: get: - summary: Returns adjudications associated with a person, sorted by dateTimeOfIncident. + summary: Returns adjudications associated with a person, sorted by dateTimeOfIncident (descending). parameters: - name: hmppsId in: path @@ -871,7 +871,7 @@ paths: /v1/persons/{hmppsId}/licences/conditions: get: - summary: Returns license conditions associated with a person, sorted by createdDateTime. + summary: Returns license conditions associated with a person, sorted by createdDateTime (descending). parameters: - $ref: "#/components/parameters/hmppsId" responses: From b3edcb162409b8b4ed26853a2c30609ceec14be6 Mon Sep 17 00:00:00 2001 From: Chiara Date: Thu, 13 Jun 2024 10:48:27 +0100 Subject: [PATCH 4/5] Lint --- .../hmppsintegrationapi/gateways/AdjudicationsGateway.kt | 6 +++--- .../gateways/AssessRisksAndNeedsGateway.kt | 7 ++++--- .../gateways/ProbationOffenderSearchGateway.kt | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/AdjudicationsGateway.kt b/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/AdjudicationsGateway.kt index 3331eba2b..67bfd9c38 100644 --- a/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/AdjudicationsGateway.kt +++ b/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/AdjudicationsGateway.kt @@ -32,9 +32,9 @@ class AdjudicationsGateway( is WebClientWrapper.WebClientWrapperResponse.Success -> { Response( data = - result.data - .map { it.toAdjudication() } - .sortedByDescending { it.incidentDetails?.dateTimeOfIncident }, + result.data + .map { it.toAdjudication() } + .sortedByDescending { it.incidentDetails?.dateTimeOfIncident }, ) } diff --git a/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/AssessRisksAndNeedsGateway.kt b/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/AssessRisksAndNeedsGateway.kt index dfb68462b..8d96d8c7e 100644 --- a/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/AssessRisksAndNeedsGateway.kt +++ b/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/AssessRisksAndNeedsGateway.kt @@ -36,9 +36,10 @@ class AssessRisksAndNeedsGateway( return when (result) { is WebClientWrapperResponse.Success -> { Response( - data = result.data - .map { it.toRiskPredictorScore() } - .sortedByDescending { it.completedDate } + data = + result.data + .map { it.toRiskPredictorScore() } + .sortedByDescending { it.completedDate }, ) } diff --git a/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/ProbationOffenderSearchGateway.kt b/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/ProbationOffenderSearchGateway.kt index 75edaa568..214c47c07 100644 --- a/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/ProbationOffenderSearchGateway.kt +++ b/src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/gateways/ProbationOffenderSearchGateway.kt @@ -104,7 +104,7 @@ class ProbationOffenderSearchGateway( return when (result) { is WebClientWrapperResponse.Success -> { Response( - data = result.data.map { it.toPerson() }.sortedByDescending { it.dateOfBirth } + data = result.data.map { it.toPerson() }.sortedByDescending { it.dateOfBirth }, ) } is WebClientWrapperResponse.Error -> { From fd28e5e8e296ad2d1679f0d7931d6a8b5b556f5c Mon Sep 17 00:00:00 2001 From: Chiara Date: Thu, 13 Jun 2024 11:52:22 +0100 Subject: [PATCH 5/5] Changed wording --- openapi.yml | 70 ++++++++++++++++++++++++++--------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/openapi.yml b/openapi.yml index 45a4e1de6..9351725e3 100644 --- a/openapi.yml +++ b/openapi.yml @@ -12,7 +12,7 @@ paths: get: tags: - persons - summary: Returns person(s) by search criteria, sorted by date of birth (descending). At least one query parameter must be specified. + summary: Returns person(s) by search criteria, sorted by date of birth (newest first). At least one query parameter must be specified. parameters: - in: query name: first_name @@ -126,7 +126,7 @@ paths: get: tags: - persons - summary: Returns metadata of images associated with a person sorted by captureDateTime (descending). + summary: Returns metadata of images associated with a person sorted by captureDateTime (newest first). parameters: - $ref: "#/components/parameters/hmppsId" - $ref: "#/components/parameters/page" @@ -254,7 +254,7 @@ paths: tags: - persons summary: > - Returns offences associated with a person, ordered by startDate (descending). + Returns offences associated with a person, ordered by startDate (newest first). > Note: This API does not contain the complete list of offences for a person. Offences are retrieved from Prison and Probation systems exclusively. @@ -331,7 +331,7 @@ paths: tags: - persons - alerts - summary: Returns alerts associated with a person, sorted by dateCreated (descending). + summary: Returns alerts associated with a person, sorted by dateCreated (newest first). parameters: - $ref: "#/components/parameters/hmppsId" - $ref: "#/components/parameters/page" @@ -375,7 +375,7 @@ paths: tags: - persons - alerts - summary: Returns alerts associated with a person, sorted by dateCreated (descending). + summary: Returns alerts associated with a person, sorted by dateCreated (newest first). parameters: - $ref: "#/components/parameters/hmppsId" - $ref: "#/components/parameters/page" @@ -418,7 +418,7 @@ paths: get: tags: - persons - summary: Returns sentences associated with a person, sorted by dateOfSentencing (descending). + summary: Returns sentences associated with a person, sorted by dateOfSentencing (newest first). parameters: - $ref: "#/components/parameters/hmppsId" - $ref: "#/components/parameters/page" @@ -497,7 +497,7 @@ paths: get: tags: - risks - summary: Returns risk scores from the last year associated with a person, sorted by completedDate (descending). + summary: Returns risk scores from the last year associated with a person, sorted by completedDate (newest first). parameters: - $ref: "#/components/parameters/hmppsId" - $ref: "#/components/parameters/page" @@ -802,7 +802,7 @@ paths: /v1/persons/{hmppsId}/adjudications: get: - summary: Returns adjudications associated with a person, sorted by dateTimeOfIncident (descending). + summary: Returns adjudications associated with a person, sorted by dateTimeOfIncident (newest first). parameters: - name: hmppsId in: path @@ -871,7 +871,7 @@ paths: /v1/persons/{hmppsId}/licences/conditions: get: - summary: Returns license conditions associated with a person, sorted by createdDateTime (descending). + summary: Returns license conditions associated with a person, sorted by createdDateTime (newest first). parameters: - $ref: "#/components/parameters/hmppsId" responses: @@ -1546,7 +1546,7 @@ components: - OIC description: > View is the subject focus; describing the inner focus or subject of the image, normally referring to a marking, tattoo or deeper level focus of the orientation. In practise this is the interior foci of what is captured in the 'orientation' field. - Options include: + Possible values are: `FACE` - Facing, `TAT` - Tattoo, `OTH` - Other, @@ -1582,7 +1582,7 @@ components: - TORSO description: > Orientation is the scope focus; describing the scope or outer focus of the image, normally referring to the highest level object of interest within the bounds of the photo itself. This is normally a body part or an angle of photography, such as a photo of someone’s facial view (`FRONT`) or arm (`ARM`). - Options include: + Possible values are: `ANKLE` - Ankle, `ARM` - Arm, `DAMAGE` - Damage, @@ -1616,7 +1616,7 @@ components: - PPTY description: > Type is the contextual focus; describing the context or scenario the image was taken within. It could be for a particular purpose or capturing the results of a particular type of incident. - Options include: + Possible values are: `OFF_BKG` - Offender Booking, `OFF_IDM` - Offender Identification Marks, `OIC` - Offence In Custody, @@ -1723,7 +1723,7 @@ components: - VARIATION_REJECTED example: IN_PROGRESS description: > - Licence status. Options include: + Licence status. Possible values are: `IN_PROGRESS`, `SUBMITTED`, `APPROVED`, @@ -1740,7 +1740,7 @@ components: - PSS - AP_PSS description: > - The type of licence. Options include: + The type of licence. Possible values are: `AP`, `PSS`, `AP_PSS` @@ -1810,7 +1810,7 @@ components: - NDELIUS example: NOMIS description: > - Which upstream API service the sentence originates from. Options include: + Which upstream API service the sentence originates from. Possible values are: `NOMIS`, `NDELIUS` systemSource: @@ -1820,7 +1820,7 @@ components: - PROBATION_SYSTEMS example: PROBATION_SYSTEMS description: > - Which upstream API system the sentence originates from. Options include: + Which upstream API system the sentence originates from. Possible values are: `PRISON_SYSTEMS`, `PROBATION_SYSTEMS` cjsCode: @@ -2177,7 +2177,7 @@ components: - NDELIUS example: NOMIS description: > - Which upstream API service the sentence originates from. Options include: + Which upstream API service the sentence originates from. Possible values are: `NOMIS`, `NDELIUS` systemSource: @@ -2187,7 +2187,7 @@ components: - PROBATION_SYSTEMS example: PROBATION_SYSTEMS description: > - Which upstream API system the sentence originates from. Options include: + Which upstream API system the sentence originates from. Possible values are: `PRISON_SYSTEMS`, `PROBATION_SYSTEMS` dateOfSentencing: @@ -2321,7 +2321,7 @@ components: - PRRD example: ARD description: > - Indicates which type of non-DTO release date is the effective release date. One of 'ARD', 'CRD', 'NPD' or 'PRRD'. Options include: + Indicates which type of non-DTO release date is the effective release date. One of 'ARD', 'CRD', 'NPD' or 'PRRD'. Possible values are: `ARD`, `CRD`, `NPD`, @@ -2441,7 +2441,7 @@ components: - Years example: Hours description: > - Time unit that is used in combination with the duration field. Options include: + Time unit that is used in combination with the duration field. Possible values are: `Hours`, `Days`, `Weeks`, @@ -2490,7 +2490,7 @@ components: example: IMP description: > The sentence term code - Options include: + Possible values are: `CUR` - Curfew Period, `DEF` - Deferment Period, `DET` - Detention, @@ -2558,7 +2558,7 @@ components: - LOCKED_INCOMPLETE example: COMPLETE description: > - Whether the risk score calculation is complete. Options include: + Whether the risk score calculation is complete. Possible values are: `COMPLETE`, `LOCKED_INCOMPLETE` groupReconviction: @@ -2584,7 +2584,7 @@ components: - NOT_APPLICABLE example: LOW description: > - Indicator for risk of group reconviction. Options include: + Indicator for risk of group reconviction. Possible values are: `LOW`, `MEDIUM`, `HIGH`, @@ -2604,7 +2604,7 @@ components: - NOT_APPLICABLE example: MEDIUM description: > - Indicator for risk of violence. Options include: + Indicator for risk of violence. Possible values are: `LOW`, `MEDIUM`, `HIGH`, @@ -2624,7 +2624,7 @@ components: - NOT_APPLICABLE example: VERY_HIGH description: > - Indicator for general prediction. Options include: + Indicator for general prediction. Possible values are: `LOW`, `MEDIUM`, `HIGH`, @@ -2644,7 +2644,7 @@ components: - NOT_APPLICABLE example: MEDIUM description: > - Indicator for risk of serious recidivism. Options include: + Indicator for risk of serious recidivism. Possible values are: `LOW`, `MEDIUM`, `HIGH`, @@ -2664,7 +2664,7 @@ components: - NOT_APPLICABLE example: HIGH description: > - Indicator for risk of sexual indecency. Options include: + Indicator for risk of sexual indecency. Possible values are: `LOW`, `MEDIUM`, `HIGH`, @@ -2680,7 +2680,7 @@ components: - NOT_APPLICABLE example: MEDIUM description: > - Indicator for risk of sexual contact. Options include: + Indicator for risk of sexual contact. Possible values are: `LOW`, `MEDIUM`, `HIGH`, @@ -2726,7 +2726,7 @@ components: - DK - NA description: > - Presence of risk. Options include: + Presence of risk. Possible values are: `YES`, `NO`, `DK`, @@ -2740,7 +2740,7 @@ components: - DK - NA description: > - Previous concerns. Options include: + Previous concerns. Possible values are: `YES`, `NO`, `DK`, @@ -2758,7 +2758,7 @@ components: - DK - NA description: > - Current concerns. Options include: + Current concerns. Possible values are: `YES`, `NO`, `DK`, @@ -2838,7 +2838,7 @@ components: - DK - NA description: > - Risk of escape/abscond. Options include: + Risk of escape/abscond. Possible values are: `YES`, `NO`, `DK`, @@ -2852,7 +2852,7 @@ components: - DK - NA description: > - Risk control issues/disruptive behaviour. Options include: + Risk control issues/disruptive behaviour. Possible values are: `YES`, `NO`, `DK`, @@ -2866,7 +2866,7 @@ components: - DK - NA description: > - Risk of breach of trust. Options include: + Risk of breach of trust. Possible values are: `YES`, `NO`, `DK`, @@ -2880,7 +2880,7 @@ components: - DK - NA description: > - Risk to other prisoners. Options include: + Risk to other prisoners. Possible values are: `YES`, `NO`, `DK`,