2

FHIR's Resource List has a RESTful API implementation of FHIR with json. Though I can query just the same in a database, I haven't used RESTful before. Would it be better to adapt this json structure to a database and not use the kind of RESTful API they provide?

James A
  • 467
  • 4
  • 12

1 Answers1

4

TL;DR: You do not (have to) use FHIR to store data, you present data with it, and it defines operations that can be done with data.

Long answer:

FHIR is an interoperability specification for exchanging medical data. Multiple systems should have a common way of representing entities they work with so they can communicate, in this case clinic-related data. Your internal representation of the entities is not really important, including your database scheme. What counts is how you expose the data to other users/systems or whatever.

If you are building a simple three-tier application which works with clinical data, just store it however you want in your database, you do not even need that standard. Your business logic should be decoupled from your storage, as well as your presentation. At the end of the day, FHIR standard is the representation, those are your entities serialized in a certain way.

As for the REST API part: you cannot share your database with another system under someone's other jurisdiction, or publicly over the internet. It's hard to enforce security, policies, scale, define operations etc. And why in the right mind would you ever want anyone poking around your database? That is where REST APIs come in. They expose resources, independently of how they are stored, in some format like XML or JSON and you can do some operations upon those resources. FHIR makes your life easier by specifying a format and operations that can be executed on your resources. If you need to exchange the data, anyone acquainted with FHIR will understand your data easily and will know how to talk with your service.

When choosing a specific technology or storage, and you have the notion that you will need some format, than you should take that into account and use something which will make your life easier. You will certainly not use a triple store or graph database for storage and later spend weeks and months making conversion logic. Although you could. But choose your tools.

Comparable standards are DATEX2 for traffic information or KML and GPX for geodata, although they are simpler.

Aleksandar Stojadinovic
  • 4,851
  • 1
  • 34
  • 56