hapifhir / org.hl7.fhir.validator-wrapper

CLI, Desktop GUI, and Standalone Server for the FHIR Validator
Apache License 2.0
28 stars 15 forks source link

Validator is throwing an incorrect error for the Patient resource relating to Race and Ethncity #183

Open jhrpcek opened 1 month ago

jhrpcek commented 1 month ago

Using the patient example json : https://hl7.org/fhir/us/core/STU6/Patient-example.json.html

Setting the us core to : hl7.fhir.us.core#6.1.0

Receiving these information and errors even though that OID is correct.

Information Line: 42, Col:12 The definition for the Code System with URI 'urn:oid:2.16.840.1.113883.6.238' doesn't provide any codes so the code cannot be validated

Error Line: 42, Col:12 The code provided (urn:oid:2.16.840.1.113883.6.238#1586-7) was not found in the value set 'Detailed Race' (http://hl7.org/fhir/us/core/ValueSet/detailed-race|6.1.0), and a code from this value set is required: The provided code 'urn:oid:2.16.840.1.113883.6.238#1586-7 ('Shoshone')' was not found in the value set 'http://hl7.org/fhir/us/core/ValueSet/detailed-race|6.1.0'

Error Line: 50, Col:12 The code provided (urn:oid:2.16.840.1.113883.6.238#2036-2) was not found in the value set 'Detailed Race' (http://hl7.org/fhir/us/core/ValueSet/detailed-race|6.1.0), and a code from this value set is required: The provided code 'urn:oid:2.16.840.1.113883.6.238#2036-2 ('Filipino')' was not found in the value set 'http://hl7.org/fhir/us/core/ValueSet/detailed-race|6.1.0'

grahamegrieve commented 1 month ago

is this issue reproducible with the command line validator?

jhrpcek commented 1 month ago

Yes it is. Using the patient example json: https://hl7.org/fhir/us/core/STU6/Patient-example.json.html

java -Xmx2048m -jar validator_cli.jar Concept.json -version 4.0.1 -ig hl7.fhir.us.core#6.1.0 -tx n/a

FAILURE: 1 errors, 11 warnings, 8 notes Error @ Patient.extension[0].extension[3].value.ofType(Coding) (line 42, col7): The code provided (urn:oid:2.16.840.1.113883.6.238#1586-7) was not found in the value set 'Detailed Race' (http://hl7.org/fhir/us/core/ValueSet/detailed-race|6.1.0), and a code from this value set is required: The provided code 'urn:oid:2.16.840.1.113883.6.238#1586-7 ('Shoshone')' was not found in the value set 'http://hl7.org/fhir/us/core/ValueSet/detailed-race|6.1.0'

grahamegrieve commented 1 month ago

see discussion here: https://chat.fhir.org/#narrow/stream/179252-IG-creation/topic/Missing.20race.20.26.20ethnicity.20codes.20that.20aren't.20missing