updating mergeRecord for allergies refactored out to record.js