Skip to content

Commit

Permalink
ADJST-836 Indicate if charge court case is finished. (#2276)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldlharper authored Sep 25, 2024
1 parent 95d36f0 commit 188de2b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,15 @@ public class CourtDateCharge {
@Schema(description = "The sentence type")
private String sentenceType;

@Schema(description = "The result code of the charge")
private String resultCode;

@Schema(description = "The result description of the charge")
private String resultDescription;

@Schema(description = "The disposition code of the result of the charge")
private String resultDispositionCode;

@Schema(description = "Is this charge active in NOMIS.")
private Boolean active;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,15 @@ data class CourtDateChargeAndOutcomes(
@Schema(description = "The sentence type")
val sentenceType: String? = null,

@Schema(description = "The result code of the charge")
val resultCode: String? = null,

@Schema(description = "The result description of the charge")
val resultDescription: String? = null,

@Schema(description = "The disposition code of the result of the charge")
val resultDispositionCode: String? = null,

@Schema(description = "The id of the booking this court date was linked to")
val bookingId: Long,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ class CourtDateService(
charge.offenderSentenceCharges.firstOrNull()?.offenderSentence?.sequence,
charge.offenderSentenceCharges.firstOrNull()?.offenderSentence?.courtOrder?.courtDate,
charge.offenderSentenceCharges.firstOrNull()?.offenderSentence?.calculationType?.calculationType,
charge.resultCodeOne?.code,
charge.resultCodeOne?.description,
charge.resultCodeOne?.dispositionCode,
charge.isActive,
),
charge.offenderBooking.bookingId,
Expand All @@ -65,7 +67,9 @@ class CourtDateService(
charge.offenderSentenceCharges.firstOrNull()?.offenderSentence?.sequence,
charge.offenderSentenceCharges.firstOrNull()?.offenderSentence?.courtOrder?.courtDate,
charge.offenderSentenceCharges.firstOrNull()?.offenderSentence?.calculationType?.calculationType,
charge.resultCodeOne?.code,
charge.resultCodeOne?.description,
charge.resultCodeOne?.dispositionCode,
charge.offenderBooking.bookingId,
charge.offenderBooking.bookNumber,
charge.isActive,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,9 @@ class CourtDateServiceTest {
.withSentenceSequence(5)
.withSentenceDate(LocalDate.of(2022, 1, 1))
.withSentenceType("ADIMP")
.withResultCode("1002")
.withResultDescription("Imprisonment")
.withResultDispositionCode("F")
.withActive(true),
),
),
Expand Down

0 comments on commit 188de2b

Please sign in to comment.