One can only display complex information in the mind. Like seeing, movement or flow or alteration of view is more important than the static picture, no matter how lovely –
Alan Perlis, Epigrams in Programming
On a high level point of view, EtherCIS main components are depicted as follows:
- JETTY: is the HTTP server and servlet container.
- Shiro: provides a security framework for authentication and authorization
- JOOQ: allows to deal with SQL in a very elegant manner
- DBPC2 is the JDBC connection pooling
- JDBC is a common database connectivity API
- POSTGRESQL is the DB engine by EtherCIS since it does blend relational and schema-less objects queryable by SQL
- Think!EHR this library is a temporary fix (non open source). It supports encoding/decoding into the Think!EHR FLAT JSON format
The following are required PostgreSQL extensions
- jsquery is an extension allowing to perform JSONB object querying with a comprehensive set of operators
- temporal_tables this extension provides object versioning as required by openEHR
- ltree is a native postgresql type to represent tree-like hierarchical objects. It is used to resolve the CONTAINS AQL clause.
EtherCIS modules are distributed in three high level build packages:
- CORE: these modules perform all required openEHR persistence and query operations (AQL).
- VEHR: contains services wrapping the core components into a REST API framework
- ECISQL: this is the experimental implementation to query openEHR RM persisted objects using GraphQL
The core modules are located in the repository ehrservice
- core: fundamental operations and encoding of OpenEhr entities
- ehrdao: persistence of OpenEhr entities using a mixed model (relational/NoSql)
- knowledge-cache: caching of OpenEhr knowledge models (operational templates in particular)
- aql-processor: two passes SQL translation and query execution
- jooq-pg: utility module, binds ethercis table to jOOQ/Postgresql 9.4
- transform: utility to handle db JSON encoded data into RAW json. Since the format is not yet final, this module will be enhanced at a later stage
- validation: gather and cache constraints from operational templates. Perform data validation (both structurally and elementary)
The REST API service framework modules are in repository VirtualEhr
- Authenticate Service: logic associated to users credential (authentication). Uses Shiro security framework.
- Composition Service deals with all CRUD operation for openEHR RM composition
- Ehr Service deals with EHR and EHR_STATUS openEHR RM objects
- Knowledge Service performs operations related to the Knowledge Cache (operational templates)
- Logon Service handles login/logout and session management. It is associated to the SecurityManager Service
- ServiceSecurityManager does the link with the security framework
- Party Identifier Service interfaces CRUD operations with an external identity service
- Query Service is a simple interface to perform SQL and AQL queries
- Resource Access Service: resources consists in the actual DB backend and Knowledge Cache. This is a system service used by all CRUD and Query interfaces
- Service Manager: this is the service manager. It provides the common attributes and methods to all services including session management etc.
- System Service is a simple CRUD interface to deal with System objects
- VEhr Service is the main REST API gateway.