Krystian Wydrzynski · Sep 29, 2017

How to add FHIR extension to Patient resource?


What is the best practice when adding FHIR extension to Patient resource? To not to lose it when updating Patient base class etc.


2 2,653
Discussion (6)1
Log in or sign up to continue

Hi Krystian, are you referring to the "extension" property in the data model?  If so, then that is currently supported by FHIR repository in HealthShare.  Resources can be created in the repository with extensions and these will be saved.  I'm attaching an example of a patient resource that contains multiple extensions. Note that this is a DSTU2 resource, which is the FHIR version that HealthShare currently supports.  The current version of FHIR is STU3.  HealthShare will support this in a future release.

EDIT: I *thought* I could attach a file, but that seems not to be the case. In any event, you can download the FHIR DSTU2 examples directly from the site as XML or JSON:

And you can look through those for examples of extensions.

Hi Krystian,

I understand now, you mean you want to extend the FHIR data model, rather than use the "extension" property in the FHIR core spec.  Extending the data model is not something that is supported in the 15.03 release of HealthShare Core, but currently we are planning to support this in the next release.  However, even when this is supported, we will actually encourage users to use the "extension" property for simple extensions, rather than extending the data model.  This is a sentiment shared by much of the FHIR community, based on their collective experience with extensions.

Hi there,

I'm referring to new extensions. For example _birthDate or _randomExtension. I know the easiest way is to add them as a property of  HS.FHIR.Model.Resource.Patient, but I prefer to not to modify this class. Should I use HS.FHIR.Model.Base.DomainResource extension property for them?

Thanks for helping

Yes and no :-) I want to use the original extension property, but need few more properties in the Patient resource e.g. _myBirthDate. I wanted to add them without modify the original HS.FHIR.Model.Resource.Patient class As HS.FHIR.Model.Datatype.Integer so they inherits extension property.



When I was first exploring FHIR support In IRIS for Health I came across a very good Learning Services  Tutorial on the steps to add the extension to the FHIR Resource and then what you have to do to modify sda3 so that the FHIR STU3->SDA3 and the SDA3 -> FHIR STU3. However I did not bookmark the tutorial and despite searching Learning Services I cannot find that  tutorial.

If you know of any tutorial that covers this functionality please can you send me the link

Yours Hopefully

Nigel Salm

Hi Krystian,

I am checking to see if you have received the information that you wanted for this question.

If not, can you clarify whether you are asking about using the FHIR extension property, or about extending (i.e., sub-classing) existing HealthShare FHIR classes?