generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PI-1284 Migrate prison-to-probation-update listener to prison-identif…
…ier-and-delius (#3478)
- Loading branch information
1 parent
c85cfc5
commit ebcb1fe
Showing
61 changed files
with
1,729 additions
and
580 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...lius/src/dev/kotlin/uk/gov/justice/digital/hmpps/data/generator/ReferenceDataGenerator.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package uk.gov.justice.digital.hmpps.data.generator | ||
|
||
import uk.gov.justice.digital.hmpps.entity.ReferenceData | ||
import uk.gov.justice.digital.hmpps.entity.ReferenceDataSet | ||
|
||
object ReferenceDataGenerator { | ||
val GENDER_SET = generateReferenceDataSet("GENDER") | ||
val MALE = generateGender("M") | ||
|
||
val CUSTODY_STATUS_SET = generateReferenceDataSet("THROUGHCARE STATUS") | ||
val CUSTODY_STATUS = generateCustodyStatus("A") | ||
|
||
val ADDITIONAL_IDENTIFIER_TYPE_SET = generateReferenceDataSet("ADDITIONAL IDENTIFIER TYPE") | ||
val DUPLICATE_NOMS = generateIdentifierType("DNOMS") | ||
val FORMER_NOMS = generateIdentifierType("XNOMS") | ||
|
||
fun generateGender(code: String, id: Long = IdGenerator.getAndIncrement()) = ReferenceData(id, code, GENDER_SET) | ||
fun generateCustodyStatus(code: String, id: Long = IdGenerator.getAndIncrement()) = | ||
ReferenceData(id, code, CUSTODY_STATUS_SET) | ||
|
||
fun generateIdentifierType(code: String, id: Long = IdGenerator.getAndIncrement()) = | ||
ReferenceData(id, code, ADDITIONAL_IDENTIFIER_TYPE_SET) | ||
|
||
fun generateReferenceDataSet(name: String, id: Long = IdGenerator.getAndIncrement()) = ReferenceDataSet(id, name) | ||
} |
20 changes: 20 additions & 0 deletions
20
projects/prison-identifier-and-delius/src/dev/resources/messages/prisoner-merged.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"version": 1, | ||
"eventType": "prison-offender-events.prisoner.merged", | ||
"description": "A prisoner has been merged from A0001AA to B0001BB", | ||
"occurredAt": "2024-03-14T16:14:47Z", | ||
"publishedAt": "2024-03-14T16:14:48.060048501Z", | ||
"additionalInformation": { | ||
"nomsNumber": "B0007BB", | ||
"removedNomsNumber": "A0007AA", | ||
"reason": "MERGE" | ||
}, | ||
"personReference": { | ||
"identifiers": [ | ||
{ | ||
"type": "NOMS", | ||
"value": "A0007AA" | ||
} | ||
] | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...-identifier-and-delius/src/dev/resources/messages/prisoner-received-inactive-booking.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"version": 1, | ||
"eventType": "prison-offender-events.prisoner.received", | ||
"description": "A prisoner has been received into prison", | ||
"occurredAt": "2023-08-04T08:09:36.649098+01:00", | ||
"publishedAt": "2023-08-04T09:06:46.65281576+01:00", | ||
"additionalInformation": { | ||
"nomsNumber": "A0002AA", | ||
"reason": "ADMISSION", | ||
"probableCause": "RECALL", | ||
"source": "PRISON", | ||
"nomisMovementReasonCode": "N", | ||
"details": "ACTIVE IN:ADM-N", | ||
"currentLocation": "IN_PRISON", | ||
"prisonId": "WSI", | ||
"currentPrisonStatus": "UNDER_PRISON_CARE" | ||
}, | ||
"personReference": { | ||
"identifiers": [ | ||
{ | ||
"type": "NOMS", | ||
"value": "A0002AA" | ||
} | ||
] | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
projects/prison-identifier-and-delius/src/dev/resources/messages/prisoner-received.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"version": 1, | ||
"eventType": "prison-offender-events.prisoner.received", | ||
"description": "A prisoner has been received into prison", | ||
"occurredAt": "2023-08-04T08:09:36.649098+01:00", | ||
"publishedAt": "2023-08-04T09:06:46.65281576+01:00", | ||
"additionalInformation": { | ||
"nomsNumber": "A0001AA", | ||
"reason": "ADMISSION", | ||
"probableCause": "RECALL", | ||
"source": "PRISON", | ||
"nomisMovementReasonCode": "N", | ||
"details": "ACTIVE IN:ADM-N", | ||
"currentLocation": "IN_PRISON", | ||
"prisonId": "WSI", | ||
"currentPrisonStatus": "UNDER_PRISON_CARE" | ||
}, | ||
"personReference": { | ||
"identifiers": [ | ||
{ | ||
"type": "NOMS", | ||
"value": "A0001AA" | ||
} | ||
] | ||
} | ||
} |
Oops, something went wrong.