FHIR Chat · custom resources · implementers

Stream: implementers

Topic: custom resources


view this post on Zulip Aaron (Jun 08 2018 at 17:14):

Hi all, I might have missed this in the specification but I couldn't figure out whether it is expected that implementers will define custom Resource Types by extending Domain Resource or just Resource. Is this level of freedom expected in situations where highly specialized needs must be met or is there an expectation that a system would only ever support a resource if it has been added to the official list?

Just to clarify, I'm asking if it would be acceptable to create http://myServer/MyEndpoint/myCustomResource rather than attempting to extend an existing resource as described by extensions and modifier extensions.

view this post on Zulip Igor Sirkovich (Jun 08 2018 at 17:34):

My understanding is that you are extending a Basic resource http://www.hl7.org/fhir/basic.html, which is based on DomainResource with a few additional common elements

view this post on Zulip Aaron (Jun 08 2018 at 17:46):

This is exactly what I was looking for. Not sure how I missed it. Thanks!

view this post on Zulip Lloyd McKenzie (Jun 08 2018 at 18:09):

At present, there's no ability to define your own resources. Profiling Basic and adding extensions for whatever elements you like is the current (somewhat ugly) solution. We're exploring allowing custom resources in a way that can actually be supported by reference servers and won't break reference implementations, but that's not landed yet.

view this post on Zulip Lloyd McKenzie (Jun 08 2018 at 18:10):

If you have something you'd like to see added to the spec, feel free to submit a change proposal.

view this post on Zulip Grahame Grieve (Jun 08 2018 at 20:11):

to be specific:

  • you can extend by adding your own resources that extend either of the abstract resources
  • HAPI as support for that
  • but we don't have a governance /policy or tooling framework for doing it, or any consensus of the community about its viability or goodnesss

view this post on Zulip Lloyd McKenzie (Jun 08 2018 at 21:32):

Can = technically possible, not "currently considered a conformant FHIR instance"

view this post on Zulip René Spronk (Aug 14 2018 at 12:47):

The above having been noted, I have to ask (because I have been, and will be asked in FHIR training courses that I provide): who has created Custom resources in their project, and why did you choose to do so instead of extending Basic? What (technical/tooling) stumbling blocks did you encounter ?
Please respond here or via DM, your feedback will be shared anonymously ;-)

view this post on Zulip lashan_123 (Sep 30 2019 at 15:47):

Hi all,
I'm trying to create a custom resource in my application, which should includes informations like the TNM staging system etc. in the Diagnosis. I don't know if I got it right in the documentation or if this chat is the right place to ask. Anyway, I would be very glad if I got help as a FHIR-newbie. :)
Is there already a resource for cancer classification and if not - am I correct in extending the Basic Resource or is it always the DomainResource? Is there a significant difference in the use of either of those resources (except of what's written on the homepage about Basic) ?

Thanks in advance!

view this post on Zulip Yunwei Wang (Sep 30 2019 at 15:57):

@lashan_123 Can you be more specific about your question?

view this post on Zulip Lloyd McKenzie (Sep 30 2019 at 16:04):

Typically you would use Condition and Observation for this sort of thing. If you define a custom resource, you won't be consistent with how other systems represent the same information, won't be FHIR-conformant and won't work well with FHIR tooling (validation tools, reference implementations, test servers, etc.)


Last updated: Apr 12 2022 at 19:14 UTC