This tool maps secondary ids (outdated, split, replaced, whatever might cause them to become invalid) to primary ids: https://github.com/sec2pri/mapping_preprocessing and it would be great to include this as an additional service in MSME. This is best implemented as a tool that fetches the tables from the repo and stores them as dataframes. These can then be used to look up the tables and replace the secondary ids with primary ids. This should be done for all supported databases.