if (i.getPersonnelId() != null) {
SchoolPersonnel existingEntry = em.find(SchoolPersonnel.class, i.getPersonnelId());
if (existingEntry.getHealthRecordId().compareTo(healthRecordId) == 0) {
i.setDataSourceId(healthRecordId);
em.merge(i);
persistenceSvc.commitTx();
} else {
logger.error("Non-matching HRID on merge attempt");
res = false;
}
} else {