AHRQ-CDS / AHRQ-CDS-Connect-Authoring-Tool

The CDS Authoring Tool is part of the CDS Connect project https://cds.ahrq.gov/, sponsored by the Agency for Healthcare Research and Quality (AHRQ), and developed under contract with AHRQ by MITRE's CAMH FFRDC.
https://cds.ahrq.gov/cdsconnect/authoring
Apache License 2.0
42 stars 19 forks source link

zip of external cels fail #90

Open tusharkantawp opened 1 year ago

tusharkantawp commented 1 year ago

If I upload a zip file of external cql files (dependent on one another), I get an error that invalid file format (it says format should be in cql or zip) though I am loading a zip file. Please advise what to do

cmoesel commented 1 year ago

Hi @tusharkantawp. A few questions:

tusharkantawp commented 1 year ago

It is a standard zip file and all cqls are in root. Not in any subfolder.

cmoesel commented 1 year ago

A colleague and I have both tried this and it seems to be working for us. It's hard to know if it is an issue with your zip file or with your system.

Here is a file that works fine for me. Can you try it?

my-cql-files.zip

cmoesel commented 1 year ago

Hi @tusharkantawp. Is this still an issue? We were never able to reproduce it. If it's no longer a problem, I'd like to close this issue.

nibaba007 commented 11 months ago

image When uploading external cql files; The following error is reported:

Proxy error: Could not proxy request /authoring/api/externalCQL from localhost:3000 to http://localhost:3001/. See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNRESET). SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>) at parseELMFiles (D:\code\AHRQ-CDS-Connect-Authoring-Tool\api\src\handlers\externalCQLHandler.js:410:32) at D:\code\AHRQ-CDS-Connect-Authoring-Tool\api\src\handlers\externalCQLHandler.js:734:58 at Multipart.<anonymous> (D:\code\AHRQ-CDS-Connect-Authoring-Tool\api\src\handlers\cqlHandler.js:1797:7) at Multipart.emit (node:events:514:28) at finish (node:internal/streams/writable:748:10) at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

cmoesel commented 11 months ago

Hi @nibaba007. Based on the API stack trace you provided, it looks like there may be a problem converting the CQL into JSON. Are you running a local CQL Translation Service? If you look at the API README's Development Details section, it discusses this at the end. You can either disable the use of CQL-to-ELM in the config or run a CQL Translation Service using Java or Docker.

nibaba007 commented 11 months ago

I am certain that I have started the service: cql translation service image

cmoesel commented 11 months ago

OK. Let's try a few things:

  1. If you create a simple artifact, does the "Download CQL" feature work? If so, does the zip file have a JSON file corresponding to each CQL file?

  2. When the CDS Authoring Tool API starts up, it should log out the config. Do you see something like this in the config?

    "cqlToElm": {
    "url": "http://localhost:8080/cql/translator",
    "active": true
    },

    Is the URL pointing to http://localhost:8080/cql/translator?

  3. If you go to http://localhost:8080/cql/application.wadl in your browser and then right-click and view source, do you see XML with a top-level <application xmlns="http://wadl.dev.java.net/2009/02"> tag?