© 2018 Capita Business Services Ltd. All rights reserved.

Capita Education Software Solutions is a trading name of Capita Business Services Ltd. Our Registered office is 30 Berners Street, London, W1T 3LR and our registered number is 02299747. Further information about Capita plc can be found in our legal statement.

SIMS 7 - Alternative Provision

Alternative Provision Data can be accessed as follows

Data available

public class dAlternativeProvision
    {
        public int? alternativeprovisionplacement_id { get;set; }
        public int? person_id { get; set; }
        public DateTime? start_date { get; set; }
        public DateTime? end_date { get; set; }
        public string ap_urn { get; set; }
        public string ap_ukprn { get; set; }
        public int? ap_setting { get; set; }
        public int? ap_association { get; set; }
        public string ap_reason { get; set; }
        public string ap_attendance { get; set; }
        public int? ap_sessions { get; set; }
        public string notes { get; set; }

    }

How to get it

EditStudentInformation studentEdit = new EditStudentInformation();
StudentEdit.Load(new Person(1234), DateTime.Now);
List<APDetail> APDetails = new List<APDetail>();
foreach (StudentAlternativeProvisionPlacement pl in      studentEdit.Student.RegDetails.StudentAlternativeProvisionPlacements)
{
                    //Alternative placement setting type  APSettingType
                    //Alternative provision placement reason PlacementReason

                    APDetail plac = new APDetail();
                    plac.Type = "Null";
                    if (pl.APSettingAttribute.Value != null)
                    {
                        plac.Type = pl.APSettingAttribute.Value.Description;
                    }
                    plac.Reason = "Null";
                    if (pl.APReasonAttribute.Value != null)
                    {
                        plac.Reason = pl.APReasonAttribute.Value.Description;
                    }
                   
                    //Alternative provision placement entry date EntryDate
                    if (pl.StartDateAttribute.Value != null)
                    {
                        plac.EntryDate = pl.StartDateAttribute.Value;
                    }
                    //Alternative provision placement leaving date    LeavingDate
                    if (pl.EndDateAttribute.Value != null)
                    {
                        plac.LeavingDate = pl.EndDateAttribute.Value;
                    }
                    plac.Attendance = pl.APAttendance;
                    plac.Sessions = pl.APSessions;
                    plac.Notes = pl.NotesAttribute.Value;
                    APDetails.Add(plac);
}