@@ -20,6 +20,9 @@ data class ReportedAdjudication(
20
20
val isYouthOffender : Boolean ,
21
21
val incidentRole : AdjudicationsIncidentRole ? = null ,
22
22
val offenceDetails : AdjudicationsOffenceDetails ? = null ,
23
+ val status : String? = null ,
24
+ val statusReason : String? = null ,
25
+ val statusDetails : String? = null ,
23
26
val hearings : List <AdjudicationsHearing ?> = emptyList(),
24
27
val outcomes : List <AdjudicationsOutcomeHistory > = emptyList(),
25
28
val punishments : List <AdjudicationsPunishment > = emptyList(),
@@ -28,10 +31,7 @@ data class ReportedAdjudication(
28
31
fun toAdjudication (): Adjudication =
29
32
Adjudication (
30
33
incidentDetails = IncidentDetailsDto (
31
- locationId = this .incidentDetails.locationId,
32
34
dateTimeOfIncident = this .incidentDetails.dateTimeOfIncident,
33
- dateTimeOfDiscovery = this .incidentDetails.dateTimeOfDiscovery,
34
- handoverDeadline = this .incidentDetails.handoverDeadline,
35
35
),
36
36
isYouthOffender = this .isYouthOffender,
37
37
incidentRole = IncidentRoleDto (
@@ -40,67 +40,50 @@ data class ReportedAdjudication(
40
40
paragraphNumber = this .incidentRole?.offenceRule?.paragraphNumber,
41
41
paragraphDescription = this .incidentRole?.offenceRule?.paragraphDescription,
42
42
),
43
- associatedPrisonersNumber = this .incidentRole?.associatedPrisonersNumber,
44
- associatedPrisonersName = this .incidentRole?.associatedPrisonersName,
45
43
),
46
44
offenceDetails = OffenceDto (
47
45
offenceCode = this .offenceDetails?.offenceCode,
48
46
offenceRule = OffenceRuleDto (
49
47
paragraphNumber = this .offenceDetails?.offenceRule?.paragraphNumber,
50
48
paragraphDescription = this .offenceDetails?.offenceRule?.paragraphDescription,
51
- nomisCode = this .offenceDetails?.offenceRule?.nomisCode,
52
- withOthersNomisCode = this .offenceDetails?.offenceRule?.withOthersNomisCode,
53
-
54
49
),
55
- victimPrisonersNumber = this .offenceDetails?.victimPrisonersNumber,
56
- victimStaffUsername = this .offenceDetails?.victimStaffUsername,
57
- victimOtherPersonsName = this .offenceDetails?.victimOtherPersonsName,
58
50
),
51
+ status = this .status,
52
+ statusReason = this .statusReason,
53
+ statusDetails = this .statusDetails,
59
54
hearings = this .hearings.map {
60
55
HearingDto (
61
- id = it?.id,
62
- locationId = it?.locationId,
63
56
dateTimeOfHearing = it?.dateTimeOfHearing,
64
57
oicHearingType = it?.oicHearingType,
65
58
outcome = HearingOutcomeDto (
66
- id = it?.outcome?.id,
67
- adjudicator = it?.outcome?.adjudicator,
68
59
code = it?.outcome?.code,
69
60
reason = it?.outcome?.reason,
70
61
details = it?.outcome?.details,
71
62
plea = it?.outcome?.plea,
72
63
),
73
- agencyId = it?.agencyId,
74
64
)
75
65
},
76
66
outcomes = this .outcomes.map {
77
67
OutcomeHistoryDto (
78
68
hearing = HearingDto (
79
- id = it.hearing?.id,
80
- locationId = it.hearing?.locationId,
81
69
dateTimeOfHearing = it.hearing?.dateTimeOfHearing,
82
70
oicHearingType = it.hearing?.oicHearingType,
83
71
outcome = HearingOutcomeDto (
84
- id = it.hearing?.outcome?.id,
85
- adjudicator = it.hearing?.outcome?.adjudicator,
86
72
code = it.hearing?.outcome?.code,
87
73
reason = it.hearing?.outcome?.reason,
88
74
details = it.hearing?.outcome?.details,
89
75
plea = it.hearing?.outcome?.plea,
90
76
),
91
- agencyId = it.hearing?.agencyId,
92
77
),
93
78
outcome = CombinedOutcomeDto (
94
79
outcome = OutcomeDto (
95
- id = it.outcome?.outcome?.id,
96
80
code = it.outcome?.outcome?.code,
97
81
details = it.outcome?.outcome?.details,
98
82
reason = it.outcome?.outcome?.reason,
99
83
quashedReason = it.outcome?.outcome?.quashedReason,
100
84
canRemove = it.outcome?.outcome?.canRemove,
101
85
),
102
86
referralOutcome = OutcomeDto (
103
- id = it.outcome?.referralOutcome?.id,
104
87
code = it.outcome?.referralOutcome?.code,
105
88
details = it.outcome?.referralOutcome?.details,
106
89
reason = it.outcome?.referralOutcome?.reason,
@@ -112,31 +95,21 @@ data class ReportedAdjudication(
112
95
},
113
96
punishments = this .punishments.map {
114
97
PunishmentDto (
115
- id = it.id,
116
98
type = it.type,
117
99
privilegeType = it.privilegeType,
118
100
otherPrivilege = it.otherPrivilege,
119
- stoppagePercentage = it.stoppagePercentage,
120
- activatedBy = it.activatedBy,
121
- activatedFrom = it.activatedFrom,
122
101
schedule = PunishmentScheduleDto (
123
102
days = it.schedule?.days,
124
103
startDate = it.schedule?.startDate,
125
104
endDate = it.schedule?.endDate,
126
105
suspendedUntil = it.schedule?.suspendedUntil,
127
106
),
128
- consecutiveChargeNumber = it.consecutiveChargeNumber,
129
- consecutiveReportAvailable = it.consecutiveReportAvailable,
130
- damagesOwedAmount = it.damagesOwedAmount,
131
- canRemove = it.canRemove,
132
107
)
133
108
},
134
109
punishmentComments = this .punishmentComments.map {
135
110
PunishmentCommentDto (
136
- id = it.id,
137
111
comment = it.comment,
138
112
reasonForChange = it.reasonForChange,
139
- createdByUserId = it.createdByUserId,
140
113
dateTime = it.dateTime,
141
114
)
142
115
},
0 commit comments