Skip to content

Commit

Permalink
PI-1794: Referral Codes Update (#3107)
Browse files Browse the repository at this point in the history
* PI-1794: Referral Codes Update
  • Loading branch information
pmcphee77 authored Jan 22, 2024
1 parent a728d9f commit b257d27
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ enum class ApprovedPremisesCategoryCode(
LIFE("J", CategoryMappings(SentenceType.LifeSentence to ReleaseType.Licence)),
IPP("K", CategoryMappings(SentenceType.IndeterminatePublicProtection to ReleaseType.Licence)),
LICENCE("L", CategoryMappings(SentenceType.StandardDeterminate to ReleaseType.Licence)),
PAROLE_DIRECTED(
"M",
CategoryMappings(
SentenceType.ExtendedDeterminate to ReleaseType.ParoleDirectedLicence,
SentenceType.StandardDeterminate to ReleaseType.ParoleDirectedLicence
)
),
VOLUNTARY_MAPPA(
"MAP",
CategoryMappings(*ReleaseType.entries.map { SentenceType.NonStatutory to it }.toTypedArray())
Expand All @@ -40,7 +47,12 @@ enum class ApprovedPremisesCategoryCode(
SentenceType.SuspendedSentence to ReleaseType.ResidencyManagement
)
),
EXTENDED_DETERMINATE("Y", CategoryMappings(SentenceType.ExtendedDeterminate to ReleaseType.Licence));
EXTENDED_DETERMINATE(
"Y", CategoryMappings(
SentenceType.ExtendedDeterminate to ReleaseType.Licence,
SentenceType.ExtendedDeterminate to ReleaseType.ExtendedDeterminateLicence
)
);

companion object {
fun from(sentenceType: SentenceType, releaseType: ReleaseType) =
Expand Down Expand Up @@ -68,8 +80,10 @@ enum class SentenceType(val value: String) {
enum class ReleaseType(val value: String) {
BailAssessment("bailAssessment"),
BailSentence("bailSentence"),
ExtendedDeterminateLicence("extendedDeterminateLicence"),
HomeDetentionCurfew("hdc"),
Licence("licence"),
ParoleDirectedLicence("paroleDirectedLicence"),
PostSentenceSupervision("pss"),
ResidencyManagement("residencyManagement"),
RiskManagement("riskManagement"),
Expand Down

0 comments on commit b257d27

Please sign in to comment.