Skip to content
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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Shayan1375
Copy link
Contributor

No description provided.

@Shayan1375 Shayan1375 requested a review from geloro94 July 4, 2024 08:24
@Shayan1375 Shayan1375 linked an issue Jul 4, 2024 that may be closed by this pull request
Copy link
Collaborator

@geloro94 geloro94 left a 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?

@Shayan1375 Shayan1375 requested a review from geloro94 July 19, 2024 09:10
@@ -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')
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

Copy link
Collaborator

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.

Comment on lines +31 to +33
else:
canonical_address = f"ValueSet/$expand?url={url}"
logging.debug(f"No version found for canonical address: {canonical_address}")
Copy link
Collaborator

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"

Copy link
Contributor Author

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}")

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Copy link
Collaborator

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.

Copy link
Contributor Author

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.

Copy link
Collaborator

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.

@juliangruendner juliangruendner self-requested a review August 5, 2024 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error expading Value set with multiple versions
2 participants