Hi, we are trying out microsoft azure fhir server which uses Hl7.Fhir.STU3 by Ewout Kramer. We need to extend its default implementation. What would be the best practice? Create our own solution that derives from Hl7.Fhir.STU3, add our data elements and then reference this solution from azure fhir server?
Can you explain what you mean by âextendâ? With the built in extension capabilities of FHIR and the Basic resource, you should be able to represent any structure you like while remaining compliant and just leveraging the base STU3 model.
I am new to this so bear with me please. Letâs take Patient resource. Say it has 100 properties. I need to add 5 more. I was thinking of creating new class (e.g. MemberPatient) that derives from Patient and add 5 properties I need. Then I will serialize it and post to the server. Then when I query, i get MemberPatient back with my 5 custom properties.
Doing that is non-compliant. What you should do is use the built-in âextensionâ elements to convey your additional properties. Check out http://hl7.org/fhir/extensibility.html. If you serialize that way, everyone will be able to consume your instances and youâll be able to work with other software. If you change the syntax to add extra elements, youâre not actually using the standard and wonât work with other implementers or public test servers, reference implementations, etc.
Thank you Lloyd. It makes sense. What about resources that donât exist? Something that specific to our organization (at least for now). Is there a built-in capability for that? We are just trying to decide whether we can get away with using out-of-the-box server or get the source code and build new resources there.
The Basic resource is intended for that purpose - itâs a generic structure where you can define a code to say what it is and use extensions to define the properties.
Note that if you find something that you feel FHIR canât do, itâs always best to raise a question on chat.fhir.org because itâs possible the requirement is supported by a mechanism you didnât recognize or there might already be a âstandardâ extension defined for the purpose.
So what you are saying is that I donât need to make any customizations to default fhir server. And just like with extending existing resources, I can create new resources w/o any changes to default source code. If so, then when is default implementation is not enough?
The default implementation isnât going to enforce any business rules or authorization rules. Thatâs where changes are typically needed. However, in principle, the data structures shouldnât need to be changed. That doesnât mean that they canât be, but any data that youâre going to share with external systems should only use the defined resources and should leverage the Basic and extension mechanisms to satisfy needs specific to your implementation environment.