Stream: hapi
Topic: Profile generation within RestfulServer
John Grimes (Feb 16 2018 at 01:17):
I am struggling to get profile generation working within a RestfulServer
that has a number of custom resource types (that are extensions of base resources). I can get the server to list the StructureDefinitions through the use of the @ProvidesResources
annotation, but the resources themselves are empty.
What annotations / configuration needs to be in place in order to compel HAPI to populate the StructureDefinitions themselves?
I have tried the documentation, and the restful-server-example
, but there doesn't appear to be an example which actually goes all the way to enabling this behaviour.
John Grimes (Apr 11 2018 at 00:44):
@James Agnew Would you have any ideas regarding the above question? We still haven't managed to work this out.
James Agnew (May 20 2018 at 20:42):
@John Grimes we don't really have an easy way to do this currently. Probably the best thing would be to override the ServerConformanceProvider and add your custom types manually.
Subramanya Kudithipudi (Oct 22 2019 at 13:07):
Hi,
I'm trying to implement FHIR Restful server in my existing sample Spring boot application.
I have used example from https://github.com/FirelyTeam/fhirstarters/tree/master/java/hapi-fhirstarters-simple-server.
Created @WebServlet(urlPatterns= {"/fhir/*"}, displayName="FHIR Server")
public class ExampleFhirServlet extends RestfulServer
Created patient provider resource class as mentioned in the example.
When I try http://localhost:8080/fhir/Patient/1 in the browser this is downloading the file instead of rendering in the browser. Also the result is in XML how do I change it to JSON format.
I tried with example project and that works fine.
How do I get this fixed in the spring boot application? Any help would be appreciated.
Thanks
Last updated: Apr 12 2022 at 19:14 UTC