Open paynejd opened 1 week ago
Thanks @paynejd. A small python script that calculates checksum for a concept or a mapping would be very helpful. At this point, I'm missing something in my little toy python script.
@snyaggarwal, if you could provide me with the structure of the JSON sent to the JSum algorithm for a CIEL concept (like this one), it would help me troubleshoot my script.
@bmamlin For standard checksum --
{'concept_class': 'Diagnosis', 'datatype': 'N/A', 'external_id': '1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', 'names': [{'locale': 'en', 'locale_preferred': True, 'name': 'Anemia due to blood loss', 'name_type': 'FULLY_SPECIFIED'}, {'locale': 'es', 'locale_preferred': True, 'name': 'Anemia por pérdida de sangre', 'name_type': 'FULLY_SPECIFIED'}, {'locale': 'en', 'locale_preferred': False, 'name': 'Anemia, blood loss', 'name_type': None}, {'locale': 'fr', 'locale_preferred': True, 'name': 'Anémie secondaire à une hémorragie', 'name_type': 'FULLY_SPECIFIED'}, {'locale': 'ur', 'locale_preferred': True, 'name': 'خون کی کمی، خون بہنے کی وجہ سے', 'name_type': 'FULLY_SPECIFIED'}], 'descriptions': [{'locale': 'en', 'locale_preferred': False, 'description': 'Anemia due to bleeding or a hemorrhagic process.', 'description_type': None}, {'locale': 'ur', 'locale_preferred': False, 'description': 'خون بہنے کی وجہ سے خون کی کمی', 'description_type': None}], 'parent_concept_urls': [], 'child_concept_urls': []}
We want a script that can be run outside of the OCL core services. The script can be either python or javascript -- python might be easier for the moment. It must have the logic required to generate standard and smart checksums for concepts or mappings. The user should not need to know which fields should be included for standard/smart checksums -- this needs to be embedded in the script.
The initial goal is to enable @bmamlin to create checksums for CIEL resources outside of OCL to support validation workflows.
Also see #1691