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

No good way to use multiple versions of the library in a single project? #49

Open
jmandel opened this issue Mar 7, 2018 · 4 comments
Open

Comments

@jmandel
Copy link
Member

jmandel commented Mar 7, 2018

In S4S we're building some demo apps that connect to DSTU2 clinical data servers and an STU3 financial server from CMS. I tried loading two versions of the library at different paths, but

https://github.com/smart-on-fhir/client-py/blob/master/fhirclient/__init__.py#L5

seems to clobber the namespaces. Has this come up before? I can think about ways to improve the module loading, but wanted to start with a quick sanity check.

@p2
Copy link
Member

p2 commented Mar 7, 2018

The problem has come up already, yes, but not a good solution. IIRC this was the only way we found so that imports from within client-py as well as from a higher level in Python 2 and Python 3 would work. If you have a solution you should push it!

@jmandel
Copy link
Member Author

jmandel commented Mar 7, 2018

This gets a lot easier if we limit to Python 3, huh? I might contemplate a branch to explore that...

@rectalogic
Copy link

Could you support the different versions as packages e.g. fhirclient.models.DSTU2, fhirclient.models.STU3 etc. Then allow instantiating FHIRClient to use the version you want.

Similar to how fhir.resources is packaged
https://github.com/nazrulworld/fhir.resources/tree/master/fhir/resources

@rectalogic
Copy link

@p2 would you be able to take a look at #81 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants