hapi-fhir
hapi-fhir copied to clipboard
Feature Request - Toggle return of all issues in "diagnostics", comma delimited, instead of first issue at index 0.
https://github.com/jamesagnew/hapi-fhir/blob/master/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/OperationOutcomeUtil.java#L110
I would like the ability to get all reported issues returned in the diagnostics field in the response body json entity. It doesn't need to be the default behavior, but being able to get back all issues at once could go a long way to save time in correcting issues and cleaning up data.
I don't think it'd make sense to add that to the existing methods since they are named to explicitly fetch the first, but a separate method that was similar but also took an index as input could definitely be useful.
Right, exactly! Thank you. I included the link for some context. The solution would involve a separate method, or simply renaming this method and make the return statement conditional.
I also think, regardless of whether the first index is returned or a comma delimited list is returned, it should be sorted by severity if that's possible. If the code will return only the first item, it should be the most important item in the list if that makes sense.