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

Simultaneously support R4, STU3 and DSTU2 #81

Closed
wants to merge 6 commits into from

Conversation

rectalogic
Copy link

Fixes #49

Generate a models package for R4, STU3 and DSTU2. This allows the same FHIRClient version to be used with multiple FHIR versions.

We have to use a different version of fhir-parser to generate DSTU2 because the latest version dropped support.

Running the tests re-downloads the FHIR specs for each version because fhir-parser doesn't provide a way to cache different versions simultaneously.

This also cleans up the (non-generated) code to make it PEP8 compliant and adds a flake8 test.

This allows the same FHIRClient version to be used with multiple FHIR versions.

We have to use a different version of fhir-parser to generate DSTU2
because the latest version dropped support.
Regenerate DSTU2 unit tests with a template that works for 2.7.
@rectalogic
Copy link
Author

To review this I would suggest ignoring everything below fhirclient/models and instead diff newly regenerated classes with the previous versions models:

$ git diff v4.0.0:fhirclient/models HEAD:fhirclient/models/R4
$ git diff v3.0.0:fhirclient/models HEAD:fhirclient/models/STU3
$ git diff v1.0.3:fhirclient/models HEAD:fhirclient/models/DSTU2

Also in the github diff settings select Hide whitespace changes

@rectalogic
Copy link
Author

Closing for now, will reopen a smaller initial PR

@rectalogic rectalogic closed this Oct 21, 2019
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.

No good way to use multiple versions of the library in a single project?
1 participant