Smarter de-duping of encounter entries

This commit applies the smarter de-duping that fixed issue #89 to encounters. This ensures that clinical data isn't lost when de-duping encounters by merging codes and concatenating values.