medizininformatik-initiative / fhir-ontology-generator

3 stars 3 forks source link

Merging of multiple ontologies #18

Closed juliangruendner closed 1 month ago

juliangruendner commented 4 months ago

A script should be developed and the generator extended in the generation where necessary so that mulitple ontologies generated in different subprojects (folder examples) can be merged into one ontology.

This means that from each subproject, the files should be merged as follows: ui_tree: ui trees are separate files and instead of merging the files all files should be collected in the same ui_tree folder mapping_cql: All mappings should be merged into one file - a simple appending of one file to another should work mapping_fhir: All mappings should be merged into one file - a simple appending of one file to another should work R__Load_latest_ui_profile.sql: All .sql files can be kept separatedly, but should be added to the same folder - the order is not relevant but each successive addition of a .sql file should increment the name by one

BoehmDo commented 3 months ago

This issues development branch now contains a script that can successfully merge multiple ontologies. So far it has only been tested on those that have been created based on the example-ontology script and file-structure: DKTK-Oncology and the preliminary Bildgebung. Currently it manually merges the relevant parts of the migration scripts which is not an elegant solution but seems to work. If frequent use of this functionality is planned it might be better to join the data in a temporary database to ensure a valid joined migration script?

juliangruendner commented 2 months ago

@BoehmDo , @Shayan1375 , @michael-82 : I spoke with michael and the merging by offset of mulitple files does not work as whole code systems would be duplicated. @michael-82 will adjust the merge script to merge multiples databases without needlessly duplicating entries.