medizininformatik-initiative/fhir-ontology-generator

exclude termcode version from context-termcode-hash

juliangruendner opened this issue · 0 comments

The context-term-code-hash should be changed to not include the version of the termcode.

The hash is currently calculated in two spots:

https://github.com/medizininformatik-initiative/fhir-ontology-generator/blob/develop/database/DataBaseWriter.py#L181

https://github.com/medizininformatik-initiative/fhir-ontology-generator/blob/develop/core/ElasticSearchBulkGenerator.py#L18

both should be changed from

context_termcode_hash_input = f"{context_node.get('system')}{context_node.get('code')}{context_node.get('version', '')}{termcode_node.get('system')}{termcode_node.get('code')}{termcode_node.get('version', '')}"

to

context_termcode_hash_input = f"{context_node.get('system')}{context_node.get('code')}{context_node.get('version', '')}{termcode_node.get('system')}{termcode_node.get('code')}"