The CQServer module is a series of helper utilities for creating a REST server that powers many aspects of the CQLab platform.
It wraps the CQFlow evaluation engine, exposes CQDefine documentation, provides convenient access to CQVocabulary clinical codes and value-sets, and exposes mock data from the CQMockData module.
CQServer is built with NestJS. We have been very happy with NestJS on many different projects, however this server is entirely optional and configurable, and any TypeScript environment can be used. One could even wrap the required endpoints in a micro-service exposed through gRPC (or similar alternative) if desired.
In a production environment, an implementation server leverages medical data to make calculations and automate decisions and tasks. This dependency on PHI means security is absolutely essential.
The CQServer, or a custom alternative, will always be run on a client's own infrastructure, behind their own firewall, and using their own security best practices.
Slightly different approaches to security may be taken depending on the needs of the technology stack, such as token based authentication or OAuth2, however these decisions are left to the implementation team.
CQServer can be trivially wrapped up in a docker container to make deployment easy. It can be scaled horizontally to handle increased load capacity, and can be configured to use external services such as databases, caches, queues, event busses, internal services/APIs, etc. all using standard asynchronous coding patterns.
Testing, deployment, CI/CD pipelines, and other architectural concerns are handled using standard solutions and best practices for the technology stack.