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

Add easy access to parent rescources and shared-tags #55

Merged
merged 4 commits into from
Nov 30, 2023

Conversation

gacou54
Copy link
Owner

@gacou54 gacou54 commented Nov 27, 2023

Features:

  • Each resource as new parent_(patient/study/series) property that facilitate the access to its parent resources
  • Patient, Study and Series objects now have a shared_tags property that retrieve the shared tags in a simplified format
    • For more control on the output format, a get_shared_tags(simplify=True/False, short=True/False) method is also accessible

@gacou54
Copy link
Owner Author

gacou54 commented Nov 27, 2023

related to #53 and #54

def get_shared_tags(self, simplify: bool = False, short: bool = False) -> Dict:
"""Retrieve the shared tags of the study"""
if simplify and not short:
params = {'simplify': True}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you could put these verifications in get_series_id_shared_tags (or a dedicated def ortherwise), to avoid code duplication

Copy link
Owner Author

Choose a reason for hiding this comment

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

Since get_series_id_shared_tags is in the generated client, I am not sure it is a good idea to change it?

Copy link
Collaborator

Choose a reason for hiding this comment

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

You are right. Still I would put this business rule in a dedicated function.
I'm not sure if it is the best solution.

@gacou54 gacou54 merged commit aff2ee3 into main Nov 30, 2023
1 check passed
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.

2 participants