Skip to content
Reference

Adapter: Medplum CDR

Read and write FHIR resources to the local Medplum Clinical Data Repository.

On this page

Purpose

Search, read, create and update resources on a Medplum FHIR server, by default the one in the engine's Compose stack.

Auth

  • Medplum client credentials (clientId and clientSecret).

Settings

Auth is no selector; the secret settings below are the credentials. Dotted names are fields inside an object setting. Secret settings are encrypted at rest, never returned by a read, and shown masked in the console and in exports; their defaults are not shown.

SettingTypeRequiredDefaultSecretDescription
baseUrlurlNohttp://medplum-server:8103NoMedplum server base URL.
clientIdstringYesNoMedplum OAuth2 client ID.
clientSecretstringYesYesMedplum OAuth2 client secret.

Actions

A trailing ? marks an optional step parameter. A message can supply only the keys in the last column; everything else comes from the step.

ActionWhat it doesStep parametersKeys a message may supply
searchSearch FHIR resources with query parameters.resourceType, queryParams?id, resourceId, resourceType, patient, patientId, fhirId, identifier, name, family, given, birthdate, birthDate, date, category, status, practitioner, appointmentId, encounterId, documentId, queryParams
readRead a FHIR resource by type and ID.resourceType, resourceIdid, resourceId, resourceType, patient, patientId, fhirId, identifier, name, family, given, birthdate, birthDate, date, category, status, practitioner, appointmentId, encounterId, documentId, queryParams
createCreate a new FHIR resource.resourceresource, bundle, observation, episodeOfCare, patientId, encounterId, documentId, noteContent, noteTitle, authorName, documentType
updateUpdate an existing FHIR resource.resourceresource, bundle, observation, episodeOfCare, patientId, encounterId, documentId, noteContent, noteTitle, authorName, documentType
import-bundleImport a FHIR Bundle (transaction or batch).bundleresource, bundle, observation, episodeOfCare, patientId, encounterId, documentId, noteContent, noteTitle, authorName, documentType
patient-everythingGet all data for a patient ($everything operation).patientIdid, resourceId, resourceType, patient, patientId, fhirId, identifier, name, family, given, birthdate, birthDate, date, category, status, practitioner, appointmentId, encounterId, documentId, queryParams

Minimal example

The smallest profile the engine accepts: the required settings only, with synthetic values. Create it with POST /api/adapter-profiles, then test it with POST /api/adapter-profiles/{id}/test.

json
{
  "name": "Medplum CDR (example)",
  "adapterType": "medplum",
  "config": {
    "clientId": "example-clientId",
    "clientSecret": "synthetic-secret"
  }
}

Limits

  • A Medplum server outside the stack is reached with the system CA store only: this adapter does not take the client certificate, private CA or proxy connection options.
  • import-bundle sends a transaction Bundle; patient-everything runs Patient/$everything.

Reference