smart-on-fhir / client-py

Python SMART on FHIR client
http://docs.smarthealthit.org
Other
574 stars 209 forks source link

description is not a required field for Conformance #132

Closed timharsch closed 1 year ago

timharsch commented 1 year ago

This BUG is in the v1.0.6 tag and prevents using fhirclient to process records from the publc HAPI DSTU2 test server (see the conformance document at https://hapi.fhir.org/baseDstu2/metadata?_format=json). And notice it does not provide a "description" in the "implementation" object.

image

per: https://hl7.org/implement/standards/fhir/DSTU2/conformance-definitions.html#Conformance.implementation, description is not a required field

Attempting to make a connection to the HAPI server mentioned above will cause the following error: image

The line of code that needs to be changed to fix this is here: image

I'm happy to submit a PR, but I'll need to understand the release process for DSTU2 to do so.

p2 commented 1 year ago

These classes are all generated from the spec. If you look closely at the link you provided, implementation.description is indeed 1..1, meaning it is required if implementation is present.

timharsch commented 1 year ago

Ah, I see I misread the 0..1 for Conformance.implementation, and this statement made me think it was to Conformance.implementation.description, but I think it must have meant Conformance.description

SHALL have at least one of description, software, or implementation

I think this means then the Conformance doc for the HAPI server has a bug.

Are there test documents to run with the tests in the project?

timharsch commented 1 year ago

The problem has been address in the DSTU2 HAPI test server, so it should be possible to connect and fetch resources from that server now.

Closing this issue.

https://github.com/hapifhir/hapi-fhir/pull/4082