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

Cannot login in using default user and password. #78

Closed dilvan1 closed 1 year ago

dilvan1 commented 2 years ago

I compiled the Authoring Tool using the instructions at Run (Development Quick Start). Everything went fine (with some warnings), and the tool ran, but I could not log in. I tried the pair user: demo and password: password, and made sure I copied the local.json and local-users.json files to their proper places.

I got the message Authentication Error: 500 Internal Server Error, please try again. on the browser and the following messages on the console:

11:40:31 AM web.1 |  Proxy error: Could not proxy request /authoring/api/auth/login from localhost:5100 to http://localhost:3001.
11:40:31 AM web.1 |  See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).

By the way, the project docker is not available:

Unable to find image 'cdsauthoringtool:latest' locally
docker: Error response from daemon: pull access denied for cdsauthoringtool, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
cmoesel commented 2 years ago

Hi @dilvan1. This sounds like the backend API server is not running correctly. Please ensure that MongoDB 4.4 is running locally and that the backend API server (on port 3001) did not have any errors launching. The node foreman script should launch the backend API server for you, but it won't launch MongoDB for you (and will fail if MongoDB is not running).

As for DockerHub, this project is not offered on DockerHub because there are specific environment variables and values that are built into the image -- the values of which differ depending on your environment. So you must build the image yourself if you want to use Docker.

dilvan1 commented 1 year ago

Hi

It only works with MongoDB 4.4 . There is a migration functionality that isn't supported on versions greater than 4.4. In the README.md page, it says: The CDS Authoring Tool is tested using MongoDB 4.4.x, but later versions are expected to work.

Thanks,

Dilvan Moreira.

From my phone.

On Thu, Oct 20, 2022, 12:18 PM Chris Moesel @.***> wrote:

Hi @dilvan1 https://github.com/dilvan1. This sounds like the backend API server is not running correctly. Please ensure that MongoDB 4.4 is running locally and that the backend API server (on port 3001) did not have any errors launching. The node foreman script should launch the backend API server for you, but it won't launch MongoDB for you (and will fail if MongoDB is not running).

As for DockerHub, this project is not offered on DockerHub because there are specific environment variables and values that are built into the image -- the values of which differ depending on your environment. So you must build the image yourself if you want to use Docker.

— Reply to this email directly, view it on GitHub https://github.com/AHRQ-CDS/AHRQ-CDS-Connect-Authoring-Tool/issues/78#issuecomment-1285724059, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7QD3E3UYDLYCEC2SWDHFTWEFPCTANCNFSM6AAAAAARKIBPBQ . You are receiving this because you were mentioned.Message ID: @.***>

dilvan1 commented 1 year ago

Hi,

I am able to edit CQL and upload patients (from Synthea), 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.

Dilvan de Abreu Moreira, Ph.D. @.*** http://java.icmc.usp.br Warning: I use a spam filter, some emails sent to me CAN be lost!

On Fri, Dec 2, 2022 at 11:03 AM Dilvan Moreira @.***> wrote:

Hi

It only works with MongoDB 4.4 . There is a migration functionality that isn't supported on versions greater than 4.4. In the README.md page, it says: The CDS Authoring Tool is tested using MongoDB 4.4.x, but later versions are expected to work.

Thanks,

Dilvan Moreira.

From my phone.

On Thu, Oct 20, 2022, 12:18 PM Chris Moesel @.***> wrote:

Hi @dilvan1 https://github.com/dilvan1. This sounds like the backend API server is not running correctly. Please ensure that MongoDB 4.4 is running locally and that the backend API server (on port 3001) did not have any errors launching. The node foreman script should launch the backend API server for you, but it won't launch MongoDB for you (and will fail if MongoDB is not running).

As for DockerHub, this project is not offered on DockerHub because there are specific environment variables and values that are built into the image -- the values of which differ depending on your environment. So you must build the image yourself if you want to use Docker.

— Reply to this email directly, view it on GitHub https://github.com/AHRQ-CDS/AHRQ-CDS-Connect-Authoring-Tool/issues/78#issuecomment-1285724059, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7QD3E3UYDLYCEC2SWDHFTWEFPCTANCNFSM6AAAAAARKIBPBQ . You are receiving this because you were mentioned.Message ID: @.*** com>

cmoesel commented 1 year ago

Hi Dilvan. 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.

dilvan1 commented 1 year ago

Yes, I can.

From my phone.

On Tue, Dec 6, 2022, 3:05 PM Chris Moesel @.***> wrote:

Hi Dilvan. 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.

— Reply to this email directly, view it on GitHub https://github.com/AHRQ-CDS/AHRQ-CDS-Connect-Authoring-Tool/issues/78#issuecomment-1339768495, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7QD3HNIP6ESDR2U274UIDWL555VANCNFSM6AAAAAARKIBPBQ . You are receiving this because you were mentioned.Message ID: @.***>

cmoesel commented 1 year ago

Hi @dilvan1 - is this the same issue as reported in #80? Are you working together? If so, let's just track it there.

fiona43 commented 1 year ago

Hi @cmoesel From my side I'm not working with @dilvan1. :)

cmoesel commented 1 year ago

OK, then @dilvan1 -- I'd like to ask you the same questions that I asked @fiona43:

cmoesel commented 1 year ago

Hi @dilvan1. 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.

dilvan1 commented 1 year ago

Hi,

It worked for me. Maybe you should update the README.md file Run instructions. Remember to inform that users must use MongoDB 4.4.x.

Thanks!

Dilvan de Abreu Moreira, Ph.D. @.*** http://java.icmc.usp.br Warning: I use a spam filter, some emails sent to me CAN be lost!

On Thu, Dec 8, 2022 at 11:38 AM Chris Moesel @.***> wrote:

Hi @dilvan1 https://github.com/dilvan1. 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 https://github.com/AHRQ-CDS/AHRQ-CDS-Connect-Authoring-Tool/blob/master/api/config/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 https://github.com/AHRQ-CDS/AHRQ-CDS-Connect-Authoring-Tool/blob/master/api/config/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 https://github.com/cqframework/cql-translation-service#cql-to-elm-translation-service .

— Reply to this email directly, view it on GitHub https://github.com/AHRQ-CDS/AHRQ-CDS-Connect-Authoring-Tool/issues/78#issuecomment-1342835406, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7QD3HQ5PP3EUYX7FSTBWDWMHXHZANCNFSM6AAAAAARKIBPBQ . You are receiving this because you were mentioned.Message ID: @.***>

cmoesel commented 1 year ago

Thanks for confirming! I apologize for the trouble and have taken note to improve the instructions!