From 90be6df52fde414e298f6fcf296998ae30eb600f Mon Sep 17 00:00:00 2001 From: Marcus Aspin Date: Thu, 28 Nov 2024 15:56:10 +0000 Subject: [PATCH] PI-2611 Update additional registrations from OASys risks (#4471) --- .idea/codeStyles/Project.xml | 18 ++ .../justice/digital/hmpps/data/DataLoader.kt | 55 +++- .../hmpps/data/generator/PersonGenerator.kt | 20 +- .../data/generator/ReferenceDataGenerator.kt | 6 +- .../data/generator/RegistrationGenerator.kt | 36 +-- .../assessment-summary-produced-F123456.json | 12 - .../assessment-summary-produced-G123456.json | 12 - .../assessment-summary-produced-H123456.json | 12 - .../assessment-summary-produced-L123456.json | 12 - .../assessment-summary-produced-M123456.json | 12 - .../assessment-summary-produced-N123456.json | 12 - .../assessment-summary-produced-O123456.json | 12 - ....json => assessment-summary-produced.json} | 2 +- ...mary-N123456.json => A000001-no-rosh.json} | 4 +- ...ary-L123456.json => A000002-low-rosh.json} | 4 +- ...-M123456.json => A000003-medium-rosh.json} | 4 +- ...ry-F123456.json => A000004-high-rosh.json} | 4 +- ...ary-E123456.json => A000006-no-event.json} | 4 +- ...G123456.json => A000007-soft-deleted.json} | 4 +- ...mmary-O123456.json => A000008-prison.json} | 4 +- .../A000009-high-risk-to-children.json | 127 +++++++++ .../__files/A000010-multiple-risks.json | 127 +++++++++ .../__files/A000011-multiple-risks.json | 127 +++++++++ ...456.json => Z999999-no-delius-record.json} | 4 +- .../simulations/mappings/oasys-mappings.json | 71 +++-- .../justice/digital/hmpps/IntegrationTest.kt | 247 ++++++++++++++---- .../justice/digital/hmpps/enum/RiskLevel.kt | 12 + .../hmpps/enum/RiskOfSeriousHarmType.kt | 9 + .../justice/digital/hmpps/enum/RiskType.kt | 15 ++ .../delius/person/entity/Registration.kt | 12 + .../referencedata/entity/ReferenceData.kt | 7 +- .../hmpps/service/DomainEventService.kt | 34 +++ .../digital/hmpps/service/RiskService.kt | 165 ++++++------ 33 files changed, 924 insertions(+), 282 deletions(-) delete mode 100644 projects/assessment-summary-and-delius/src/dev/resources/messages/assessment-summary-produced-F123456.json delete mode 100644 projects/assessment-summary-and-delius/src/dev/resources/messages/assessment-summary-produced-G123456.json delete mode 100644 projects/assessment-summary-and-delius/src/dev/resources/messages/assessment-summary-produced-H123456.json delete mode 100644 projects/assessment-summary-and-delius/src/dev/resources/messages/assessment-summary-produced-L123456.json delete mode 100644 projects/assessment-summary-and-delius/src/dev/resources/messages/assessment-summary-produced-M123456.json delete mode 100644 projects/assessment-summary-and-delius/src/dev/resources/messages/assessment-summary-produced-N123456.json delete mode 100644 projects/assessment-summary-and-delius/src/dev/resources/messages/assessment-summary-produced-O123456.json rename projects/assessment-summary-and-delius/src/dev/resources/messages/{assessment-summary-produced-E123456.json => assessment-summary-produced.json} (69%) rename projects/assessment-summary-and-delius/src/dev/resources/simulations/__files/{assessment-summary-N123456.json => A000001-no-rosh.json} (98%) rename projects/assessment-summary-and-delius/src/dev/resources/simulations/__files/{assessment-summary-L123456.json => A000002-low-rosh.json} (97%) rename projects/assessment-summary-and-delius/src/dev/resources/simulations/__files/{assessment-summary-M123456.json => A000003-medium-rosh.json} (98%) rename projects/assessment-summary-and-delius/src/dev/resources/simulations/__files/{assessment-summary-F123456.json => A000004-high-rosh.json} (98%) rename projects/assessment-summary-and-delius/src/dev/resources/simulations/__files/{assessment-summary-E123456.json => A000006-no-event.json} (98%) rename projects/assessment-summary-and-delius/src/dev/resources/simulations/__files/{assessment-summary-G123456.json => A000007-soft-deleted.json} (98%) rename projects/assessment-summary-and-delius/src/dev/resources/simulations/__files/{assessment-summary-O123456.json => A000008-prison.json} (98%) create mode 100644 projects/assessment-summary-and-delius/src/dev/resources/simulations/__files/A000009-high-risk-to-children.json create mode 100644 projects/assessment-summary-and-delius/src/dev/resources/simulations/__files/A000010-multiple-risks.json create mode 100644 projects/assessment-summary-and-delius/src/dev/resources/simulations/__files/A000011-multiple-risks.json rename projects/assessment-summary-and-delius/src/dev/resources/simulations/__files/{assessment-summary-H123456.json => Z999999-no-delius-record.json} (98%) create mode 100644 projects/assessment-summary-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/enum/RiskLevel.kt create mode 100644 projects/assessment-summary-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/enum/RiskOfSeriousHarmType.kt create mode 100644 projects/assessment-summary-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/enum/RiskType.kt diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index 6247f5c3b5..983f9352f2 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -3,6 +3,24 @@ + + + +