Skip to content
This repository has been archived by the owner on Sep 2, 2020. It is now read-only.

Louis's Notes on Cypress and CQL

lmd59 edited this page Oct 17, 2017 · 4 revisions

This is a compilation of my notes taken on CQL and Cypress from interviewing different sources.

What is the purpose of this repository?

Currently, Cypress uses Quality Data Model (QDM) measures in the HQMF format, converted into Javascript methods and ran through Mongo map-reduce, to perform measure calculations on sets of patients. Project Tacoma's Bonnie project also uses the HQMF measures, but these measures are converted to Javascript methods and ran through through the browser's Javascript engine instead. This creates slight differences in measure calculation behaviors between the two platforms. Additionally, the Bonnie team is currently transitioning the project to using CQL instead of QDM HQMF to hold measure logic. CQL integration with Bonnie is currently in alpha.

Cypress hopes to eventually perform all of its measure calculation using CQL measures rather than our current QDM measures in HQMF format as well. Additionally, the measure calculation will eventually be done in a V8 Javascript Runtime engine (used currently in Google Chrome) rather than our current Mongoid platform. This repository intends to eventually be a library that accomplishes both of these outcomes. Once it is completed, it will also be adapted into a shared library that will also allow Bonnie to do its measure calculation in this environment and yield the same results.

Relevant Github Repositories

Intended Process For Developing This Library

The library, once finished, will need to handle three core operations: measure and patient loading, measure calculation, and results output. Additionally, it will need to be able to interface with a database environment, which in our case is MongoDB. Finally, it will need to perform these operations for both Cypress and Bonnie.

While the following is subject to change, I foresee the major steps moving forward to be:

  1. Implement the shared library for Cypress only for QDM measure loading, calculation and result output.
  2. Integrate CQL as the new standard for measure loading, calculation and result output.
  3. Integrate Bonnie support for the shared library.

The process would be designed to tackle each component of the library (loading, calculation, and results) as independent processes, with modularity and heavy testing along the way. Implementing the library using our current QDM measure standard first allows us to perform AB testing on it against the current integration.

Moving to integrating CQL afterwards allows us to perform the same type of testing against the QDM HQMF implementation.

Throughout the process, modularity must remain a top priority since Bonnie will eventually be integrated as well. Bonnie should expect the same functionality and identical results that the platform already receives in their current in-browser CQL integration. Building the library around the shared needs of both Cypress and Bonnie, rather than building solely around Cypress, will allow for minimal work to be done during Bonnie integration.