Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can someone explain FHIR extensions?

I've been trying to wrap my head around authoring profiles in FHIR. The trouble I'm having is around the use of using extensions.

The documentation talks about extensions as if they are simply just there to extend existing elements of the resource which a profile belongs to, this is kind of confirmed to me when using forge because I can add new elements which don't have extensions.

It feels very foreign to me as in our proprietary storage system, we have the equivalent of profiles, and they have properties about them (which I think are similar to elements in fhir), however a property is only designed to store one type of thing; e.g. you might have a patient profile that has the properties DOB, ethniticy, identifier, etc. I don't really understand what profiles are for in the context of fhir, are they similar to my properties? Can I use the to limit the datatype that a profile instance can have for a particular element?

Is there any better documentation than the spec? I'm finding it really hard to get to grips with.

like image 587
Andy Avatar asked Oct 17 '16 10:10

Andy


1 Answers

FHIR extensions are used to be able to enter extra data elements, when there's no field for that in the standard definition. Mother's maiden name is an example of that for the Patient resource. The use of an extension is a standard FHIR mechanism and will always look like this:

<extension>
    <url value="http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName"/>
    <valueString value="Williams"/>
</extension>

The url is the canonical url for the definition of the extension, which is a StructureDefinition resource defining the extension and the datatype(s) of the value. You can have extensions on every level of a resource/datatype.

Since profiling is a very overloaded term, it is hard for me to understand what you're saying about profiles and properties in your proprietary system, or how that relates to your question. But in general, FHIR profiling is needed and used to

  1. be able to add data when there's no data field for it in the specification (i.e. an extension of the specs)
  2. constrain the specification in places where you need to be more strict, for example to make an optional field mandatory (i.e. a constraint on the specs, also called a profile)

I recommend browsing through some of the profiles and their descriptions on the Simplifier repository to get an idea of why people are creating profiles on FHIR.

like image 69
Mirjam Baltus Avatar answered Jan 01 '23 09:01

Mirjam Baltus