openehr-cdr-query

0.0.3 • Public • Published

openehr-cdr-query

Build Status

API

Table of Contents

CDR

A connection to a single Clinical Data Repository

Parameters

  • config Object CDR configuration
    • config.url String API URL (without a trailing /)
    • config.authentication Object Authentication configuration
      • config.authentication.type "basic" Type of authentication (currently only supports Basic)
      • config.authentication.username String Username for authentication
      • config.authentication.password String Password for authentication

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

  • cdrs Array<CDR> Array of CDRs to connect to

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

Properties

  • message String Status code and text returned by CDR
  • body (Object | String) Error body returned by CDR: either parsed JSON or a HTML string

Readme

Keywords

none

Package Sidebar

Install

npm i openehr-cdr-query

Weekly Downloads

0

Version

0.0.3

License

none

Unpacked Size

27 kB

Total Files

12

Last publish

Collaborators

  • leomca