Skip to content

Local Installation

Time to complete

60 Minutes

Warning

This guide is for demonstrations or tests only, not for production environments.

Note

This installation method requires familiarity with the command line.

Prerequisites

  • CPU/RAM: Modern CPUs with 8GB RAM.
  • Java version 8 (1.8). Oracle-licensed Java (requires sign-in) and AdoptOpenJDK (not sign-in required) have been tested.
  • Node 10 which includes npm.
  • git

HAPI FHIR Server CLI

For non-production environments, the HAPI maintainers provide a simple CLI-based tool to run it.

The only required dependency is Java >= 8 (1.8).

See HAPI FHIR CLI for instructions for the OS of choice.

The Client Registry requires FHIR version R4 and HAPI must be started for this version. To run HAPI:

hapi-fhir-cli run-server -v r4

The HAPI Web Testing UI is available at http://localhost:8080/ The Web Testing UI should be disabled for production. It allows the viewing of any resource on the server.

The FHIR Base URL is at http://localhost:8080/baseR4/

Visit http://localhost:8080/ to ensure HAPI is up and running or

curl -X GET "localhost:8080/baseR4/Patient?"

Indexing

openCR supports both elasticsearch and opensearch, you are free to use either of them but we do recommend opensearch because of elasticsearch license restrictions. Follow instructions below to either install opensearch or elasticsearch

OpenSearch

Install and start opensearch for the intended OS. See the install instructions here

The required version is >=2.1.

The phonetic analysis package must be installed. For example:

/usr/share/opensearch/bin/opensearch-plugin install analysis-phonetic

The string similarity plugin must be installed. See: https://github.com/DigitalSQR/record-linkage/releases

Once installed and started, ensure that opensearch is up and running:

curl -X GET "localhost:9200/_cat/health?v&pretty"

Status should be yellow for a single-node cluster.

ElasticSearch

Install and start ES for the intended OS. See the ES install instructions

The required version is >=7.6.

The phonetic analysis package must be installed. For example:

/usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-phonetic

The string similarity plugin must be installed. See: https://github.com/intrahealth/similarity-scoring

Once installed and started, ensure that ES is up and running:

curl -X GET "localhost:9200/_cat/health?v&pretty"

Status should be yellow for a single-node cluster.

OpenCR Service and UI

Clone the repository into a directory of choice.

git clone https://github.com/intrahealth/client-registry.git

Enter the server directory, install node packages.

cd client-registry/server
npm install

Copy and edit the configuration file to your liking.

cp config/config_development_template.json config/config_development.json
# edit the servers...

The minimum changes to start a running standalone system are:

  • Change fhirServer.baseURL to "http://localhost:8080/baseR4/"

Run the server from inside client-registry/server:

# from client-registry/server
sudo NODE_ENV=development node lib/app.js

OpenCR may require access to /var/log for logging. This requirement may be changed in the future.

Congratulations! Now it's time to run a query.