package Ġuk . gov . just ice . digital . h mp ps . calcul at erelease dates api . service Ċ Ċ import Ġorg . assertj . core . api . Assertions . assertThat Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġuk . gov . just ice . digital . h mp ps . calcul at erelease dates api . entity . Calculation Outcome Ċ import Ġuk . gov . just ice . digital . h mp ps . calcul at erelease dates api . entity . Calculation Request Ċ import Ġuk . gov . just ice . digital . h mp ps . calcul at erelease dates api . enum er ations . Release Date Type . CR D Ċ import Ġuk . gov . just ice . digital . h mp ps . calcul at erelease dates api . enum er ations . Release Date Type . E SED Ċ import Ġuk . gov . just ice . digital . h mp ps . calcul at erelease dates api . enum er ations . Release Date Type . SED Ċ import Ġuk . gov . just ice . digital . h mp ps . calcul at erelease dates api . enum er ations . Release Date Type . S LED Ċ import Ġuk . gov . just ice . digital . h mp ps . calcul at erelease dates api . model . Booking Calculation Ċ import Ġuk . gov . just ice . digital . h mp ps . calcul at erelease dates api . model . Duration Ċ import Ġuk . gov . just ice . digital . h mp ps . calcul at erelease dates api . model . Off ence Ċ import Ġuk . gov . just ice . digital . h mp ps . calcul at erelease dates api . model . Off ender Ċ import Ġuk . gov . just ice . digital . h mp ps . calcul at erelease dates api . model . Sentence Ċ import Ġuk . gov . just ice . digital . h mp ps . calcul at erelease dates api . model . external . Alert Ċ import Ġuk . gov . just ice . digital . h mp ps . calcul at erelease dates api . model . external . Off ender Key Dates Ċ import Ġuk . gov . just ice . digital . h mp ps . calcul at erelease dates api . model . external . Off ender Off ence Ċ import Ġuk . gov . just ice . digital . h mp ps . calcul at erelease dates api . model . external . Pr isoner Details Ċ import Ġuk . gov . just ice . digital . h mp ps . calcul at erelease dates api . model . external . Sentence And Off ences Ċ import Ġjava . time . LocalDate Ċ import Ġjava . time . Period Ċ import Ġjava . time . temporal . Ch rono Unit . DAYS Ċ import Ġjava . time . temporal . Ch rono Unit . MONTH S Ċ import Ġjava . time . temporal . Ch rono Unit . W EE KS Ċ import Ġjava . time . temporal . Ch rono Unit . YEAR S Ċ import Ġjava . util . UUID Ċ Ċ class ĠTransform Functions Test Ġ{ ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` Transform Ġan Ġoff enders ĠSentence Ġand Ġoff ences Ġinto Ġa ĠSentence Ġcorrectly Ġwhere Ġthere Ġare Ġmultiple Ġoff ences `() Ġ{ ĊĠĠĠ Ġval Ġbooking Id Ġ= Ġ 1 1 1 0 0 2 2 L ĊĠĠĠ Ġval Ġsequence Ġ= Ġ 1 5 3 ĊĠĠĠ Ġval Ġline Sequence Ġ= Ġ 1 5 4 ĊĠĠĠ Ġval Ġcase Sequence Ġ= Ġ 1 5 5 ĊĠĠĠ Ġval Ġoff ences Ġ= ĠlistOf ( ĊĠĠĠĠĠ ĠOff ender Off ence ( ĊĠĠĠĠĠĠĠ Ġoff ender Charge Id Ġ= Ġ 1 L , Ġoff ence StartDate Ġ= ĠFIRST _ J AN _ 2 0 1 5 , ĊĠĠĠĠĠĠĠ Ġoff ence Code Ġ= Ġ" RR 1 ", Ġoff ence Description Ġ= Ġ" L itter ing ", ĊĠĠĠĠĠĠĠ Ġindicators Ġ= ĠlistOf (" An Ġindicator ") ĊĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ ĠOff ender Off ence ( ĊĠĠĠĠĠĠĠ Ġoff ender Charge Id Ġ= Ġ 2 L , Ġoff ence StartDate Ġ= ĠSE COND _ J AN _ 2 0 1 5 , ĊĠĠĠĠĠĠĠ Ġoff ence Code Ġ= Ġ" RR 2 ", Ġoff ence Description Ġ= Ġ" J ay walk ing ", ĊĠĠĠĠĠĠĠ Ġindicators Ġ= ĠlistOf ( Off ender Off ence . SCHED ULE _ 1 5 _ IND IC ATOR ) ĊĠĠĠĠĠ Ġ), ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġrequest Ġ= ĠSentence And Off ences ( ĊĠĠĠĠĠ Ġbooking Id Ġ= Ġbooking Id , ĊĠĠĠĠĠ Ġsentence Sequence Ġ= Ġsequence , ĊĠĠĠĠĠ Ġsentence Date Ġ= ĠFIRST _ J AN _ 2 0 1 5 , ĊĠĠĠĠĠ Ġyears Ġ= Ġ 5 , ĊĠĠĠĠĠ Ġmonths Ġ= Ġ 4 , ĊĠĠĠĠĠ Ġweeks Ġ= Ġ 3 , ĊĠĠĠĠĠ Ġdays Ġ= Ġ 2 , ĊĠĠĠĠĠ Ġsentence Status Ġ= Ġ" IMP ", ĊĠĠĠĠĠ Ġsentence Category Ġ= Ġ" CAT ", ĊĠĠĠĠĠ Ġsentence Calculation Type Ġ= Ġ" SD S ", ĊĠĠĠĠĠ Ġsentence Type Description Ġ= Ġ" Standard ĠDetermin ate ", ĊĠĠĠĠĠ Ġoff ences Ġ= Ġoff ences , ĊĠĠĠĠĠ Ġline Sequence Ġ= Ġline Sequence , ĊĠĠĠĠĠ Ġcase Sequence Ġ= Ġcase Sequence ĊĠĠĠ Ġ) ĊĊĠĠĠ ĠassertThat ( transform ( request )). isEqualTo ( ĊĠĠĠĠĠ ĠlistOf ( ĊĠĠĠĠĠĠĠ ĠSentence ( ĊĠĠĠĠĠĠĠĠĠ Ġsent enced At Ġ= ĠFIRST _ J AN _ 2 0 1 5 , ĊĠĠĠĠĠĠĠĠĠ Ġduration Ġ= ĠF IVE _ YEAR _ FO UR _ MONTH S _ TH REE _ W EE KS _ TWO _ DAYS _ DURATION , ĊĠĠĠĠĠĠĠĠĠ Ġoff ence Ġ= ĠOff ence ( committed At Ġ= ĠFIRST _ J AN _ 2 0 1 5 , Ġis Schedule F if teen Ġ= Ġfalse ), ĊĠĠĠĠĠĠĠĠĠ Ġidentifier Ġ= ĠUUID . name UUID From Bytes ( ("$ booking Id -$ sequence "). toByteArray ()), ĊĠĠĠĠĠĠĠĠĠ Ġconsecutive Sentence UUID s Ġ= Ġmutable ListOf (), ĊĠĠĠĠĠĠĠĠĠ Ġline Sequence Ġ= Ġline Sequence , ĊĠĠĠĠĠĠĠĠĠ Ġcase Sequence Ġ= Ġcase Sequence ĊĠĠĠĠĠĠĠ Ġ), ĊĠĠĠĠĠĠĠ ĠSentence ( ĊĠĠĠĠĠĠĠĠĠ Ġsent enced At Ġ= ĠFIRST _ J AN _ 2 0 1 5 , ĊĠĠĠĠĠĠĠĠĠ Ġduration Ġ= ĠF IVE _ YEAR _ FO UR _ MONTH S _ TH REE _ W EE KS _ TWO _ DAYS _ DURATION , ĊĠĠĠĠĠĠĠĠĠ Ġoff ence Ġ= ĠOff ence ( committed At Ġ= ĠSE COND _ J AN _ 2 0 1 5 , Ġis Schedule F if teen Ġ= Ġtrue ), ĊĠĠĠĠĠĠĠĠĠ Ġidentifier Ġ= ĠUUID . name UUID From Bytes ( ("$ booking Id -$ sequence "). toByteArray ()), ĊĠĠĠĠĠĠĠĠĠ Ġconsecutive Sentence UUID s Ġ= Ġmutable ListOf (), ĊĠĠĠĠĠĠĠĠĠ Ġline Sequence Ġ= Ġline Sequence , ĊĠĠĠĠĠĠĠĠĠ Ġcase Sequence Ġ= Ġcase Sequence ĊĠĠĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` Transform Ġan Ġoff enders ĠSentence Ġand Ġoff ences Ġinto Ġa ĠSentence Ġcorrectly Ġwhere Ġthere Ġare Ġconsecutive Ġsentences `() Ġ{ ĊĠĠĠ Ġval Ġbooking Id Ġ= Ġ 1 1 1 0 0 2 2 L ĊĠĠĠ Ġval Ġsequence Ġ= Ġ 1 5 3 ĊĠĠĠ Ġval Ġline Sequence Ġ= Ġ 1 5 4 ĊĠĠĠ Ġval Ġcase Sequence Ġ= Ġ 1 5 5 ĊĠĠĠ Ġval Ġconsecutive To Ġ= Ġ 9 9 ĊĠĠĠ Ġval Ġoff ences Ġ= ĠlistOf ( ĊĠĠĠĠĠ ĠOff ender Off ence ( ĊĠĠĠĠĠĠĠ Ġoff ender Charge Id Ġ= Ġ 1 L , Ġoff ence StartDate Ġ= ĠFIRST _ J AN _ 2 0 1 5 , Ġoff ence EndDate Ġ= ĠSE COND _ J AN _ 2 0 1 5 , ĊĠĠĠĠĠĠĠ Ġoff ence Code Ġ= Ġ" RR 1 ", Ġoff ence Description Ġ= Ġ" L itter ing ", Ġindicators Ġ= ĠlistOf () ĊĠĠĠĠĠ Ġ), ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġrequest Ġ= ĠSentence And Off ences ( ĊĠĠĠĠĠ Ġbooking Id Ġ= Ġbooking Id , ĊĠĠĠĠĠ Ġsentence Sequence Ġ= Ġsequence , ĊĠĠĠĠĠ Ġconsecutive To Sequence Ġ= Ġconsecutive To , ĊĠĠĠĠĠ Ġsentence Date Ġ= ĠFIRST _ J AN _ 2 0 1 5 , ĊĠĠĠĠĠ Ġyears Ġ= Ġ 5 , ĊĠĠĠĠĠ Ġsentence Status Ġ= Ġ" IMP ", ĊĠĠĠĠĠ Ġsentence Category Ġ= Ġ" CAT ", ĊĠĠĠĠĠ Ġsentence Calculation Type Ġ= Ġ" SD S ", ĊĠĠĠĠĠ Ġsentence Type Description Ġ= Ġ" Standard ĠDetermin ate ", ĊĠĠĠĠĠ Ġoff ences Ġ= Ġoff ences , ĊĠĠĠĠĠ Ġline Sequence Ġ= Ġline Sequence , ĊĠĠĠĠĠ Ġcase Sequence Ġ= Ġcase Sequence ĊĠĠĠ Ġ) ĊĊĠĠĠ ĠassertThat ( transform ( request )). isEqualTo ( ĊĠĠĠĠĠ ĠlistOf ( ĊĠĠĠĠĠĠĠ ĠSentence ( ĊĠĠĠĠĠĠĠĠĠ Ġsent enced At Ġ= ĠFIRST _ J AN _ 2 0 1 5 , ĊĠĠĠĠĠĠĠĠĠ Ġduration Ġ= ĠF IVE _ YEAR _ DURATION , ĊĠĠĠĠĠĠĠĠĠ Ġoff ence Ġ= ĠOff ence ( committed At Ġ= ĠSE COND _ J AN _ 2 0 1 5 ), ĊĠĠĠĠĠĠĠĠĠ Ġidentifier Ġ= ĠUUID . name UUID From Bytes ( ("$ booking Id -$ sequence "). toByteArray ()), ĊĠĠĠĠĠĠĠĠĠ Ġconsecutive Sentence UUID s Ġ= Ġmutable ListOf ( UUID . name UUID From Bytes ( ("$ booking Id -$ con secutive To "). toByteArray ())), ĊĠĠĠĠĠĠĠĠĠ Ġline Sequence Ġ= Ġline Sequence , ĊĠĠĠĠĠĠĠĠĠ Ġcase Sequence Ġ= Ġcase Sequence ĊĠĠĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` Transform Ġa ĠCalcul ation Request Ġto Ġa ĠBook ing Calculation `() Ġ{ ĊĠĠĠ Ġval Ġrelease Dates ByType Ġ= Ġmutable Map Of ( ĊĠĠĠĠĠ ĠCR D Ġto ĠFIRST _ J AN _ 2 0 1 5 , ĊĠĠĠĠĠ ĠS ED Ġto ĠSE COND _ J AN _ 2 0 1 5 , ĊĠĠĠ Ġ) ĊĊĠĠĠ ĠassertThat ( transform ( CAL C UL ATION _ REQUEST )). isEqualTo ( ĊĠĠĠĠĠ ĠBook ing Calculation ( ĊĠĠĠĠĠĠĠ Ġrelease Dates ByType , ĊĠĠĠĠĠĠĠ ĠCAL C UL ATION _ REQUEST _ ID ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` Transform Ġinto Ġan Ġoff ender Ġdates Ġobject Ġwith Ġa ĠCR D Ġdate , ĠS LED , ĠE SED Ġand ĠE SL `() Ġ{ ĊĠĠĠ ĠassertThat ( ĊĠĠĠĠĠ Ġtransform ( ĊĠĠĠĠĠĠĠ ĠBO OK ING _ CAL C UL ATION . copy ( ĊĠĠĠĠĠĠĠĠĠ Ġdates Ġ= Ġmutable Map Of ( CR D Ġto ĠCR D _ DATE , ĠS LED Ġto ĠS LED _ DATE , ĠE SED Ġto ĠE SED _ DATE ), ĊĠĠĠĠĠĠĠĠĠ Ġeffective Sentence Length Ġ= ĠPeriod . of ( 6 , Ġ 2 , Ġ 3 ) ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ). isEqualTo ( ĊĠĠĠĠĠ ĠOff ender Key Dates ( ĊĠĠĠĠĠĠĠ Ġconditional Release Date Ġ= ĠCR D _ DATE , ĊĠĠĠĠĠĠĠ Ġsentence Expiry Date Ġ= ĠS LED _ DATE , ĊĠĠĠĠĠĠĠ Ġlicence Expiry Date Ġ= ĠS LED _ DATE , ĊĠĠĠĠĠĠĠ Ġeffective Sentence EndDate Ġ= ĠE SED _ DATE , ĊĠĠĠĠĠĠĠ Ġsentence Length Ġ= Ġ" 0 6 / 0 2 / 0 3 " ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` Transform Ġpr isoner Ġdetails Ġ- Ġcheck Ġactive Ġsex Ġoff ender Ġis Ġset `() Ġ{ ĊĠĠĠ ĠassertThat ( ĊĠĠĠĠĠ Ġtransform ( ĊĠĠĠĠĠĠĠ ĠPR IS ON ER _ DETAILS . copy ( alerts Ġ= ĠlistOf ( SE X _ OFF ENDER _ ALERT , ĠR AN DOM _ ALERT )) ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ). isEqualTo ( ĊĠĠĠĠĠ ĠOff ender ( ĊĠĠĠĠĠĠĠ Ġreference Ġ= ĠPR IS ON ER _ ID , ĊĠĠĠĠĠĠĠ Ġdate OfBirth Ġ= ĠDO B , ĊĠĠĠĠĠĠĠ Ġname Ġ= Ġ" H arry ĠH oud ini ", ĊĠĠĠĠĠĠĠ ĠisActive Sex Off ender Ġ= Ġtrue , ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` Transform Ġpr isoner Ġdetails Ġ- Ġcheck Ġactive Ġsex Ġoff ender Ġis Ġnot Ġset Ġwith Ġanother Ġtype Ġof Ġalert `() Ġ{ ĊĠĠĠ ĠassertThat ( ĊĠĠĠĠĠ Ġtransform ( ĊĠĠĠĠĠĠĠ ĠPR IS ON ER _ DETAILS . copy ( alerts Ġ= ĠlistOf ( RANDOM _ ALERT )) ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ). isEqualTo ( ĊĠĠĠĠĠ ĠOff ender ( ĊĠĠĠĠĠĠĠ Ġreference Ġ= ĠPR IS ON ER _ ID , ĊĠĠĠĠĠĠĠ Ġdate OfBirth Ġ= ĠDO B , ĊĠĠĠĠĠĠĠ Ġname Ġ= Ġ" H arry ĠH oud ini ", ĊĠĠĠĠĠĠĠ ĠisActive Sex Off ender Ġ= Ġfalse , ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` Transform Ġpr isoner Ġdetails Ġ- Ġcheck Ġactive Ġsex Ġoff ender Ġis Ġnot Ġset Ġwith Ġno Ġalerts `() Ġ{ ĊĠĠĠ ĠassertThat ( ĊĠĠĠĠĠ Ġtransform ( ĊĠĠĠĠĠĠĠ ĠPR IS ON ER _ DETAILS . copy ( alerts Ġ= ĠlistOf ( RANDOM _ ALERT )) ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ). isEqualTo ( ĊĠĠĠĠĠ ĠOff ender ( ĊĠĠĠĠĠĠĠ Ġreference Ġ= ĠPR IS ON ER _ ID , ĊĠĠĠĠĠĠĠ Ġdate OfBirth Ġ= ĠDO B , ĊĠĠĠĠĠĠĠ Ġname Ġ= Ġ" H arry ĠH oud ini ", ĊĠĠĠĠĠĠĠ ĠisActive Sex Off ender Ġ= Ġfalse , ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ) ĊĠ Ġ} ĊĊĠ Ġprivate Ġcompanion Ġobject Ġ{ ĊĠĠĠ Ġval ĠF IVE _ YEAR _ DURATION Ġ= ĠDuration ( mutable Map Of ( DAYS Ġto Ġ 0 L , ĠW EE KS Ġto Ġ 0 L , ĠMON TH S Ġto Ġ 0 L , ĠYEAR S Ġto Ġ 5 L )) ĊĠĠĠ Ġval ĠF IVE _ YEAR _ FO UR _ MONTH S _ TH REE _ W EE KS _ TWO _ DAYS _ DURATION Ġ= ĊĠĠĠĠĠ ĠDuration ( mutable Map Of ( DAYS Ġto Ġ 2 L , ĠW EE KS Ġto Ġ 3 L , ĠMON TH S Ġto Ġ 4 L , ĠYEAR S Ġto Ġ 5 L )) ĊĠĠĠ Ġval ĠFIRST _ J AN _ 2 0 1 5 : ĠLocalDate Ġ= ĠLocalDate . of ( 2 0 1 5 , Ġ 1 , Ġ 1 ) ĊĠĠĠ Ġval ĠSE COND _ J AN _ 2 0 1 5 : ĠLocalDate Ġ= ĠLocalDate . of ( 2 0 1 5 , Ġ 1 , Ġ 2 ) ĊĠĠĠ Ġval ĠDO B : ĠLocalDate Ġ= ĠLocalDate . of ( 1 9 5 5 , Ġ 1 1 , Ġ 5 ) ĊĠĠĠ Ġprivate Ġconst Ġval ĠPR IS ON ER _ ID Ġ= Ġ" A 1 2 3 4 AJ " ĊĠĠĠ Ġprivate Ġconst Ġval ĠBO OK ING _ ID Ġ= Ġ 1 2 3 4 5 L ĊĠĠĠ Ġprivate Ġval ĠCAL C UL ATION _ REFERENCE : ĠUUID Ġ= ĠUUID . randomUUID () ĊĠĠĠ Ġprivate Ġconst Ġval ĠCAL C UL ATION _ REQUEST _ ID Ġ= Ġ 1 0 0 0 1 1 L ĊĊĠĠĠ Ġval ĠCAL C UL ATION _ REQUEST Ġ= ĠCalcul ation Request ( ĊĠĠĠĠĠ Ġid Ġ= ĠCAL C UL ATION _ REQUEST _ ID , ĊĠĠĠĠĠ Ġcalculation Reference Ġ= ĠCAL C UL ATION _ REFERENCE , ĊĠĠĠĠĠ Ġpr isoner Id Ġ= ĠPR IS ON ER _ ID , ĊĠĠĠĠĠ Ġbooking Id Ġ= ĠBO OK ING _ ID , ĊĠĠĠĠĠ Ġcalculation Outcome s Ġ= ĠlistOf ( ĊĠĠĠĠĠĠĠ ĠCalcul ation Outcome ( ĊĠĠĠĠĠĠĠĠĠ Ġcalculation RequestId Ġ= ĠCAL C UL ATION _ REQUEST _ ID , ĊĠĠĠĠĠĠĠĠĠ Ġoutcome Date Ġ= ĠFIRST _ J AN _ 2 0 1 5 , ĊĠĠĠĠĠĠĠĠĠ Ġcalculation Date Type Ġ= Ġ" CR D " ĊĠĠĠĠĠĠĠ Ġ), ĊĠĠĠĠĠĠĠ ĠCalcul ation Outcome ( ĊĠĠĠĠĠĠĠĠĠ Ġcalculation RequestId Ġ= ĠCAL C UL ATION _ REQUEST _ ID , ĊĠĠĠĠĠĠĠĠĠ Ġoutcome Date Ġ= ĠSE COND _ J AN _ 2 0 1 5 , ĊĠĠĠĠĠĠĠĠĠ Ġcalculation Date Type Ġ= Ġ" SED " ĊĠĠĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval ĠCR D _ DATE : ĠLocalDate Ġ= ĠLocalDate . of ( 2 0 2 1 , Ġ 2 , Ġ 3 ) ĊĠĠĠ Ġval ĠS LED _ DATE : ĠLocalDate Ġ= ĠLocalDate . of ( 2 0 2 1 , Ġ 3 , Ġ 4 ) ĊĠĠĠ Ġval ĠE SED _ DATE : ĠLocalDate Ġ= ĠLocalDate . of ( 2 0 2 1 , Ġ 5 , Ġ 5 ) ĊĊĠĠĠ Ġval ĠBO OK ING _ CAL C UL ATION Ġ= ĠBook ing Calculation ( ĊĠĠĠĠĠ Ġdates Ġ= Ġmutable Map Of ( CR D Ġto ĠCR D _ DATE ), ĊĠĠĠĠĠ Ġcalculation RequestId Ġ= ĠCAL C UL ATION _ REQUEST _ ID ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval ĠS EX _ OFF ENDER _ ALERT Ġ= ĠAlert ( ĊĠĠĠĠĠ Ġdate Created Ġ= ĠLocalDate . of ( 2 0 1 0 , Ġ 1 , Ġ 1 ), ĊĠĠĠĠĠ Ġalert Type Ġ= Ġ" S ", ĊĠĠĠĠĠ Ġalert Code Ġ= Ġ" SOR " ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval ĠR AN DOM _ ALERT Ġ= ĠAlert ( ĊĠĠĠĠĠ Ġdate Created Ġ= ĠLocalDate . of ( 2 0 1 0 , Ġ 1 , Ġ 1 ), ĊĠĠĠĠĠ Ġalert Type Ġ= Ġ" X ", ĊĠĠĠĠĠ Ġalert Code Ġ= Ġ" XX Y " ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval ĠPR IS ON ER _ DETAILS Ġ= ĠPr isoner Details ( ĊĠĠĠĠĠ Ġbooking Id Ġ= ĠBO OK ING _ ID , ĊĠĠĠĠĠ Ġoff ender No Ġ= ĠPR IS ON ER _ ID , ĊĠĠĠĠĠ Ġdate OfBirth Ġ= ĠDO B , ĊĠĠĠĠĠ ĠfirstName Ġ= Ġ" H arry ", ĊĠĠĠĠĠ ĠlastName Ġ= Ġ" H oud ini " ĊĠĠĠ Ġ) ĊĠ Ġ} Ċ } Ċ