Skip to content

System Architecture

Keeyan edited this page Jul 8, 2020 · 2 revisions

Overview

pathways_architecture_20191205

(Source for this diagram, from https://draw.io : pathways_architecture_20191205.xml.txt -- rename to .xml)

Evaluation Engine

The Evaluation Engine represents the core function that identifies where a patient is on a pathway. It takes as input a FHIR bundle representing one patient and a pathway definition, and returns the patient's current location on the pathway, documentation of previous steps from the pathway, and the recommendation at the patient's current location in the pathway, if any. For more specifics on the data model, see Pathway Data Model.

CQL Extractor

(see src/engine/cql-extractor.ts) The CQL extractor takes the CQL library referenced in the Pathway, along with the CQL referenced in all recommendation nodes within the pathway, to construct a single CQL document. Each node within the pathway contains a CQL expression which is used to determine whether the patient has already gone through the given node or not.

CQL Converter

(see src/engine/cql-to-elm.ts) The CQL document from the previous step is sent to the CQL-to-ELM webservice (URL configurable) to convert the CQL into an executable format, ELM.

ELM Executor

(see src/engine/elm-executor.ts) The ELM from the previous step is executed against the patient's FHIR record, to produce a set of results for all the CQL expressions used in the pathways.

Pathway Locator

(see src/engine/output-results.ts) The results from the ELM executor are used to step through the pathway one node at a time to find the first node where the result of the CQL is either missing or indicates incomplete. (for instance a medication regimen may be started but not yet finished) The pathway locator returns the patient's current location on the pathway, documentation of previous steps from the pathway, and the recommendation at the patient's current location in the pathway, if any.

Visualization

Work in progress.

Referenced Libraries and Projects