FHIR Chat · Validator returns invalid OperationOutcome · implementers

Stream: implementers

Topic: Validator returns invalid OperationOutcome


view this post on Zulip Reece Adamson (Jun 18 2020 at 21:02):

We discovered this while working directly with the ValidationEngine class in Java, but it is reproducible with the Desktop JAR validator.

The HL7 Validator returns an invalid OperationOutcome. The main issue we noticed is that it does not include an OperationOutcome.issue which has a cardinality of 1..1 in the base FHIR spec. I'm not sure if this is related to the lack of suitable codes for OperationOutcomes when reporting successful outcomes which was discussed at DevDays and spawned FHIR-27840.

For example trying to validate a simple patient ( e.g. patient.json )

FHIR Validation tool Version 5.0.7-SNAPSHOT (Git# 6bc790d98b04). Built 2020-06-07T08:35:37.25+10:00 (11 days old)
Detected Java version: 11.0.7 from /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home on x86_64 (64bit). 4096MB available
Arguments: patient.json -output out.json
Directories: Current = /Users/crowleyj/Downloads, Package Cache = /Users/crowleyj/.fhir/packages
  .. FHIR Version current, definitions from hl7.fhir.r5.core#current
  .. connect to tx server @ http://tx.fhir.org
    (vcurrent)
  .. validate [patient.json]

This provides this operation outcome (out.json)

{
  "resourceType" : "OperationOutcome",
  "text" : {
    "status" : "extensions",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>All OK</p></div>"
  },
  "extension" : [{
    "url" : "http://hl7.org/fhir/StructureDefinition/operationoutcome-file",
    "valueString" : "patient.json"
  }]

Subsequently trying to validate the provided OperationOutcome gives:

$ java -jar org.hl7.fhir.validator.jar out.json
FHIR Validation tool Version 5.0.7-SNAPSHOT (Git# 6bc790d98b04). Built 2020-06-07T08:35:37.25+10:00 (11 days old)
Detected Java version: 11.0.7 from /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home on x86_64 (64bit). 4096MB available
Arguments: out.json
Directories: Current = /Users/crowleyj/Downloads, Package Cache = /Users/crowleyj/.fhir/packages
  .. FHIR Version current, definitions from hl7.fhir.r5.core#current
  .. connect to tx server @ http://tx.fhir.org
    (vcurrent)
  .. validate [out.json]
*FAILURE* validating out.json:  error:2 warn:0 info:1
  Error @ OperationOutcome.extension[0].url (line 8, col77) : URL value "http://hl7.org/fhir/StructureDefinition/operationoutcome-file" does not resolve
  Error @ OperationOutcome (line 1, col2) : Profile http://hl7.org/fhir/StructureDefinition/OperationOutcome, Element 'OperationOutcome.issue': minimum required = 1, but only found 0
  Information @ OperationOutcome.extension[0] (line 7, col19) : Unknown extension http://hl7.org/fhir/StructureDefinition/operationoutcome-file

Let me know if we can help provide further information and, as always, thanks for the hard work on these tools!

view this post on Zulip Grahame Grieve (Jun 18 2020 at 23:45):

oops. I really though I had fixed that. But I missed it somehow. Fixed next release

view this post on Zulip Grahame Grieve (Jun 18 2020 at 23:48):

"issue": [
    {
      "severity": "information",
      "code": "informational",
      "details": {
        "text": "All OK"
      }
    }
  ]

From http://hl7.org/fhir/operationoutcome-example-allok.html. Note that "All OK" is subject to internationalization


Last updated: Apr 12 2022 at 19:14 UTC