‘Extending’ a ValueSet in a profile

In the last post we talked about ValueSets and CodeSystems – and in particular how the ValueSet can be thought of as the set of possible values from one or more CodeSystems for a particular element in a given context.

As you know, the spec provides ValueSets and bindings for all coded elements, and a common need when profiling is likely to be to ‘extend’ the set of possible values – take the contents already in the ValueSet and add others. What’s the best pattern to do that?

This thought was triggered when reviewing the new CareConnect profiles from the UK. This is an initiative being driven by the interOpen project (disclaimer: I’m a vendor representative to the board) and they have published an initial set of profiles and API’s (technically an Implementation Guide) which will going for ballot shortly by HL7 UK.

Take a look at the profile for the Condition resource. What you can see is that the Condition.category field is bound to a new ValueSet which takes the current values from the spec and adds a few others: (They also tightening the binding from ‘example’ to ‘extensible’, which makes sense).

Screen Shot 2017-07-20 at 9.03.06 am

(Here’s a screenshot of what it looks like when viewed in clinFHIR)


The interesting thing is that all of the actual values in this ValueSet point to concepts from a new Code System with the Url https://fhir-test.hl7.org.uk/CareConnect-ConditionCategory-1.

Now, there’s nothing wrong with this approach – but it could be improved.

Here’s the contents of the ValueSet from the spec:


(Note that it’s STU-2). You can clearly see that the values from the codesystem in this set have been duplicated in the CareConnect one – and so are now in a new system.

Why is this undesirable? Well it’s just that it takes a little away from semantic interoperability. We now have 2 codes for the ‘symptom’ concept. One from http://hl7.org/fhir/ValueSet/condition-category and one from https://fhir.hl7.org.uk/CareConnect-ConditionCategory-1 – but they both mean the same thing. More work for the consumer.

A better approach would be to define the contents of the CareConnect ValueSet as follows:

In this way, the 4 concepts that are in both ValueSets come from the same CodeSystem making it just that little bit easier for the consumers. (You could also argue that all of them should come from SNOMED – but I’m not going to go there!)

BTW – I’m not intending to criticize CareConnect – far from it! It’s great to see the sector coming together to do this work – with National buy-in – and to make the work publicly available for comment. These are issues that will arise very commonly by everyone involved in profiling FHIR and it’s great to be able to share the learnings and issues that arise with the FHIR community when doing so.

Indeed, one of the precepts for interOpen is to be – well – open, and this is a good example of that.

About David Hay
I'm an independent contractor working with a number of Organizations in the health IT space. I'm an HL7 Fellow, Chair Emeritus of HL7 New Zealand and a co-chair of the FHIR Management Group. I have a keen interest in health IT, especially health interoperability with HL7 and the FHIR standard. I'm the author of a FHIR training and design tool - clinFHIR - which is sponsored by InterSystems Ltd.

Leave a Reply

%d bloggers like this: