Skip to content

Be more lenient when validating a coded element with an extensible binding but no code or text #622

@alexzautke

Description

@alexzautke

When validating a ValueSet with

  "jurisdiction": [
    {
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason",
          "valueCode": "unknown"
        }
      ]
    }
  ],

we currently return the following error:

      "severity": "error",
      "code": "code-invalid",
      "details": {
        "coding": [
          {
            "system": "http://hl7.org/fhir/dotnet-api-operation-outcome",
            "code": "6005"
          }
        ],
        "text": "Extensible binding requires code or text."
      },
      "diagnostics": "ElementDefinition trace: ValueSet.jurisdiction",
      "expression": [
        "ValueSet.jurisdiction[0]"
      ]
    }

The Java validator instead only returns a warning:

   Warning @ ValueSet.jurisdiction[0] (line 33, col4): No code provided, and a code should be provided from the value set 'Jurisdiction' (http://hl7.org/fhir/ValueSet/jurisdiction%7C4.0.1)

Be more forgiving an change the error to a warning.

Metadata

Metadata

Assignees

Labels

align-with-javaFrom comparing the shared unit tests

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions