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

improve error handling for remote term service poor responses #2292

Closed
kmbarton423 opened this issue Apr 26, 2021 · 3 comments
Closed

improve error handling for remote term service poor responses #2292

kmbarton423 opened this issue Apr 26, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request terminology

Comments

@kmbarton423
Copy link
Contributor

kmbarton423 commented Apr 26, 2021

Determined today that one of our FHIRServerIntegrationTests for US Core 3.1.1 profile http://hl7.org/fhir/us/core/StructureDefinition/us-core-smokingstatus fails status 400 when fhir server is configured with a remote term service provider for SNOMED.

Snippet from the FHIR server log:
Unable to expand value set with url: http://hl7.org/fhir/us/core/ValueSet/us-core-observation-smokingstatus-max and version: 3.1.1
com.ibm.fhir.term.service.exception.FHIRTermServiceException: An error occurred during the ValueSet $expand operation

Below is the request and response being exchanged with the remote server for this scenario:
(request)

{
    "resourceType": "Parameters",
    "parameter": [
        {
            "name": "valueSet",
            "resource": {
                "resourceType": "ValueSet",
                "status": "active",
                "compose": {
                    "include": [
                        {
                            "system": "http://snomed.info/sct"
                        }
                    ]
                }
            }
        }
    ]
}

(response status 500)

{
    "resourceType": "OperationOutcome",
    "issue": [
        {
            "severity": "error",
            "code": "processing",
            "diagnostics": "Failed to call access method: org.snomed.langauges.ecl.ECLException: Failed to parse ECL '(  )'"
        }
    ]
}

The diagnostics returned from SNOMED is not very meaningful in this case.
There may be situations where bad responses (status 500) from the remote term server should result in a warning versus halt.

@kmbarton423 kmbarton423 added the enhancement New feature or request label Apr 26, 2021
@JohnTimm JohnTimm added bug Something isn't working enhancement New feature or request and removed enhancement New feature or request bug Something isn't working labels Apr 27, 2021
@kmbarton423
Copy link
Contributor Author

kmbarton423 commented Apr 27, 2021

WITHOUT the remote terminology service enabled, the store for an Observation using the noted profile above gets status 201 with the following Operation Outcome:

{
    "resourceType": "OperationOutcome",
    "issue": [
        {
            "severity": "warning",
            "code": "incomplete",
            "details": {
                "text": "Membership check was not performed: value set 'http://hl7.org/fhir/us/core/ValueSet/us-core-observation-smokingstatus-max' is empty or could not be expanded"
            },
            "expression": [
                "Observation.value"
            ]
        }
    ]
}

@kmbarton423
Copy link
Contributor Author

kmbarton423 commented Apr 27, 2021

WITH the remote terminology service enabled, the store for an Observation using the noted profile above gets status 400 with the following Operation Outcome:

{
    "resourceType": "OperationOutcome",
    "id": "9-55-b7-24-5afac486-9167-49f5-bbc5-ee6a3c0fb1f3",
    "issue": [
        {
            "severity": "error",
            "code": "invariant",
            "details": {
                "text": "generated-us-core-smokingstatus-5: Constraint violation: value.as(CodeableConcept).exists() and value.as(CodeableConcept).memberOf('http://hl7.org/fhir/us/core/ValueSet/us-core-observation-smokingstatus', 'preferred') and value.as(CodeableConcept).memberOf('http://hl7.org/fhir/us/core/ValueSet/us-core-observation-smokingstatus-max', 'required')"
            },
            "expression": [
                "Observation"
            ]
        }
    ]
}

JohnTimm added a commit that referenced this issue May 7, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 7, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 7, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 7, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 7, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
prb112 added a commit that referenced this issue May 7, 2021
Issue #2292 - error handling and memberOf optimization
JohnTimm added a commit that referenced this issue May 10, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 10, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 10, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 10, 2021
* Issue #2292 - miscellaneous clean-up

Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>

* Issue #2292 - sort members

Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>

* Issue #2292 - minor tweaks

Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 10, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 11, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 11, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
prb112 added a commit that referenced this issue May 11, 2021
Issue #2292 - introduce String constants
michaelwschroeder pushed a commit that referenced this issue May 11, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
michaelwschroeder pushed a commit that referenced this issue May 11, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
michaelwschroeder pushed a commit that referenced this issue May 11, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
michaelwschroeder pushed a commit that referenced this issue May 11, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
michaelwschroeder pushed a commit that referenced this issue May 11, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
@kmbarton423
Copy link
Contributor Author

Confirmed additional error information provided indicating a problem encountered with remote term service. See example below:

`POST https://localhost:9443/fhir-server/api/v4/ValueSet/$expand
(json body)
{
"resourceType": "ValueSet",
"id": "snomed-valueset",
"url": "http://ibm.com/fhir/ValueSet/snomed-valueset",
"version": "1",
"name": "SNOMED-CT ValueSet",
"status": "active",
"compose": {
"include": [
{
"system": "http://snomed.info/sct",
"filter": [
{
"property": "concept",
"op": "is-a",
"value" : "bogus"
}
]
}
]
}
}

(json response)
{
"resourceType": "OperationOutcome",
"id": "ac-11-0-2-adf235ca-ac0f-4245-bc4f-183137616d0f",
"issue": [
{
"severity": "error",
"code": "exception",
"details": {
"text": "A communication or processing error occurred during the remote ValueSet/$expand operation (endpoint: https://snowstorm-fhir.snomedtools.org/fhir/ValueSet/$expand)"
}
},
{
"severity": "error",
"code": "processing",
"diagnostics": "Failed to call access method: org.snomed.langauges.ecl.ECLException: Failed to parse ECL ' << bogus'"
}
]
}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request terminology
Projects
None yet
Development

No branches or pull requests

3 participants