FHIR Chat · Custom Profiles on Basic · hapi

Stream: hapi

Topic: Custom Profiles on Basic


view this post on Zulip Ross Shnaper (Dec 08 2016 at 19:41):

I have 2 profiles for resources that are based on Basic. I have also implemented IResourceProvider with separate @Read annotations to fetch each specific resource. I can't seem to understand what needs to be supplied in the URL parameters for HAPI to differentiate between the two different resources and call the appropriate method. Any advice on this would be much appreciated.

view this post on Zulip James Agnew (Dec 08 2016 at 21:42):

Unfortunately this isn't actually supported right now.. If you have 2 @Read methods, the server will just use the first one. The only exception to this is if the second is marked version=true then a VRead client call (e.g. GET base/Patient/1/_history/1) will be routed to the second.

This kind of mirrors how FHIR works though. There isn't really a concept in FHIR of a "read by profile". When you do a read, you do it by ID and whatever profiles that read has are the ones that get returned. You can do a search by profile, is that what you're looking for?

view this post on Zulip Ross Shnaper (Dec 09 2016 at 03:51):

Thanks @James Agnew I wanted to verify that I'm not missing something obvious. I'll stick to using search with a profile parameter.


Last updated: Apr 12 2022 at 19:14 UTC