Stream: cql
Topic: Issues with remote fhirServer
Rich Boyce (Jan 22 2021 at 21:17):
We are currently testing rules that we have created by using the CQF-Ruler and Logica Sandbox. We have registered our CDS-service and have a working fhirAuthorization access token. Whenever we try to issue a post request by specifying the Logica sandbox as the fhirServer we get an error: HTTP 413 Request Entity Too Large. We have traced the issue to being caused by a GET request created by the Hapi FHIR library to the Sandbox checking if the patient has any medication statements that exist in a ValueSet we have created (roughly 60 codes). Any help with proceeding would be appreciated.
JP (Jan 22 2021 at 21:49):
The cqf-ruler supports a couple of undocumented options to work around things like this:
https://github.com/DBCG/cqf-ruler/blob/master/r4/src/main/resources/hapi.properties#L182
JP (Jan 22 2021 at 21:50):
I'd suggest first trying:
cds_hooks.fhirServer.searchStyle=POST
And if that doesn't work
cds_hooks.fhirServer.maxCodesPerQuery=24
JP (Jan 22 2021 at 21:50):
(only one of those at a time)
Rich Boyce (Jan 25 2021 at 17:51):
Thanks so much, that worked. I am also running into an error "org.opencds.cqf.cql.engine.exception.InvalidOperatorArgument: Expected a list with at most one element, but found a list with multiple elements." It seems to be caused by how Logica Sandbox returns patient bundle information. Any idea how to work around this?
JP (Jan 25 2021 at 19:46):
Hmm... Are multiple patients being returned? A Bundle should be ok, but there should be one and only one patient in the Bundle.
Rich Boyce (Jan 25 2021 at 23:26):
After tracing the code it does seem that the result of an internal evaluate statement is a list of 2 patients, but technically speaking they are the same patient. I think its caused by the prefetch that Logica is sending but I can't quite pinpoint the cause
JP (Jan 26 2021 at 17:36):
For Patient context CQL the cql-engine expects to only get one Patient when querying. It is surprising that you're getting two Patients back. Any way you could provide a repro and file an issue on the cqf-ruler github?
Last updated: Apr 12 2022 at 19:14 UTC