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
"Message": "{\"eventType\":\"prison.case-note.published\",\"version\":1,\"description\":\"A prison case note has been created or amended\",\"occurredAt\":\"2022-10-18T08:19:19.451579+01:00\",\"detailUrl\":\"http://localhost:{wiremock.port}/case-notes/AA0001A/1111\",\"additionalInformation\":{\"caseNoteId\":\"1111\",\"caseNoteType\":\"NEG-IEP_WARN\"},\"personReference\":{\"identifiers\":[{\"type\":\"NOMS\",\"value\":\"AA0001A\"}]}}",
5
+
"Message": "{\"eventType\":\"person.case-note.updated\",\"version\":1,\"description\":\"A prison case note has been amended\",\"occurredAt\":\"2022-10-18T08:19:19.451579+01:00\",\"detailUrl\":\"http://localhost:{wiremock.port}/case-notes/AA0001A/0ec15f8b-6b57-471f-b02a-c89169a6a3e5\",\"additionalInformation\":{\"id\":\"0ec15f8b-6b57-471f-b02a-c89169a6a3e5\",\"legacyId\":\"1111\",\"type\":\"NEG\",\"subType\":\"IEP_WARN\"},\"personReference\":{\"identifiers\":[{\"type\":\"NOMS\",\"value\":\"AA0001A\"}]}}",
"Message": "{\"eventType\":\"prison.case-note.published\",\"version\":1,\"description\":\"A prison case note has been created or amended\",\"occurredAt\":\"2022-10-18T08:19:19.451579+01:00\",\"detailUrl\":\"http://localhost:{wiremock.port}/case-notes/AA0001A/2222\",\"additionalInformation\":{\"caseNoteId\":\"2222\",\"caseNoteType\":\"NEG-IEP_WARN\"},\"personReference\":{\"identifiers\":[{\"type\":\"NOMS\",\"value\":\"AA0001A\"}]}}",
5
+
"Message": "{\"eventType\":\"person.case-note.created\",\"version\":1,\"description\":\"A prison case note has been created\",\"occurredAt\":\"2022-10-18T08:19:19.451579+01:00\",\"detailUrl\":\"http://localhost:{wiremock.port}/case-notes/AA0001A/2cf4f9e1-df22-49a1-a2a7-5968a96529e3\",\"additionalInformation\":{\"id\":\"2cf4f9e1-df22-49a1-a2a7-5968a96529e3\",\"legacyId\":\"2222\",\"type\":\"NEG\",\"subType\":\"IEP_WARN\"},\"personReference\":{\"identifiers\":[{\"type\":\"NOMS\",\"value\":\"AA0001A\"}]}}",
"Message": "{\"eventType\":\"prison.case-note.published\",\"version\":1,\"description\":\"A prison case note has been created or amended\",\"occurredAt\":\"2022-10-18T08:19:19.451579+01:00\",\"detailUrl\":\"http://localhost:{wiremock.port}/case-notes/AA0001A/4444\",\"additionalInformation\":{\"caseNoteId\":\"4444\",\"caseNoteType\":\"NEG-IEP_WARN\"},\"personReference\":{\"identifiers\":[{\"type\":\"NOMS\",\"value\":\"AA0001A\"}]}}",
5
+
"Message": "{\"eventType\":\"person.case-note.created\",\"version\":1,\"description\":\"A prison case note has been created\",\"occurredAt\":\"2022-10-18T08:19:19.451579+01:00\",\"detailUrl\":\"http://localhost:{wiremock.port}/case-notes/AA0001A/da82e1df-1a74-486e-842c-6ce961575211\",\"additionalInformation\":{\"id\":\"da82e1df-1a74-486e-842c-6ce961575211\",\"legacyId\":\"432109\",\"type\":\"NEG\",\"subType\":\"IEP_WARN\"},\"personReference\":{\"identifiers\":[{\"type\":\"NOMS\",\"value\":\"AA0001A\"}]}}",
"Message": "{\"eventType\":\"prison.case-note.published\",\"version\":1,\"description\":\"A prison case note has been created or amended\",\"occurredAt\":\"2022-10-18T08:19:19.451579+01:00\",\"detailUrl\":\"http://localhost:{wiremock.port}/case-notes/AA0001A/5767\",\"additionalInformation\":{\"caseNoteId\":\"5767\",\"caseNoteType\":\"RESET-BCST\"},\"personReference\":{\"identifiers\":[{\"type\":\"NOMS\",\"value\":\"AA0001A\"}]}}",
5
+
"Message": "{\"eventType\":\"person.case-note.created\",\"version\":1,\"description\":\"A prison case note has been created\",\"occurredAt\":\"2022-10-18T08:19:19.451579+01:00\",\"detailUrl\":\"http://localhost:{wiremock.port}/case-notes/AA0001A/9f0a2112-acde-4501-b1f9-3f2f5f04e426\",\"additionalInformation\":{\"id\":\"9f0a2112-acde-4501-b1f9-3f2f5f04e426\",\"legacyId\":\"576777\",\"type\":\"RESET\",\"subType\":\"BCST\"},\"personReference\":{\"identifiers\":[{\"type\":\"NOMS\",\"value\":\"AA0001A\"}]}}",
Copy file name to clipboardExpand all lines: projects/prison-case-notes-to-probation/src/dev/resources/simulations/__files/get-case-note-body-exists-in-delius.json
Copy file name to clipboardExpand all lines: projects/prison-case-notes-to-probation/src/dev/resources/simulations/__files/get-case-note-body-new-to-delius.json
Copy file name to clipboardExpand all lines: projects/prison-case-notes-to-probation/src/dev/resources/simulations/__files/get-case-note-body-resettlement-passport-new.json
Copy file name to clipboardExpand all lines: projects/prison-case-notes-to-probation/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/entity/CaseNote.kt
Copy file name to clipboardExpand all lines: projects/prison-case-notes-to-probation/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/model/DeliusCaseNote.kt
Copy file name to clipboardExpand all lines: projects/prison-case-notes-to-probation/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/repository/CaseNoteRepository.kt
Copy file name to clipboardExpand all lines: projects/prison-case-notes-to-probation/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/delius/service/DeliusService.kt
Copy file name to clipboardExpand all lines: projects/prison-case-notes-to-probation/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/prison/PrisonCaseNote.kt
funisResettlementPassport() = type =="RESET"&& subType =="BCST"
35
34
}
36
35
37
36
data classCaseNoteAmendment(
@@ -40,21 +39,27 @@ data class CaseNoteAmendment(
40
39
valadditionalNoteText:String
41
40
)
42
41
43
-
fun PrisonCaseNote.toDeliusCaseNote(occurredAt:ZonedDateTime): DeliusCaseNote {
42
+
fun PrisonCaseNote.toDeliusCaseNote(): DeliusCaseNote {
44
43
funamendments(): (CaseNoteAmendment) ->String= { a ->
45
44
"${System.lineSeparator()}[${a.authorName} updated the case notes on ${DeliusDateTimeFormatter.format(a.creationDateTime)}]${System.lineSeparator()}${a.additionalNoteText}"
Copy file name to clipboardExpand all lines: projects/prison-case-notes-to-probation/src/main/kotlin/uk/gov/justice/digital/hmpps/integrations/prison/PrisonCaseNotesClient.kt
Copy file name to clipboardExpand all lines: projects/prison-case-notes-to-probation/src/main/kotlin/uk/gov/justice/digital/hmpps/messaging/CaseNotePublished.kt
0 commit comments