Connected SIMS: Command Reporter vs APIs
Introduction:
This article proposes various methods for Technical Implementers (TIs) to retrieve data from SIMS, highlighting the importance of distinguishing between the 'easiest' and 'most efficient' routes, as these may not align. Efficiency is crucial due to the substantial demand on both locally and centrally hosted SIMS servers around the clock. The article explores the advantages and disadvantages of different approaches.
Connected SIMS and Other Hosting Models:
Connected SIMS eliminates the need for schools to purchase and maintain servers, offering a cost-effective cloud-based service. While TI applications function similarly to on-premise SIMS servers, there is an overhead associated with each API call.
Example - Partner APIs/Command Reporter vs. Individual Calls for Pupil Premium Data:
The options for obtaining data include a partner API call for extracting parental information in a single call, creating a report for the same purpose, or making multiple calls for each parent's data. The article considers these options, with an illustration using n = 2000 for a large secondary school.
- Create a Report: Creating a report is a straightforward method, extracting specific information like UPN, Pupil Premium Eligibility, Service Child status, FSM Ever 6, In Care, and Ever in Care. While this is quick to code using sample automation code, the actual implementation may take days or weeks.
- Code Option: Using code to retrieve data per pupil involves loading the full student edit, which is relatively expensive and may slow down significantly with a large number of pupils, especially in a connected environment.
Compare the Load on Servers/Infrastructure:
This article compares the load on servers and infrastructure for partner API calls, report calls, and individual per entity calls. Partner API calls are likely the most efficient, followed by report calls, and individual per entity calls may become time-consuming, particularly in bulk scenarios.
Conclusion:
Efficiency is ranked based on different methods, prioritizing change-tracked calls, partner API calls for bulk data, individual API calls for specific entities in small numbers, automated reporting for bulk data with infrequent calls, and individual per entity calls for bulk scenarios. Exceptions can be identified through testing, and assistance for TIs is available through consultancy or partner support.
Code Sample and comments
public static void GetStudentPP(ref bool isPP, ref bool isServiceChild, ref bool FSMEver6, ref bool inCare)
{
// For the sake of brevity we will assume care - incare now.
// it is simple enough to extrapolate that to ever in care.
// Student Shaquib is 3920
SIMS.Entities.IIDEntity identity = new SIMS.Entities.Person(3920);
// Load the edit
EditStudentInformation edStudInfo = new EditStudentInformation();
edStudInfo.Load(identity, System.DateTime.Now);
// PP Flag
//edStudInfo.Student.AdditionalInformation.PupilPremiums;
foreach (SIMS.Entities.PupilPremium premium in edStudInfo.Student.AdditionalInformation.PupilPremiums.Value)
{
// TI needs to work out what year they want the answer for.
// bit the data is there...
string t = premium.AcadYearAttribute.Value;
if (t == "2023")
{
if (premium.Eligible)
{
isPP = true;
}
}
}
// In Care
//edStudInfo.Student.AdditionalInformation.InCareDetails;
//pastoral context dll;
foreach (SIMS.Entities.InCareMembership icm in edStudInfo.Student.AdditionalInformation.InCareDetails)
{
string t = icm.StartDateAttribute.Value.ToString();
string Auth = icm.MemBaseGroup.Description;
// need to check dates and decide whether the value needed is
// ever in care or currently in care...
// But the data is there for the TI to decide.
inCare = true;
}
// Service Children
SIMS.Entities.ServiceChildrenEducationIndicator sci = (SIMS.Entities.ServiceChildrenEducationIndicator)edStudInfo.Student.AdditionalInformation.ServiceChildrenEducationIndicatorsAttribute.Value;
// FSM
//edStudInfo.Student.AdditionalInformation.FreeMealDetails
foreach (SIMS.Entities.StudentFreeMeal sfm in edStudInfo.Student.AdditionalInformation.FreeMealDetails)
{
DateTime d1 = sfm.StartDate;
DateTime d2 = sfm.EndDate;
// TI needs to work out the correct rules on 'Ever 6 which seem to vary if
// the school is a referral unit. But given the set of entitlement dates...
// they can apply whatever algorithm they deem appropriate.
}