arazzo: 1.0.1
info:
title: Medplum FHIR Resource CRUD
summary: Create a FHIR R4 resource, read it back by id, update it, then search the resource type for it.
description: >-
A generic FHIR RESTful API lifecycle against the Medplum FHIR R4 backend. A
resource of any type is created with the generic resource-type create
operation, read back by id, updated by id, and finally located through a
type-level search. This exercises the core HL7 FHIR R4 create, read, update,
and search interactions that underpin US Core and any other FHIR profile.
Every step inlines its request so the flow is self-contained.
version: 1.0.0
x-realizes-capability-ids:
- BC-2900.60
x-capability-derivation:
method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
min_confidence: 0.7
sources:
- capability_id: BC-2900.60
capability_name: Healthcare Interoperability Operations
spec: medplum-fhir-api-openapi.yml
confidence: 0.7
model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: fhirApi
url: ../openapi/medplum-fhir-api-openapi.yml
type: openapi
workflows:
- workflowId: fhir-resource-crud
summary: Create, read, update, and search a FHIR resource of a given type.
description: >-
Creates a FHIR R4 resource of the requested type, reads it by id, updates it,
and searches the resource type to confirm it is present.
inputs:
type: object
required:
- resourceType
- resource
- updatedResource
properties:
resourceType:
type: string
description: The FHIR resource type to operate on (e.g. Patient, Observation).
resource:
type: object
description: The FHIR R4 resource body to create.
updatedResource:
type: object
description: The FHIR R4 resource body to write on update.
steps:
- stepId: createResource
description: Create the FHIR resource of the requested type.
operationId: createResource
parameters:
- name: resourceType
in: path
value: $inputs.resourceType
requestBody:
contentType: application/fhir+json
payload: $inputs.resource
successCriteria:
- condition: $statusCode == 201
outputs:
resourceId: $response.body#/id
- stepId: readResource
description: Read the created resource back by id.
operationId: readResource
parameters:
- name: resourceType
in: path
value: $inputs.resourceType
- name: id
in: path
value: $steps.createResource.outputs.resourceId
successCriteria:
- condition: $statusCode == 200
outputs:
created: $response.body
- stepId: updateResource
description: Update the resource by id.
operationId: updateResource
parameters:
- name: resourceType
in: path
value: $inputs.resourceType
- name: id
in: path
value: $steps.createResource.outputs.resourceId
requestBody:
contentType: application/fhir+json
payload: $inputs.updatedResource
successCriteria:
- condition: $statusCode == 200
outputs:
updated: $response.body
- stepId: searchResources
description: Search the resource type to confirm the resource is present.
operationId: search
parameters:
- name: resourceType
in: path
value: $inputs.resourceType
successCriteria:
- condition: $statusCode == 200
outputs:
bundle: $response.body
outputs:
resourceId: $steps.createResource.outputs.resourceId
created: $steps.readResource.outputs.created
updated: $steps.updateResource.outputs.updated
bundle: $steps.searchResources.outputs.bundle
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.