FHIR is complicated. Let’s see if we can make it simpler.

Every FHIR resource is composed of a collection of predefined data types. It’s not the Wild West. You can’t create whatever you want to create.

You’re constrained to work within an existing set of data types — some simple, some complex. Once you understand this, it makes working with FHIR resources easier.

Most data types fall into the ‘Primitive’ or ‘General Purpose’ categories.

If you’ve written even a few lines of code in your life you’ll have encountered Primitive data types:

– date
– string
– boolean
– url

‘General Purpose’ data types are bigger and store more complex pieces of data. They tend to be small objects that are useful across a wide range of resources and elements.

– Ratio
– HumanName
– Address
– Coding

These different data types are the building blocks of the various FHIR resources and elements. Doesn’t sound that complicated now, does it?

I’d love to say it really is that simple.

But, every data type — even the Primitives like string and boolean — can contain Extensions. An Extension can be composed of almost any data type — even the more complex ‘General Purpose’ ones.

This is by design.

So yes — there is a bit of the Wild West about FHIR.

More about data types: http://hl7.org/fhir/R4/datatypes.html

Example of a complex data type: http://hl7.org/fhir/R4/datatypes.html#timing

Discussion

---

Sign up to “The Tuesday FHIR Sessions” and receive an email every Tuesday where I go deep on a single FHIR topic.