Adapter: NextGen EHR FHIR R4
Connect to NextGen EHR (NextGen Office) via FHIR R4 using OAuth2 client credentials.
Purpose
Read patients, appointments, encounters and documents from NextGen Healthcare, and write observations.
Auth
- OAuth2 client credentials.
- 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.
| Setting | Type | Required | Default | Secret | Description |
|---|---|---|---|---|---|
baseUrl | url | Yes | No | ||
clientId | string | Yes | No | ||
clientSecret | string | Yes | Yes | ||
scope | string | No | No | ||
tlsCaPem | string | No | Yes | PEM CA certificate(s) to verify the server against. See tlsCaMode. | |
tlsCaMode | enum: replace, add | No | No | Trust: replace = only this CA (default), add = the system CAs plus this CA. Needs tlsCaPem. | |
tlsClientCertPem | string | No | Yes | PEM client certificate, for servers that require mutual TLS. Set with tlsClientKeyPem. | |
tlsClientKeyPem | string | No | Yes | PEM private key for the client certificate (encrypted at rest). | |
tlsClientPfx | string | No | Yes | Client certificate and key as a base64 PKCS#12 (.p12 / .pfx) bundle, instead of the PEM pair. | |
tlsClientPassphrase | string | No | Yes | Passphrase of the PKCS#12 bundle. | |
tlsMinVersion | enum: TLSv1.2, TLSv1.3 | No | No | Lowest TLS version to accept (default TLSv1.2). | |
proxyUrl | url | No | No | HTTP(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). | |
proxyUsername | string | No | No | Proxy user (Basic auth). | |
proxyPassword | string | No | Yes | Proxy password. | |
noProxy | array of string | No | No | Hosts sent direct, not through the proxy: a name (and its subdomains), .suffix, host:port or *. |
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.
| Action | What it does | Step parameters | Keys a message may supply |
|---|---|---|---|
read-patient | Read a single Patient resource by FHIR ID. | None | id, resourceId, resourceType, patient, patientId, fhirId, identifier, name, family, given, birthdate, birthDate, date, category, status, practitioner, appointmentId, encounterId, documentId, queryParams |
search-patients | Search for patients by name, date of birth, or identifier. | 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 |
search | Search any FHIR resource type. | resourceType, searchParams?, maxPages? | id, resourceId, resourceType, patient, patientId, fhirId, identifier, name, family, given, birthdate, birthDate, date, category, status, practitioner, appointmentId, encounterId, documentId, queryParams |
read | Read any FHIR resource by type and ID. | resourceType, id | id, resourceId, resourceType, patient, patientId, fhirId, identifier, name, family, given, birthdate, birthDate, date, category, status, practitioner, appointmentId, encounterId, documentId, queryParams |
read-appointment | Read a single Appointment resource by FHIR ID. | None | id, resourceId, resourceType, patient, patientId, fhirId, identifier, name, family, given, birthdate, birthDate, date, category, status, practitioner, appointmentId, encounterId, documentId, queryParams |
read-encounter | Read a single Encounter resource by FHIR ID. | None | id, resourceId, resourceType, patient, patientId, fhirId, identifier, name, family, given, birthdate, birthDate, date, category, status, practitioner, appointmentId, encounterId, documentId, queryParams |
read-document | Read a single DocumentReference resource by FHIR ID. | None | id, resourceId, resourceType, patient, patientId, fhirId, identifier, name, family, given, birthdate, birthDate, date, category, status, practitioner, appointmentId, encounterId, documentId, queryParams |
write-observation | Create an Observation resource (vital sign, lab result, etc.). | None | resource, bundle, observation, episodeOfCare, patientId, encounterId, documentId, noteContent, noteTitle, authorName, documentType |
create-resource | Create any FHIR resource from the input (the default send action), or post a transaction Bundle to the FHIR base URL. | None | resource, bundle, observation, episodeOfCare, patientId, encounterId, documentId, noteContent, noteTitle, authorName, documentType |
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.
{
"name": "NextGen EHR FHIR R4 (example)",
"adapterType": "nextgen-fhir",
"config": {
"baseUrl": "https://nextgen-fhir.example.test/base",
"clientId": "example-clientId",
"clientSecret": "synthetic-secret"
}
}Limits
- The send verbs
write,sendandpostrun the adapter's default send; the read verbsread,getandfetchread{resourceType}/{id}. An unknown action fails the step without sending anything. - The engine refuses a URL that resolves to a private address unless the host is in
SSRF_ALLOWLIST(see Environment variables).