Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validate-code on remote-terminology service returns NullPointerException #4957

Closed
volodymyr-korzh opened this issue Jun 5, 2023 · 0 comments · Fixed by #4958
Closed

validate-code on remote-terminology service returns NullPointerException #4957

volodymyr-korzh opened this issue Jun 5, 2023 · 0 comments · Fixed by #4958
Assignees

Comments

@volodymyr-korzh
Copy link
Collaborator

With remote-terminology service enabled, $validate-code operation with unknown code system or unknown Value Set returns 500 Server Error response with NullPointerException in body. With remote-terminology service disabled - response is correct.

Steps To Reproduce:

  1. Enable Remote terminology Service
  2. Send a request with invalid Code System to fhir endpoint:
    POST: {fhir-endpoint}/CodeSystem/$validate-code
{
	"resourceType": "Parameters",
	"parameter": [
		{
			"name": "url",
			"valueUri": "http://terminology.hl7.org/CodeSystem/unknown"
		},
		{
			"name": "coding",
			"valueCoding": {
				"code": "P",
				"system": "http://terminology.hl7.org/CodeSystem/unknown"
			}
		}
	]
}
  1. Send a request with invalid Value Set to fhir endpoint:
    POST: {fhir-endpoint}/ValueSet/$validate-code
{
	"resourceType": "Parameters",
	"parameter": [
		{
			"name": "url",
			"valueUri": "http://hl7.org/fhir/ValueSet/uknown-value-set"
		},
		{
			"name": "coding",
			"valueCoding": {
				"code": "P",
				"system": "http://terminology.hl7.org/CodeSystem/v2-0247"
			}
		}
	]
}

Actual result
500 Server Error

{
	"resourceType": "OperationOutcome",
	"issue": [
		{
			"severity": "error",
			"code": "processing",
			"diagnostics": "HAPI-0389: Failed to call access method: java.lang.NullPointerException: Cannot invoke \"ca.uhn.fhir.context.support.IValidationSupport$CodeValidationResult.isOk()\" because \"theResult\" is null"
		}
	]
}

Expected behavior
Response should be the same, as without remote terminology service enabled:
200 OK

{
	"resourceType": "Parameters",
	"parameter": [
		{
			"name": "result",
			"valueBoolean": false
		},
		{
			"name": "message",
			"valueString": "Validator is unable to provide validation for P#http://terminology.hl7.org/CodeSystem/v2-0247 - Unknown or unusable ValueSet[http://hl7.org/fhir/ValueSet/uknown-value-set]"
		}
	]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant