How to add FHIR extension to Patient resource?

Hi,

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

Krystian

Answers

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?

Thanks

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 hl7.org site as XML or JSON:

http://hl7.org/fhir/DSTU2/examples.zip

http://hl7.org/fhir/DSTU2/examples-json.zip

And you can look through those for examples of 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

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.

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.

Thanks