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

Adding support for FHIR R4B #110

Open
apollo13 opened this issue Aug 19, 2022 · 7 comments
Open

Adding support for FHIR R4B #110

apollo13 opened this issue Aug 19, 2022 · 7 comments

Comments

@apollo13
Copy link

  • fhir.resources version: 6.4.0
  • Python version: 3.10
  • Operating System: Fedora 36

Description

It would be great if this package supported FHIR Release R4B https://hl7.org/fhir/R4B/version.info .

I guess this would mean moving the current implementation into an R4 subfolder and then generate it against R4B. I tried doing that locally to submit a PR but more or less failed (even when just regenerating the current version I had loads of diffs due to black and what not). Are there any documentations on how to prepare a PR for a new version?

@nazrulworld
Copy link
Owner

nazrulworld commented Aug 20, 2022

Hi, @apollo13 thanks a lot for this issue!
I think there will be no sub-folder for R4B as this is not a major release, as like R5, you will see it (R4B) is still under version scheme 4. x.x.

https://hl7.org/fhir/R4B/r4b-explanation.html

But obviously, we will need more discussion, maybe we could await a bit more to see if more updates coming. Also, we need to think fhir.resources version policy for implementing R4B. like should it be 7.x.x or 6.5.x etc.

We will work on it soon.

@bwalsh
Copy link

bwalsh commented Dec 11, 2022

Seems like R4B is pretty stable. My use case is considering 5.0

In any event, happy to help on this effort.
In my local testing, I've gotten to the point where I have some reasonable results (below).

Not quite ready to create a PR. Is the CONTRIBUTING.rst guide up to date? I wasn't sure of the steps necessary to create a new FHIR release. I'm a bit confused how directories are managed i.e. I had to manually move R4 code to a legacy directory, manually deploy examples to script/static, etc.

# test failures after generating resources for R4B
fhir/resources/tests/test_activitydefinition.py - timingTiming null not allowed
fhir/resources/tests/test_implementationguide.py - url missing scheme
fhir/resources/tests/test_library.py -  url missing scheme
fhir/resources/tests/test_plandefinition.py - timingTiming null not allowed, url missing scheme
fhir/resources/tests/test_relatedperson.py -  url missing scheme 
fhir/resources/tests/test_searchparameter.py - __root__ -> base field required, id ensure this value has at most 64 characters
tests/test_utils_xml.py -  Value is expected from the instance of <class 'fhir.resources.fhirprimitiveextension.FHIRPrimitiveExtension'>, but got type <class 'fhir.resources.R4.fhirprimitiveextension.FHIRPrimitiveExtension'> (type=value_error)

The testTiming seem to be related to differences in the test fixtures.
http://hl7.org/fhir/R4B/examples-json.zip vs https://github.com/nazrulworld/hl7-archives/raw/0.2.1/FHIR/R4/4.0.1-examples-json.zip

<   "timingTiming": null,
---
>   "timingTiming": {
>     "_event": [
>       {
>         "extension": [
>           {
>             "url": "http://hl7.org/fhir/StructureDefinition/cqf-expression",
>             "valueExpression": {
>               "language": "text/cql",
>               "expression": "Now()"
>             }
>           }
>         ]
>       }
>     ]
>   },

The url missing scheme also seems to be related to differences in the test fixtures:

<       "nameUrl": "http://example.com/patient-example.html",
---
>       "nameUrl": "patient-example.html",
86c86
<           "nameUrl": "http://example.com/list.html",
---
>           "nameUrl": "list.html",
107c107
<         "relativePath": "https://example.com/patient-test.html#patient-test"
---
>         "relativePath": "patient-test.html#patient-test"

@bwalsh
Copy link

bwalsh commented Dec 14, 2022

@nazrulworld Hi. Checking in to see if there was any interest on collaborating on a R4B and eventually a 5.0.0 version. Thanks very much

@dajaffe
Copy link

dajaffe commented Dec 17, 2022

++ Very interested in the R4B. The new Medication Definition Module has some resources I'd like to use (specifically ClinicalUseDefinition)

@nazrulworld
Copy link
Owner

I will look into it if I can manage some good times.
Any kind of contribution is always welcome.

@bwalsh bwalsh mentioned this issue Dec 22, 2022
Closed
@Kalmis
Copy link

Kalmis commented Jan 13, 2023

Hello @nazrulworld, nice to see support for R4B!
Have I understood correctly that the v6.5.0 is now fully based on R4B, so if I for time being want to stick with R4 version, then I should not upgrade beyond 6.4.0? Our reasoning is that our counterpart system is still on R4. I think there might be others stuck in the same situation, so a note about this in the readme could be in place

Thanks for the awesome library!

@wowkin2
Copy link

wowkin2 commented Mar 29, 2023

R5 released 🥳
Here is a discussion started on migration to it and how to ensure that library will work for older versions: #126

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

No branches or pull requests

6 participants