For AI agents: the documentation index is at /docs/aidbox/llms.txt. A Markdown version of this page is available at /docs/aidbox/notebooks.md or by requesting it with the Accept: text/markdown header.
Aidbox Docs
All notebooks

Getting Started: Basic FHIR CRUD

This notebook will help you create, read, update, and delete resources in Aidbox using FHIR API

9 cells · updated May 13, 2025

This is a read-only view. Responses shown were saved when the notebook was published — open it in your own Aidbox to run the cells against live data.

Introduction

A resource is an object with a type, associated data, relationships to other resources, and a set of methods that operate on it (information about that can be found in FHIR specification or through Aidbox metadata). In most cases, a resource is represented as a JSON/YAML document.

Create Patient resource using FHIR API

REST Send Cells run only inside Aidbox. Use Run in Aidbox above to open this notebook in your own instance.
POST /fhir/Patient
content-type: text/yaml
accept: text/yaml

name: [{given: ["FhirBob"]}]
Response: Body
Status: 201
name:
- given: [FhirBob]
id: cb2629c4-2b54-46ad-92ae-0f12e1ff9e12
resourceType: Patient
meta:
  lastUpdated: '2024-06-10T16:46:12.692871Z'
  versionId: '1057'
  extension:
  - {url: 'ex:createdAt', valueInstant: '2024-06-10T16:46:12.692871Z'}

Get Patient Resource using FHIR API

REST Send Cells run only inside Aidbox. Use Run in Aidbox above to open this notebook in your own instance.
GET /fhir/Patient/cb2629c4-2b54-46ad-92ae-0f12e1ff9e12
content-type: text/yaml
accept: text/yaml
Response: Body
Status: 200
name:
- given: [FhirBob]
id: cb2629c4-2b54-46ad-92ae-0f12e1ff9e12
resourceType: Patient
meta:
  lastUpdated: '2024-06-10T16:46:12.692871Z'
  versionId: '1057'
  extension:
  - {url: 'ex:createdAt', valueInstant: '2024-06-10T16:46:12.692871Z'}

Update Patient resource using FHIR API

REST Send Cells run only inside Aidbox. Use Run in Aidbox above to open this notebook in your own instance.
PUT /fhir/Patient/cb2629c4-2b54-46ad-92ae-0f12e1ff9e12
content-type: text/yaml
accept: text/yaml

name: [{given: ["FhirBob"],
        family: "FhirFamily"}]
Response: Body
Status: 200
name:
- given: [FhirBob]
  family: FhirFamily
id: cb2629c4-2b54-46ad-92ae-0f12e1ff9e12
resourceType: Patient
meta:
  lastUpdated: '2024-06-10T16:47:42.827678Z'
  versionId: '1059'
  extension:
  - {url: 'ex:createdAt', valueInstant: '2024-06-10T16:46:12.692871Z'}

Delete Patient resource using FHIR API

REST Send Cells run only inside Aidbox. Use Run in Aidbox above to open this notebook in your own instance.
DELETE /fhir/Patient/cb2629c4-2b54-46ad-92ae-0f12e1ff9e12
Response: Body
Status: 200
{
  "name": [
    {
      "given": [
        "FhirBob"
      ],
      "family": "FhirFamily"
    }
  ],
  "id": "cb2629c4-2b54-46ad-92ae-0f12e1ff9e12",
  "resourceType": "Patient",
  "meta": {
    "lastUpdated": "2024-06-10T16:48:21.748922Z",
    "versionId": "1060",
    "extension": [
      {
        "url": "ex:createdAt",
        "valueInstant": "2024-06-10T16:48:21.748922Z"
      }
    ]
  }
}