Stream: implementers
Topic: Validator: CodeSystem errors and ValueSet warnings
Reece Adamson (Nov 22 2019 at 16:25):
I'm trying to validate some FHIR Resources @Jason Walonoski produced with Synthea, but see some errors that I don't understand. Attached at the end are two resources that exhibit the errors so others can attempt to reproduce.
Validating the PraciticionerRole example resource returns 2 errors and 2 warnings:
Error @ PractitionerRole.code[0].coding[0] (line 19, col10) : The code system "http://nucc.org/provider-taxonomy" is not known for the code "208D00000X"; The code provided (http://nucc.org/provider-taxonomy#208D00000X) is not valid in the value set All codes known to the system for 'http://nucc.org/provider-taxonomy#208D00000X'
Error @ PractitionerRole.specialty[0].coding[0] (line 31, col10) : The code system "http://nucc.org/provider-taxonomy" is not known for the code "208D00000X"; The code provided (http://nucc.org/provider-taxonomy#208D00000X) is not valid in the value set All codes known to the system for 'http://nucc.org/provider-taxonomy#208D00000X'
Warning @ PractitionerRole.code[0] (line 17, col6) : None of the codes provided are in the value set http://hl7.org/fhir/us/core/ValueSet/us-core-provider-role (http://hl7.org/fhir/us/core/ValueSet/us-core-provider-role, and a code should come from this value set unless it has no suitable code) (codes = http://nucc.org/provider-taxonomy#208D00000X)
Warning @ PractitionerRole.specialty[0] (line 29, col6) : None of the codes provided are in the value set http://hl7.org/fhir/us/core/ValueSet/us-core-provider-specialty (http://hl7.org/fhir/us/core/ValueSet/us-core-provider-specialty, and a code should come from this value set unless it has no suitable code) (codes = http://nucc.org/provider-taxonomy#208D00000X)
I was able to find the nucc-provider-taxonomy
CodeSystem on tx.fhir.org and the code, 208D00000X
, appears in the CodeSystem resource. The code also appears in both ValueSets in the US Core IG (provider-role and provider-specialty), but I wasn't able to find the ValueSet on tx.fhir.org..
It seems like this is a valid code and that the relevant CodeSystem exists on the terminology server. @Grahame Grieve do you have any insight into why these errors are appearing or if I'm missing something?
A similar result was observed with the Immunization resource:
Error @ Immunization.vaccineCode.coding[0] (line 11, col8) : The code system "http://hl7.org/fhir/sid/cvx" is not known for the code "140"; The code provided (http://hl7.org/fhir/sid/cvx#140) is not valid in the value set All codes known to the system for 'http://hl7.org/fhir/sid/cvx#140'
Warning @ Immunization.vaccineCode (line 10, col16) : None of the codes provided are in the value set http://hl7.org/fhir/us/core/ValueSet/us-core-vaccines-cvx (http://hl7.org/fhir/us/core/ValueSet/us-core-vaccines-cvx, and a code should come from this value set unless it has no suitable code) (codes = http://hl7.org/fhir/sid/cvx#140)
Let me know if there's anything else I can provide or try. Initially these were validated in a Bundle, but I extracted them so it's easier to observe the errors and warnings.
Examples and settings to reproduce:
Tool Version: FHIR Validation tool Version 4.1.7-SNAPSHOT - Built 2019-11-21T18:18:33.170+11:00 - Git 45df4708d77b
practictioner-role-example.json
immunization-example.json
resources-in-bundle.json
References/Links
US Core Provider Role ValueSet
US Core Provider Speciality ValueSet
NUCC Provider Taxonomy CodeSystem on tx.fhir.org
CVX CodeSystem on tx.fhir.org
Lloyd McKenzie (Nov 22 2019 at 19:48):
@Grahame Grieve
Grahame Grieve (Nov 24 2019 at 15:16):
@Reece Adamson you found a bug in tx.fhir.org to do with handling code systems without versions. Fixed shortly
Reece Adamson (Nov 25 2019 at 14:53):
Thanks for the quick fix! Just tried again and it works as expected. Is the tx.fhir.org server open source and do you have a link for the fix? I've been working with the validator more and more lately and would like to learn more about how it works.
Grahame Grieve (Nov 25 2019 at 16:11):
sure. fix here:
Grahame Grieve (Nov 25 2019 at 16:12):
https://github.com/grahamegrieve/fhirserver/commit/d71d04db334d721de1b2ba639dd1aca6a6d80f87
Grahame Grieve (Nov 25 2019 at 16:15):
I'm glad you asked. I just noticed my fix introduced a different bug....
Last updated: Apr 12 2022 at 19:14 UTC