Stream: implementers
Topic: Multiple custom resources that inherits from Basic
Johan Nicklasson (Nov 16 2020 at 15:56):
We have two custom resources that both inherits from the Basic resource. But how do we call these resources using the dotnet client? I tried to set up our server (Hapi) with two resource providers listening on /MyResource1 and /MyResource2.
The dotnet client app has a custom class inheriting from Basic. But that did not work since the parser in the dotnet library could not find a correct ClassMapper.
Has anyone had this problem and can share some tips?
Lloyd McKenzie (Nov 16 2020 at 15:59):
You might ask on #hapi
Johan Nicklasson (Nov 16 2020 at 16:02):
Ok. Even though I'm using the dotnet client?
Mareike Przysucha (Nov 16 2020 at 16:05):
There is also a #dotnet stream.
Johan Nicklasson (Nov 16 2020 at 16:07):
yes, I know. But thought it was a more generic question when using the basic resources in this way. But I'll give it a try there.
Lloyd McKenzie (Nov 16 2020 at 16:54):
(Sorry - saw 'hapi' and missed that the client was .net)
Michele Mottini (Nov 16 2020 at 16:56):
There is no inheriting - if you are using Basic that's what you have to request / search for
Michele Mottini (Nov 16 2020 at 16:57):
i.e. you searches are always [base]/Basic?. . .
for both of your derived resources
Johan Nicklasson (Nov 17 2020 at 13:53):
I understand. But using the Hapi server, you can create custom resources and expose them through custom endpoints.
i.e [base]/MyResource.
I was maybe using the wrong term when I said 'inheriting', but that's how we implement our custom resources in Hapi ( inheriting from Basic to be able to access the specific extensions as 'real' properties)
Michele Mottini (Nov 17 2020 at 14:16):
you can create custom resources and expose them through custom endpoints.
. . . that's no longer a FHIR server then, and standard FHIR libraries would not know how to access it.
Last updated: Apr 12 2022 at 19:14 UTC