Closed fiona43 closed 1 year ago
Are you able to download your CQL from the Authoring Tool? Knowing if you can do that successfully will help me determine if the issue is the the CQL-to-ELM translation service or something else.
Yes, I downloaded it successfully.
OK, that helps narrow it down... A few more questions:
Thanks for your feedback. My replies here below.
Hi @fiona43. I have tried to reproduce this error, but I cannot. I am running the latest code and using the Edge browser. I've created a simple artifact with inclusion criteria like in your screenshot and a simple recommendation ("Do something"). I've uploaded the test patient that you provided and then run the test by:
When I do so, I get the following result:
I have also tried this in FireFox with the same results.
In addition, I've tested this on the AHRQ-hosted CDS Authoring Tool and it works there too. Do you have an account for the AHRQ-hosted CDS Authoring Tool? If so, have you tried it there? I'm wondering if it is something wrong with your local installation.
Since I cannot reproduce this, it is difficult to debug it. Do you know how to open the developer tools in your browser and look at the console? If so, can you look at that and post more specific errors and stack traces that you see there?
Hi @fiona43. I've done some more investigation and I think I know what the problem is. The error Cannot read properties of undefined (reading 'content')
happens when the CDS Authoring Tool API backend is not configured to use the CQL Translation Service (which translates human-readable CQL to machine-friendly ELM JSON). Execution requires the ELM JSON representation of CQL, so when it is not there, execution fails.
I suspect you probably copied the minimal-example.json when you created your local.json
configuration. The minimal example unfortunately has the CQL-to-ELM Translation Service turned off:
{
"cqlToElm": {
"active": false
},
// other config
}
You'll need to install and run a CQL Translation Service and then set that value to true
in your config. If youre CQL Translation Service is running at a URL other than http://localhost:8080/cql/translator
, you'll also need to set the url
property. See example.json for a more complete configuration example.
Unfortunately, it looks like this repo's README is not very clear about the requirement for the CQL Translation Service or how to install and run it. I apologize for that. If you have Docker, then the easiest way to run it is as a Docker container like this:
docker run -d -p 8080:8080 --restart unless-stopped cqframework/cql-translation-service:latest
Otherwise, you can run it using Java by following the instructions in the CQL to ELM Translation Service README.
Hi @cmoesel, the CQL Translation Service works! Thanks.
The CQL Execution Results seems to not work properly. After a lot of tests, I tried to implement an extremely simple test aiming to evaluate the correctness of the observation's evaluation. Related to this purpose I focused my attention on the inclusion criteria (discarding all the question related to the recommendation). My tests can be summarised in three groups:
Thanks in advance.
Hi @fiona43. I'm glad you were able to get the Translation Service working. As for your other difficulties, there are a few things that aren't quite right.
1. http://loinc.org/ vs http://loinc.org
In your test data, the codes' system
properties are set to http://loinc.org/
. This is not the correct code system URI for LOINC. It should be http://loinc.org
. Note that there is no trailing /
. For correct code system URIs, see FHIR's code system table here.
This is the most important change you need to make, as it affects all of your other test queries.
2. is not null modifier
In your first example above, you applied the "Exists" modifier and then the "is not null" modifier. The "is not null" modifier is not helpful here. This is because the "Exists" modifier that is before it will always return true
or false
(and never null
). Since "Exists" never returns null, the "is not null" modifier after it will always return true. You actually just want "Exists" by itself, because that tells you if the query returned any data (true
) or if it resulted in an empty list (false
).
The difference between "Exists" and "is not null" can be confusing. You did use "is not null" correctly in the 3rd example, so that's good!
Once you make those two changes above, I think you'll find that everything is working as expected.
@cmoesel, Thanks for your clarifications. Now it works properly!
During the tests I noticed that the performance, during the editing process (within the 'Subpopulation' tab), decreases as the number of created items increases. For instance I created an artifact with:
Hi @fiona43. I've seen this before, and as you noted, it often happens when there are a lot of sub-populations (or sometimes a lot of elements on other pages). In my experience, I haven't seen too many people use more than 5 sub-populations, so it's not a use case that we've optimized for.
That said, it's worth looking into, so I'm tagging @jafeltra for her awareness. For now, however, I'm not aware of any workarounds. I apologize for the inconvenience!
Hi @cmoesel, thanks for your feedback! Now the issue is clearer and I look forward to a possibile update from @jafeltra.
Have a nice day!
Hi @fiona43. This issue you're noticing in the Subpopulation tab is something we have seen before. We had worked on an initial fix to this issue a little while ago that I thought had helped to resolve this. The initial fix we had implemented should be included if you are using the latest changes in this repository. To check that you have the latest commit with the fix, you can run git log
and check that the commit with hash dd51380
is your latest commit.
If you do have the latest changes locally and still see this issue, we will continue looking into ways to improve the performance of the app. It is also worth noting that the fix to this issue is not yet available on the hosted version of the tool at https://cds.ahrq.gov/authoring/ so you will likely still see this issue if you are authoring artifacts there.
Closing this issue since it appears to be resolved and there has been no activity for more than a year.
Hi, I am able to edit CQL and upload patients, but when I run a test (Testing page: Execute CQL on Selected Patients ) I get: Execution failed. Error: Cannot read properties of undefined (reading 'content')
It seems like a JavaScript bug. Please can you provide a feedback on this? Thanks in advance.