Skip to main content

Quick Start

Create and query FHIR resources using the REST API.

Prerequisites

Start the server following the Installation Guide, then verify it's running:

curl http://localhost:8080/metadata

Create a Patient

curl -X POST http://localhost:8080/Patient \
-H "Content-Type: application/fhir+json" \
-d '{
"resourceType": "Patient",
"name": [{"family": "Smith", "given": ["John"]}],
"gender": "male",
"birthDate": "1990-05-15"
}'

Note the id in the response for subsequent requests.

Read

curl http://localhost:8080/Patient/{id}
curl "http://localhost:8080/Patient?family=Smith"

Update

curl -X PUT http://localhost:8080/Patient/{id} \
-H "Content-Type: application/fhir+json" \
-d '{
"resourceType": "Patient",
"id": "{id}",
"name": [{"family": "Smith", "given": ["John"]}],
"gender": "male",
"birthDate": "1990-05-15",
"telecom": [{"system": "phone", "value": "+1-555-0123"}]
}'

Delete

curl -X DELETE http://localhost:8080/Patient/{id}

Next Steps