Open kairosmike opened 2 years ago
Good catch! Unknown Profiles can't create warnings in languages other than english. Unfortunately the underlying Java Validator only reports a generic coding on this issue.
I think the easiest fix would be to forward the setting to the core validator, and not do Severity changes inside the hapi code. @jamesagnew do you agree?
Bug description: ResponseValidation uses different validation message severities for the same message depending on the server’s language. The same validation message on an English system has the issue severity ERROR, but on a German system the severity WARNING. This means that some FHIR message responses are returned only on German systems, but are blocked by the response validation with validation message of sverity ERROR on English systems.
Where: Responsible for the severity change is org.hl7.fhir.common.hapi.validation.validator.ValidatorWrapper L182 (v.5.0.3) https://github.com/hapifhir/hapi-fhir/blob/v5.0.2/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/ValidatorWrapper.java or L199 (master) https://github.com/hapifhir/hapi-fhir/blob/master/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/ValidatorWrapper.java
Expected Fix: If severity level switches necessary at all, decide it by a message code, not by a multilingualized message text of only one language. The validation behavior has to be independent from the server language.