-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new env variable for setting Value set version #32
base: main
Are you sure you want to change the base?
new env variable for setting Value set version #32
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You introduce a new environment variable but never use it? Further from the discussion I think you want to explicitly set the CODE_SYSTEM_VERSION not the VALUE_SET_VERSION?
@@ -22,7 +23,23 @@ def expand_value_set(url: str, onto_server: str = TERMINOLOGY_SERVER_ADDRESS): | |||
if '|' in url: | |||
url = url.replace('|', '&version=') | |||
term_codes = SortedSet() | |||
response = requests.get(onto_server + f"ValueSet/$expand?url={url}", cert=(SERVER_CERTIFICATE, PRIVATE_KEY)) | |||
version = MAPPING_ONTO_VERSION.get('canonical_address') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use a file if you always get the same version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It ensures that the system remains adaptable and scalable as more version-specific requirements emerge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure but please a variable here and not a string in that case. Probably you want to use the actual canonical_adress not a string.
else: | ||
canonical_address = f"ValueSet/$expand?url={url}" | ||
logging.debug(f"No version found for canonical address: {canonical_address}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The log output is not in line with the implementation. You never look up {canonical_address} but "canonical_address"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would that be a better logging message which clarifys the purpose of the error?
logging.debug(f"No version was provided.Using canonical address: {canonical_address}")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can only assume this intended to be the canonical address of the valueset that requires the snomed version?
In that case you would have a change the key accordingly and also add all snomed based valuesets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mapping.json file, which contains version information, has been updated as follows:
{ "snomed-version": "http%3A%2F%2Fsnomed.info%2Fsct%7Chttp%3A%2F%2Fsnomed.info%2Fsct%2F900000000000207008%2Fversion%2F20240101" }
Currently, only one version of SNOMED is provided in this file because this update specifically applies to ICU use cases. Additional versions will be added as they become available and relevant to other domains.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do you get the key information from? It shouldn't be static.
No description provided.