hapifhir / hapi-fhir

🔥 HAPI FHIR - Java API for HL7 FHIR Clients and Servers
http://hapifhir.io
Apache License 2.0
2k stars 1.31k forks source link

validation errors in STU3 ("dstu3") and R4 ("r4") conformance resources #2138

Open jschneid-nmdp opened 3 years ago

jschneid-nmdp commented 3 years ago

Not sure if this is the ideal place to report this kind of issue, but here it is ...

Describe the bug Some STU3 and R4 conformance resources fail validation when uploaded via hapi-fhir-cli to a FHIR server which rejects requests containing basic FHIR validation errors.

To Reproduce Steps to reproduce the behavior:

  1. Use a HAPI server which has a RequestValidatingInterceptor with failOnSeverity set to ResultSeverityEnum.ERROR. (My test server has terminology checks disabled in its FhirInstanceValidator.)
  2. Use hapi-fhir-cli to upload conformance resources to the server, e.g. for STU3 "./hapi-fhir-cli upload-definitions --target http://localhost:8080/r3 --fhir-version dstu3". To capture all HTTP 422 responses, I modified the hapi-fhir-cli code as indicated here: https://github.com/jamesagnew/hapi-fhir/pull/2137
  3. Some of the conformance resources fail to upload, with the server returning HTTP 422 status (Unprocessable Entity). As of this writing, 378 of the STU3 and 7 of the R4 conformance resources fail validation. The hapi-fhir-cli output shows additional information about each validation error.

Expected behavior All conformance resources should upload without error.

Screenshots N/A

Environment (please complete the following information):

Additional context The attached files contain hapi-fhir-cli output showing the HTTP 422 errors. upload-definitions-stu3-422.txt upload-definitions-r4-422.txt

jschneid-nmdp commented 3 years ago

Note: It's possible to upload the conformance resources without error if I remove or disable the server's RequestValidatingInterceptor.