Stream: cql
Topic: AHRQ Custom ValueSet Support
Raghavan Chandrabalan (Sep 22 2021 at 20:05):
Hi @Chris Moesel, I'm using the AHRQ CQL Services and would like to know if there's a way to reference a ValueSet that's not on VSAC in an imported CQL Library or any tools available to support this case?
Chris Moesel (Sep 22 2021 at 20:29):
Hi @Raghavan Chandrabalan. The AHRQ CQL Services currently works only with VSAC "out of the box". I was thinking you might be able to get it working for other value sets by editing the .vsca_cache/valueset-db.json
file -- but on second thought, I'm not sure that would work either -- as I think the CodeService expects to extract an OID from the value set URL before doing the lookup in that file. So... I think the only approach that would work right now would be to replace the code-service-loader.js
with another implementation that defines a new CodeService
that works with other value sets (which, as far as I know, does not exist).
This is something I'd like to add support for in the future, but I'm not sure exactly when (or even if) we'll be able to get to it. Support for VSAC is currently our primary use case.
Paul Denning (Sep 22 2021 at 21:25):
https://github.com/cqframework/cqf-tooling/pull/298 may be of interest
Chris Moesel (Sep 23 2021 at 12:35):
@Paul Denning - that is for the Java based CQL tools, so it won't help with the Node-based CQL Services; except to provide some insight into approaches one might take to implement something like this in JavaScript.
Raghavan Chandrabalan (Sep 23 2021 at 16:44):
Thanks for the info, defining a new CodeService
sounds like a good way to go about it. It looks like the method of editing valueset-db.json
would technically work though since any non-URL OID found is returned as-is to CodeService
.
Bryn Rhodes (Sep 24 2021 at 21:26):
@Raghavan Chandrabalan, note that there is tooling to go from FHIR ValueSet resources to the valueset-db.json format expected by the CodeService: https://github.com/cqframework/cqf-tooling/blob/master/src/main/java/org/opencds/cqf/tooling/terminology/ToJsonValueSetDbOperation.java#L18
Chris Moesel (Sep 25 2021 at 00:17):
Thanks, @Bryn Rhodes! I forgot about that. I need to bookmark it or something. And add it to the docs. Thanks!
Last updated: Apr 12 2022 at 19:14 UTC