Handout · Cheat sheet
FHIR R4 — REST & Conformance
Interactions, Bundle types, status codes & a conformance checklist
Objective: Interact with a FHIR R4 server and recognise a conformant resource at a glance.
REST interactions
| Interaction | HTTP | URL | Returns |
|---|---|---|---|
| read | GET | /[Type]/[id] | the resource (+ ETag) |
| search | GET | /[Type]?param=value | searchset Bundle |
| create | POST | /[Type] | 201 Created + Location |
| update | PUT | /[Type]/[id] | 200, versionId bumped |
| patch | PATCH | /[Type]/[id] | partial update |
| delete | DELETE | /[Type]/[id] | 204 No Content |
| capability | GET | /metadata | CapabilityStatement |
Bundle types
- searchset — Results of a search — entry.search.mode = match | include.
- transaction — Atomic — every entry succeeds or all roll back.
- batch — Independent entries — each can succeed or fail on its own.
- document / collection — A fixed, signed set / a loose bag of resources.
Status codes
| Code | Meaning |
|---|---|
| 200 / 201 | OK / Created |
| 204 | No Content (delete) |
| 400 | Invalid resource / bad request |
| 401 / 403 | Not authenticated / not authorised |
| 404 | Unknown resource |
| 409 / 412 | Version conflict / ETag precondition failed |
Conformance checklist
- resourceType is present and a known type.
- Required elements set — Observation: status + code; MedicationRequest: status + intent + medication[x] + subject.
- status is a value from the resource's status value set.
- Every coding carries BOTH a system URI and a code.
- References look like Type/id (e.g. Patient/PAT-1).
- Quantities carry a value + a UCUM unit/code (system http://unitsofmeasure.org).
- Use meta.versionId / ETag (If-Match) for optimistic concurrency on update.
Practise this
Practised at HealthAtoms · healthatoms.com — synthetic, educational reference.