I am creating a HAPI FHIR Plain Server.
I manage to implement FHIR resource providers such as Patient, Encounter, ...
But I also want to be able to process FHIR Bundles of type transaction.
When I try to execute a "create" with a Bundle message to the HAPI Test Server (R4 FHIR) (
http://hapi.fhir.org/resource?serverId=home_r4&pretty=false&_summary=&resource=Bundle),
I get the message:
Warning!
Error: HTTP 422 Unprocessable Entity: HAPI-0522: Unable to store a Bundle resource on this server with a Bundle.type value of: transaction. Note that if you are trying to perform a FHIR transaction or batch operation you should POST the Bundle resource to the Base URL of the server, not to the /Bundle endpoint.
Indeed when a post the FHIR Bundle message of type transaction to the root URL (
http://hapi.fhir.org/baseR4), my bundle is treated successfuly. "response": {"status": "201 Created", ...}
I conclude that I should not use the Resource Providers and Plain Providers mechanism (
https://hapifhir.io/hapi-fhir/docs/server_plain/resource_providers.html) to process incoming bundles of type transaction.
What kind of HAPI FHIR mechanism, should I use?
Could you give me some guidance on to start my HAPI FHIR implementation?
I googled around but couldn't find any starting point.
Thanks in Advance
Joost