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