Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Editing CQL of an Existing Package

hossenlopp edited this page Jun 3, 2019 · 3 revisions

Editing CQL of an Existing Package

Sometimes it is helpful to try a different piece of CQL logic before suggesting it to a measure developer. The bonnie:cql:add_json_to_package rake task can make this fairly easy. There are a few caveats.

  • You cannot change the name of the population defining statements. The HQMF references them by name.
  • The MAT may not allow them to use your suggestion.

Process

  1. Start the translation server with java -jar <PATH_TO_cqlTranslationServer-<VERSION>-SNAPSHOT-jar-with-dependencies.jar>
  2. Extract the package.
  3. Edit the cql.
  4. Delete the *.json in the folder.
  5. Zip up folder. In Finder, right click folder, click compress.
  6. In a terminal navigate to the bonnie code folder on branch master.
  7. Run the rake task. Choose between passing in the .zip or the directory:
    • $ bundle exec rake bonnie:cql:rebuild_package[path/to/package.zip] or
    • $ bundle exec rake bonnie:cql:rebuild_package[path/to/package_dir]
    • NOTE: This rake task DOES NOT work with composite measures
    • NOTE: The cql-to-elm cqlTranslationServer JAR must be running on your local machine.
    • NOTE: If you are using a zsh terminal, you need to use 'noglob':
      • $ noglob bundle exec rake bonnie:cql:rebuild_package[path/to/package.zip])
    • Dragging the zip file from Finder onto the terminal session will paste the absolute path.
  8. If successful, a new zip package will be created next to the original with _rebuilt appended to the name. This can be uploaded to Bonnie. If there are syntax errors, they will be printed out and no package will be created.