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

R4FhirTerminologyProvider.in Exception when "result" parameter is not first #1350

Open
justin-A6 opened this issue Apr 3, 2024 · 0 comments

Comments

@justin-A6
Copy link

Seeing an exception at R4FhirTerminologyProvider.in when the terminology server returns another parameter other than "result" first. I was not sure if there was a required order or not honestly when it came to the parameters returned by the $validate-code operation so this issue might not be with the engine-fhir subproject.

This occurred when running cms190 though I can try to mock up something simpler if needed.

Example request to a terminology server where this is happening:

curl --location 'https://tx.fhir.org/r4/ValueSet/2.16.840.1.113883.3.464.1003.106.12.1001/$validate-code?code=G43.B0&system=http%3A%2F%2Fhl7.org%2Ffhir%2Fsid%2Ficd-10-cm' \
--header 'Accept: application/json'

The result from above request:

{
    "resourceType": "Parameters",
    "parameter": [
        {
            "name": "version",
            "valueString": "2024"
        },
        {
            "name": "result",
            "valueBoolean": false
        },
        {
            "name": "system",
            "valueUri": "http://hl7.org/fhir/sid/icd-10-cm"
        },
        {
            "name": "code",
            "valueCode": "G43.B0"
        },
        {
            "name": "display",
            "valueString": "Ophthalmoplegic migraine, not intractable"
        }
...

The exception:

Caused by: java.lang.ClassCastException: class org.hl7.fhir.r4.model.StringType cannot be cast to class org.hl7.fhir.r4.model.BooleanType (org.hl7.fhir.r4.model.StringType and org.hl7.fhir.r4.model.BooleanType are in unnamed module of loader 'app')
	at org.opencds.cqf.cql.engine.fhir.terminology.R4FhirTerminologyProvider.in(R4FhirTerminologyProvider.java:70) ~[engine-fhir-3.9.0.jar:3.9.0]
	at org.opencds.cqf.cql.engine.elm.executing.InValueSetEvaluator.inValueSet(InValueSetEvaluator.java:48) ~[engine-3.9.0.jar:3.9.0]
	at org.opencds.cqf.cql.engine.execution.EvaluationVisitor.visitInValueSet(EvaluationVisitor.java:123) ~[engine-3.9.0.jar:3.9.0]
	at org.opencds.cqf.cql.engine.execution.EvaluationVisitor.visitInValueSet(EvaluationVisitor.java:14) ~[engine-3.9.0.jar:3.9.0]
	at org.cqframework.cql.elm.visiting.BaseElmClinicalVisitor.visitOperatorExpression(BaseElmClinicalVisitor.java:64) ~[elm-3.9.0.jar:3.9.0]
	at org.cqframework.cql.elm.visiting.BaseElmVisitor.visitExpression(BaseElmVisitor.java:267) ~[elm-3.9.0.jar:3.9.0]
	at org.cqframework.cql.elm.visiting.BaseElmClinicalVisitor.visitExpression(BaseElmClinicalVisitor.java:49) ~[elm-3.9.0.jar:3.9.0]
	at org.opencds.cqf.cql.engine.execution.EvaluationVisitor.visitOr(EvaluationVisitor.java:1189) ~[engine-3.9.0.jar:3.9.0]
	at org.opencds.cqf.cql.engine.execution.EvaluationVisitor.visitOr(EvaluationVisitor.java:14) ~[engine-3.9.0.jar:3.9.0]
...
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

No branches or pull requests

1 participant