/fhirplace

Open-source FHIR server

Primary LanguageJavaEclipse Public License 1.0EPL-1.0

fhirplace

Build Status

FHIR Server implementation powered by FHIRBase.

Installation

FHIRPlace and FHIRBase both are using a lot of third-party software like PostgreSQL, Java, Node.js, etc. Installing it by hand is an complex task which can take several working days to accomplish.

Fortunatelly, another approach is available nowadays. Instead of installing all required software manually, one can use virtualization technologies to run a "virtual machine" with alredy pre-configured operating system.

To quickly get FHIRPlace up and running we advice you to follow virtualization path. If you're willing to install FHIRPlace to your local machine or server, please follow full Installation Manual.

Running FHIRPlace's Virtual Machine

Mac OS X and Windows

If you're running Windows or Mac OS X, you have to install VirtualBox virtualization software. Installation process is quite straightforward, so we won't describe it here. If problems arise, refer to Official Installation Manual.

Linux

If you're runnig some flavour of Linux, make sure you have Docker installed:

$ docker --version # or docker.io --version

If docker binary is not present, install it using your distributive's package manager, e.g. sudo apt-get install docker.io.

Installing Vagrant

Vagrant is a simple and powerful command-line utility to manage virtual machines primary intended for developers use. Navigate to downloads page to get an installer suitable for your OS. After installation is finished, run Terminal application (on Mac OS X) or Command Prompt (on Windows) to test if installation was successful. Type following command:

vagrant --version

If you see output like

Vagrant 1.6.5

you had successfuly installed Vagrant.

Getting FHIRPlace source code

You have to get FHIRPlace source code to run FHIRPlace. If you have Git SCM installed, clone FHIRPlace repository from GitHub. Alternatively, you can download ZIP archive and unpack it somewhere in your file system.

Starting VMs

Open Terminal (or Command Prompt) and navigate to directory where FHIRPlace's source code is located, e.g.:

cd ~/work/fhirplace

Then start FHIRPlace VMs with command:

vagrant up fhirbase && vagrant up fhirplace

Initial VMs startup can take a lot of time because Vagrant have to download several OS images (about 1.5 Gb total) and unpack them. Next startups will be much faster (almost instant).

If Vagrant won't report any errors, direct your browser to http://localhost:3000/ and you'll see FHIRPlace welcome page.

Stopping VMs

When you finish your work with FHIRPlace, you may decide to stop running VMs to free system resources that they have allocated. This can be done with following command:

vagrant halt fhirbase fhirplace

Accessing FHIRBase with pgAdmin

You can access FHIRBase directly using any PostgreSQL client like command-line psql utility or graphical pgAdmin. This section describes connection to FHIRBase with pgAdmin, actions in other clients are similar.

Run pgAdmin and click File -> Add server... menu. Enter following connection paremeters in dialog window:

Parameter Value
Host localhost
Port 5433
User fhirbase
Password fhirbase

pgAdmin Connection Screenshot

Click "OK" and you will see new server appeared in the left sidebar.

pgAdmin Connection Screenshot

Double-click newly created server to connect to it. Then expand "Databases" subtree and double-click "fhirbase" database.

pgAdmin Connection Screenshot

Now you're connected to fhirbase database and ready to perform SQL queries. Let's try to create new Organization resource.

Click Tools -> Query tool menu and SQL editor window will appear.

pgAdmin Connection Screenshot

Copy-paste following SQL query:

SELECT fhir_create(
  '{"base":"https://localhost:3000/"}'::jsonb,
  'Organization',
  '{"resourceType":"Organization","text":{"status":"generated","div":"<div>\n      <p>XYZ Insurance</p>\n    </div>"},"identifier":[{"system":"urn:oid:2.16.840.1.113883.3.19.2.3","value":"666666"}],"name":"XYZ Insurance"}'::jsonb,
  '[]'::jsonb
);

Press F5 or click Query -> Execute menu to run query. You should see result in "Output" pane:

pgAdmin Connection Screenshot

That means query was executed successfuly. Now let's try to find newly created Organization with FHIR search functionality. Copy-paste following query in editor window and execute it:

SELECT * FROM search(
  'Organization'::text,
  'name=XYZ'
);

In "Output" pane you'll see Organization resource we inserted in previous step.

pgAdmin Connection Screenshot

Summarizing up, we connected to FHIRBase using pgAdmin and performed some queries to test if it's actually works. Please, refer to FHIRBase and PostgreSQL Documentation for further reading.

Service

All premium services from developers of Fhirbase projects should be requested from Choice Hospital Systems (http://Choice-HS.com)

License

Copyright © 2014 Health Samurai Team.

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.