in src/FhirDashboardJS/js/PatientModule.js [286:317]
success: function (result, status) {
ptMod.patientSearchNextLink = null; //Assume we are at the end
if (Array.isArray(result.link))
{
for (var i = 0; i < result.link.length; i++)
{
if (result.link[i].relation == "next")
{
//Set new search link
ptMod.patientSearchNextLink = result.link[i].url;
break;
}
}
}
if (Array.isArray(result.entry))
{
for (var i = 0; i < result.entry.length; i++)
{
ptMod.patientList.push(result.entry[i].resource);
}
}
if (ptMod.patientSearchNextLink && patientsNeeded > ptMod.patientList.length)
{
ptMod.fetchPatients(patientsNeeded, callback);
}
else
{
callback();
}
}