To try this project out:
- Run the following command to compile the project and start a local testing server that runs it:
mvn jetty:run
-
Test that your server is running by fetching its CapabilityStatement:
-
Try reading back a resource from your server using the following URL:
-
Try reading back a resource that does not exist by using the following URL:
The responses to the Patient read operations above come from the resource provider called Example01_PatientResourceProvider.java
This project is intended to help you get started using the HAPI FHIR Plain Server project.
Have a look at the REST Operations: Overview documentation for some examples of how different kinds of FHIR operations in the server. You may also want to review the subsequent pages in the docs for even more examples.
-
Try adding support for create operation
- Use a REST tool (Postman, Insomnia) to invoke your create operation and read the same resource back
-
Add support for the delete operation
-
Add a simple Search operation where you can search by name. You could implement a very basic version of this where you simply loop through the Patient resources in memory and return those matching the given search term.
Hint: You can also look at HashMapResourceProvider for an example resource provider with many operations implemented (using a simple in-memory HashMap as the storage mechanism, so it's easy to follow).