FHIR Chat · Incorrect Java validator warning · implementers

Stream: implementers

Topic: Incorrect Java validator warning


view this post on Zulip Matthijs van der Wielen (Sep 28 2020 at 06:32):

@Grahame Grieve When creating a snapshot of the attached extension with Forge or Simplifier, the following is added for Extension.id and Extension.url:
Forge is adding for Extension.id and Extension.url in the snapshot:

  "type": [
     {
      "extension": [
       {
        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
        "valueUrl": "uri"
       }
      ],
      "code": "http://hl7.org/fhirpath/System.String"
     }
    ]

The Simplifier Validator does not report any issues of warnings about this. But the java validator reports this:

Success: 0 errors, 2 warnings, 0 notes
  Warning @ StructureDefinition.snapshot.element[1].type[0].code (line 116, col12) : The value provided ('http://hl7.org/fhirpath/System.String') is not in the value set http://hl7.org/fhir/ValueSet/defined-types (http://hl7.org/fhir/ValueSet/defined-types), and a code should come from this value set unless it has no suitable code) (error message = Not in value set http://hl7.org/fhir/ValueSet/defined-types)
  Warning @ StructureDefinition.snapshot.element[3].type[0].code (line 224, col12) : The value provided ('http://hl7.org/fhirpath/System.String') is not in the value set http://hl7.org/fhir/ValueSet/defined-types (http://hl7.org/fhir/ValueSet/defined-types), and a code should come from this value set unless it has no suitable code) (error message = Not in value set http://hl7.org/fhir/ValueSet/defined-types)

The Java validator gets that check against http://hl7.org/fhir/ValueSet/defined-types from http://hl7.org/fhir/elementdefinition-definitions.html#ElementDefinition.type.code, but it is 'extensible' . So we think the Java validator should not give these warnings.

address-confidential_diff_only2.json

view this post on Zulip Grahame Grieve (Sep 28 2020 at 22:33):

well, it's not an error. It's certainly the correct value.


Last updated: Apr 12 2022 at 19:14 UTC