OHDSI / Usagi

Usagi is an application to help create mappings between coding systems and the Vocabulary standard concepts.
http://ohdsi.github.io/Usagi/
92 stars 29 forks source link

Merge additional columns when applying previous mapping #124

Open MaximMoinat opened 3 years ago

MaximMoinat commented 3 years ago

Current Behaviour

Currently, when applying a previous mapping only the additional info columns (any column prefixed with ADD_INFO:) in the current mapping are kept. Any values in the additional information from the applied mapping are ignored. Even if the additional info columns are named the same.

Related to the bug reported here #107. A hot fix for this bug was made by creating empty additional info fields for any new codes from applied mapping.

Expected Behaviour

A better solution would be to merge additional columns from the two mappings. If different columns, keep both. If they contain the same additional column, then overwrite with the value from the applied mapping. This is the same behaviour (overwriting with value from applied mapping) is implemented for e.g. source code name.