openehr-cdr-query
v0.0.3
Published
ES6 module for querying openEHR CDRs
Downloads
7
Readme
openehr-cdr-query
API
Table of Contents
CDR
A connection to a single Clinical Data Repository
Parameters
config
Object CDR configuration
query
Runs an AQL query against the CDR
Parameters
aql
String The AQL query to run
Returns Promise<Object> A promise resolving with the parsed JSON result of the query from the CDR, or rejecting with a CDRError
CDRs
A connection to multiple Clinical Data Repositories
Parameters
query
Runs an AQL query against the CDRs
Parameters
aql
String The AQL query to run
Returns CDRsResponse<Array<Promise>> Object representing responses from the CDRs
CDRsResponse
Class which combines responses from multiple CDRs
Parameters
promises
Array<Promises> Array of promises from calling the API
all
Wait for all API calls to succeed before resolving. If one fails, they all fail.
Returns CDRsFormatter<Promise>
CDRsFormatter
Class which formats responses from multiple CDRs
Parameters
promise
Promise Promise which resolves with the result of an API call
concat
Concatenate results of multiple API calls
Returns Promise Promise which resolves with concatenated results
CDRError
Extends Error
Represents an error when communicating with a Clinical Data Repository
Parameters
res
Object node-fetch response object