hapifhir / hapi-fhir-jpaserver-starter

Apache License 2.0
375 stars 1.01k forks source link

Invalid request error of $extract operation #570

Open tandara0 opened 1 year ago

tandara0 commented 1 year ago

I have tried to use the $extract operation, which commented in the https://hapifhir.io/hapi-fhir/docs/clinical_reasoning/questionnaires.html.

For this, 1) I created docker container with image: "hapiproject/hapi:latest" 2) I set hapi.fhir.cr_enabled=true 3) I created Example Questionnaire in the https://hapifhir.io/hapi-fhir/docs/clinical_reasoning/questionnaires.html.

Then I tried variable ways of REST APIs for $extraction operation as below: 1) GET http://{base_ip}/fhir/QuestionnaireResponse/$extract 2) GET http://{base_ip}/fhir/QuestionnaireResponse/ASLPA1/$extract 3) POST http://{base_ip}/fhir/QuestionnaireResponse/$extract 4) POST http://{base_ip}/fhir/QuestionnaireResponse/ASLPA1/$extract

I referenced https://hl7.org/fhir/uv/sdc/OperationDefinition-QuestionnaireResponse-extract.html for the APIs. In all trials, for the body, I use the corresponding Example QuestionnaireResponse in the https://hapifhir.io/hapi-fhir/docs/clinical_reasoning/questionnaires.html.

But all the responses of the trials, have the same "not-supported" error: One of the example is:

{
    "resourceType": "OperationOutcome",
    "text": {
        "status": "generated",
        "div": "..."
    },
    "issue": [
        {
            "severity": "error",
            "code": "not-supported",
            "diagnostics": "Invalid request: The FHIR endpoint on this server does not know how to handle POST operation[QuestionnaireResponse/ASLPA1/$extract] with parameters [[]]"
        }
    ]
}
tandara0 commented 1 year ago

I tried the $extract operation to the https://hapi.fhir.org, too. But I met the same problem.

I tried to all below versions: http://hapi.fhir.org/baseR4 http://hapi.fhir.org/baseR5 http://hapi.fhir.org/baseDstu3

All the versions have the same error.

timilsinabishal commented 1 year ago

HI @tandara0 were you able to solve it? We are also facing the same issue.

barhodes commented 3 months ago

This operation is only available if the Clinical Reasoning module is enabled. On the public servers this module has not been enabled so the operation is not supported.

joofio commented 2 months ago

I have tested this with : docker run --rm -p 8181:8080 -e "hapi.fhir.cr.enabled=true" -e "hapi.fhir.fhir_version=R4" hapiproject/hapi and works however, this does not - fails to start docker run --rm -p 8181:8080 -e "hapi.fhir.cr.enabled=true" -e "hapi.fhir.fhir_version=R5" hapiproject/hapi

and this also does not work (starts but not extract operation)

docker run --rm -p 8181:8080 -e hapi.fhir.fhir_version=R5 -e spring.main.allow-bean-definition-overriding=true -e hapi.fhir.cr_enabled=true hapiproject/hapi

something weird about the overriding? checking https://github.com/hapifhir/hapi-fhir-jpaserver-starter/issues/591

barhodes commented 2 months ago

I have tested this with : docker run --rm -p 8181:8080 -e "hapi.fhir.cr.enabled=true" -e "hapi.fhir.fhir_version=R4" hapiproject/hapi and works however, this does not - fails to start docker run --rm -p 8181:8080 -e "hapi.fhir.cr.enabled=true" -e "hapi.fhir.fhir_version=R5" hapiproject/hapi

and this also does not work (starts but not extract operation)

docker run --rm -p 8181:8080 -e hapi.fhir.fhir_version=R5 -e spring.main.allow-bean-definition-overriding=true -e hapi.fhir.cr_enabled=true hapiproject/hapi

something weird about the overriding? checking #591

Due to a dependency on CQL, the Clinical Reasoning module currently only supports Stu3 and R4. Once the CQL engine supports R5 we can update the Clinical Reasoning module to support R5. CQL #665

joofio commented 2 months ago

thanks for the quick reply