#CaboLabs EHRServer
Service-oriented clinical data repository for shared EHRs/EMRs/PHRs based on the openEHR standard.
- clinical data commit
- clinical data query (with aggregation and grouping capabilities)
- data synchronization (for backup and server clustering)
- multiformat XML/JSON
- web services (REST and SOAP)
- versioned openEHR objects
- data indexing
- Patient management
- EHR and contributions management
- Query building and testing
- Usage logs
- Clinical Record Managers
- EHR/EMR/PHR System Admins
- Healthcare Informatics Trainers & Students
- EHR/EMR/PHR apps should be written separately as clients of the EHRServer, but use the provided data services to access and send data from/to the EHRServer.
- Data analysis, data aggregation, business intelligence and other data processing related applications should be written separately from the EHRServer, all those systems can get data from the EHRServer using the provided data services.
/rest/ehrs(String format:xml|json, int max, int offset)
Get patients (this service will be obsolete when we move patient data to a specific demographic repo)
/rest/patients(String format:xml|json, int max, int offset)
/rest/patients/{uid}(String format:xml|json, int max, int offset)
/rest/ehrs/subjectUid/{subjectUid}(String format:xml|json)
/rest/ehrs/ehrUid/{ehrUid}(String format:xml|json)
/rest/findCompositions(String ehrId)
/rest/queries(String format:xml|json, int max, int offset)
/rest/queries/{queryUid}
/rest/queries/{queryUid}/execute(String organizationUid, String ehrId)
/rest/commit(String ehrUid, Version[] versions, String auditSystemId, String auditCommitter)
Versions should be committed in XML, following this XSD: https://github.com/ppazos/cabolabs-ehrserver/blob/master/xsd/Version.xsd
- The XML should be valid against the XSD (see /xsd folder in project).
- version.uid should have this format: versioned_object_id::creating_system_id::version_tree_id.
- The 3 fields of the version.uid attribute should be set by the client.
- When committing a new Version, the client should assign: a_generated_uid::client_system_id::1
- The first commit of a Version will generate on the EHRServer a new VersionedObject that contains that Version.
- The versionedObject.uid will be equal to the first part of the version.uid
- When committing a change to an existing VersionedObject, the version.uid should be equal to the uid of the version that was checked out and to which the changes were apply.
- When receiving a new Version for an existing VersionedObject, the EHRServer will update the versio_tree_id, generating uid::system::1, uid::system::2, uid::system::3, ... for each version.uid of the same VersionedObject.
- remember to use the archetype_id in the archetype_node_id attribute, of all the LOCATABLE elements inside version.data, when the node_id is 'at0000' (root node).
- for the encoding element in ENTRIES use 'Unicode' as the terminology and 'UTF-8' as the code_string, and be sure that the XML content is encoded with UTF-8.
- version.commit_audit.time_committed that is set by client apps will be overriden by the server
to be compliant with this rule from the openEHR specs:
- The time_committed attribute in both the Contribution and Version audits should reflect the time of committal to an EHR server, i.e. the time of availability to other users in the same system. It should therefore be computed on the server in implementations where the data are created in a separate client context.
- The parameters auditSystemId, auditTimeCommitted and auditCommitter are used to create the CONTRIBUTION for each commit.
To be compliant with the openEHR specs, the client system should use that data to create the VERSION.commit_audit structure. So
this rule is met:
- "CONTRIBUTION.audit captures to the time, place and committer of the committal act; these three attributes (system_id, committer, time_committed of AUDIT_DETAILS) should be copied into the corresponding attributes of the commit_audit of each VERSION included in the CONTRIBUTION..."
A client applicaton can commit one or more versions of different Compositions in one transaction.
Query execution by UID. Queries are created by admins. In the near future we'll add an API to create and manage Queries from client applications. We'll also explore adding support to AQL queries.
On checkout, the client will receive a copy of an existing version of a Composition, with the current UID. The client can modify, and commit, and the same UID should be used. Then the EHRServer will update the version number in the new Version UID. Then Queries will get data only from the latest Version of the existing Compositions. All the Versions of a Composition are grouped in a VersionedComposition object.
- list and show of EHRs, Compositions, Queries and Contributions
- commit reception (just openEHR XML for now)
- data indexing operation
- openEHR archetype definition indexing
- EHR management
- Directory management
- Composition management
- Query management
- Contribution management
- Patient management (should be externalized to a demographic server)
- User management
- Support rules for directory management (copying and moving compositions between folders)
- Composition versioning
- Persistent composition support
- Querying versioned objects
- Data syncrhonization between servers
- Support for AQL/EQL output (openEHR archetype-based query language)