Uploaded image for project: 'FHIR Specification Feedback'
  1. FHIR Specification Feedback
  2. FHIR-25424

Validator fails when multiple Codings are included in a CodeableConcept with a required binding

    XMLWordPrintableJSON

Details

    • Icon: Technical Correction Technical Correction
    • Resolution: Persuasive
    • Icon: Medium Medium

    Description

      When validating resources that have a CodeableConcept with a required binding (e.g. AllergyIntolerance.clinicalStatus) the validator fails resources which include multiple Codings in the CodeableConcept even if at least one of the Codings is in the required ValueSet.

      For example:

      Running: java -jar org.hl7.fhir.validator.jar allergy.json -ig hl7.fhir.us.core -version 4.0

      Against the attached allergy.json

      I get
      java -jar org.hl7.fhir.validator.jar allergy.json -ig hl7.fhir.us.core -version 4.0 FHIR Validation tool Version 4.1.41-SNAPSHOT (Git# bdab9a78b39a). Built 2019-12-31T14:32:35.701+11:00 (7 days old) Detected Java version: 1.8.0_222 from /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre on x86_64 (64bit). 3641MB available Arguments: allergy.json -ig hl7.fhir.us.core -version 4.0 Directories: Current = /Users/radamson/Desktop, Package Cache = /Users/radamson/.fhir/packages .. FHIR Version 4.0, definitions from hl7.fhir.r4.core#4.0.1 .. connect to tx server @ http://tx.fhir.org (v4.0.1) + .. load IG from hl7.fhir.us.core ... Using version 3.1.0 .. validate [allergy.json] Terminology server: Check for supported code systems for http://fhir.whatever.com/codes/AllergyClinicalStatus FAILURE validating allergy.json: error:1 warn:0 info:0 Error @ AllergyIntolerance.clinicalStatus (line 8, col16) : None of the codes provided are in the value set http://hl7.org/fhir/ValueSet/allergyintolerance-clinical|4.0.1 (http://hl7.org/fhir/ValueSet/allergyintolerance-clinical, and a code from this value set is required) (codes = http://fhir.whatever.com/codes/AllergyClinicalStatus#active, http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical#active)

      If I remove one of Codings from the clinicalStatus CodeableConcept, leaving only one Coding it passes. The attached allergy2.json resource is provided as an example.

      I would expect allergy.json to pass even with the extra Codings in the CodeableConcept as the required binding only requires that one of the Coding values SHALL be from the specified value set.

      Relevant chat.fhir thread]

      Attachments

        Activity

          People

            Unassigned Unassigned
            radamson Reece Adamson
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: