FHIR Chat · Error while CQL execution in HAPI FHIR (JPA) · implementers

Stream: implementers

Topic: Error while CQL execution in HAPI FHIR (JPA)


view this post on Zulip Praveen (Sep 01 2021 at 22:28):

Hi All, I was trying to execute CQL on hapi-fhir-jpaserver-starter (HAPI FHIR JPA) server running on Jetty. I enabled the flag mentioned in the documentation - https://hapifhir.io/hapi-fhir/docs/server_jpa_cql/cql.html .
I have the enough number of resources available within the server to be evaluated. When I make a call using below code.

Code to make a call to FHIR server:

Parameters outParams = client
.operation()
.onInstance(new IdDt("Measure", measureId))
.named("$evaluate-measure")
.withParameters(inParams)
.cacheControl(new CacheControlDirective().setNoCache(true))
.withAdditionalHeader("Content-Type", "application/json")
.useHttpGet()
.execute();

Error I am getting:
Exception in thread "main" ca.uhn.fhir.rest.server.exceptions.InvalidRequestException: HTTP 400 Bad Request: Invalid request: The FHIR endpoint on this server does not know how to handle GET operation[Measure/ColorectalCancerScreeningsFHIR/$evaluate-measure] with parameters [[measure, periodStart, periodEnd]]

I even tried calling via direct POST method - http://localhost:8080/fhir/Measure/ColorectalCancerScreeningsFHIR/evaluate-measure?periodStart=2019-01-01&periodEnd=2021-12-31 but response was still the same.

Any help or direction on this will be highly appreciated. Thanks for reading this issue.

view this post on Zulip Lloyd McKenzie (Sep 01 2021 at 23:10):

Dos the server declare support for that operation?

view this post on Zulip Praveen (Sep 01 2021 at 23:24):

[Quoting…]
How do I check it ?

view this post on Zulip Praveen (Sep 02 2021 at 00:36):

Lloyd McKenzie said:

Dos the server declare support for that operation?

I tried other GET and POST operations. Those are working fine. I tried to do a history of the measure resource using GET and POST and it worked fine.

view this post on Zulip Lloyd McKenzie (Sep 02 2021 at 00:45):

Access the /metadata endpoint.

view this post on Zulip Praveen (Sep 02 2021 at 01:49):

Lloyd McKenzie said:

Access the /metadata endpoint.

I am running on a Jetty server and I am able to access it /metadata from browser and also postman. Anything setting I need to check on that response.

view this post on Zulip Bhautik (Sep 02 2021 at 05:38):

Hello Everyone
Any one let me know what is the live API End Point for FHIR ?

view this post on Zulip Praveen (Sep 02 2021 at 11:19):

Bhautik said:

Hello Everyone
Any one let me know what is the live API End Point for FHIR ?

Depends on the FHIR server you are running. If you are running HAPI FHIR JPA (starter) project then end point will be http://localhost:8080/fhir/ . Here local host will be replaced by the server name where you are hosting the FHIR server

view this post on Zulip Praveen (Sep 02 2021 at 11:22):

Praveen said:

Hi All, I was trying to execute CQL on hapi-fhir-jpaserver-starter (HAPI FHIR JPA) server running on Jetty. I enabled the flag mentioned in the documentation - https://hapifhir.io/hapi-fhir/docs/server_jpa_cql/cql.html .
I have the enough number of resources available within the server to be evaluated. When I make a call using below code.

Code to make a call to FHIR server:

Parameters outParams = client
.operation()
.onInstance(new IdDt("Measure", measureId))
.named("$evaluate-measure")
.withParameters(inParams)
.cacheControl(new CacheControlDirective().setNoCache(true))
.withAdditionalHeader("Content-Type", "application/json")
.useHttpGet()
.execute();

Error I am getting:
Exception in thread "main" ca.uhn.fhir.rest.server.exceptions.InvalidRequestException: HTTP 400 Bad Request: Invalid request: The FHIR endpoint on this server does not know how to handle GET operation[Measure/ColorectalCancerScreeningsFHIR/$evaluate-measure] with parameters [[measure, periodStart, periodEnd]]

I even tried calling via direct POST method - http://localhost:8080/fhir/Measure/ColorectalCancerScreeningsFHIR/evaluate-measure?periodStart=2019-01-01&periodEnd=2021-12-31 but response was still the same.

Any help or direction on this will be highly appreciated. Thanks for reading this issue.

Trying to Bump up my issue so that it is noticed by anyone logging now. Please let me know if you have any information around this or any documentation link around this.

view this post on Zulip Lloyd McKenzie (Sep 02 2021 at 15:48):

Does the CapabilityStatement you receive from hitting /metadata indicate support for the evaluate-measure operation?


Last updated: Apr 12 2022 at 19:14 UTC