"A referral order is the mandatory sentence in a youth court or magistrates' court for most children and young people who have committed an offence for the first time and have pleaded guilty to an imprisonable offence. Exceptions are for offences where a sentence is fixed by law or if the court deems a custodial sentence, an absolute or conditional discharge or a hospital order to be more appropriate."