Skip to content
Reference

Adapter: athenahealth FHIR R4

Connect to athenahealth via FHIR R4 with 2-Legged OAuth (JWK) authentication.

On this page

Purpose

Search patients and read clinical summaries from athenahealth's FHIR R4 API.

Auth

  • Two-legged OAuth with a JWT signed by the profile's private key. SMART launch is optional.
  • It takes the shared connection options: a client certificate for mutual TLS, a private CA, a minimum TLS version and a proxy. They apply to its token requests too.

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
environmentenum: preview, productionNopreviewNo
privateKeyPEMstringYesYes
keyIdstringYesNo
clientIdstringYesNo
tokenUrlurlYesNo
fhirBaseUrlurlYesNo
practiceIdstringNoNo
smartEnabledbooleanNofalseNoEnable SMART on FHIR app launch protocol for this adapter profile.
smartRedirectUriurlNoNoOAuth2 redirect URI for SMART app launch (e.g., http://localhost:3000/api/auth/smart/callback (opens in a new tab)).
tlsCaPemstringNoYesPEM CA certificate(s) to verify the server against. See tlsCaMode.
tlsCaModeenum: replace, addNoNoTrust: replace = only this CA (default), add = the system CAs plus this CA. Needs tlsCaPem.
tlsClientCertPemstringNoYesPEM client certificate, for servers that require mutual TLS. Set with tlsClientKeyPem.
tlsClientKeyPemstringNoYesPEM private key for the client certificate (encrypted at rest).
tlsClientPfxstringNoYesClient certificate and key as a base64 PKCS#12 (.p12 / .pfx) bundle, instead of the PEM pair.
tlsClientPassphrasestringNoYesPassphrase of the PKCS#12 bundle.
tlsMinVersionenum: TLSv1.2, TLSv1.3NoNoLowest TLS version to accept (default TLSv1.2).
proxyUrlurlNoNoHTTP(S) proxy, e.g. http://proxy.example.test:3128 (opens in a new tab). The proxy host must pass the SSRF rules (SSRF_ALLOWLIST for a private one).
proxyUsernamestringNoNoProxy user (Basic auth).
proxyPasswordstringNoYesProxy password.
noProxyarray of stringNoNoHosts sent direct, not through the proxy: a name (and its subdomains), .suffix, host:port or *.

Actions

This adapter only reads or receives: a send step through it is refused. A trailing ? marks an optional step parameter.

ActionWhat it doesStep parametersKeys a message may supply
search-patientsSearch for patients (supports demographic search).identifier?, family?, given?, birthDate?, fhirId?, maxPages?id, resourceId, resourceType, patient, patientId, fhirId, identifier, name, family, given, birthdate, birthDate, date, category, status, practitioner, appointmentId, encounterId, documentId, queryParams
get-patient-summaryGet clinical summary for a patient.Noneid, resourceId, resourceType, patient, patientId, fhirId, identifier, name, family, given, birthdate, birthDate, date, category, status, practitioner, appointmentId, encounterId, documentId, queryParams
searchGeneric FHIR resource search.resourceType, searchParams?, maxPages?id, resourceId, resourceType, patient, patientId, fhirId, identifier, name, family, given, birthdate, birthDate, date, category, status, practitioner, appointmentId, encounterId, documentId, queryParams
readRead a specific FHIR resource by ID.resourceType, idid, 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": "athenahealth FHIR R4 (example)",
  "adapterType": "athena-fhir",
  "config": {
    "privateKeyPEM": "synthetic-secret",
    "keyId": "example-keyId",
    "clientId": "example-clientId",
    "tokenUrl": "https://athena-fhir.example.test/token",
    "fhirBaseUrl": "https://athena-fhir.example.test/fhirbase"
  }
}

Limits

  • Read-only: the send verbs are refused with a read-only error.
  • practiceId scopes requests to one practice when set.
  • The engine refuses a URL that resolves to a private address unless the host is in SSRF_ALLOWLIST (see Environment variables).

Reference