Introduction to FHIR REST

What is REST?

REST is a method to exchange information using HTTP. This means that each request from a client and response from a server contains the necessary information to service a request. This data exchange using REST is called a RESTful exchange.

What is an API?

An API is an entry point or interface that allows a system to access the data of a different system. The entry point defines how the data should be formatted and the type of interactions that are supported. FHIR API is usually used to access or exchange data.

RESTful FHIR

Taking the Google browser as an example, when you search for “restaurants near me”, the browser makes a GET request to its server (the Google server in this case) using HTTP. If the requested data is available on the server, it’ll reflect on the Status Code as “200 OK”. The server then responds back with the requested data.

Similarly, a FHIR server contains multiple resources which a client can request access to via RESTful FHIR API. A FHIR server needs to support a few main operations to make this possible. This would include: Create, Read, Update, Delete and Search.

A client, e.g. a browser, can interact with a server using HTTP methods such as GET, POST, PUT, DELETE.

Each resource in a FHIR server can be identified using a unique URL. This enables managing patient data on a FHIR server with ease.

Example RESTful API call:

GET http://example.com/fhir/Patient/456

This would retrieve the Patient resource with ID 456.

Comments (0)

No comments yet. Be the first to comment!