-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Describe the bug
We are using HAPI FHIR Validators to validate QICore resources. Some of the terminology referenced in these resources is hosted on a remote terminology server provided by VSAC. To support validation against external terminology, we utilize HAPI's RemoteTerminologyServiceValidationSupport.
Our understanding is that when a terminology code is missing and the binding strength is either EXTENSIBLE or PREFERRED, the validator should return a result with severity level WARNING. However, in our case, the validator is returning results with severity level ERROR.
Upon further investigation into the HAPI FHIR validation logic, we found that the InstanceValidator from hapi fhir core does consider the binding strength and conditionally updates the issue severity to WARNING if the binding strength is EXTENSIBLE or PREFERRED. This behavior is triggered when the issue coding is "not-found".
However, the RemoteTerminologyServiceValidationSupport returns the issue coding as "invalid-code" instead of "not-found". Due to this mismatch, the InstanceValidator does not downgrade the severity level, resulting in an ERROR instead of a WARNING.
Following is the response for validating the QICore Immunization.vaccineCode
:
// Request
GET https://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1010.6/$validate-code?system=http://hl7.org/fhir/sid/cvx&code=010000
// Response
{
"resourceType": "Parameters",
"parameter": [
{
"name": "result",
"valueBoolean": false
},
{
"name": "message",
"valueString": "The code(010000), system(http://hl7.org/fhir/sid/cvx) does not exist in ValueSet/2.16.840.1.113762.1.4.1010.6-20250411"
}
]
To Reproduce
Please use attached immunization resource as test data to validate: qicore-immunization-resource.json
- HAPI FHIR Version: We are using hapi fhir validation v7.6.1 but I think the specific function used to build the code validation result is same even in latest version.
Could someone please look into this. I was not sure if this should be raised with hapi-fhir or org.hl7.fhir.core or VSAC.
Thank you!
-Ashok