Stream: cql
Topic: CQF-Ruler $cql help
Andy Stevens (Oct 26 2021 at 15:34):
I have a question about the $cql operation currently available on CQF-Ruler. In the code for the operation, it looks like there's not an option to define an external data source like for the Library $evaluate measure. Is this a known limitation of the operation, where the CQL has to be registered as a library on CQF-Ruler to be evaluated using an external data source or am I missing something? @JP I think you would probably know best since you've helped my teammate with cqf-ruler stuff before
Bryn Rhodes (Oct 26 2021 at 15:48):
The intent is for both those operations to support the same set of parameters so they can access data in the same way, but it sounds like accessing external data isn't wired up in the $cql operation. It should be a straightforward change because they're both running the cql-evaluator underneath, it sounds like the dataEndpoint parameter just needs to be wired up to a provider parameter to the evaluate call.
JP (Oct 26 2021 at 17:09):
Using the evaluator modules is still a WIP in the ruler. The current implementation is inline. Still hammering out the interfaces so that those modules can be reused with Android, VS Code, eCR Now, etc. Getting there, but it's slow going. :frown:
Andy Stevens (Oct 26 2021 at 19:02):
Now im switching back to using Libraries and $evaluate but its giving an error in the logs saying "Unknown element 'valueEndpoint' found while parsing", and it worked a few days ago so I dont know what couldve happened to cause this. My post body is
{
"resourceType": "Parameters",
"parameter": [
{
"name": "patientId",
"valueString": "11364"
},
{
"name": "context",
"valueString": "Patient"
},
{
"name": "dataEndpoint",
"valueEndpoint": "Endpoint/1"
}
]
}
where Endpoint/1 is a valid resource on the server
JP (Nov 03 2021 at 17:25):
Apologies for missing this Andy. The operation expects the actual Endpoint resource, not just a reference to an existing one.
{
"resourceType": "Parameters",
"parameter": [
{
"name": "patientId",
"valueString": "11364"
},
{
"name": "context",
"valueString": "Patient"
},
{
"name": "dataEndpoint",
"resource": {
"resourceType": "Endpoint",
// The rest of the Endpoint here
}
}
]
}
JP (Nov 03 2021 at 17:27):
We could probably overload the operation to support an Endpoint reference. Endpoint references currently don't work well in OAuth environments because the headers are static, and in real-world environments it's expected that the refresh token will refresh periodically. The cqf-ruler currently doesn't support such a scenario.
Last updated: Apr 12 2022 at 19:14 UTC